GODT-1433 Message.Type is deprecated, use Flags instead.

This commit is contained in:
Jakub
2021-11-30 17:03:50 +01:00
parent 55beb9227f
commit a0dc764bb9
9 changed files with 50 additions and 45 deletions

View File

@ -370,7 +370,7 @@ func (storeMailbox *Mailbox) txCreateOrUpdateMessages(tx *bolt.Tx, msgs []*pmapi
// Draft bodies can change and bodies are not re-fetched by IMAP clients.
// Every change has to be a new message; we need to delete the old one and always recreate it.
if msg.Type == pmapi.MessageTypeDraft || msg.IsDraft() {
if msg.IsDraft() {
if err := storeMailbox.txDeleteMessage(tx, msg.ID); err != nil {
return errors.Wrap(err, "cannot delete old draft")
}