server icon indicating copy to clipboard operation
server copied to clipboard

User specific invite support

Open erkinalp opened this issue 4 years ago • 5 comments

Currently, only token style invites are possible. User specific invites should be added as an extension. Compatible clients can show them in the quick switcher/dashboards/invite list.

  • [ ] POST /channels/{channel.id}/invite/{user.id} — invite user
  • [ ] DELETE /channels/{channel.id}/invite/{user.id}— disinvite user
  • [ ] DELETE /channels/{channels.id}/invite/@me — refuse a user-specific invite directed towards self
  • [ ] GET /users/@me/invites
  • [ ] INVITE_USER event
  • [ ] GET /users/{user.id}/invites

erkinalp avatar Jul 03 '21 18:07 erkinalp

can you further explain what you mean with "token style invites"? What are user specific invites?

samuelscheit avatar Jul 08 '21 07:07 samuelscheit

Token invite means anyone knowing the invite token can use the invite, such as https://discord.gg/eDav8uDEfY. Those are also known as mass invites. User specific invite means the invite can only be used by users specified during the creation of invite. Facebook Messenger and Matrix have user specific invites for example.

erkinalp avatar Jul 08 '21 07:07 erkinalp

do they have user specific invites or one time usage invites?

samuelscheit avatar Jul 08 '21 07:07 samuelscheit

Facebook Messenger, Facebook Groups and Matrix have true user specific invites. Telegram and WhatsApp support user specific invites for 1:1 chats only.

erkinalp avatar Jul 08 '21 07:07 erkinalp

A user specific invite is similar to a token-style invite, but differing in regard it is only valid for the targeted users. To create a user-specific invite, the endpoint to create a token invite will be reused, with target_type set to -1, which would register an user-specific invite. User-specific invites will appear in the invite management dashboard the same way as token invites, and be dispatched as gateway events to the target users, so that compatible clients can show those invites in their dashboard. Withdrawal of an user specific invite should invalidate that invite for all its targets. Use or refusal (represented in the API as "delete invite") of such an invite by its target user should invalidate the invite for that target user.

erkinalp avatar Sep 04 '21 09:09 erkinalp