Bug 1180360 - "Can't compose a message to a newsgroup from the header". r=mkmelin, a=rkent
authorJim Porter <squibblyflabbetydoo>
Fri, 03 Jul 2015 22:00:00 +0200
changeset 26296 9ef3bdaaa318a8db7c2551372b8b1b20a44fdd71
parent 26295 166d8e44fb957be701d3163099599caf846e06e8
child 26297 4f1d6e940fc4a328db80e28fac4f1e22aa1a563e
push id1850
push userclokep@gmail.com
push dateWed, 08 Mar 2017 19:29:12 +0000
treeherdercomm-esr52@028df196b2d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkmelin, rkent
bugs1180360
Bug 1180360 - "Can't compose a message to a newsgroup from the header". r=mkmelin, a=rkent
mail/base/content/msgHdrViewOverlay.js
--- a/mail/base/content/msgHdrViewOverlay.js
+++ b/mail/base/content/msgHdrViewOverlay.js
@@ -1588,19 +1588,21 @@ function EditContact(emailAddressNode)
 function SendMailToNode(addressNode, aEvent)
 {
   let fields = Components.classes["@mozilla.org/messengercompose/composefields;1"]
                          .createInstance(Components.interfaces.nsIMsgCompFields);
   let params = Components.classes["@mozilla.org/messengercompose/composeparams;1"]
                          .createInstance(Components.interfaces.nsIMsgComposeParams);
 
   fields.newsgroups = addressNode.getAttribute("newsgroup");
-  let addresses = MailServices.headerParser.makeFromDisplayAddress(
-    addressNode.getAttribute("fullAddress"), {});
-  fields.to = MailServices.headerParser.makeMimeHeader(addresses, 1);
+  if (addressNode.hasAttribute("fullAddress")) {
+    let addresses = MailServices.headerParser.makeFromDisplayAddress(
+      addressNode.getAttribute("fullAddress"), {});
+    fields.to = MailServices.headerParser.makeMimeHeader(addresses, 1);
+  }
 
   params.type = Components.interfaces.nsIMsgCompType.New;
 
   // If aEvent is passed, check if Shift key was pressed for composition in
   // non-default format (HTML vs. plaintext).
   params.format = (aEvent && aEvent.shiftKey) ? 
     Components.interfaces.nsIMsgCompFormat.OppositeOfDefault :
     Components.interfaces.nsIMsgCompFormat.Default;