Address Book API should be able to handle and access read-only address books
Categories
(Thunderbird :: Add-Ons: Extensions API, defect)
Tracking
(thunderbird_esr78 wontfix)
Tracking | Status | |
---|---|---|
thunderbird_esr78 | --- | wontfix |
People
(Reporter: standard8, Assigned: standard8)
References
Details
Attachments
(2 files)
Currently the address book API is explicitly excluded from handling read-only address books:
The limitation seems to have been added when the API was originally implemented, though I don't see a reason as to why. The documentation says that read-only address books are currently ignored, so I suspect this was just for scope limiting initially.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
Assignee | ||
Comment 2•4 years ago
|
||
This means that UID is generated consistently across restarts for the OS X address book which is read-only.
It also works around an issue where doing a search via extensions would sometimes not have a UID straight away.
Depends on D98006
Comment 3•4 years ago
|
||
It also works around an issue where doing a search via extensions would sometimes not have a UID straight away.
Could you explain this a little more? nsAbCardProperty::GetUID
creates a value if there isn't already one, so unless something's looking through the card properties, a card should always appear to have a UID.
Assignee | ||
Comment 4•4 years ago
|
||
(In reply to Geoff Lankow (:darktrojan) from comment #3)
It also works around an issue where doing a search via extensions would sometimes not have a UID straight away.
Could you explain this a little more?
nsAbCardProperty::GetUID
creates a value if there isn't already one, so unless something's looking through the card properties, a card should always appear to have a UID.
I was getting confused as there was different behaviour happening. The problem with nsAbCardProperty::GetUID
is that it will also call nsAbCardProperty::SetUID
. The SetUID
has a check for read-only address books at the end of it:
That fails - as OS X is a read-only directory. However, at that point, the UID property has already been stored, so the next time we use the UID, it passes (which was confusing me when I first tried to look at it).
I'm going to update the patch to include an explicit nsAbOSXCard::SetUID
to fail if someone attempts to set it.
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/comm-central/rev/66e8e55639b4
Handle read-only address books on the WebExtension APIs. r=darktrojan
https://hg.mozilla.org/comm-central/rev/d3ce9854522e
Use the system-provided UID for OS X address book cards. r=darktrojan
Updated•3 years ago
|
Assignee | ||
Comment 6•3 years ago
|
||
Just to note, I'm not sure this should be uplifted to esr78. This could affect add-ons that have implemented contacts handling already but not taken account of read-only address books.
It might be better to announce it once it gets onto beta, but wait until the next esr for when we fix it (unless there's possibly high demand).
Comment 7•3 years ago
|
||
Ok let's set 78 to wontfix for the moment. Can always reconsider later if need be.
Description
•