Page MenuHomePhabricator

[keyserver] Introduce invite link handler
ClosedPublic

Authored by tomek on Apr 19 2023, 9:49 AM.
Tags
None
Referenced Files
Unknown Object (File)
Apr 3 2024, 8:22 PM
Unknown Object (File)
Apr 3 2024, 8:22 PM
Unknown Object (File)
Apr 3 2024, 8:22 PM
Unknown Object (File)
Apr 3 2024, 8:22 PM
Unknown Object (File)
Apr 3 2024, 8:21 PM
Unknown Object (File)
Apr 3 2024, 8:14 PM
Unknown Object (File)
Mar 28 2024, 3:19 PM
Unknown Object (File)
Feb 18 2024, 4:10 AM
Subscribers

Details

Summary

The handler checks if the app was opened by a link. It also listens for link clicks while the app is running. If a user is logged out, clicking a link results in saving it for later. Then, when a user is logged in, we validate a link and navigate to invite modal, based on the result. The only case when this navigation won't happen is when the user is already a member of a community.

Depends on D7524

Test Plan

Check if clicking an invalid link causes a modal to be shown with an error message.
Check if clicking a valid link causes a modal with join button to be shown.
Check if clicking a link to a community to which the user already belongs doesn't result in showing a modal.
Check if clicking a link has the same result when the app is closed and when the app is running.

I've tested all of these on iOS, and I have to do this also on Android.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

native/navigation/invite-link-handler.react.js
24 ↗(On Diff #25363)

This one listens for a link click while the app is running.

25–30 ↗(On Diff #25363)

And this one is for the case when the app was opened by using a link.

bartek added inline comments.
native/navigation/invite-link-handler.react.js
25–30 ↗(On Diff #25363)

It might be worth adding in-code comments because this isn't that obvious

This revision is now accepted and ready to land.Apr 19 2023, 11:48 AM
This revision was automatically updated to reflect the committed changes.