Selaa lähdekoodia

MUC bugfix: Don't attempt to rejoin too eagerly

Otherwise we're sending two join stanzas in quick succession
JC Brand 4 kuukautta sitten
vanhempi
commit
02eec2de5f
1 muutettua tiedostoa jossa 2 lisäystä ja 3 poistoa
  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();
         }
     }