diff options
| author | 2024-07-31 16:03:34 +0200 | |
|---|---|---|
| committer | 2024-07-31 15:03:34 +0100 | |
| commit | 38f041cea1ba0cd3492f351353a29aa5b73e2731 (patch) | |
| tree | bdd055d5cf7d9c06523c694cb4abe86d220960d0 /internal/db/bundb/relationship.go | |
| parent | [feature] Object store custom URL (S3) (#3046) (diff) | |
| download | gotosocial-38f041cea1ba0cd3492f351353a29aa5b73e2731.tar.xz | |
[feature] Allow users to export data via the settings panel (#3140)
* [feature] Allow users to export data via the settings panel
* rename/move some stuff
Diffstat (limited to 'internal/db/bundb/relationship.go')
| -rw-r--r-- | internal/db/bundb/relationship.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/db/bundb/relationship.go b/internal/db/bundb/relationship.go index e3a4a2c0b..69b91f161 100644 --- a/internal/db/bundb/relationship.go +++ b/internal/db/bundb/relationship.go @@ -178,6 +178,11 @@ func (r *relationshipDB) GetAccountBlocks(ctx context.Context, accountID string, return r.GetBlocksByIDs(ctx, blockIDs) } +func (r *relationshipDB) CountAccountBlocks(ctx context.Context, accountID string) (int, error) { + blockIDs, err := r.GetAccountBlockIDs(ctx, accountID, nil) + return len(blockIDs), err +} + func (r *relationshipDB) GetAccountFollowIDs(ctx context.Context, accountID string, page *paging.Page) ([]string, error) { return loadPagedIDs(&r.state.Caches.DB.FollowIDs, ">"+accountID, page, func() ([]string, error) { var followIDs []string |
