From b46b497f99d7f4dcba8936ce0ebfe8cf982cec1f Mon Sep 17 00:00:00 2001 From: Ben Burwell Date: Thu, 4 Jul 2019 22:34:52 -0400 Subject: Factor UI models out of the worker message package Before, the information needed to display different parts of the UI was tightly coupled to the specific messages being sent back and forth to the backend worker. Separating out a models package allows us to be more specific about exactly what a backend is able to and required to provide for the UI. --- 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 78e5537..8d1a5bb 100644 --- a/worker/imap/worker.go +++ b/worker/imap/worker.go @@ -179,9 +179,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 v1.2.3