Skip to content

Commit 8808635

Browse files
authored
Ensure permission event is only emitted once for local participant (#1643)
1 parent ad9c101 commit 8808635

2 files changed

Lines changed: 5 additions & 11 deletions

File tree

.changeset/brown-masks-stop.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'livekit-client': patch
3+
---
4+
5+
Ensure permission event is only emitted once for local participant

src/room/participant/LocalParticipant.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {
99
Encryption_Type,
1010
JoinResponse,
1111
ParticipantInfo,
12-
ParticipantPermission,
1312
RequestResponse,
1413
RequestResponse_Reason,
1514
RpcAck,
@@ -453,16 +452,6 @@ export default class LocalParticipant extends Participant {
453452
return this.setTrackEnabled(Track.Source.ScreenShare, enabled, options, publishOptions);
454453
}
455454

456-
/** @internal */
457-
setPermissions(permissions: ParticipantPermission): boolean {
458-
const prevPermissions = this.permissions;
459-
const changed = super.setPermissions(permissions);
460-
if (changed && prevPermissions) {
461-
this.emit(ParticipantEvent.ParticipantPermissionsChanged, prevPermissions);
462-
}
463-
return changed;
464-
}
465-
466455
/** @internal */
467456
async setE2EEEnabled(enabled: boolean) {
468457
this.encryptionType = enabled ? Encryption_Type.GCM : Encryption_Type.NONE;

0 commit comments

Comments
 (0)