Skip to content

Commit

Permalink
fix(GODT-1954): Assign new message ID on delete+create
Browse files Browse the repository at this point in the history
We forgot to set the Internal Message ID for this case.
  • Loading branch information
LBeernaertProton committed Nov 3, 2022
1 parent 6072c69 commit 8bf679a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/backend/connector_updates.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ func (user *user) applyMessagesCreated(ctx context.Context, update *imap.Message
// need to delete the old message from the database first before we can insert the new one.
logrus.WithField("message-id", message.Message.ID.ShortID()).Debug("Message marked delete, will be replaced with new incoming message")
messagesToDelete = append(messagesToDelete, existingMessage.ID)
internalID = user.nextMessageID()
} else {
// Message exists, but has not been marked deleted, so we can't replace.
return nil
Expand Down

0 comments on commit 8bf679a

Please sign in to comment.