Commit 3011461f authored by andreabenini's avatar andreabenini

Update converse.js

parent d715b3d3
......@@ -304,6 +304,7 @@
auto_login: false, // Currently only used in connection with anonymous login
auto_reconnect: false,
auto_subscribe: false,
auto_join_on_invite: false, // Auto-join chatroom on invite
bosh_service_url: undefined, // The BOSH connection manager URL.
cache_otr_key: false,
csi_waiting_time: 0, // Support for XEP-0352. Seconds before client is considered idle and CSI is sent out.
......@@ -3633,16 +3634,20 @@
contact = converse.roster.get(from),
result;
if (converse.auto_join_on_invite) {
result = true;
} else {
contact = contact? contact.get('fullname'): Strophe.getNodeFromJid(from); // Invite request might come from someone not your roster list
if (!reason) {
result = confirm(
__(___("%1$s has invited you to join a chat room: %2$s"), contact.get('fullname'), room_jid)
__(___("%1$s has invited you to join a chat room: %2$s"), contact, room_jid)
);
} else {
result = confirm(
__(___('%1$s has invited you to join a chat room: %2$s, and left the following reason: "%3$s"'),
contact.get('fullname'), room_jid, reason)
__(___('%1$s has invited you to join a chat room: %2$s, and left the following reason: "%3$s"'), contact, room_jid, reason)
);
}
}
if (result === true) {
var chatroom = converse.chatboxviews.showChat({
'id': room_jid,
......
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