diff options
author | Ben Burwell <ben@benburwell.com> | 2019-07-07 22:43:58 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-07-08 16:06:28 -0400 |
commit | c610c3cd9dd47c400e52c1858e987f5f32a7a45b (patch) | |
tree | 6e521ba706d87ea4a03ce81d57ff84317506f3df /worker/imap/fetch.go | |
parent | 88c379dcbaaf9fd549cd271817e79fe634b1dd84 (diff) | |
download | aerc-c610c3cd9dd47c400e52c1858e987f5f32a7a45b.tar.gz |
Factor IMAP-specific structs out of UI models
Before, we were using several IMAP-specific concepts to represent information being displayed in the UI. Factor these structures out of the IMAP package to make it easier for other backends to provide the required information.
Diffstat (limited to 'worker/imap/fetch.go')
-rw-r--r-- | worker/imap/fetch.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/worker/imap/fetch.go b/worker/imap/fetch.go index fe25977..1745ead 100644 --- a/worker/imap/fetch.go +++ b/worker/imap/fetch.go @@ -82,9 +82,9 @@ func (imapw *IMAPWorker) handleFetchMessages( imapw.worker.PostMessage(&types.MessageInfo{ Message: types.RespondTo(msg), Info: &models.MessageInfo{ - BodyStructure: _msg.BodyStructure, - Envelope: _msg.Envelope, - Flags: _msg.Flags, + BodyStructure: translateBodyStructure(_msg.BodyStructure), + Envelope: translateEnvelope(_msg.Envelope), + Flags: translateFlags(_msg.Flags), InternalDate: _msg.InternalDate, RFC822Headers: header, Uid: _msg.Uid, @@ -103,7 +103,7 @@ func (imapw *IMAPWorker) handleFetchMessages( imapw.worker.PostMessage(&types.MessageInfo{ Message: types.RespondTo(msg), Info: &models.MessageInfo{ - Flags: _msg.Flags, + Flags: translateFlags(_msg.Flags), Uid: _msg.Uid, }, }, nil) @@ -120,7 +120,7 @@ func (imapw *IMAPWorker) handleFetchMessages( imapw.worker.PostMessage(&types.MessageInfo{ Message: types.RespondTo(msg), Info: &models.MessageInfo{ - Flags: _msg.Flags, + Flags: translateFlags(_msg.Flags), Uid: _msg.Uid, }, }, nil) |