Skip to content

Commit

Permalink
fix(classroom): force using periodic uuid when exist (#1551)
Browse files Browse the repository at this point in the history
  • Loading branch information
hyrious authored Jun 6, 2022
1 parent e751bbe commit 1817304
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion desktop/renderer-app/src/pages/utils/join-room-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ export const joinRoomHandler = async (
try {
const formatRoomUUID = roomUUID.replace(/\s+/g, "");
const roomInfo = roomStore.rooms.get(formatRoomUUID);
const data = await roomStore.joinRoom(formatRoomUUID);
const periodicUUID = roomInfo?.periodicUUID;
const data = await roomStore.joinRoom(periodicUUID || formatRoomUUID);
globalStore.updateShowGuide(data.showGuide);
globalStore.updatePeriodicUUID(roomInfo?.periodicUUID);

Expand Down
3 changes: 2 additions & 1 deletion web/flat-web/src/pages/utils/join-room-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ export const joinRoomHandler = async (
try {
const formatRoomUUID = roomUUID.replace(/\s+/g, "");
const roomInfo = roomStore.rooms.get(formatRoomUUID);
const data = await roomStore.joinRoom(formatRoomUUID);
const periodicUUID = roomInfo?.periodicUUID;
const data = await roomStore.joinRoom(periodicUUID || formatRoomUUID);
globalStore.updateShowGuide(data.showGuide);
globalStore.updatePeriodicUUID(roomInfo?.periodicUUID);
// try to work around chrome does not show permission popup after
Expand Down

0 comments on commit 1817304

Please sign in to comment.