summary refs log tree commit diff stats
path: root/worker/imap/worker.go
diff options
context:
space:
mode:
authorBen Burwell <ben@benburwell.com>2019-07-07 22:43:58 -0400
committerDrew DeVault <sir@cmpwn.com>2019-07-08 16:06:28 -0400
commitc610c3cd9dd47c400e52c1858e987f5f32a7a45b (patch)
tree6e521ba706d87ea4a03ce81d57ff84317506f3df /worker/imap/worker.go
parent88c379dcbaaf9fd549cd271817e79fe634b1dd84 (diff)
downloadaerc-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/worker.go')
-rw-r--r--worker/imap/worker.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/worker/imap/worker.go b/worker/imap/worker.go
index 9ddaa47..88f8b37 100644
--- a/worker/imap/worker.go
+++ b/worker/imap/worker.go
@@ -187,9 +187,9 @@ func (w *IMAPWorker) handleImapUpdate(update client.Update) {
 		}
 		w.worker.PostMessage(&types.MessageInfo{
 			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,
 				Uid:           msg.Uid,
 			},