Other: Only send to necessary update channel

This commit is contained in:
James Houlahan
2022-11-30 13:53:20 +01:00
parent f355cb4d38
commit 71ad1e9939
2 changed files with 7 additions and 5 deletions

View File

@ -564,7 +564,7 @@ func (user *User) doEventPoll(ctx context.Context) error {
// Wait for all events to be applied.
safe.RLock(func() {
for _, updateCh := range user.updateCh {
for _, updateCh := range xslices.Unique(maps.Values(user.updateCh)) {
update := imap.NewNoop()
defer update.WaitContext(ctx)