From a7b9572e6b7da243ecc43c10c73218fe2656aeeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20=C5=A0koda?=
Date: Mon, 11 May 2020 16:47:33 +0200 Subject: [PATCH] Fix reference parsing --- internal/imap/mailbox_message.go | 2 +- internal/smtp/user.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/imap/mailbox_message.go b/internal/imap/mailbox_message.go index 1f907d47..5b970461 100644 --- a/internal/imap/mailbox_message.go +++ b/internal/imap/mailbox_message.go @@ -151,7 +151,7 @@ func (im *imapMailbox) CreateMessage(flags []string, date time.Time, body imap.L re := regexp.MustCompile(pmapi.InternalReferenceFormat) match := re.FindStringSubmatch(lastReference) if len(match) > 0 { - internalID = match[1] + internalID = match[0] } } diff --git a/internal/smtp/user.go b/internal/smtp/user.go index 5381e8bc..a4541c67 100644 --- a/internal/smtp/user.go +++ b/internal/smtp/user.go @@ -375,7 +375,7 @@ func (su *smtpUser) handleReferencesHeader(m *pmapi.Message) (draftID, parentID } else { // internalid is the parentID. idMatch := regexp.MustCompile(pmapi.InternalReferenceFormat).FindStringSubmatch(reference) if len(idMatch) > 0 { - lastID := idMatch[1] + lastID := idMatch[0] filter := &pmapi.MessagesFilter{ID: []string{lastID}} if su.addressID != "" { filter.AddressID = su.addressID