diff options
author | Drew DeVault <sir@cmpwn.com> | 2019-03-14 21:51:29 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-03-14 21:51:29 -0400 |
commit | 11f0a7267fd1a9d1c6dd55e1dc044b8ed639bbc0 (patch) | |
tree | 80e2456edadfdcd7c6a8e02ab4830c1139816174 /worker/imap/open.go | |
parent | 0f8b7a1203309ebec0dc78baf3f195671eadac2d (diff) | |
download | aerc-11f0a7267fd1a9d1c6dd55e1dc044b8ed639bbc0.tar.gz |
Implement message store side of message fetching
Diffstat (limited to 'worker/imap/open.go')
-rw-r--r-- | worker/imap/open.go | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/worker/imap/open.go b/worker/imap/open.go index 0f25c5e0..87c4fb33 100644 --- a/worker/imap/open.go +++ b/worker/imap/open.go @@ -29,7 +29,7 @@ func (imapw *IMAPWorker) handleFetchDirectoryContents( go func() { seqSet := &imap.SeqSet{} seqSet.AddRange(1, imapw.selected.Messages) - uid32, err := imapw.client.UidSearch(&imap.SearchCriteria{ + uids, err := imapw.client.UidSearch(&imap.SearchCriteria{ SeqNum: seqSet, }) if err != nil { @@ -38,12 +38,7 @@ func (imapw *IMAPWorker) handleFetchDirectoryContents( Error: err, }, nil) } else { - imapw.worker.Logger.Printf("Found %d UIDs", len(uid32)) - var uids []uint64 - for _, uid := range uid32 { - uids = append(uids, - (uint64(imapw.selected.UidValidity)<<32)|uint64(uid)) - } + imapw.worker.Logger.Printf("Found %d UIDs", len(uids)) imapw.worker.PostMessage(&types.DirectoryContents{ Message: types.RespondTo(msg), Uids: uids, |