snapshot of https://github.com/jitsi/jitsi-meet.git @ fd1749dd28f4138aa80234fc7f311b19aaffa0e7 (2026-09-15)
This commit is contained in:
15
react/features/base/config/getRoomName.ts
Normal file
15
react/features/base/config/getRoomName.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { getBackendSafeRoomName } from '../util/uri';
|
||||
|
||||
/**
|
||||
* Builds and returns the room name.
|
||||
*
|
||||
* @returns {string}
|
||||
*/
|
||||
export default function getRoomName(): string | undefined {
|
||||
const path = window.location.pathname;
|
||||
|
||||
// The last non-directory component of the path (name) is the room.
|
||||
const roomName = path.substring(path.lastIndexOf('/') + 1) || undefined;
|
||||
|
||||
return getBackendSafeRoomName(roomName);
|
||||
}
|
||||
Reference in New Issue
Block a user