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 22177 0f19fabeb6d1bd4c1f73498b9677e25ba260d0c3
parent 22176 7b835a634206df88bf654a87c187fe3c2f0f3e74
child 22178 fb8c831a4997303b2e4e7055d37afe69f07f15a0
push id44
push userkent@caspia.com
push dateMon, 14 Sep 2015 21:52:38 +0000
treeherdercomm-esr38@fb8c831a4997 [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;