Commit cf429117 authored by JC Brand's avatar JC Brand

converse-muc: rename wrapping function again and put on converse

So that it can be overridden.
parent 59ad2858
...@@ -2182,7 +2182,7 @@ ...@@ -2182,7 +2182,7 @@
}; };
converse.on('chatBoxesFetched', autoJoinRooms); converse.on('chatBoxesFetched', autoJoinRooms);
var getWrappedChatBox = function (jid, attrs, fetcher) { converse.getWrappedChatRoom = function (jid, attrs, fetcher) {
jid = jid.toLowerCase(); jid = jid.toLowerCase();
return converse.wrappedChatBox(fetcher(_.extend({ return converse.wrappedChatBox(fetcher(_.extend({
'id': jid, 'id': jid,
...@@ -2231,9 +2231,9 @@ ...@@ -2231,9 +2231,9 @@
if (typeof jids === "undefined") { if (typeof jids === "undefined") {
throw new TypeError('rooms.open: You need to provide at least one JID'); throw new TypeError('rooms.open: You need to provide at least one JID');
} else if (typeof jids === "string") { } 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) { 'get': function (jids, attrs, create) {
if (typeof attrs === "string") { if (typeof attrs === "string") {
...@@ -2255,9 +2255,9 @@ ...@@ -2255,9 +2255,9 @@
attrs.nick = Strophe.getNodeFromJid(converse.bare_jid); attrs.nick = Strophe.getNodeFromJid(converse.bare_jid);
} }
if (typeof jids === "string") { 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));
} }
} }
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment