summaryrefslogtreecommitdiff
path: root/internal/db/bundb/mention.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/db/bundb/mention.go')
-rw-r--r--internal/db/bundb/mention.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/internal/db/bundb/mention.go b/internal/db/bundb/mention.go
index a93a5cef6..1c1c25c4b 100644
--- a/internal/db/bundb/mention.go
+++ b/internal/db/bundb/mention.go
@@ -46,7 +46,13 @@ func (m *mentionDB) getMentionCached(id string) (*gtsmodel.Mention, bool) {
if !ok {
return nil, false
}
- return v.(*gtsmodel.Mention), true
+
+ mention, ok := v.(*gtsmodel.Mention)
+ if !ok {
+ panic("mention cache entry was not a mention")
+ }
+
+ return mention, true
}
func (m *mentionDB) putMentionCache(mention *gtsmodel.Mention) {