From 648295e26b8b999f816a3ecedb3cd41328bfb39a Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 17 Feb 2021 19:00:21 +0000 Subject: [PATCH] Oops, we still used this cache for new incoming virtual rooms --- src/VoipUserMapper.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/VoipUserMapper.ts b/src/VoipUserMapper.ts index 5f4e33dc04..d919615349 100644 --- a/src/VoipUserMapper.ts +++ b/src/VoipUserMapper.ts @@ -24,6 +24,8 @@ import { Room } from 'matrix-js-sdk/src/models/room'; // is sip virtual: there could be others in the future. export default class VoipUserMapper { + private virtualRoomIdCache = new Set(); + public static sharedInstance(): VoipUserMapper { if (window.mxVoipUserMapper === undefined) window.mxVoipUserMapper = new VoipUserMapper(); return window.mxVoipUserMapper; @@ -61,6 +63,8 @@ export default class VoipUserMapper { public isVirtualRoom(room: Room):boolean { if (this.nativeRoomForVirtualRoom(room.roomId)) return true; + if (this.virtualRoomIdCache.has(room.roomId)) return true; + // also look in the create event for the claimed native room ID, which is the only // way we can recognise a virtual room we've created when it first arrives down // our stream. We don't trust this in general though, as it could be faked by an