Bug 1081559 - Send raw msgs through the conversation service. r=florian
--- 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,