diff --git a/xul/content/commands.js b/xul/content/commands.js --- a/xul/content/commands.js +++ b/xul/content/commands.js @@ -2478,24 +2478,27 @@ function cmdLeave(e) if (channelToLeave.joined) channelToLeave.joined = false; if (e.deleteWhenDone) channelToLeave.dispatch("delete-view"); } return shouldContinue; - } + }; if (!e.server) { display(getMsg(MSG_ERR_IMPROPER_VIEW, e.command.name), MT_ERROR); return; } + if (!e.hasOwnProperty("channelName") && e.channel) + e.channelName = e.channel.unicodeName; + if (e.hasOwnProperty("channelName")) { if (!e.channelName) { // No channel specified and command not sent from a channel view display(getMsg(MSG_ERR_NEED_CHANNEL, e.command.name), MT_ERROR); return; }