summaryrefslogtreecommitdiff
path: root/internal/db/notification.go
diff options
context:
space:
mode:
authorLibravatar Artémis <diane@artemix.org>2022-08-01 11:13:49 +0200
committerLibravatar GitHub <noreply@github.com>2022-08-01 11:13:49 +0200
commit4fdbef04b4ae41e6193d4f4416c83edf91e1bfb7 (patch)
treef28b7d40c38ee6b83ae5ff386cf25dc55ed0e157 /internal/db/notification.go
parentserve HEAD requests via the fileserver (#735) (diff)
downloadgotosocial-4fdbef04b4ae41e6193d4f4416c83edf91e1bfb7.tar.xz
[feature] Implemented notification clear (#720)
* Implemented notification clear * Added the cache clear mechanism * added multi user check test
Diffstat (limited to 'internal/db/notification.go')
-rw-r--r--internal/db/notification.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/db/notification.go b/internal/db/notification.go
index d8291ae51..7d8258d93 100644
--- a/internal/db/notification.go
+++ b/internal/db/notification.go
@@ -32,4 +32,6 @@ type Notification interface {
GetNotifications(ctx context.Context, accountID string, limit int, maxID string, sinceID string) ([]*gtsmodel.Notification, Error)
// GetNotification returns one notification according to its id.
GetNotification(ctx context.Context, id string) (*gtsmodel.Notification, Error)
+ // ClearNotifications deletes every notification that pertain to the given accountID.
+ ClearNotifications(ctx context.Context, accountID string) Error
}