From 9b13728d9ea000673c1f15d92dc5d7c5a271c2fb Mon Sep 17 00:00:00 2001 From: lukasIO Date: Fri, 11 Oct 2024 18:39:49 +0200 Subject: [PATCH] Fix attribute deletion (#1285) * Fix attribute deletion * Create silver-owls-brush.md --- .changeset/silver-owls-brush.md | 5 +++++ src/room/participant/LocalParticipant.ts | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 .changeset/silver-owls-brush.md diff --git a/.changeset/silver-owls-brush.md b/.changeset/silver-owls-brush.md new file mode 100644 index 0000000000..3440ee1800 --- /dev/null +++ b/.changeset/silver-owls-brush.md @@ -0,0 +1,5 @@ +--- +"livekit-client": patch +--- + +Fix attribute deletion diff --git a/src/room/participant/LocalParticipant.ts b/src/room/participant/LocalParticipant.ts index ce0a371883..ef7373fd1c 100644 --- a/src/room/participant/LocalParticipant.ts +++ b/src/room/participant/LocalParticipant.ts @@ -282,7 +282,10 @@ export default class LocalParticipant extends Participant { (!name || this.name === name) && (!metadata || this.metadata === metadata) && (!attributes || - Object.entries(attributes).every(([key, value]) => this.attributes[key] === value)) + Object.entries(attributes).every( + ([key, value]) => + this.attributes[key] === value || (value === '' && !this.attributes[key]), + )) ) { this.pendingSignalRequests.delete(requestId); resolve();