From 95875b13f829919b3453763628d1dda97371fab0 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Sun, 31 Mar 2019 12:17:57 -0400 Subject: Rename FetchMessageBodies to FetchFullMessages --- worker/imap/fetch.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'worker/imap/fetch.go') diff --git a/worker/imap/fetch.go b/worker/imap/fetch.go index feae462b..89c0d991 100644 --- a/worker/imap/fetch.go +++ b/worker/imap/fetch.go @@ -21,15 +21,6 @@ func (imapw *IMAPWorker) handleFetchMessageHeaders( imapw.handleFetchMessages(msg, &msg.Uids, items) } -func (imapw *IMAPWorker) handleFetchMessageBodies( - msg *types.FetchMessageBodies) { - - imapw.worker.Logger.Printf("Fetching message bodies") - section := &imap.BodySectionName{} - items := []imap.FetchItem{section.FetchItem()} - imapw.handleFetchMessages(msg, &msg.Uids, items) -} - func (imapw *IMAPWorker) handleFetchMessageBodyPart( msg *types.FetchMessageBodyPart) { @@ -42,6 +33,15 @@ func (imapw *IMAPWorker) handleFetchMessageBodyPart( imapw.handleFetchMessages(msg, &uids, items) } +func (imapw *IMAPWorker) handleFetchFullMessages( + msg *types.FetchFullMessages) { + + imapw.worker.Logger.Printf("Fetching full messages") + section := &imap.BodySectionName{} + items := []imap.FetchItem{section.FetchItem()} + imapw.handleFetchMessages(msg, &msg.Uids, items) +} + func (imapw *IMAPWorker) handleFetchMessages( msg types.WorkerMessage, uids *imap.SeqSet, items []imap.FetchItem) { @@ -64,7 +64,7 @@ func (imapw *IMAPWorker) handleFetchMessages( InternalDate: _msg.InternalDate, Uid: _msg.Uid, }, nil) - case *types.FetchMessageBodies: + case *types.FetchFullMessages: reader := _msg.GetBody(section) imapw.worker.PostMessage(&types.MessageBody{ Reader: reader, -- cgit