Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
fix: presences fanout fail on deleted set
Browse files Browse the repository at this point in the history
  • Loading branch information
AnatoleAM committed Dec 13, 2023
1 parent 2e5bb1b commit c270344
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions internal/svc/presences/presences.fanout.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,13 @@ func (p *inst) ChannelPresenceFanout(ctx context.Context, opt ChannelPresenceFan
}

// Fetch Emote Sets
sets, errs := p.loaders.EmoteSetByID().LoadAll(setIDs)
if multierror.Append(nil, errs...).ErrorOrNil() != nil {
return err
}
sets, _ := p.loaders.EmoteSetByID().LoadAll(setIDs)

for _, es := range sets {
if es.ID.IsZero() {
continue
}

es.Owner = nil

ent, ok := entMap[es.ID]
Expand All @@ -186,7 +187,7 @@ func (p *inst) ChannelPresenceFanout(ctx context.Context, opt ChannelPresenceFan
return x.ID
}),
)
if multierror.Append(nil, errs...).ErrorOrNil() != nil {
if err = multierror.Append(nil, errs...).ErrorOrNil(); err != nil {
zap.S().Errorw("failed to load emotes", "emote_set_id", es.ID, "errors", errs)

continue
Expand Down

0 comments on commit c270344

Please sign in to comment.