From cf42911754f4e12cdd6c20d680a19a8d3c80ece0 Mon Sep 17 00:00:00 2001 From: JC Brand Date: Mon, 5 Dec 2016 18:31:58 +0000 Subject: [PATCH] converse-muc: rename wrapping function again and put on converse So that it can be overridden. --- src/converse-muc.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/converse-muc.js b/src/converse-muc.js index 9e17e002a..8e6632e42 100755 --- a/src/converse-muc.js +++ b/src/converse-muc.js @@ -2182,7 +2182,7 @@ }; converse.on('chatBoxesFetched', autoJoinRooms); - var getWrappedChatBox = function (jid, attrs, fetcher) { + converse.getWrappedChatRoom = function (jid, attrs, fetcher) { jid = jid.toLowerCase(); return converse.wrappedChatBox(fetcher(_.extend({ 'id': jid, @@ -2231,9 +2231,9 @@ if (typeof jids === "undefined") { throw new TypeError('rooms.open: You need to provide at least one JID'); } else if (typeof jids === "string") { - return getWrappedChatBox(jids, attrs, converse.createChatRoom); + return converse.getWrappedChatRoom(jids, attrs, converse.createChatRoom); } - return _.map(jids, _.partial(getWrappedChatBox, _, attrs, converse.createChatRoom)); + return _.map(jids, _.partial(converse.getWrappedChatRoom, _, attrs, converse.createChatRoom)); }, 'get': function (jids, attrs, create) { if (typeof attrs === "string") { @@ -2255,9 +2255,9 @@ attrs.nick = Strophe.getNodeFromJid(converse.bare_jid); } if (typeof jids === "string") { - return getWrappedChatBox(jids, attrs, fetcher); + return converse.getWrappedChatRoom(jids, attrs, fetcher); } - return _.map(jids, _.partial(getWrappedChatBox, _, attrs, fetcher)); + return _.map(jids, _.partial(converse.getWrappedChatRoom, _, attrs, fetcher)); } } });