|
@@ -218,8 +218,22 @@ converse.plugins.add('converse-muc', {
|
|
this.initOccupants();
|
|
this.initOccupants();
|
|
this.registerHandlers();
|
|
this.registerHandlers();
|
|
this.initMessages();
|
|
this.initMessages();
|
|
|
|
+ this.enterRoom();
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ async enterRoom () {
|
|
|
|
+ if (this.get('connection_status') !== converse.ROOMSTATUS.ENTERED) {
|
|
|
|
+ await this.getRoomFeatures();
|
|
|
|
+ if (!u.isPersistableModel(this)) {
|
|
|
|
+ // XXX: Happens during tests, nothing to do if this
|
|
|
|
+ // is a hanging chatbox (i.e. not in the collection anymore).
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ this.join();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+
|
|
async onConnectionStatusChanged () {
|
|
async onConnectionStatusChanged () {
|
|
if (this.get('connection_status') === converse.ROOMSTATUS.ENTERED) {
|
|
if (this.get('connection_status') === converse.ROOMSTATUS.ENTERED) {
|
|
this.occupants.fetchMembers();
|
|
this.occupants.fetchMembers();
|