mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-11 05:06:51 +00:00
GODT-2226: Fix moving drafts to trash
Only handle draft updates if the event was a message update. Also includes Gluon update.
This commit is contained in:
@ -409,8 +409,9 @@ func (user *User) handleMessageEvents(ctx context.Context, messageEvents []proto
|
||||
}
|
||||
|
||||
case proton.EventUpdate, proton.EventUpdateFlags:
|
||||
// Draft update means to completely remove old message and upload the new data again.
|
||||
if event.Message.IsDraft() {
|
||||
// Draft update means to completely remove old message and upload the new data again, but we should
|
||||
// only do this if the event is of type EventUpdate otherwise label switch operations will not work.
|
||||
if event.Message.IsDraft() && event.Action == proton.EventUpdate {
|
||||
if err := user.handleUpdateDraftEvent(
|
||||
logging.WithLogrusField(ctx, "action", "update draft"),
|
||||
event,
|
||||
|
||||
Reference in New Issue
Block a user