Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make preview/meeting conditional #1919

Merged
merged 1 commit into from
Sep 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/100ms-custom-app/src/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ function isRoomCode(str) {

export const getRoomCodeFromUrl = () => {
const path = window.location.pathname;
const regex = /(\/streaming)?\/(preview|meeting)\/(?<code>[^/]+)/;
const regex = /(\/streaming)?(\/(preview|meeting))?\/(?<code>[^/]+)/;
const roomCode = path.match(regex)?.groups?.code || null;
return isRoomCode(roomCode) ? roomCode : null;
};

export const getRoomIdRoleFromUrl = () => {
const path = window.location.pathname;
const regex =
/(\/streaming)?\/(preview|meeting)\/(?<roomId>[^/]+)\/(?<role>[^/]+)/;
/(\/streaming)?(\/(preview|meeting))?\/(?<roomId>[^/]+)\/(?<role>[^/]+)/;
const roomId = path.match(regex)?.groups?.roomId || null;
const role = path.match(regex)?.groups?.role || null;
return {
Expand Down
Loading