Просмотр исходного кода

Adds not allowed errors and handling it.

master
damencho 8 лет назад
Родитель
Сommit
31d22ef5b4
4 измененных файлов: 10 добавлений и 1 удалений
  1. 5
    0
      JitsiConferenceErrors.js
  2. 3
    0
      JitsiConferenceEventManager.js
  3. 1
    1
      modules/xmpp/ChatRoom.js
  4. 1
    0
      service/xmpp/XMPPEvents.js

+ 5
- 0
JitsiConferenceErrors.js Просмотреть файл

@@ -22,6 +22,11 @@ export const CONFERENCE_MAX_USERS = "conference.max_users";
22 22
  * Indicates that a connection error occurred when trying to join a conference.
23 23
  */
24 24
 export const CONNECTION_ERROR = "conference.connectionError";
25
+/**
26
+ * Indicates that a connection error is due to not allowed,
27
+ * occurred when trying to join a conference.
28
+ */
29
+export const NOT_ALLOWED_ERROR = "conference.connectionError.notAllowed";
25 30
 /**
26 31
  * Indicates that focus error happened.
27 32
  */

+ 3
- 0
JitsiConferenceEventManager.js Просмотреть файл

@@ -118,6 +118,9 @@ JitsiConferenceEventManager.prototype.setupChatRoomListeners = function () {
118 118
     this.chatRoomForwarder.forward(XMPPEvents.ROOM_CONNECT_ERROR,
119 119
         JitsiConferenceEvents.CONFERENCE_FAILED,
120 120
         JitsiConferenceErrors.CONNECTION_ERROR);
121
+    this.chatRoomForwarder.forward(XMPPEvents.ROOM_CONNECT_NOT_ALLOWED_ERROR,
122
+        JitsiConferenceEvents.CONFERENCE_FAILED,
123
+        JitsiConferenceErrors.NOT_ALLOWED_ERROR);
121 124
 
122 125
     this.chatRoomForwarder.forward(XMPPEvents.ROOM_MAX_USERS_ERROR,
123 126
         JitsiConferenceEvents.CONFERENCE_FAILED,

+ 1
- 1
modules/xmpp/ChatRoom.js Просмотреть файл

@@ -583,7 +583,7 @@ ChatRoom.prototype.onPresenceError = function (pres, from) {
583 583
 
584 584
         } else {
585 585
             logger.warn('onPresError ', pres);
586
-            this.eventEmitter.emit(XMPPEvents.ROOM_CONNECT_ERROR);
586
+            this.eventEmitter.emit(XMPPEvents.ROOM_CONNECT_NOT_ALLOWED_ERROR);
587 587
         }
588 588
     } else if($(pres).find('>error>service-unavailable').length) {
589 589
         logger.warn('Maximum users limit for the room has been reached',

+ 1
- 0
service/xmpp/XMPPEvents.js Просмотреть файл

@@ -135,6 +135,7 @@ var XMPPEvents = {
135 135
     REMOTE_TRACK_REMOVED: "xmpp.remote_track_removed",
136 136
     RESERVATION_ERROR: "xmpp.room_reservation_error",
137 137
     ROOM_CONNECT_ERROR: 'xmpp.room_connect_error',
138
+    ROOM_CONNECT_NOT_ALLOWED_ERROR: 'xmpp.room_connect_error.not_allowed',
138 139
     ROOM_JOIN_ERROR: 'xmpp.room_join_error',
139 140
     /**
140 141
      * Indicates that max users limit has been reached.

Загрузка…
Отмена
Сохранить