Fix a soft crash with video rooms (#8333)

pull/21833/head
Robin 2022-04-14 18:13:00 -04:00 committed by GitHub
parent 8da6c98201
commit f27386ec37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -42,6 +42,6 @@ export const addVideoChannel = async (roomId: string, roomName: string) => {
export const getConnectedMembers = (state: RoomState): RoomMember[] =>
state.getStateEvents(VIDEO_CHANNEL_MEMBER)
// Must have a device connected and still be joined to the room
.filter(e => e.getContent<IVideoChannelMemberContent>().devices?.length)
.filter(e => e.getContent<IVideoChannelMemberContent>()?.devices?.length)
.map(e => state.getMember(e.getStateKey()))
.filter(member => member.membership === "join");
.filter(member => member?.membership === "join");