Filter inactive participants from the dev tools
This commit is contained in:
parent
e98abaff4d
commit
c2d7156033
2 changed files with 15 additions and 3 deletions
|
@ -167,9 +167,17 @@ export class ConferenceCallManager extends EventEmitter {
|
||||||
this.client.sendStateEvent(this.roomId, CONF_ROOM, { active: true }, "");
|
this.client.sendStateEvent(this.roomId, CONF_ROOM, { active: true }, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
this.room
|
const roomMemberIds = this.room.getMembers().map(({ userId }) => userId);
|
||||||
.getMembers()
|
|
||||||
.forEach((member) => this._processMember(member.userId));
|
for (const userId of this.debugState.keys()) {
|
||||||
|
if (roomMemberIds.indexOf(userId) === -1) {
|
||||||
|
this.debugState.delete(userId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
roomMemberIds.forEach((userId) => {
|
||||||
|
this._processMember(userId);
|
||||||
|
});
|
||||||
|
|
||||||
for (const { call, onHangup, onReplaced } of this.pendingCalls) {
|
for (const { call, onHangup, onReplaced } of this.pendingCalls) {
|
||||||
if (call.roomId !== roomId) {
|
if (call.roomId !== roomId) {
|
||||||
|
|
|
@ -41,6 +41,10 @@ export function DevTools({ manager }) {
|
||||||
};
|
};
|
||||||
}, [manager]);
|
}, [manager]);
|
||||||
|
|
||||||
|
if (!manager.joined) {
|
||||||
|
return <div className={styles.devTools} />;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.devTools}>
|
<div className={styles.devTools}>
|
||||||
{Array.from(debugState.entries()).map(([userId, props]) => (
|
{Array.from(debugState.entries()).map(([userId, props]) => (
|
||||||
|
|
Loading…
Add table
Reference in a new issue