Explorar o código

MUC bugfix: Don't attempt to rejoin too eagerly

Otherwise we're sending two join stanzas in quick succession
JC Brand hai 4 meses
pai
achega
02eec2de5f
Modificáronse 1 ficheiros con 2 adicións e 3 borrados
  1. 2 3
      src/headless/plugins/muc/muc.js

+ 2 - 3
src/headless/plugins/muc/muc.js

@@ -307,9 +307,8 @@ class MUC extends ModelWithVCard(ModelWithMessages(ColorAwareModel(ChatBoxBase))
                 }
             }
         } else {
-            if (conn_status === roomstatus.DISCONNECTED) {
-                this.rejoin();
-            }
+            await this.initialized;
+            if (conn_status === roomstatus.DISCONNECTED) this.rejoin();
             this.clearUnreadMsgCounter();
         }
     }