summaryrefslogtreecommitdiff
path: root/internal/db/status.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2023-07-24 13:14:13 +0100
committerLibravatar GitHub <noreply@github.com>2023-07-24 13:14:13 +0100
commit9eff0d46e49b947dc2642207ee49ed657eb6b565 (patch)
tree62994afff170737d83f1ed911e385504a0ad16cd /internal/db/status.go
parent[chore]: Bump github.com/microcosm-cc/bluemonday from 1.0.24 to 1.0.25 (#2021) (diff)
downloadgotosocial-9eff0d46e49b947dc2642207ee49ed657eb6b565.tar.xz
[feature/performance] support uncaching remote emoji + scheduled cleanup functions (#1987)
Diffstat (limited to 'internal/db/status.go')
-rw-r--r--internal/db/status.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/internal/db/status.go b/internal/db/status.go
index fdce19094..c0e330260 100644
--- a/internal/db/status.go
+++ b/internal/db/status.go
@@ -28,9 +28,6 @@ type Status interface {
// GetStatusByID returns one status from the database, with no rel fields populated, only their linking ID / URIs
GetStatusByID(ctx context.Context, id string) (*gtsmodel.Status, Error)
- // GetStatuses gets a slice of statuses corresponding to the given status IDs.
- GetStatuses(ctx context.Context, ids []string) ([]*gtsmodel.Status, Error)
-
// GetStatusByURI returns one status from the database, with no rel fields populated, only their linking ID / URIs
GetStatusByURI(ctx context.Context, uri string) (*gtsmodel.Status, Error)
@@ -58,6 +55,12 @@ type Status interface {
// CountStatusFaves returns the amount of faves/likes recorded for a status, or an error if something goes wrong
CountStatusFaves(ctx context.Context, status *gtsmodel.Status) (int, Error)
+ // GetStatuses gets a slice of statuses corresponding to the given status IDs.
+ GetStatusesByIDs(ctx context.Context, ids []string) ([]*gtsmodel.Status, error)
+
+ // GetStatusesUsingEmoji fetches all status models using emoji with given ID stored in their 'emojis' column.
+ GetStatusesUsingEmoji(ctx context.Context, emojiID string) ([]*gtsmodel.Status, error)
+
// GetStatusParents gets the parent statuses of a given status.
//
// If onlyDirect is true, only the immediate parent will be returned.