Displays reservation system error if one is returned by the focus.
This commit is contained in:
parent
aee7a8e1bd
commit
9123923818
|
@ -19,7 +19,7 @@
|
|||
<script src="libs/popover.js?v=1"></script><!-- bootstrap tooltip lib -->
|
||||
<script src="libs/toastr.js?v=1"></script><!-- notifications lib -->
|
||||
<script src="interface_config.js?v=5"></script>
|
||||
<script src="libs/app.bundle.js?v=22"></script>
|
||||
<script src="libs/app.bundle.js?v=23"></script>
|
||||
<script src="analytics.js?v=1"></script><!-- google analytics plugin -->
|
||||
<link rel="stylesheet" href="css/font.css?v=6"/>
|
||||
<link rel="stylesheet" href="css/toastr.css?v=1">
|
||||
|
|
34527
libs/app.bundle.js
34527
libs/app.bundle.js
File diff suppressed because it is too large
Load Diff
|
@ -143,6 +143,17 @@ function registerListeners() {
|
|||
' Please try again later.'
|
||||
);
|
||||
});
|
||||
APP.xmpp.addListener(XMPPEvents.RESERVATION_ERROR, function (code, msg) {
|
||||
messageHandler.openDialog(
|
||||
'Reservation system error',
|
||||
'Error code: ' + code + ', message: ' + msg,
|
||||
true, {},
|
||||
function (event, value, message, formVals)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
);
|
||||
});
|
||||
APP.xmpp.addListener(XMPPEvents.KICKED, function () {
|
||||
messageHandler.openMessageDialog("dialog.sessTerminated", "Session Terminated",
|
||||
"dialog.kickMessage", "Ouch! You have been kicked out of the meet!");
|
||||
|
|
|
@ -279,6 +279,19 @@ var Moderator = {
|
|||
eventEmitter.emit(XMPPEvents.GRACEFUL_SHUTDOWN);
|
||||
return;
|
||||
}
|
||||
// Check for error returned by the reservation system
|
||||
var reservationErr = $(error).find('>error>reservation-error');
|
||||
if (reservationErr.length) {
|
||||
// Trigger error event
|
||||
var errorCode = reservationErr.attr('error-code');
|
||||
var errorMsg;
|
||||
if ($(error).find('>error>text')) {
|
||||
errorMsg = $(error).find('>error>text').text();
|
||||
}
|
||||
eventEmitter.emit(
|
||||
XMPPEvents.RESERVATION_ERROR, errorCode, errorMsg);
|
||||
return;
|
||||
}
|
||||
// Not authorized to create new room
|
||||
if ($(error).find('>error>not-authorized').length) {
|
||||
console.warn("Unauthorized to start the conference", error);
|
||||
|
|
|
@ -17,6 +17,7 @@ var XMPPEvents = {
|
|||
REMOTE_STATS: "xmpp.remote_stats",
|
||||
LOCALROLE_CHANGED: "xmpp.localrole_changed",
|
||||
PRESENCE_STATUS: "xmpp.presence_status",
|
||||
RESERVATION_ERROR: "xmpp.room_reservation_error",
|
||||
SUBJECT_CHANGED: "xmpp.subject_changed",
|
||||
MESSAGE_RECEIVED: "xmpp.message_received",
|
||||
SENDING_CHAT_MESSAGE: "xmpp.sending_chat_message",
|
||||
|
|
Loading…
Reference in New Issue