Fix reference parsing

This commit is contained in:
Pavel Škoda 2020-05-11 16:47:33 +02:00 committed by Pavel Škoda
parent 4090c490b1
commit a7b9572e6b
2 changed files with 2 additions and 2 deletions

View File

@ -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]
}
}

View File

@ -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