Avoid using deprecated exports, fields, and duplicate code (#12555)
This commit is contained in:
parent
1973197eb6
commit
148a360598
33 changed files with 258 additions and 108 deletions
|
@ -90,7 +90,7 @@ export const usePublicRoomDirectory = (): {
|
|||
async ({ limit = 20, query, roomTypes }: IPublicRoomsOpts): Promise<boolean> => {
|
||||
const opts: IRoomDirectoryOptions = { limit };
|
||||
|
||||
if (config?.roomServer != MatrixClientPeg.getHomeserverName()) {
|
||||
if (config?.roomServer != MatrixClientPeg.safeGet().getDomain()) {
|
||||
opts.server = config?.roomServer;
|
||||
}
|
||||
|
||||
|
@ -139,7 +139,7 @@ export const usePublicRoomDirectory = (): {
|
|||
return;
|
||||
}
|
||||
|
||||
const myHomeserver = MatrixClientPeg.getHomeserverName();
|
||||
const myHomeserver = MatrixClientPeg.safeGet().getDomain()!;
|
||||
const lsRoomServer = localStorage.getItem(LAST_SERVER_KEY);
|
||||
const lsInstanceId: string | undefined = localStorage.getItem(LAST_INSTANCE_KEY) ?? undefined;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue