mirror of
https://github.com/vector-im/element-web.git
synced 2026-05-12 07:56:18 +02:00
Change to class field
This commit is contained in:
parent
8a59a16ccb
commit
5f8aa32015
@ -10,16 +10,11 @@ import { AccountDataApi } from "./AccountDataApi";
|
||||
import { MatrixClientPeg } from "../MatrixClientPeg";
|
||||
|
||||
export class ClientApi implements IClientApi {
|
||||
private accountDataApi?: AccountDataApi;
|
||||
public readonly accountData = new AccountDataApi();
|
||||
|
||||
public getRoom(roomId: string): Room | null {
|
||||
const sdkRoom = MatrixClientPeg.safeGet().getRoom(roomId);
|
||||
if (sdkRoom) return new ModuleRoom(sdkRoom);
|
||||
return null;
|
||||
}
|
||||
|
||||
public get accountData(): AccountDataApi {
|
||||
this.accountDataApi ??= new AccountDataApi();
|
||||
return this.accountDataApi;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user