From 19d5ca9147db5abacb2bcd112b549cfb15224375 Mon Sep 17 00:00:00 2001 From: Ajay Bura <32841439+ajbura@users.noreply.github.com> Date: Wed, 1 Nov 2023 10:06:03 +0530 Subject: [PATCH] replace deprecated resolveRoomAlias --- src/app/organisms/join-alias/JoinAlias.jsx | 2 +- src/util/matrixUtil.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/organisms/join-alias/JoinAlias.jsx b/src/app/organisms/join-alias/JoinAlias.jsx index bb90bf35..bc0a8adb 100644 --- a/src/app/organisms/join-alias/JoinAlias.jsx +++ b/src/app/organisms/join-alias/JoinAlias.jsx @@ -62,7 +62,7 @@ function JoinAliasContent({ term, requestClose }) { let via; if (alias.startsWith('#')) { try { - const aliasData = await mx.resolveRoomAlias(alias); + const aliasData = await mx.getRoomIdForAlias(alias); via = aliasData?.servers.slice(0, 3) || []; if (mountStore.getItem()) { setProcess(`Joining ${alias}...`); diff --git a/src/util/matrixUtil.js b/src/util/matrixUtil.js index 54ee31bb..a776fb2b 100644 --- a/src/util/matrixUtil.js +++ b/src/util/matrixUtil.js @@ -41,7 +41,7 @@ export function getUsernameOfRoomMember(roomMember) { export async function isRoomAliasAvailable(alias) { try { - const result = await initMatrix.matrixClient.resolveRoomAlias(alias); + const result = await initMatrix.matrixClient.getRoomIdForAlias(alias); if (result.room_id) return false; return false; } catch (e) {