Comment 269 for bug 52667

Revision history for this message
In , Mkmelin+mozilla (mkmelin+mozilla) wrote :

(From update of attachment 378660)
>+function UpdateReplyButtons(aUrl)
>+{
>+ let msgHdr = msgHdrForCurrentMessage();
>+
>+ let myEmail = getIdentityForHeader(msgHdr).email;
>+ let recipients = msgHdr.recipients + "," + msgHdr.ccList;
>+
>+ // If my email address isn't in the to or cc list, then I've been bcc-ed.
>+ let imBcced = recipients.indexOf(myEmail) == -1;
>+
>+ // Now, let's get the number of unique recipients
>+ let hdrParser = Components.classes["@mozilla.org/messenger/headerparser;1"]
>+ .getService(Components.interfaces.nsIMsgHeaderParser);
>+ let addresses = {};
>+ let names = {};
>+ let fullNames = {};
>+ let uniqueRecipients = hdrParser.removeDuplicateAddresses(recipients, {});
>+ let numAddresses = hdrParser.parseHeadersWithArray(uniqueRecipients, addresses,
>+ names, fullNames);

You can pass in {} without naming the fields here, for the stuff you don't need later, no?

>+ // If we're Bcc:-ed, we should show the ReplyAll button.
>+ let showReplyAll = true;
>+ if (aUrl.scheme == "news")
>+ // If it's news, we should not show the ReplyAll button.
>+ showReplyAll = false;

Per previous comment, we should, only not as default.