Mailspring/spec/models
John McNair dccf4f3ad3 Parse Office 365 names (#2016)
Office 365 likes to format email addresses as follows:
Last Name, First Name (Some Description) <email@address.org>

This causes Contact.firstName() (and hence sometimes displayName()) to return
"Last Name," which looks a bit odd in the message/thread views.

The intent of the commit is to correctly parse these names so that (using the
above example):
- firstName = "First Name"
- lastName = "Last Name (Some Description)"
- fullName = "First Name Last Name (Some Description)"

These behavioral changes only impact names containing a ','.

I don't know that this really provides exhaustive coverage of Office 365, and
keeping the description as part of the last name is not completely guilt free,
but it's not any worse than the previous state of affairs which also has
the description in the same field but combined instead with (misplaced)
first name data.
2016-04-27 10:26:23 -07:00
..
category-spec.coffee fix(specs) 2016-03-14 11:22:42 -07:00
contact-spec.coffee Parse Office 365 names (#2016) 2016-04-27 10:26:23 -07:00
event-spec.coffee fix(db): Allow string attributes to be null. Never coerce to "" 2016-02-05 13:49:18 -08:00
file-spec.coffee refactor(spec) move spec-nylas to spec 2015-10-01 21:39:44 -07:00
message-spec.coffee refactor(spec) move spec-nylas to spec 2015-10-01 21:39:44 -07:00
model-spec.coffee refactor(spec) move spec-nylas to spec 2015-10-01 21:39:44 -07:00
model-with-metadata-spec.es6 es6(*): convert 20+ source files used in example packages to ES2016 2016-02-29 18:47:22 -08:00
mutable-query-result-set-spec.coffee DataView => ListDataSource 2016-01-14 12:26:54 -08:00
query-range-spec.coffee New QueryRange specs, fixes 2016-01-14 12:03:06 -08:00
query-spec.coffee fix(db): Remove - from table names, which was a bad idea 2016-04-04 17:44:45 -07:00
query-subscription-pool-spec.coffee Merging in new observables for thread list 2016-01-08 14:31:33 -08:00
query-subscription-spec.coffee fix(db-spec): Accompanying spec changes 2016-04-05 19:03:47 -07:00
thread-spec.coffee fix(sent): Do not allow sent or drafts to be modified 2016-03-10 15:44:53 -08:00