summaryrefslogtreecommitdiff
path: root/internal/cache/status.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/cache/status.go')
-rw-r--r--internal/cache/status.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/internal/cache/status.go b/internal/cache/status.go
index 1e92c9c63..9a698c608 100644
--- a/internal/cache/status.go
+++ b/internal/cache/status.go
@@ -91,7 +91,13 @@ func (c *StatusCache) getByID(id string) (*gtsmodel.Status, bool) {
if !ok {
return nil, false
}
- return copyStatus(v.(*gtsmodel.Status)), true
+
+ s, ok := v.(*gtsmodel.Status)
+ if !ok {
+ panic("status cache entry was not a status")
+ }
+
+ return copyStatus(s), true
}
// Put places a status in the cache, ensuring that the object place is a copy for thread-safety