diff --git a/play.pokemonshowdown.com/src/client-main.ts b/play.pokemonshowdown.com/src/client-main.ts index 1ebf96172..35646bb3a 100644 --- a/play.pokemonshowdown.com/src/client-main.ts +++ b/play.pokemonshowdown.com/src/client-main.ts @@ -304,6 +304,13 @@ class PSPrefs extends PSStreamModel { // send even if `rooms` is empty, for server autojoins PS.send(cmd); } + + for (const roomid in PS.rooms) { + const room = PS.rooms[roomid]!; + if (room.type === 'battle') { + room.connect(); + } + } } } diff --git a/play.pokemonshowdown.com/src/panel-chat.tsx b/play.pokemonshowdown.com/src/panel-chat.tsx index 5f805ebd7..074da702a 100644 --- a/play.pokemonshowdown.com/src/panel-chat.tsx +++ b/play.pokemonshowdown.com/src/panel-chat.tsx @@ -67,7 +67,7 @@ export class ChatRoom extends PSRoom { this.connect(); } override connect() { - if (!this.connected) { + if (!this.connected || this.connected === 'autoreconnect') { if (this.pmTarget === null) PS.send(`/join ${this.id}`); this.connected = true; this.connectWhenLoggedIn = false;