fix(GODT-2573): Crash on null update

Ensure that if we don't produce an update we don't construct an update
array with nil values.
This commit is contained in:
Leander Beernaert
2023-04-11 10:36:26 +02:00
parent a6f5cc870c
commit 098f294cac

View File

@ -635,6 +635,10 @@ func (user *User) handleCreateMessageEvent(ctx context.Context, message proton.M
return nil, err
}
if update == nil {
return nil, nil
}
return []imap.Update{update}, nil
}, user.apiUserLock, user.apiAddrsLock, user.apiLabelsLock, user.updateChLock)
}