Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Adjusts anonymous domain functionality to work with Jicofo.

paweldomasd3003d4fcdd1
diff --git a/moderator.js b/moderator.js
index 5f0ed3bd8b..be58236a0b 100644
--- a/moderator.js
+++ b/moderator.js
@@ -190,7 +190,17 @@ var Moderator = (function (my) {
// Not authorized to create new room
if ($(error).find('>error>not-authorized').length) {
console.warn("Unauthorized to start the conference");
- UI.onAuthenticationRequired();
+ var toDomain
+ = Strophe.getDomainFromJid(error.getAttribute('to'));
+ if (toDomain === config.hosts.anonymousdomain) {
+ // we are connected with anonymous domain and
+ // only non anonymous users can create rooms
+ // we must authorize the user
+ $(document).trigger('passwordrequired.main');
+ } else {
+ // External authentication mode
+ UI.onAuthenticationRequired();
+ }
return;
}
var waitMs = getNextErrorTimeout();
diff --git a/muc.js b/muc.js
index 98b3473374..a2abbdc01a 100644
--- a/muc.js
+++ b/muc.js
@@ -255,9 +255,18 @@ Strophe.addConnectionPlugin('emuc', {
'>error[type="cancel"]>not-allowed[xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"]').length) {
var toDomain = Strophe.getDomainFromJid(pres.getAttribute('to'));
if(toDomain === config.hosts.anonymousdomain) {
- // we are connected with anonymous domain and only non anonymous users can create rooms
- // we must authorize the user
- $(document).trigger('passwordrequired.main');
+ // We are connected with anonymous domain and only non anonymous
+ // users can create rooms, but focus should not allow us to
+ // enter the room by replying with 'not-authorized'. This would
+ // result in reconnection from authorized domain.
+ // We're either missing Jicofo/Prosody config for anonymous
+ // domains or something is wrong.
+ //$(document).trigger('passwordrequired.main');
+ UI.messageHandler.openReportDialog(null,
+ 'Oops ! We couldn`t join the conference.' +
+ ' There might be some problem with security' +
+ ' configuration. Please contact service' +
+ ' administrator.', pres);
} else {
console.warn('onPresError ', pres);
UI.messageHandler.openReportDialog(null,