[bugfix] more little edit fixes (#3633)

* fix slice size calculation

* stop attached status edit slice getting cached
This commit is contained in:
kim 2024-12-31 09:44:07 +00:00 committed by GitHub
parent 6b727404be
commit 29da5b35a5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View file

@ -1320,6 +1320,7 @@ func (c *Caches) initStatus() {
s2.Mentions = nil s2.Mentions = nil
s2.Emojis = nil s2.Emojis = nil
s2.CreatedWithApplication = nil s2.CreatedWithApplication = nil
s2.Edits = nil
return s2 return s2
} }

View file

@ -281,7 +281,7 @@ func (s *Status) AllAttachmentIDs() []string {
} }
// Get count of attachment IDs. // Get count of attachment IDs.
total += len(s.Attachments) total += len(s.AttachmentIDs)
for _, edit := range s.Edits { for _, edit := range s.Edits {
total += len(edit.AttachmentIDs) total += len(edit.AttachmentIDs)
} }