Korjaa vastaanottajien lukeminen moniosaisesta viestistä
Valitse osa, jossa on *eniten* sähköpostiosoitteita, äläkä sitä, jossa niitä on vähiten.
This commit is contained in:
parent
13878fd796
commit
4786c1055d
@ -87,7 +87,7 @@ getEmailsFromMessage = readEmails . toListOf
|
|||||||
where isText = matchContentType "text" Nothing . view contentType
|
where isText = matchContentType "text" Nothing . view contentType
|
||||||
|
|
||||||
readEmails :: [T.Text] -> [Email]
|
readEmails :: [T.Text] -> [Email]
|
||||||
readEmails = fromMaybe [] . listToMaybe . sortBy (comparing length) .
|
readEmails = fromMaybe [] . listToMaybe . reverse . sortBy (comparing length) .
|
||||||
map (catMaybes . map (email . encodeUtf8) . T.lines)
|
map (catMaybes . map (email . encodeUtf8) . T.lines)
|
||||||
|
|
||||||
replySettings :: Mailbox -> ReplySettings
|
replySettings :: Mailbox -> ReplySettings
|
||||||
|
Loading…
Reference in New Issue
Block a user