浏览代码

fix: Skip sending multiple times disco-info to jicofo.

dev1
damencho 4 年前
父节点
当前提交
8bb653f1d6
共有 1 个文件被更改,包括 9 次插入0 次删除
  1. 9
    0
      modules/xmpp/ChatRoom.js

+ 9
- 0
modules/xmpp/ChatRoom.js 查看文件

@@ -641,6 +641,10 @@ export default class ChatRoom extends Listenable {
641 641
                 // participant joins during that period of time the first
642 642
                 // presence from the focus won't contain
643 643
                 // <item jid="focus..." />.
644
+                // By default we are disabling the waiting for form submission in order to use the room
645
+                // and we had enabled by default that jids are public in the room ,
646
+                // so this case should not happen, if public jid is turned off we will receive the jid
647
+                // when we become moderator in the room
644 648
                 memberOfThis.isFocus = true;
645 649
                 this._initFocus(from, jid);
646 650
             }
@@ -758,6 +762,11 @@ export default class ChatRoom extends Listenable {
758 762
      * @param mucJid the jid of the focus in the muc
759 763
      */
760 764
     _initFocus(from, mucJid) {
765
+        // skip if we have queried jicofo already, it will not change
766
+        if (this.focusFeatures) {
767
+            return;
768
+        }
769
+
761 770
         this.focusMucJid = from;
762 771
 
763 772
         logger.info(`Ignore focus: ${from}, real JID: ${mucJid}`);

正在加载...
取消
保存