This document describes an alternative method of accepting follow requests via an ‘invite code’ intended to be used with Private FEP-1b12 Groups, although it is applicable to any Actor. It further defines an extension of Webfinger to resolve an InviteCode to its corresponding Actor.
It is useful to allow some mechanism of joining communities via a secret rather than knowing the Actor ID and having manually accepted requests.
Some use cases include:
The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this specification are to be interpreted as described in [RFC-2119].
InviteCode is an ActivityStreams Object that represents a short code used to automatically Approve Follow requests.
It MUST contain the following properties:
type (REQUIRED): The value of the type property MUST be the string InviteCodename (REQUIRED): The instance-unique string used to reference this InviteCodeattributedTo (REQUIRED): The Actor that this InviteCode can be used to FollowThe document MAY contain additional properties.
The InviteCode name MAY be user-defined. It is RECOMMENDED that the name is a short, alphanumeric string.
If InviteCodes are to be dereferenceable via Webfinger as described below, the name MUST be able to form a valid URL.
As InviteCodes can be dereferenced via Webfinger, they MUST be unique per instance.
A Follow activity MAY include the ID of an InviteCode in the instrument field.
{
"id": "https://example.com/myFollowActivity",
"type": "Follow",
"actor": "https://example.com/myActor",
"object": "https://remote.example/remoteActor",
"instrument": "https://remote.example/remoteInvite",
}
When an Actor receives a Follow activity containing an InviteCode:
If the InviteCode is not valid, a Reject activity SHOULD be sent.
This section is non-normative
endTime as defined by ActivityStreams. After this timestamp the InviteCode may be deletedFor the purposes of Group moderation by external Actors is it useful to allow modifications to InviteCodes via activities.
When an activity modifying the invites collection of an Actor is received, the Actor MUST ensure that the activity is being performed by an authorised Actor.
The following activities are used to modify the invites collection:
When a Create, Add, Update, or Remove activity is received by an Actor from an unauthorised Actor, the Actor MAY send a Reject(InviteCode), refuse to add it to its invites Collection, and deem the InviteCode invalid for future Follow requests.
InviteCodes MAY be Created without being Added to the invites collection. Such InviteCodes are not discoverable via the collection and therefore can be used as ‘secrets’.
invites CollectionActors that accept InviteCodes SHOULD include an invites field that resolves to a Collection containing valid InviteCodes for this Actor.
If present, the invites Collection MUST be private and only accessible to authorised Actors. The mechanism described by FEP-db0e MAY be used to achieve this.
InviteCodes MAY be dereferenceable via Webfinger.
To prevent InviteCodes colliding with regular Webfinger acct lookups, a new URI scheme invite is defined.
To resolve an InviteCode ABCDE hosted on instance example.com, we can query:
GET https://example.com/.well-known/webfinger?resource=invite:ABCDE@example.com
This will resolve to an InviteCode object which can further be resolved via the attributedTo field to the target Actor.
The set of Actors authorised to make changes to an invites collection is up to the specific software controlling the collection.
Some examples include:
CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
To the extent possible under law, the authors of this Fediverse Enhancement Proposal have waived all copyright and related or neighbouring rights to this work.