Skip to content

Commit

Permalink
[keyserver] Use custom url on intermediate invite link page
Browse files Browse the repository at this point in the history
Summary:
Clicking universal links (https) in other browsers than Safari doesn't open the app. But using `comm://` scheme should work correctly.

https://linear.app/comm/issue/ENG-4089/invite-links-dont-work-on-prod

Test Plan:
Click a link (in Safari and Chrome) and check if the app is opened. It works in debug mode - still have to check in release.

Update: tested it in release mode and it works.

Reviewers: kamil, inka

Reviewed By: kamil

Subscribers: ashoat

Differential Revision: https://phab.comm.dev/D8620
  • Loading branch information
palys-swm committed Jul 31, 2023
1 parent ed7f2c9 commit 24b521e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
3 changes: 1 addition & 2 deletions keyserver/src/responders/website-responders.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ 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 @@ -798,7 +797,7 @@ async function inviteResponder(req: $Request, res: $Response): Promise<void> {
<div class="separator"></div>
<section class="buttons">
<a class="button" href="${stores.appStoreUrl}">Download Comm</a>
<a class="button secondary" href="${inviteLinkUrl(secret)}">
<a class="button secondary" href="comm://invite/${secret}">
Invite Link
</a>
</section>
Expand Down
4 changes: 4 additions & 0 deletions native/ios/Comm/Info.debug.plist
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>comm</string>
<key>CFBundleURLSchemes</key>
<array>
<string>comm</string>
Expand Down
13 changes: 13 additions & 0 deletions native/ios/Comm/Info.release.plist
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@
<string>????</string>
<key>CFBundleVersion</key>
<string>238</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>comm</string>
<key>CFBundleURLSchemes</key>
<array>
<string>comm</string>
</array>
</dict>
</array>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>rainbow</string>
Expand Down

0 comments on commit 24b521e

Please sign in to comment.