diff options
Diffstat (limited to 'internal/db/bundb/notification.go')
-rw-r--r-- | internal/db/bundb/notification.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/internal/db/bundb/notification.go b/internal/db/bundb/notification.go index e030cc623..d01bb9067 100644 --- a/internal/db/bundb/notification.go +++ b/internal/db/bundb/notification.go @@ -114,7 +114,13 @@ func (n *notificationDB) getNotificationCache(id string) (*gtsmodel.Notification if !ok { return nil, false } - return v.(*gtsmodel.Notification), true + + notif, ok := v.(*gtsmodel.Notification) + if !ok { + panic("notification cache entry was not a notification") + } + + return notif, true } func (n *notificationDB) putNotificationCache(notif *gtsmodel.Notification) { |