Skip to content

Commit

Permalink
Ignore unknown fields in protobuf parsing (#1029)
Browse files Browse the repository at this point in the history
* Ignore unknown fields in protobuf parsing

* Create empty-geese-exist.md
  • Loading branch information
lukasIO authored Feb 12, 2024
1 parent 58d1e65 commit a94b09c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/empty-geese-exist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"livekit-client": patch
---

Ignore unknown fields in protobuf parsing
2 changes: 1 addition & 1 deletion src/api/SignalClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ export class SignalClient {
let resp: SignalResponse;
if (typeof ev.data === 'string') {
const json = JSON.parse(ev.data);
resp = SignalResponse.fromJson(json);
resp = SignalResponse.fromJson(json, { ignoreUnknownFields: true });
} else if (ev.data instanceof ArrayBuffer) {
resp = SignalResponse.fromBinary(new Uint8Array(ev.data));
} else {
Expand Down

0 comments on commit a94b09c

Please sign in to comment.