Ver código fonte

fix(BreakoutRooms) fix checking for isBreakoutRoom early

dev1
Saúl Ibarra Corretgé 3 anos atrás
pai
commit
883785830d
1 arquivos alterados com 7 adições e 2 exclusões
  1. 7
    2
      modules/xmpp/BreakoutRooms.js

+ 7
- 2
modules/xmpp/BreakoutRooms.js Ver arquivo

@@ -1,5 +1,5 @@
1 1
 import { getLogger } from '@jitsi/logger';
2
-import { $msg } from 'strophe.js';
2
+import { $msg, Strophe } from 'strophe.js';
3 3
 
4 4
 import { XMPPEvents } from '../../service/xmpp/XMPPEvents';
5 5
 
@@ -138,7 +138,12 @@ export default class BreakoutRooms {
138 138
      * @returns True if the room is a breakout room, false otherwise.
139 139
      */
140 140
     isBreakoutRoom() {
141
-        return this._isBreakoutRoom;
141
+        if (typeof this._isBreakoutRoom !== 'undefined') {
142
+            return this._isBreakoutRoom;
143
+        }
144
+
145
+        // Use heuristic, helpful for checking in the MUC_JOINED event.
146
+        return Strophe.getDomainFromJid(this.room.myroomjid) === this.getComponentAddress();
142 147
     }
143 148
 
144 149
     /**

Carregando…
Cancelar
Salvar