diff options
Diffstat (limited to 'internal/cache/account.go')
-rw-r--r-- | internal/cache/account.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/internal/cache/account.go b/internal/cache/account.go index 98f1684a4..02ec71503 100644 --- a/internal/cache/account.go +++ b/internal/cache/account.go @@ -91,7 +91,13 @@ func (c *AccountCache) getByID(id string) (*gtsmodel.Account, bool) { if !ok { return nil, false } - return copyAccount(v.(*gtsmodel.Account)), true + + a, ok := v.(*gtsmodel.Account) + if !ok { + panic("account cache entry was not an account") + } + + return copyAccount(a), true } // Put places a account in the cache, ensuring that the object place is a copy for thread-safety |