You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-28 15:22:05 +03:00
Oops, we still used this cache for new incoming virtual rooms
This commit is contained in:
@ -24,6 +24,8 @@ import { Room } from 'matrix-js-sdk/src/models/room';
|
|||||||
// is sip virtual: there could be others in the future.
|
// is sip virtual: there could be others in the future.
|
||||||
|
|
||||||
export default class VoipUserMapper {
|
export default class VoipUserMapper {
|
||||||
|
private virtualRoomIdCache = new Set<string>();
|
||||||
|
|
||||||
public static sharedInstance(): VoipUserMapper {
|
public static sharedInstance(): VoipUserMapper {
|
||||||
if (window.mxVoipUserMapper === undefined) window.mxVoipUserMapper = new VoipUserMapper();
|
if (window.mxVoipUserMapper === undefined) window.mxVoipUserMapper = new VoipUserMapper();
|
||||||
return window.mxVoipUserMapper;
|
return window.mxVoipUserMapper;
|
||||||
@ -61,6 +63,8 @@ export default class VoipUserMapper {
|
|||||||
public isVirtualRoom(room: Room):boolean {
|
public isVirtualRoom(room: Room):boolean {
|
||||||
if (this.nativeRoomForVirtualRoom(room.roomId)) return true;
|
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
|
// 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
|
// 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
|
// our stream. We don't trust this in general though, as it could be faked by an
|
||||||
|
Reference in New Issue
Block a user