mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-17 15:46:44 +00:00
Fix reference parsing
This commit is contained in:
@ -151,7 +151,7 @@ func (im *imapMailbox) CreateMessage(flags []string, date time.Time, body imap.L
|
|||||||
re := regexp.MustCompile(pmapi.InternalReferenceFormat)
|
re := regexp.MustCompile(pmapi.InternalReferenceFormat)
|
||||||
match := re.FindStringSubmatch(lastReference)
|
match := re.FindStringSubmatch(lastReference)
|
||||||
if len(match) > 0 {
|
if len(match) > 0 {
|
||||||
internalID = match[1]
|
internalID = match[0]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -375,7 +375,7 @@ func (su *smtpUser) handleReferencesHeader(m *pmapi.Message) (draftID, parentID
|
|||||||
} else { // internalid is the parentID.
|
} else { // internalid is the parentID.
|
||||||
idMatch := regexp.MustCompile(pmapi.InternalReferenceFormat).FindStringSubmatch(reference)
|
idMatch := regexp.MustCompile(pmapi.InternalReferenceFormat).FindStringSubmatch(reference)
|
||||||
if len(idMatch) > 0 {
|
if len(idMatch) > 0 {
|
||||||
lastID := idMatch[1]
|
lastID := idMatch[0]
|
||||||
filter := &pmapi.MessagesFilter{ID: []string{lastID}}
|
filter := &pmapi.MessagesFilter{ID: []string{lastID}}
|
||||||
if su.addressID != "" {
|
if su.addressID != "" {
|
||||||
filter.AddressID = su.addressID
|
filter.AddressID = su.addressID
|
||||||
|
|||||||
Reference in New Issue
Block a user