summary refs log tree commit diff stats
path: root/worker
diff options
context:
space:
mode:
Diffstat (limited to 'worker')
-rw-r--r--worker/imap/open.go9
-rw-r--r--worker/types/messages.go4
2 files changed, 4 insertions, 9 deletions
diff --git a/worker/imap/open.go b/worker/imap/open.go
index 0f25c5e..87c4fb3 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,
diff --git a/worker/types/messages.go b/worker/types/messages.go
index d44624d..3f1a39f 100644
--- a/worker/types/messages.go
+++ b/worker/types/messages.go
@@ -110,7 +110,7 @@ type DirectoryInfo struct {
 
 type DirectoryContents struct {
 	Message
-	Uids []uint64
+	Uids []uint32
 }
 
 type MessageInfo struct {
@@ -120,5 +120,5 @@ type MessageInfo struct {
 	InternalDate time.Time
 	Mail         *mail.Message
 	Size         uint32
-	Uid          uint64
+	Uid          uint32
 }