mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 11:47:23 +03:00
Fix permalink local linkification to not strip via servers
This commit is contained in:
parent
ddba5c6223
commit
d0c716d61c
1 changed files with 4 additions and 0 deletions
|
@ -332,6 +332,10 @@ export function tryTransformPermalinkToLocalHref(permalink: string): string {
|
|||
if (permalinkParts.roomIdOrAlias) {
|
||||
const eventIdPart = permalinkParts.eventId ? `/${permalinkParts.eventId}` : '';
|
||||
permalink = `#/room/${permalinkParts.roomIdOrAlias}${eventIdPart}`;
|
||||
if (permalinkParts.viaServers.length > 0) {
|
||||
const riotPermalinkConstructor = new SpecPermalinkConstructor();
|
||||
permalink += riotPermalinkConstructor.encodeServerCandidates(permalinkParts.viaServers);
|
||||
}
|
||||
} else if (permalinkParts.groupId) {
|
||||
permalink = `#/group/${permalinkParts.groupId}`;
|
||||
} else if (permalinkParts.userId) {
|
||||
|
|
Loading…
Reference in a new issue