Page MenuHomePhabricator

[keyserver] Introduce invite link handler
ClosedPublic

Authored by tomek on Apr 19 2023, 9:49 AM.
Tags
None
Referenced Files
F3370637: D7525.diff
Tue, Nov 26, 3:30 AM
Unknown Object (File)
Thu, Oct 31, 3:18 PM
Unknown Object (File)
Tue, Oct 29, 10:06 AM
Unknown Object (File)
Mon, Oct 28, 1:26 AM
Unknown Object (File)
Mon, Oct 28, 1:26 AM
Unknown Object (File)
Mon, Oct 28, 1:26 AM
Unknown Object (File)
Mon, Oct 28, 1:26 AM
Unknown Object (File)
Mon, Oct 28, 1:25 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
No Lint Coverage
Unit
No Test Coverage

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.