[bugfix] Missing emoji urls (#3707)

* filter out emoji that are uncached when converting to frontend models

* some very small fixups

* remove TODO notice
This commit is contained in:
kim 2025-01-30 12:52:03 +00:00 committed by GitHub
commit 91cef3495d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 32 additions and 11 deletions

View file

@ -104,13 +104,14 @@ func (e *Emoji) UncacheRemote(ctx context.Context, olderThan time.Time) (int, er
return total, gtserror.Newf("error getting remote emoji: %w", err)
}
// If no emojis / same group is returned, we reached the end.
// If no emojis / same group is
// returned, we reached the end.
if len(emojis) == 0 ||
olderThan.Equal(emojis[len(emojis)-1].CreatedAt) {
break
}
// Use last created-at as the next 'olderThan' value.
// Use last createdAt as next 'olderThan' value.
olderThan = emojis[len(emojis)-1].CreatedAt
for _, emoji := range emojis {