diff --git a/services/protocols/internal/e2e/imap_idle_condstore_e2e_test.go b/services/protocols/internal/e2e/imap_idle_condstore_e2e_test.go index 2a32f55..ef1ab08 100644 --- a/services/protocols/internal/e2e/imap_idle_condstore_e2e_test.go +++ b/services/protocols/internal/e2e/imap_idle_condstore_e2e_test.go @@ -175,8 +175,8 @@ func TestImapIdleAndCondStoreEndToEnd(t *testing.T) { if err != nil { t.Fatalf("SEARCH FLAGGED: %v", err) } - if searchRes.Count != 1 { - t.Fatalf("SEARCH FLAGGED expected 1 result, got %d", searchRes.Count) + if len(searchRes.AllSeqNums()) != 1 { + t.Fatalf("SEARCH FLAGGED expected 1 result, got %d (all=%v)", len(searchRes.AllSeqNums()), searchRes.AllSeqNums()) } // --- IDLE test ----------------------------------------------------------- diff --git a/services/protocols/internal/presentation/imap/backend.go b/services/protocols/internal/presentation/imap/backend.go index 269c7cb..c870326 100644 --- a/services/protocols/internal/presentation/imap/backend.go +++ b/services/protocols/internal/presentation/imap/backend.go @@ -5,6 +5,7 @@ import ( "bytes" "context" "errors" + "log" "github.com/emersion/go-imap/v2" "github.com/emersion/go-imap/v2/imapserver" @@ -179,6 +180,8 @@ func (s *session) numSetIter(numSet imap.NumSet, messages []port.MessageRecord, if set != nil { contains = set.Contains(imap.UID(msg.UID)) } + default: + log.Printf("[DEBUG numSetIter] UNKNOWN numSet type: %T (val=%#v)", numSet, numSet) } if contains { f(seqNum, msg)