fix: properly find parent id

This commit is contained in:
James Houlahan
2020-05-27 16:47:50 +02:00
parent 1ba319bb69
commit 2919d1a3c0
2 changed files with 2 additions and 1 deletions

View File

@ -15,6 +15,7 @@ Changelog [format](http://keepachangelog.com/en/1.0.0/)
* GODT-356 Fix crash when removing account while mail client is fetching messages (regression from GODT-204).
* GODT-390 Don't logout user if AuthRefresh fails because internet was off.
* GODT-358 Bad timeouts with Alternative Routing
* GODT-363 Drafts are not deleted when already created on webapp.
* GODT-390 Don't logout user if AuthRefresh fails because internet was off
* GODT-341 Fixed flaky unittest for Store synchronization cooldown

View File

@ -379,7 +379,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[0]
lastID := strings.TrimSuffix(strings.Trim(idMatch[0], "<>"), "@protonmail.internalid")
filter := &pmapi.MessagesFilter{ID: []string{lastID}}
if su.addressID != "" {
filter.AddressID = su.addressID