diff options
author | 2023-07-31 11:25:29 +0100 | |
---|---|---|
committer | 2023-07-31 11:25:29 +0100 | |
commit | ed2477ebea4c3ceec5949821f4950db9669a4a15 (patch) | |
tree | 1038d7abdfc787ddfc1febb326fd38775b189b85 /internal/db/relationship.go | |
parent | [bugfix/frontend] Decode URI component domain before showing on frontend (#2043) (diff) | |
download | gotosocial-ed2477ebea4c3ceec5949821f4950db9669a4a15.tar.xz |
[performance] cache follow, follow request and block ID lists (#2027)
Diffstat (limited to 'internal/db/relationship.go')
-rw-r--r-- | internal/db/relationship.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/db/relationship.go b/internal/db/relationship.go index e19aee646..6ba9fdf8c 100644 --- a/internal/db/relationship.go +++ b/internal/db/relationship.go @@ -21,6 +21,7 @@ import ( "context" "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" + "github.com/superseriousbusiness/gotosocial/internal/paging" ) // Relationship contains functions for getting or modifying the relationship between two accounts. @@ -166,6 +167,9 @@ type Relationship interface { // CountAccountFollowerRequests returns number of follow requests originating from the given account. CountAccountFollowRequesting(ctx context.Context, accountID string) (int, error) + // GetAccountBlocks returns all blocks originating from the given account, with given optional paging parameters. + GetAccountBlocks(ctx context.Context, accountID string, paging *paging.Pager) ([]*gtsmodel.Block, error) + // GetNote gets a private note from a source account on a target account, if it exists. GetNote(ctx context.Context, sourceAccountID string, targetAccountID string) (*gtsmodel.AccountNote, error) |