Browse Source

fix: Cleans up rooms after failure to join.

Subsequent attempts to join will show produce an error "[JitsiConference.js] : A coference with the same name has already been created!".
release-8443
Дамян Минков 3 years ago
parent
commit
f23372dd88
2 changed files with 5 additions and 0 deletions
  1. 4
    0
      JitsiConferenceEventManager.js
  2. 1
    0
      modules/xmpp/ChatRoom.js

+ 4
- 0
JitsiConferenceEventManager.js View File

231
     this.chatRoomForwarder.forward(XMPPEvents.RESERVATION_ERROR,
231
     this.chatRoomForwarder.forward(XMPPEvents.RESERVATION_ERROR,
232
         JitsiConferenceEvents.CONFERENCE_FAILED,
232
         JitsiConferenceEvents.CONFERENCE_FAILED,
233
         JitsiConferenceErrors.RESERVATION_ERROR);
233
         JitsiConferenceErrors.RESERVATION_ERROR);
234
+    chatRoom.addListener(XMPPEvents.RESERVATION_ERROR,
235
+        () => {
236
+            conference.xmpp.connection.emuc.doLeave(conference.room.roomjid);
237
+        });
234
 
238
 
235
     this.chatRoomForwarder.forward(XMPPEvents.GRACEFUL_SHUTDOWN,
239
     this.chatRoomForwarder.forward(XMPPEvents.GRACEFUL_SHUTDOWN,
236
         JitsiConferenceEvents.CONFERENCE_FAILED,
240
         JitsiConferenceEvents.CONFERENCE_FAILED,

+ 1
- 0
modules/xmpp/ChatRoom.js View File

1178
             logger.warn('Maximum users limit for the room has been reached',
1178
             logger.warn('Maximum users limit for the room has been reached',
1179
                 pres);
1179
                 pres);
1180
             this.eventEmitter.emit(XMPPEvents.ROOM_MAX_USERS_ERROR);
1180
             this.eventEmitter.emit(XMPPEvents.ROOM_MAX_USERS_ERROR);
1181
+            this.connection.emuc.doLeave(this.roomjid);
1181
         } else if ($(pres)
1182
         } else if ($(pres)
1182
             .find(
1183
             .find(
1183
                 '>error[type="auth"]'
1184
                 '>error[type="auth"]'

Loading…
Cancel
Save