You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
delegate to class when needing a roomId permalink
This commit is contained in:
@@ -241,8 +241,11 @@ export function makeRoomPermalink(roomId) {
|
|||||||
// Aliases are already routable, and don't need extra information.
|
// Aliases are already routable, and don't need extra information.
|
||||||
if (roomId[0] !== '!') return permalinkBase;
|
if (roomId[0] !== '!') return permalinkBase;
|
||||||
|
|
||||||
const serverCandidates = pickServerCandidates(roomId);
|
const client = MatrixClientPeg.get();
|
||||||
return `${permalinkBase}${encodeServerCandidates(serverCandidates)}`;
|
const room = client.getRoom(roomId);
|
||||||
|
const permaLinkCreator = new RoomPermaLinkCreator(room);
|
||||||
|
permaLinkCreator.load();
|
||||||
|
return permaLinkCreator.forRoom();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function makeGroupPermalink(groupId) {
|
export function makeGroupPermalink(groupId) {
|
||||||
|
|||||||
Reference in New Issue
Block a user