mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-10 12:46:46 +00:00
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:
@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user