From c610c3cd9dd47c400e52c1858e987f5f32a7a45b Mon Sep 17 00:00:00 2001 From: Ben Burwell Date: Sun, 7 Jul 2019 22:43:58 -0400 Subject: 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. --- worker/imap/worker.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'worker/imap/worker.go') 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, }, -- cgit 1.4.1-2-gfad0