If no resource exists, add one which mentions converse.js

updates #123
This commit is contained in:
JC Brand 2014-07-14 23:09:39 +02:00
parent 01c2c5d93c
commit 9846f89a2c
2 changed files with 5 additions and 0 deletions

View File

@ -3612,6 +3612,10 @@
if ($form) {
$form.find('input[type=submit]').hide().after('<span class="spinner login-submit"/>');
}
var resource = Strophe.getResourceFromJid(jid);
if (!resource) {
jid += '/converse.js-' + Math.floor(Math.random()*139749825).toString();
}
converse.connection = new Strophe.Connection(converse.bosh_service_url);
converse.connection.connect(jid, password, converse.onConnect);
},

View File

@ -20,6 +20,7 @@ Changelog
Message forwarding was before a default behavior but is now optional (and disabled by default). [jcbrand]
* Newly opened chat boxes always appear immediately left of the controlbox. [jcbrand]
* #71 Chat boxes and rooms can be minimized. [jcbrand]
* #123 Show converse.js in the resource assigned to a user. [jcbrand]
* #130 Fixed bootstrap conflicts. [jcbrand]
* #132 Support for `XEP-0280: Message Carbons <https://xmpp.org/extensions/xep-0280.html'>`_.
Configured via `enable_message_carbons <https://conversejs.org/docs/html/index.html#enable_message_carbons>`_ [hejazee]