Browse Source

Merge pull request #262 from jitsi/not-allowed-error

Not allowed error
dev1
yanas 9 years ago
parent
commit
05e17bf5ce

+ 5
- 0
JitsiConferenceErrors.js View File

@@ -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 View File

@@ -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,

+ 4
- 4
modules/xmpp/ChatRoom.js View File

@@ -579,19 +579,19 @@ ChatRoom.prototype.onPresenceError = function (pres, from) {
579 579
             // result in reconnection from authorized domain.
580 580
             // We're either missing Jicofo/Prosody config for anonymous
581 581
             // domains or something is wrong.
582
-            this.eventEmitter.emit(XMPPEvents.ROOM_JOIN_ERROR, pres);
582
+            this.eventEmitter.emit(XMPPEvents.ROOM_JOIN_ERROR);
583 583
 
584 584
         } else {
585 585
             logger.warn('onPresError ', pres);
586
-            this.eventEmitter.emit(XMPPEvents.ROOM_CONNECT_ERROR, pres);
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',
590 590
             pres);
591
-        this.eventEmitter.emit(XMPPEvents.ROOM_MAX_USERS_ERROR, pres);
591
+        this.eventEmitter.emit(XMPPEvents.ROOM_MAX_USERS_ERROR);
592 592
     } else {
593 593
         logger.warn('onPresError ', pres);
594
-        this.eventEmitter.emit(XMPPEvents.ROOM_CONNECT_ERROR, pres);
594
+        this.eventEmitter.emit(XMPPEvents.ROOM_CONNECT_ERROR);
595 595
     }
596 596
 };
597 597
 

+ 1
- 0
service/xmpp/XMPPEvents.js View File

@@ -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.

Loading…
Cancel
Save