File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -1586,7 +1586,9 @@ export default class ChatRoom extends Listenable {
15861586 } else if ( $ ( pres ) . find ( '>error>service-unavailable' ) . length ) {
15871587 logger . warn ( 'Maximum users limit for the room has been reached' ,
15881588 pres ) ;
1589- this . eventEmitter . emit ( XMPPEvents . ROOM_MAX_USERS_ERROR ) ;
1589+ this . eventEmitter . emit ( XMPPEvents . ROOM_MAX_USERS_ERROR , {
1590+ visitorsSupported : this . xmpp . moderator . visitorsSupported
1591+ } ) ;
15901592 } else if ( $ ( pres )
15911593 . find (
15921594 '>error[type="auth"]'
Original file line number Diff line number Diff line change @@ -58,6 +58,10 @@ export default class Moderator extends Listenable {
5858 // availability.
5959 this . sipGatewayEnabled = false ;
6060
61+ // Response to conference request may contain whether visitors are supported
62+ // in certain cases we need to know this to be able to get decisions on some errors (max-occupants reached)
63+ this . visitorsSupported = false ;
64+
6165 this . xmpp = xmpp ;
6266 this . connection = xmpp . connection ;
6367
@@ -413,6 +417,8 @@ export default class Moderator extends Listenable {
413417 return ;
414418 }
415419
420+ this . visitorsSupported = conferenceRequest . properties [ 'visitors-supported' ] ;
421+
416422 if ( conferenceRequest . ready ) {
417423 // Reset the non-error timeout (because we've succeeded here).
418424 this . getNextTimeout ( true ) ;
You can’t perform that action at this time.
0 commit comments