Simplify references parsing

This commit is contained in:
Pavel Škoda
2020-05-11 10:39:54 +02:00
committed by Pavel Škoda
parent 4a8d07d54e
commit 2639f7333e
3 changed files with 5 additions and 5 deletions

View File

@ -148,7 +148,7 @@ func (im *imapMailbox) CreateMessage(flags []string, date time.Time, body imap.L
if len(referenceList) > 0 {
lastReference := referenceList[len(referenceList)-1]
// In case we are using a mail client which corrupts headers, try "References" too.
re := regexp.MustCompile("<[a-zA-Z0-9-_=]*@protonmail.internalid>")
re := regexp.MustCompile(`(?U)<.*@protonmail.internalid>`)
match := re.FindString(lastReference)
if match != "" {
internalID = match[1 : len(match)-len("@protonmail.internalid>")]