Skip to content

Commit d2ac7ce

Browse files
committed
Remove stale rooms
1 parent 8ac17f6 commit d2ac7ce

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/client/client.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -872,6 +872,7 @@ export class Client {
872872
this.events.dispatchEvent(
873873
new CustomEvent('error', { detail: args[2] }),
874874
);
875+
this._removeRoom(roomID);
875876
break;
876877
default:
877878
// assertNever(reason);
@@ -1280,7 +1281,7 @@ export class Client {
12801281
this.tryLogin();
12811282
}
12821283
const savedRooms = client.settings.rooms;
1283-
this.autojoin(savedRooms.map((e) => e.ID), true);
1284+
this.autojoin(savedRooms.filter((e) => e.open).map((e) => e.ID), true);
12841285
};
12851286

12861287
this.socket.onmessage = (event) => {

0 commit comments

Comments
 (0)