Bug 1081559 - Send raw msgs through the conversation service. r=florian
authorArlo Breault <arlolra@gmail.com>
Sat, 11 Oct 2014 13:06:06 -0700 (2014-10-11)
changeset 16976 332650fa4e8d2d0eb5ddf77c58a345ac9791fad9
parent 16975 0ac236b0be380235fa0092bee0255d08c1e88ad3
child 16977 6b5ab77843f560bd2cc401e724c13f47867351dc
push id10542
push userclokep@gmail.com
push dateWed, 29 Oct 2014 02:55:46 +0000 (2014-10-29)
treeherdercomm-central@7d0449dffea8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersflorian
bugs1081559
Bug 1081559 - Send raw msgs through the conversation service. r=florian
chat/components/src/imCommands.js
--- a/chat/components/src/imCommands.js
+++ b/chat/components/src/imCommands.js
@@ -29,17 +29,20 @@ CommandsService.prototype = {
     });
 
     this.registerCommand({
       name: "raw",
       get helpString() _("rawHelpString"),
       usageContext: Ci.imICommand.CMD_CONTEXT_ALL,
       priority: Ci.imICommand.CMD_PRIORITY_DEFAULT,
       run: function(aMsg, aConv) {
-        aConv.sendMsg(aMsg);
+        let conv = Services.conversations.getUIConversation(aConv);
+        if (!conv)
+          return false;
+        conv.sendMsg(aMsg);
         return true;
       }
     });
 
     this.registerCommand({
       // Reference the command service so we can use the internal properties
       // directly.
       cmdSrv: this,