From 4fdbef04b4ae41e6193d4f4416c83edf91e1bfb7 Mon Sep 17 00:00:00 2001 From: Artémis Date: Mon, 1 Aug 2022 11:13:49 +0200 Subject: [feature] Implemented notification clear (#720) * Implemented notification clear * Added the cache clear mechanism * added multi user check test --- internal/processing/notification.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'internal/processing/notification.go') diff --git a/internal/processing/notification.go b/internal/processing/notification.go index 9b99141a6..66b967afa 100644 --- a/internal/processing/notification.go +++ b/internal/processing/notification.go @@ -58,3 +58,12 @@ func (p *processor) NotificationsGet(ctx context.Context, authed *oauth.Auth, li Limit: limit, }) } + +func (p *processor) NotificationsClear(ctx context.Context, authed *oauth.Auth) gtserror.WithCode { + err := p.db.ClearNotifications(ctx, authed.Account.ID) + if err != nil { + return gtserror.NewErrorInternalError(err) + } + + return nil +} -- cgit v1.2.3