The name of shared Etherpad document is now generated and advertised by Jicofo user.

This commit is contained in:
paweldomas
2015-06-15 12:07:31 +02:00
parent 15db9ca7e4
commit 3f9b220ee9
6 changed files with 17093 additions and 17160 deletions

View File

@@ -26,13 +26,6 @@ function resize() {
}
}
/**
* Shares the Etherpad name with other participants.
*/
function shareEtherpad() {
APP.xmpp.addToPresence("etherpad", etherpadName);
}
/**
* Creates the Etherpad button and adds it to the toolbar.
*/
@@ -115,18 +108,11 @@ var Etherpad = {
*/
init: function (name) {
if (config.etherpad_base && !etherpadName) {
if (config.etherpad_base && !etherpadName && name) {
domain = config.etherpad_base;
if (!name) {
// In case we're the focus we generate the name.
etherpadName = Math.random().toString(36).substring(7) +
'_' + (new Date().getTime()).toString();
shareEtherpad();
}
else
etherpadName = name;
etherpadName = name;
enableEtherpadButton();