Bug 342632 - Allow defaultAccount to return success with nullptr result when there is no usable account.

Tag #1273
This commit is contained in:
Matt A. Tobin 2019-11-10 22:51:10 -05:00 • committed by Roy Tam
commit af2693fe73
11 changed files with 121 additions and 101 deletions

View file

@ -224,10 +224,12 @@
let identitiesRaw = MailServices.accounts
.getIdentitiesForServer(gFilterList.folder.server);
let identities = Array.from(this.fixIterator(identitiesRaw,
Components.interfaces.nsIMsgIdentity));
Ci.nsIMsgIdentity));
if (!identities.length) // typically if this is Local Folders
identities.push(MailServices.accounts.defaultAccount.defaultIdentity);
if (identities.length == 0) { // typically if this is Local Folders
if (MailServices.accounts.defaultAccount)
identities.push(MailServices.accounts.defaultAccount.defaultIdentity);
}
let templateFound = false;
let foldersScanned = [];