summaryrefslogtreecommitdiff
path: root/internal/db/bundb/relationship_mute.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2024-07-31 16:03:34 +0200
committerLibravatar GitHub <noreply@github.com>2024-07-31 15:03:34 +0100
commit38f041cea1ba0cd3492f351353a29aa5b73e2731 (patch)
treebdd055d5cf7d9c06523c694cb4abe86d220960d0 /internal/db/bundb/relationship_mute.go
parent[feature] Object store custom URL (S3) (#3046) (diff)
downloadgotosocial-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_mute.go')
-rw-r--r--internal/db/bundb/relationship_mute.go5
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",