summaryrefslogtreecommitdiff
path: root/internal/db/db.go
diff options
context:
space:
mode:
authorLibravatar Tobi Smethurst <31960611+tsmethurst@users.noreply.github.com>2021-05-31 17:36:35 +0200
committerLibravatar GitHub <noreply@github.com>2021-05-31 17:36:35 +0200
commit6ac6f8d614d17910d929981bde7d80d8ec2c0b6e (patch)
treee7a51ba572a7cc880bbc22dacb999236ac6e36e6 /internal/db/db.go
parentMove a lot of stuff + tidy stuff (#37) (diff)
downloadgotosocial-6ac6f8d614d17910d929981bde7d80d8ec2c0b6e.tar.xz
Tidy + timeline embetterment (#38)
* tidy up timelines a bit + stub out some endpoints * who's faved and who's boosted, reblog notifs * linting * Update progress with new endpoints
Diffstat (limited to 'internal/db/db.go')
-rw-r--r--internal/db/db.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/internal/db/db.go b/internal/db/db.go
index 31a8ba5d9..1774420c6 100644
--- a/internal/db/db.go
+++ b/internal/db/db.go
@@ -253,12 +253,20 @@ type DB interface {
// This slice will be unfiltered, not taking account of blocks and whatnot, so filter it before serving it back to a user.
WhoFavedStatus(status *gtsmodel.Status) ([]*gtsmodel.Account, error)
+ // WhoBoostedStatus returns a slice of accounts who boosted the given status.
+ // This slice will be unfiltered, not taking account of blocks and whatnot, so filter it before serving it back to a user.
+ WhoBoostedStatus(status *gtsmodel.Status) ([]*gtsmodel.Account, error)
+
// GetHomeTimelineForAccount fetches the account's HOME timeline -- ie., posts and replies from people they *follow*.
// It will use the given filters and try to return as many statuses up to the limit as possible.
GetHomeTimelineForAccount(accountID string, maxID string, sinceID string, minID string, limit int, local bool) ([]*gtsmodel.Status, error)
+ // GetPublicTimelineForAccount fetches the account's PUBLIC timline -- ie., posts and replies that are public.
+ // It will use the given filters and try to return as many statuses as possible up to the limit.
+ GetPublicTimelineForAccount(accountID string, maxID string, sinceID string, minID string, limit int, local bool) ([]*gtsmodel.Status, error)
+
// GetNotificationsForAccount returns a list of notifications that pertain to the given accountID.
- GetNotificationsForAccount(accountID string, limit int, maxID string) ([]*gtsmodel.Notification, error)
+ GetNotificationsForAccount(accountID string, limit int, maxID string, sinceID string) ([]*gtsmodel.Notification, error)
/*
USEFUL CONVERSION FUNCTIONS