From 093cf2ab12a1f6bfa9629917101afffd2aeb8376 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Mon, 10 Apr 2023 21:56:02 +0200 Subject: [feature] Receive notification when followed account posts (if desired) (#1680) * start working on notifs for new posts * tidy up a bit * update swagger * carry over show reblogs + notify from follow req * test notify on status post * update column slice * dedupe update logic + add tests * fix own boosts not being timelined * avoid type check, passing unnecessary accounts * remove unnecessary 'inReplyToID' check * add a couple todo's for future db functions --- internal/db/notification.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'internal/db/notification.go') diff --git a/internal/db/notification.go b/internal/db/notification.go index fd3affe90..c4860093a 100644 --- a/internal/db/notification.go +++ b/internal/db/notification.go @@ -33,6 +33,10 @@ type Notification interface { // GetNotification returns one notification according to its id. GetNotificationByID(ctx context.Context, id string) (*gtsmodel.Notification, Error) + // GetNotification gets one notification according to the provided parameters, if it exists. + // Since not all notifications are about a status, statusID can be an empty string. + GetNotification(ctx context.Context, notificationType gtsmodel.NotificationType, targetAccountID string, originAccountID string, statusID string) (*gtsmodel.Notification, Error) + // PutNotification will insert the given notification into the database. PutNotification(ctx context.Context, notif *gtsmodel.Notification) error -- cgit v1.2.3