HomePhabricator
Diffusion Comm 01cab9fc3af8

[keyserver] Handle accepting the invitation

Description

[keyserver] Handle accepting the invitation

Summary:
We do a lot of things when joining a thread so it made more sense to use already created logic for this. If the link secret is provided, we're checking link validity instead of permissions and based on the result continue with the process. This implementation has small issue, because it is possible that e.g. server crashes between adding someone to a thread and reporting link usage. This is a really unlikely corner case, which probably can be fixed by using transactions (there might be some other solutions, but probably complicated). At this point we're not handling link expiration, so I'll take a look at the solutions while implementing the remaining part.

Depends on D7525

Test Plan: Tested in combination with the next diff. Clicking join button should add a user to a community and a field in the db should be incremented.

Reviewers: bartek, kamil, inka

Reviewed By: bartek

Subscribers: ashoat, atul

Differential Revision: https://phab.comm.dev/D7556

Details

Provenance
tomekAuthored on Apr 19 2023, 3:37 AM
Reviewer
bartek
Differential Revision
D7556: [keyserver] Handle accepting the invitation
Parents
rCOMMf72bff03200c: [keyserver] Introduce invite link handler
Branches
Unknown
Tags
Unknown