Skip to content
Snippets Groups Projects

Gofunc for notify, set toSend properly, fix unsent handling

Merged Jonah Husson requested to merge hotfix/notification-list into release
1 file
+ 4
5
Compare changes
  • Side-by-side
  • Inline
@@ -206,11 +206,10 @@ func (nb *Impl) SendBatch(data map[int64][]*notifications.Data) ([]*notification
@@ -206,11 +206,10 @@ func (nb *Impl) SendBatch(data map[int64][]*notifications.Data) ([]*notification
if err != nil {
if err != nil {
return nil, errors.WithMessage(err, "Failed to get list of tokens to notify")
return nil, errors.WithMessage(err, "Failed to get list of tokens to notify")
}
}
for _, n := range toNotify {
for i := range toNotify {
tn := n
go func(res storage.GTNResult) {
go func() {
nb.notify(csvs[res.EphemeralId], res)
nb.notify(csvs[tn.EphemeralId], tn)
}(toNotify[i])
}()
}
}
return unsent, nil
return unsent, nil
}
}
Loading