mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-01-29 01:28:29 +00:00
replace deprecated resolveRoomAlias
This commit is contained in:
parent
764e299211
commit
19d5ca9147
|
@ -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}...`);
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue