summaryrefslogtreecommitdiff
path: root/internal/db/notification.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-11-27 16:39:44 +0100
committerLibravatar GitHub <noreply@github.com>2023-11-27 15:39:44 +0000
commit33ee61575f2fc15c5a85c3fdbb3823a0cd22d25d (patch)
tree5e887d5ea5b828c84a1a9eb386bbaa07ad63a420 /internal/db/notification.go
parent[docs] Add docs about memory requirements and swap (#2385) (diff)
downloadgotosocial-33ee61575f2fc15c5a85c3fdbb3823a0cd22d25d.tar.xz
[bugfix] Don't copy ptr fields in caches (#2386)
Diffstat (limited to 'internal/db/notification.go')
-rw-r--r--internal/db/notification.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/db/notification.go b/internal/db/notification.go
index 5f8766252..ab8b5cc6d 100644
--- a/internal/db/notification.go
+++ b/internal/db/notification.go
@@ -37,6 +37,9 @@ type Notification interface {
// 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)
+ // PopulateNotification ensures that the notification's struct fields are populated.
+ PopulateNotification(ctx context.Context, notif *gtsmodel.Notification) error
+
// PutNotification will insert the given notification into the database.
PutNotification(ctx context.Context, notif *gtsmodel.Notification) error