Merge pull request #5914 from matrix-org/jryans/forget-room-error

Check for null room in `VisibilityProvider`
This commit is contained in:
J. Ryan Stinnett 2021-04-26 10:36:21 +01:00 committed by GitHub
commit dda18c9384
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -37,7 +37,11 @@ export class VisibilityProvider {
await VoipUserMapper.sharedInstance().onNewInvitedRoom(room);
}
public isRoomVisible(room: Room): boolean {
public isRoomVisible(room?: Room): boolean {
if (!room) {
return false;
}
if (
CallHandler.sharedInstance().getSupportsVirtualRooms() &&
VoipUserMapper.sharedInstance().isVirtualRoom(room)