From e7e329432f87a18eee8c5363b301724d2495a76b Mon Sep 17 00:00:00 2001 From: Carlos Santos <4a.santos@gmail.com> Date: Thu, 7 Aug 2025 19:11:12 +0200 Subject: [PATCH] backend: update role management to use speakerSecret for participant role changes --- backend/src/services/participant.service.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/services/participant.service.ts b/backend/src/services/participant.service.ts index 0b31749..317b2dd 100644 --- a/backend/src/services/participant.service.ts +++ b/backend/src/services/participant.service.ts @@ -114,9 +114,9 @@ export class ParticipantService { await this.livekitService.updateParticipantMetadata(roomId, participantName, JSON.stringify(metadata)); - const { publisherSecret, moderatorSecret } = MeetRoomHelper.extractSecretsFromRoom(meetRoom); + const { speakerSecret, moderatorSecret } = MeetRoomHelper.extractSecretsFromRoom(meetRoom); - const secret = newRole === ParticipantRole.MODERATOR ? moderatorSecret : publisherSecret; + const secret = newRole === ParticipantRole.MODERATOR ? moderatorSecret : speakerSecret; await this.frontendEventService.sendParticipantRoleUpdatedSignal(roomId, participantName, newRole, secret); } catch (error) { this.logger.error('Error changing participant role:', error); @@ -133,7 +133,7 @@ export class ParticipantService { } } - protected generateModeratorPermissions(roomId: string): ParticipantPermissions { + protected generateModeratorPermissions(roomId: string, addJoinPermission = true): ParticipantPermissions { return { livekit: { roomJoin: addJoinPermission,