mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-10 04:36:43 +00:00
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
|
||||
}
|
||||
|
||||
if m.Sender == nil {
|
||||
m.Sender = &mail.Address{}
|
||||
}
|
||||
|
||||
m.Sender.Address = pmapi.ConstructAddress(m.Sender.Address, email)
|
||||
|
||||
draft, _, err := im.user.storeUser.CreateDraft(kr, m, readers, "", "", "")
|
||||
|
||||
@ -19,6 +19,7 @@ Feature: IMAP import messages
|
||||
"""
|
||||
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
|
||||
Scenario: Import message with attachment name encoded by RFC 2047 without quoting
|
||||
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 "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
|
||||
When IMAP client imports message to "INBOX"
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user