We no longer need to force the user to provide a JID

when calling `converse.rooms.open`.
This commit is contained in:
JC Brand 2016-07-26 07:27:28 +00:00
parent 172ce7e0ce
commit 8a42e241b7

View File

@ -1535,12 +1535,6 @@
}, },
'open': function (jids, nick) { 'open': function (jids, nick) {
var fetcher = converse.chatboxviews.showChat.bind(converse.chatboxviews); var fetcher = converse.chatboxviews.showChat.bind(converse.chatboxviews);
if (!nick) {
nick = Strophe.getNodeFromJid(converse.bare_jid);
}
if (typeof nick !== "string") {
throw new TypeError('rooms.open: invalid nick, must be string');
}
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") {