Bug 1878944 - Fixing the sometimes not sent e-mail about the acceptance/rejection of appointments r=mkmelin
Currently, the email address in the account and the one used in the invitation must match one to one. This means that emails cannot be sent if there is a difference in capitalization. This is now fixed by this code change. Differential Revision: https://phabricator.services.mozilla.com/D207474 --HG-- extra : amend_source : 5892eae5c102b4f18876e917d7a45611797451fd
This commit is contained in:
Родитель
f6e0a7f2d6
Коммит
cbaf3f3d77
|
@ -1380,9 +1380,9 @@ export var itip = {
|
|||
const id = item.getProperty("X-MOZ-INVITED-ATTENDEE");
|
||||
|
||||
if (id) {
|
||||
const email = id.split("mailto:").join("");
|
||||
const email = id.replace(/^mailto:/i, "").toLowerCase();
|
||||
const identity = MailServices.accounts.allIdentities.find(
|
||||
identity => identity.email == email
|
||||
identity => identity.email.toLowerCase() == email
|
||||
);
|
||||
|
||||
if (identity) {
|
||||
|
|
|
@ -806,7 +806,7 @@ add_task(function test_getImipTransport() {
|
|||
// With X-MOZ-INVITED-ATTENDEE property.
|
||||
const account2 = MailServices.accounts.createAccount();
|
||||
const identity2 = MailServices.accounts.createIdentity();
|
||||
identity2.email = "id2@example.com";
|
||||
identity2.email = "ID2@example.com";
|
||||
account2.addIdentity(identity2);
|
||||
account2.incomingServer = MailServices.accounts.createIncomingServer(
|
||||
"id2",
|
||||
|
@ -814,7 +814,7 @@ add_task(function test_getImipTransport() {
|
|||
"imap"
|
||||
);
|
||||
|
||||
event.setProperty("X-MOZ-INVITED-ATTENDEE", "mailto:id2@example.com");
|
||||
event.setProperty("X-MOZ-INVITED-ATTENDEE", "MAILTO:id2@EXAMPLE.com");
|
||||
|
||||
const customTransport = cal.itip.getImipTransport(event);
|
||||
Assert.ok(customTransport);
|
||||
|
|
Загрузка…
Ссылка в новой задаче