Mailspring/packages/local-sync/spec
Christine Spang 9eb1aef139 [local-sync] Properly handle multiple occurrences of From/To/Cc/Bcc headers
Summary:
Well-behaved MUAs don't do this, but it is totally legal and we should
handle it.

The Python sync engine handles this properly also:
7db949fec9/sync-engine/inbox/util/addr.py (L26-L47)

(Found this out while scratching my head over the output format of
mimelib.parseHeaders---turns out it's an array for a reason:

> let to = mimelib.parseHeaders(`To: Christine Spang <spang@nylas.com>
... To: Foo Bar <foo@example.com>`);
undefined
> to
{ to:
   [ 'Christine Spang <spang@nylas.com>',
     'Foo Bar <foo@example.com>' ] }

)

Test Plan: unit test included

Reviewers: halla, jackie, mark

Reviewed By: mark

Differential Revision: https://phab.nylas.com/D3625
2017-01-10 15:07:36 -08:00
..
fixtures [local-sync] Rename extract{Snippet,Contacts} in message-factory 2017-01-10 10:41:35 -08:00
imap [local-private, local-sync] temporarily disable specs 2016-12-15 12:57:24 -05:00
helpers.js [local-sync] Parse DOM to extract snippets 2016-12-13 16:32:22 -08:00
message-factory-spec.js [local-sync] Properly handle multiple occurrences of From/To/Cc/Bcc headers 2017-01-10 15:07:36 -08:00
threading-spec.js [local-sync] Restore global queue for message processing to improve perf 2017-01-06 14:28:33 -08:00