This fix forces Converse.js to respect auto_join_rooms and allow auto join room to occur with server-side generated random room names as required for XEP 0142 - workgroup queues
This commit is contained in:
Dele Olajide 2019-08-16 16:21:59 +01:00 committed by JC Brand
parent c9c689aec7
commit f6c5f167f8

View File

@ -405,7 +405,7 @@ converse.plugins.add('converse-chatboxes', {
} }
const room_jids = _converse.auto_join_rooms.map(s => _.isObject(s) ? s.jid : s); const room_jids = _converse.auto_join_rooms.map(s => _.isObject(s) ? s.jid : s);
const auto_join = _converse.auto_join_private_chats.concat(room_jids); const auto_join = _converse.auto_join_private_chats.concat(room_jids);
if (_converse.singleton && !_.includes(auto_join, attrs.jid)) { if (_converse.singleton && !_.includes(auto_join, attrs.jid) && !_converse.auto_join_on_invite) {
const msg = `${attrs.jid} is not allowed because singleton is true and it's not being auto_joined`; const msg = `${attrs.jid} is not allowed because singleton is true and it's not being auto_joined`;
_converse.log(msg, Strophe.LogLevel.WARN); _converse.log(msg, Strophe.LogLevel.WARN);
return msg; return msg;