diff --git a/packages/flat-stores/src/room-store.ts b/packages/flat-stores/src/room-store.ts index 86b7355a708..9da925afa96 100644 --- a/packages/flat-stores/src/room-store.ts +++ b/packages/flat-stores/src/room-store.ts @@ -136,11 +136,14 @@ export class RoomStore { // need roomUUID and periodicUUID from server to cache the payload } - public async joinRoom(roomUUID: string): Promise { - const data = await joinRoom(roomUUID); + /** + * @param uuid May be inviteCode or roomUUID or periodicUUID. + */ + public async joinRoom(uuid: string): Promise { + const data = await joinRoom(uuid); globalStore.updateToken(data); - this.updateRoom(roomUUID, data.ownerUUID, { - roomUUID, + this.updateRoom(data.roomUUID, data.ownerUUID, { + roomUUID: data.roomUUID, ownerUUID: data.ownerUUID, roomType: data.roomType, });