forked from Silverfish/proton-bridge
GODT-1189 GODT-1190 GODT-1191 Fix missing sender while creating draft.
This commit is contained in:
@ -132,6 +132,10 @@ func (im *imapMailbox) createDraftMessage(kr *crypto.KeyRing, email string, body
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if m.Sender == nil {
|
||||||
|
m.Sender = &mail.Address{}
|
||||||
|
}
|
||||||
|
|
||||||
m.Sender.Address = pmapi.ConstructAddress(m.Sender.Address, email)
|
m.Sender.Address = pmapi.ConstructAddress(m.Sender.Address, email)
|
||||||
|
|
||||||
draft, _, err := im.user.storeUser.CreateDraft(kr, m, readers, "", "", "")
|
draft, _, err := im.user.storeUser.CreateDraft(kr, m, readers, "", "", "")
|
||||||
|
|||||||
@ -19,6 +19,7 @@ Feature: IMAP import messages
|
|||||||
"""
|
"""
|
||||||
Then IMAP response is "OK"
|
Then IMAP response is "OK"
|
||||||
|
|
||||||
|
# I could not find any RFC why this is not valid. But for now our parser is not able to process it.
|
||||||
@ignore
|
@ignore
|
||||||
Scenario: Import message with attachment name encoded by RFC 2047 without quoting
|
Scenario: Import message with attachment name encoded by RFC 2047 without quoting
|
||||||
When IMAP client imports message to "INBOX"
|
When IMAP client imports message to "INBOX"
|
||||||
@ -118,6 +119,25 @@ Feature: IMAP import messages
|
|||||||
And API mailbox "INBOX" for "user" has 0 message
|
And API mailbox "INBOX" for "user" has 0 message
|
||||||
And API mailbox "Sent" for "user" has 1 message
|
And API mailbox "Sent" for "user" has 1 message
|
||||||
|
|
||||||
|
Scenario Outline: Import message without sender
|
||||||
|
When IMAP client imports message to "<mailbox>"
|
||||||
|
"""
|
||||||
|
To: Lionel Richie <lionel@richie.com>
|
||||||
|
Subject: RE: Hello, is it me you looking for?
|
||||||
|
|
||||||
|
Nope.
|
||||||
|
|
||||||
|
"""
|
||||||
|
Then IMAP response is "OK"
|
||||||
|
And API mailbox "<mailbox>" for "user" has 1 message
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
| mailbox |
|
||||||
|
| Drafts |
|
||||||
|
| Archive |
|
||||||
|
| Sent |
|
||||||
|
|
||||||
|
|
||||||
Scenario: Import embedded message
|
Scenario: Import embedded message
|
||||||
When IMAP client imports message to "INBOX"
|
When IMAP client imports message to "INBOX"
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user