From 12b943764e35427dd1b133943e8baf7bc9f3ab8e Mon Sep 17 00:00:00 2001 From: juancarmore Date: Fri, 22 Aug 2025 14:37:03 +0200 Subject: [PATCH] frontend: enhance room creation navigation by extracting path and query parameters from moderator URL --- .../rooms/room-wizard/room-wizard.component.ts | 13 ++++++++++--- .../src/lib/pages/meeting/meeting.component.ts | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/frontend/projects/shared-meet-components/src/lib/pages/console/rooms/room-wizard/room-wizard.component.ts b/frontend/projects/shared-meet-components/src/lib/pages/console/rooms/room-wizard/room-wizard.component.ts index 22a9dd9..2688d10 100644 --- a/frontend/projects/shared-meet-components/src/lib/pages/console/rooms/room-wizard/room-wizard.component.ts +++ b/frontend/projects/shared-meet-components/src/lib/pages/console/rooms/room-wizard/room-wizard.component.ts @@ -129,9 +129,12 @@ export class RoomWizardComponent implements OnInit { async createRoom(roomName?: string) { try { - // Call the room service to create a new room const { moderatorUrl } = await this.roomService.createRoom({ roomName }); - await this.navigationService.redirectTo(moderatorUrl); + + // Extract the path and query parameters from the moderator URL and navigate to it + const url = new URL(moderatorUrl); + const pathWithParams = url.pathname + url.search + url.hash; + await this.navigationService.redirectTo(pathWithParams); } catch (error) { const errorMessage = `Failed to create room ${roomName}`; this.notificationService.showSnackbar(errorMessage); @@ -158,7 +161,11 @@ export class RoomWizardComponent implements OnInit { } else { // Create new room const { moderatorUrl } = await this.roomService.createRoom(roomOptions); - await this.navigationService.redirectTo(moderatorUrl); + + // Extract the path and query parameters from the moderator URL and navigate to it + const url = new URL(moderatorUrl); + const pathWithParams = url.pathname + url.search + url.hash; + await this.navigationService.redirectTo(pathWithParams); } } catch (error) { const errorMessage = `Failed to ${this.editMode ? 'update' : 'create'} room`; diff --git a/frontend/projects/shared-meet-components/src/lib/pages/meeting/meeting.component.ts b/frontend/projects/shared-meet-components/src/lib/pages/meeting/meeting.component.ts index 69ee066..36f874d 100644 --- a/frontend/projects/shared-meet-components/src/lib/pages/meeting/meeting.component.ts +++ b/frontend/projects/shared-meet-components/src/lib/pages/meeting/meeting.component.ts @@ -439,7 +439,7 @@ export class MeetingComponent implements OnInit { } // Navigate to the disconnected page with the reason - await this.navigationService.navigateTo('disconnected', { reason: leftReason }); + await this.navigationService.navigateTo('disconnected', { reason: leftReason }, true); } /**