summaryrefslogtreecommitdiff
path: root/internal/db/status.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/db/status.go')
-rw-r--r--internal/db/status.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/internal/db/status.go b/internal/db/status.go
index 88ae12a12..ade900728 100644
--- a/internal/db/status.go
+++ b/internal/db/status.go
@@ -78,4 +78,16 @@ type Status interface {
// GetStatusChildren gets the child statuses of a given status.
GetStatusChildren(ctx context.Context, statusID string) ([]*gtsmodel.Status, error)
+
+ // MaxDirectStatusID returns the newest ID across all DM statuses.
+ // Returns the empty string with no error if there are no DM statuses yet.
+ // It is used only by the conversation advanced migration.
+ MaxDirectStatusID(ctx context.Context) (string, error)
+
+ // GetDirectStatusIDsBatch returns up to count DM status IDs strictly greater than minID
+ // and less than or equal to maxIDInclusive. Note that this is different from most of our paging,
+ // which uses a maxID and returns IDs strictly less than that, because it's called with the result of
+ // MaxDirectStatusID, and expects to eventually return the status with that ID.
+ // It is used only by the conversation advanced migration.
+ GetDirectStatusIDsBatch(ctx context.Context, minID string, maxIDInclusive string, count int) ([]string, error)
}