GODT-1817: Port over missing IMAP copy feature test

This commit is contained in:
Leander Beernaert
2022-12-22 15:34:48 +01:00
parent e3a1482b8f
commit e9e59a2704
4 changed files with 56 additions and 111 deletions

View File

@ -46,7 +46,8 @@ type Message struct {
CC string `bdd:"cc"`
BCC string `bdd:"bcc"`
Unread bool `bdd:"unread"`
Unread bool `bdd:"unread"`
Deleted bool `bdd:"deleted"`
}
func (msg Message) Build() []byte {
@ -113,6 +114,7 @@ func newMessageFromIMAP(msg *imap.Message) Message {
Attachments: strings.Join(xslices.Map(m.Attachments, func(att message.Attachment) string { return att.Name }), ", "),
MessageID: msg.Envelope.MessageId,
Unread: !slices.Contains(msg.Flags, imap.SeenFlag),
Deleted: !slices.Contains(msg.Flags, imap.DeletedFlag),
}
if len(msg.Envelope.From) > 0 {