mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-12 13:46:43 +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
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if update == nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
|
||||||
return []imap.Update{update}, nil
|
return []imap.Update{update}, nil
|
||||||
}, user.apiUserLock, user.apiAddrsLock, user.apiLabelsLock, user.updateChLock)
|
}, user.apiUserLock, user.apiAddrsLock, user.apiLabelsLock, user.updateChLock)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user