2
0
Эх сурвалжийг харах

MUC bugfix: Don't attempt to rejoin too eagerly

Otherwise we're sending two join stanzas in quick succession
JC Brand 6 сар өмнө
parent
commit
02eec2de5f

+ 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();
         }
     }