Browse Source

P4TB-357: Follow-up to rev. 718c48919a40: Make Mac card ID lowercase and cater for later versions of Thunderbird.

1.1.101
Jorg Knobloch 2 years ago
parent
commit
bdddd8192c
1 changed files with 8 additions and 2 deletions
  1. +8
    -2
      addon/content/TbContacts.js

+ 8
- 2
addon/content/TbContacts.js View File

@ -32,8 +32,14 @@ const TbContacts = {
const card = ab.cardForEmailAddress(emailAddress);
if (card) {
if (abURI.startsWith("moz-abosxdirectory:")) {
// localId is of the form: moz-abosxcard://ACE6A928-78EA-46CC-8186-1B4E5F08E7B8:ABPerson
userId = card.localId.substr(16, 36);
try {
// localId is of the form: moz-abosxcard://ACE6A928-78EA-46CC-8186-1B4E5F08E7B8:ABPerson.
// Make it lowercase to match other UIDs allocated by Thunderbird.
userId = card.localId.substr(16).replace(/:.*/, "").toLowerCase();
} catch (ex) {
// localId was removed in bug 1662033, but since bug 1679364 a stable ID is provided in UID.
userId = card.UID;
}
} else {
userId = card.UID;
}


Loading…
Cancel
Save