Skip to content

Commit

Permalink
Merge pull request #271 from deepbluev7/fix-element-deeplinks
Browse files Browse the repository at this point in the history
Properly pass vias to Element clients
  • Loading branch information
t3chguy authored Jun 6, 2022
2 parents 0a15f14 + 0ca4d66 commit d7c1085
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/open/clients/Element.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ export class Element {
fragmentPath = `room/${link.identifier}/${link.eventId}`;
break;
}

if ((link.kind === LinkKind.Event || link.kind === LinkKind.Room) && link.servers.length > 0) {
fragmentPath += '?' + link.servers.map(server => `via=${encodeURIComponent(server)}`).join('&');
}

const isWebPlatform = platform === Platform.DesktopWeb || platform === Platform.MobileWeb;
if (isWebPlatform || platform === Platform.iOS) {
let instanceHost = trustedWebInstances[0];
Expand Down

0 comments on commit d7c1085

Please sign in to comment.