Skip to content

Commit

Permalink
fix: changeName to noop when name is same
Browse files Browse the repository at this point in the history
  • Loading branch information
zakybilfagih authored Nov 11, 2022
1 parent bb932db commit 5232d92
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/hms-video-web/src/transport/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -585,9 +585,12 @@ export default class HMSTransport implements ITransport {
}
}
async changeName(name: string) {
await this.signal.updatePeer({
name: name,
});
const peer = this.store.getLocalPeer();
if (peer && peer.name !== name) {
await this.signal.updatePeer({
name: name,
});
}
}

async changeMetadata(metadata: string) {
Expand Down

0 comments on commit 5232d92

Please sign in to comment.