Skip to content

Commit

Permalink
fix(flat-stores): save uuid instead of invite code on join room (#2062)
Browse files Browse the repository at this point in the history
  • Loading branch information
hyrious authored Oct 27, 2023
1 parent 6bbd7dd commit 4066421
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions packages/flat-stores/src/room-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,14 @@ export class RoomStore {
// need roomUUID and periodicUUID from server to cache the payload
}

public async joinRoom(roomUUID: string): Promise<JoinRoomResult> {
const data = await joinRoom(roomUUID);
/**
* @param uuid May be inviteCode or roomUUID or periodicUUID.
*/
public async joinRoom(uuid: string): Promise<JoinRoomResult> {
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,
});
Expand Down

0 comments on commit 4066421

Please sign in to comment.