Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit a53de43

Browse files
committed
Make updateDevices more readable
1 parent 0dda153 commit a53de43

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/stores/VideoChannelStore.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,9 @@ export default class VideoChannelStore extends EventEmitter {
130130
return;
131131
}
132132

133-
const devices = this.cli.getRoom(this.roomId)
134-
.currentState.getStateEvents(VIDEO_CHANNEL_MEMBER, this.cli.getUserId())
135-
?.getContent<IVideoChannelMemberContent>()?.devices ?? [];
133+
const room = this.cli.getRoom(this.roomId);
134+
const devicesState = room.currentState.getStateEvents(VIDEO_CHANNEL_MEMBER, this.cli.getUserId());
135+
const devices = devicesState?.getContent<IVideoChannelMemberContent>()?.devices ?? [];
136136

137137
await this.cli.sendStateEvent(
138138
this.roomId, VIDEO_CHANNEL_MEMBER, { devices: fn(devices) }, this.cli.getUserId(),

0 commit comments

Comments
 (0)