Skip to content

Commit

Permalink
[keyserver] Use blank target in invite link
Browse files Browse the repository at this point in the history
Summary:
This page is displayed only on iOS devices. For Safari, this changes invite links experience a bit - the browser shows an alert

{F630049}

asking if a page should be opened instead of showing a banner.

{F630050}

It is also possible that this diff could solve an issue on other browsers https://linear.app/comm/issue/ENG-4089/invite-links-dont-work-on-prod#comment-2e1dff05.

Also included a small change where `inviteLinkUrl` is used instead of hardcoded URL.

Test Plan: Open a link and check if the app is opened (both on Safari and Chrome).

Reviewers: kamil, inka, bartek

Reviewed By: kamil

Subscribers: ashoat

Differential Revision: https://phab.comm.dev/D8465
  • Loading branch information
palys-swm committed Jul 11, 2023
1 parent 43fb444 commit 4eabcb0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion keyserver/src/responders/website-responders.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import ReactDOMServer from 'react-dom/server';
import t from 'tcomb';
import { promisify } from 'util';

import { inviteLinkUrl } from 'lib/facts/links.js';
import { baseLegalPolicies } from 'lib/facts/policies.js';
import stores from 'lib/facts/stores.js';
import { daysToEntriesFromEntryInfos } from 'lib/reducers/entry-reducer.js';
Expand Down Expand Up @@ -791,7 +792,8 @@ async function inviteResponder(req: $Request, res: $Response): Promise<void> {
<a class="button" href="${stores.appStoreUrl}">Download Comm</a>
<a
class="button secondary"
href="https://comm.app/invite/${secret}"
href="${inviteLinkUrl(secret)}"
target="_blank"
>
Invite Link
</a>
Expand Down

0 comments on commit 4eabcb0

Please sign in to comment.