Browse Source

MUC bugfix: Don't attempt to rejoin too eagerly

Otherwise we're sending two join stanzas in quick succession
JC Brand 4 months ago
parent
commit
02eec2de5f
1 changed files with 2 additions and 3 deletions
  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();
         }
     }