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

@ -177,10 +177,8 @@ func (ctl *Controller) SetDraftBody(username string, messageID string, body stri
message.Body = body
// assuming this is draft we set following
// - Draft type (NOTE: Type is not part of pmapi.MessageEvent, but it's there on API)
// - It must not have FlagReceived and FlagSent
// - Standard labelsIDs NOTE:wrong behaviour once we will have edge case tests for drafts outside draft folder
message.Type = pmapi.MessageTypeDraft
message.Flags = pmapi.FlagE2E | pmapi.FlagInternal
message.LabelIDs = []string{pmapi.AllDraftsLabel, pmapi.AllMailLabel, pmapi.DraftLabel}