Commit 7a47b7b9 authored by JC Brand's avatar JC Brand

Don't require a chat JID to be specified in embedded mode

We might want to only open a chat later.
parent 7fafc675
...@@ -30,11 +30,10 @@ ...@@ -30,11 +30,10 @@
if (!_.isArray(_converse.auto_join_rooms) && !_.isArray(_converse.auto_join_private_chats)) { if (!_.isArray(_converse.auto_join_rooms) && !_.isArray(_converse.auto_join_private_chats)) {
throw new Error("converse-embedded: auto_join_rooms must be an Array"); throw new Error("converse-embedded: auto_join_rooms must be an Array");
} }
if (_converse.auto_join_rooms.length !== 1 && _converse.auto_join_private_chats.length !== 1) { if (_converse.auto_join_rooms.length > 1 && _converse.auto_join_private_chats.length > 1) {
throw new Error("converse-embedded: It doesn't make "+ throw new Error("converse-embedded: It doesn't make "+
"sense to have the auto_join_rooms setting to zero or "+ "sense to have the auto_join_rooms setting more then one, "+
"more then one, since only one chat room can be open "+ "since only one chat room can be open at any time.");
"at any time.");
} }
} }
}); });
......
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