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

Commit 648295e

Browse files
committed
Oops, we still used this cache for new incoming virtual rooms
1 parent 6130bdf commit 648295e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/VoipUserMapper.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ import { Room } from 'matrix-js-sdk/src/models/room';
2424
// is sip virtual: there could be others in the future.
2525

2626
export default class VoipUserMapper {
27+
private virtualRoomIdCache = new Set<string>();
28+
2729
public static sharedInstance(): VoipUserMapper {
2830
if (window.mxVoipUserMapper === undefined) window.mxVoipUserMapper = new VoipUserMapper();
2931
return window.mxVoipUserMapper;
@@ -61,6 +63,8 @@ export default class VoipUserMapper {
6163
public isVirtualRoom(room: Room):boolean {
6264
if (this.nativeRoomForVirtualRoom(room.roomId)) return true;
6365

66+
if (this.virtualRoomIdCache.has(room.roomId)) return true;
67+
6468
// also look in the create event for the claimed native room ID, which is the only
6569
// way we can recognise a virtual room we've created when it first arrives down
6670
// our stream. We don't trust this in general though, as it could be faked by an

0 commit comments

Comments
 (0)