diff options
Diffstat (limited to 'internal/db/bundb/relationship_mute.go')
-rw-r--r-- | internal/db/bundb/relationship_mute.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/db/bundb/relationship_mute.go b/internal/db/bundb/relationship_mute.go index 94c51050d..a84aad546 100644 --- a/internal/db/bundb/relationship_mute.go +++ b/internal/db/bundb/relationship_mute.go @@ -77,6 +77,11 @@ func (r *relationshipDB) GetMute( ) } +func (r *relationshipDB) CountAccountMutes(ctx context.Context, accountID string) (int, error) { + muteIDs, err := r.getAccountMuteIDs(ctx, accountID, nil) + return len(muteIDs), err +} + func (r *relationshipDB) getMutesByIDs(ctx context.Context, ids []string) ([]*gtsmodel.UserMute, error) { // Load all mutes IDs via cache loader callbacks. mutes, err := r.state.Caches.DB.UserMute.LoadIDs("ID", |