Update vCard conversion to correctly handle multiple values of the same type
Categories
(MailNews Core :: Address Book, defect)
Tracking
(thunderbird78+ fixed)
People
(Reporter: darktrojan, Assigned: darktrojan)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
28.94 KB,
patch
|
mkmelin
:
review+
wsmwk
:
approval-comm-beta+
|
Details | Diff | Splinter Review |
In most cases nsIAbCard only deals with one value of each type. Multiple values are allowed in a vCard for many data types. We need to ensure we use the right one, taking into account any preference given. For email addresses we can store two values, but there could be any number, so we need to handle that as best we can.
Assignee | ||
Comment 1•4 years ago
|
||
This required a fairly big rethink of parsing. I've taken what was in vCardToAbCard
and moved it to a separate function. It now returns a kind-of intermediate data structure that can also be reused in modifyVCard
so that I didn't have to fix each problem twice.
I also renamed propertyMap
to typeMap
which is a better description, and converted the fromAbCard
function to a generator since it can return multiple values in the case of email. toAbCard
became a generator too since it can return 0-n values.
There's probably more corner cases I haven't thought of yet, and some things we just can't handle properly without virtually replacing nsIAbCard, but this makes me feel a lot better about our vCard functions.
Updated•4 years ago
|
Comment 2•4 years ago
|
||
Updated•4 years ago
|
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/4cec8714f352
Update vCard conversion to correctly handle multiple values of the same type. r=mkmelin
Comment 4•4 years ago
|
||
Updated•4 years ago
|
Assignee | ||
Comment 5•4 years ago
|
||
bugherder uplift |
Thunderbird 78.0b2:
https://hg.mozilla.org/releases/comm-beta/rev/2b0b53861b61
Assignee | ||
Updated•4 years ago
|
Description
•