fix status source test

This commit is contained in:
kim 2024-12-23 13:49:48 +00:00
commit f0f3bc52dc
3 changed files with 7 additions and 2 deletions

View file

@ -198,6 +198,11 @@ func (p *Processor) processContent(
poll.Options = status.PollOptions
}
// We may have received multiple copies of the same emoji, deduplicate these first.
status.Emojis = xslices.DeduplicateFunc(status.Emojis, func(e *gtsmodel.Emoji) string {
return e.ID
})
// Gather up the IDs of mentions from parsed content.
status.MentionIDs = xslices.Gather(nil, status.Mentions,
func(m *gtsmodel.Mention) string {

View file

@ -54,7 +54,7 @@ func (p *Processor) Create(
return nil, errWithCode
}
// Ensure account populated; we'll need settings.
// Ensure account populated; we'll need their settings.
if err := p.state.DB.PopulateAccount(ctx, requester); err != nil {
log.Errorf(ctx, "error(s) populating account, will continue: %s", err)
}