mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-11 13:16:53 +00:00
GODT-2196: Do not generate message updates for unknown labels
During sync a user may continue to perform operations on the server it is possible we run into a message which has a labelID we are not aware of. To counter this we issue `CreateMessage` updates with `IgnoreUnknownMailboxIDs` set to true. Eventually, after sync the state will resolve itself with events.
This commit is contained in:
@ -464,7 +464,7 @@ func (user *User) handleCreateMessageEvent(ctx context.Context, event proton.Mes
|
||||
user.log.WithError(err).Error("Failed to remove failed message ID from vault")
|
||||
}
|
||||
|
||||
user.updateCh[full.AddressID].Enqueue(imap.NewMessagesCreated(res.update))
|
||||
user.updateCh[full.AddressID].Enqueue(imap.NewMessagesCreated(false, res.update))
|
||||
|
||||
return nil
|
||||
})
|
||||
|
||||
@ -47,7 +47,7 @@ func (f *flusher) push(update *imap.MessageCreated) {
|
||||
|
||||
func (f *flusher) flush() {
|
||||
if len(f.updates) > 0 {
|
||||
f.updateCh.Enqueue(imap.NewMessagesCreated(f.updates...))
|
||||
f.updateCh.Enqueue(imap.NewMessagesCreated(true, f.updates...))
|
||||
f.updates = nil
|
||||
f.curChunkSize = 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user