Merge pull request #526 from andreabenini/auto_join_on_invite-patch-1
Auto join on invite patch 1 (auto_join_on_invite new parameter)
This commit is contained in:
commit
600c83a493
21
converse.js
21
converse.js
@ -304,6 +304,7 @@
|
|||||||
auto_login: false, // Currently only used in connection with anonymous login
|
auto_login: false, // Currently only used in connection with anonymous login
|
||||||
auto_reconnect: false,
|
auto_reconnect: false,
|
||||||
auto_subscribe: false,
|
auto_subscribe: false,
|
||||||
|
auto_join_on_invite: false, // Auto-join chatroom on invite
|
||||||
bosh_service_url: undefined, // The BOSH connection manager URL.
|
bosh_service_url: undefined, // The BOSH connection manager URL.
|
||||||
cache_otr_key: false,
|
cache_otr_key: false,
|
||||||
csi_waiting_time: 0, // Support for XEP-0352. Seconds before client is considered idle and CSI is sent out.
|
csi_waiting_time: 0, // Support for XEP-0352. Seconds before client is considered idle and CSI is sent out.
|
||||||
@ -3633,15 +3634,19 @@
|
|||||||
contact = converse.roster.get(from),
|
contact = converse.roster.get(from),
|
||||||
result;
|
result;
|
||||||
|
|
||||||
if (!reason) {
|
if (converse.auto_join_on_invite) {
|
||||||
result = confirm(
|
result = true;
|
||||||
__(___("%1$s has invited you to join a chat room: %2$s"), contact.get('fullname'), room_jid)
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
result = confirm(
|
contact = contact? contact.get('fullname'): Strophe.getNodeFromJid(from); // Invite request might come from someone not your roster list
|
||||||
__(___('%1$s has invited you to join a chat room: %2$s, and left the following reason: "%3$s"'),
|
if (!reason) {
|
||||||
contact.get('fullname'), room_jid, reason)
|
result = confirm(
|
||||||
);
|
__(___("%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, room_jid, reason)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (result === true) {
|
if (result === true) {
|
||||||
var chatroom = converse.chatboxviews.showChat({
|
var chatroom = converse.chatboxviews.showChat({
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 0.10.1 (2015-12-02)
|
||||||
|
|
||||||
|
- #524 Added auto_join_on_invite parameter for automatically joining chatrooms. [ben]
|
||||||
|
- FIX: A chatroom invite might come from someone not in your roster list. [ben]
|
||||||
|
|
||||||
## 0.10.0 (2015-11-05)
|
## 0.10.0 (2015-11-05)
|
||||||
|
|
||||||
**Note:**
|
**Note:**
|
||||||
@ -16,6 +21,7 @@
|
|||||||
- Add the ability to also drag-resize chat boxes horizontally. [jcbrand]
|
- Add the ability to also drag-resize chat boxes horizontally. [jcbrand]
|
||||||
- Updated Sass files and created a new style. [jcbrand]
|
- Updated Sass files and created a new style. [jcbrand]
|
||||||
|
|
||||||
|
|
||||||
## 0.9.6 (2015-10-12)
|
## 0.9.6 (2015-10-12)
|
||||||
|
|
||||||
- Bugfix. Spinner doesn't disappear when scrolling up (when server doesn't support XEP-0313). [jcbrand]
|
- Bugfix. Spinner doesn't disappear when scrolling up (when server doesn't support XEP-0313). [jcbrand]
|
||||||
|
@ -244,6 +244,13 @@ auto_subscribe
|
|||||||
|
|
||||||
If true, the user will automatically subscribe back to any contact requests.
|
If true, the user will automatically subscribe back to any contact requests.
|
||||||
|
|
||||||
|
auto_join_on_invite
|
||||||
|
--------------
|
||||||
|
|
||||||
|
* Default: ``false``
|
||||||
|
|
||||||
|
If true, the user will automatically join a chatroom on invite without any confirm.
|
||||||
|
|
||||||
.. _`bosh-service-url`:
|
.. _`bosh-service-url`:
|
||||||
|
|
||||||
bosh_service_url
|
bosh_service_url
|
||||||
|
Loading…
Reference in New Issue
Block a user