From 6618d694b171a3b82a75dd38f00b30b0f6f733e6 Mon Sep 17 00:00:00 2001 From: JC Brand Date: Wed, 16 Mar 2016 09:03:00 +0000 Subject: [PATCH] No need to override ChatBoxView with MUC-specific method --- src/converse-muc.js | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/src/converse-muc.js b/src/converse-muc.js index 721df019f..89c3e0bc0 100755 --- a/src/converse-muc.js +++ b/src/converse-muc.js @@ -126,19 +126,6 @@ } }, - ChatBoxView: { - clearChatRoomMessages: function (ev) { - /* New method added to the ChatBox model which allows all - * messages in a chatroom to be cleared. - */ - if (typeof ev !== "undefined") { ev.stopPropagation(); } - var result = confirm(__("Are you sure you want to clear the messages from this room?")); - if (result === true) { - this.$content.empty(); - } - return this; - }, - }, ChatBoxes: { registerMessageHandler: function () { @@ -422,6 +409,15 @@ return true; }, + clearChatRoomMessages: function (ev) { + if (typeof ev !== "undefined") { ev.stopPropagation(); } + var result = confirm(__("Are you sure you want to clear the messages from this room?")); + if (result === true) { + this.$content.empty(); + } + return this; + }, + onChatRoomMessageSubmitted: function (text) { /* Gets called when the user presses enter to send off a * message in a chat room.