New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: invites regardless of registration type, invite privilege, groups to join on acceptance #8786
Conversation
Instead of introducing a new socket call, let's add a new route to the Write API. Don't worry, this is a brand new feature that got merged last week, so it is not a surprise you did not know about it 😄 Step 1Add a new route to Step 2Add the controller logic to Note here that a lot of these controllers call out to methods in In this case, this is a brand new route with no websocket variant (or rather, we're rewriting it to not be a socket call), so you do not need to put your logic into the You'll note that the token generation/deletion controllers are done in this way. This is because there is no websocket equivalent. Step 3Rewrite your call so that instead of socket.emit, you call it via:
The api module automatically handles errors by calling Slack me if you have questions! |
It is ok to use socket.io for |
3309918
to
6ddea1f
Compare
6ddea1f
to
e1acbda
Compare
Instead of GET /api/v3/users/:uid/inviteGroups
To POST /api/v3/users/:uid/invites
Some notes:
Hidden groups are not included in the "groups to be joined"
<select>
to be consistent with the behavior in other places.This leaves off joining of groups when the registration is completed by an approval (in approve-only registration mode), since it seems currently we can't distinguish a registration made through an invite link from one that is not. (Only mechanism for that right now is presence of an invite token.)
In approval flow, invite keys are not deleted, and it is assumed the user is coming from invite link even when it is not (added to the "Invitations" table at /admin/manage/registration).
In normal flow, invite-invitee "relationship" is deleted.
We can have a follow-up on this (like an invite accepted "flag", and tangentially, showing groups from invites in the "Invitations" table).