Follow
Sometimes, Users want to subscribe to each other to see each other's content. The Follow
entity facilitates this, by defining a subscription relationship between two users.
Vocabulary
- Follower: The user who is subscribing to another user. If
Joe
is followingAlice
,Joe
is the follower. - Followee: The user who is being subscribed to. If
Joe
is followingAlice
,Alice
is the followee. - Subscribing: Identical to Following. The act of subscribing to another user's content.
Usage
Consider the following example:
Joe
, a user on social.joe.org
, wants to follow Alice
, a user on alice.dev
.
Sending a Follow Request
To establish a follow relationship, social.joe.org
can do the following:
- Create a
Follow
entity withJoe
as the author andAlice
as the followee. - Send the
Follow
entity toAlice
's inbox. - Mark the relationship as "processing" in its database until
Alice
accepts the follow request.
Accepting the Follow Request
To accept the follow request, Alice
can do the following:
- Create a FollowAccept entity with
Alice
as the author andJoe
as the follower. - Send the
FollowAccept
entity toJoe
's inbox. - Update the relationship status in its database to "accepted".
Rejecting the Follow Request
To reject the follow request, Alice
can do the following:
- Create a FollowReject entity with
Alice
as the author andJoe
as the follower. - Send the
FollowReject
entity toJoe
's inbox. - Optionally, log the rejection in its database.
Final Steps
Depending on whether the follow request is accepted or rejected, social.joe.org
can then update the relationship status accordingly in its database.
Behaviour
Once a follow relationship is established, the followee's instance should send all new notes from the followee to the follower's inbox.
Entity Definition
Example Follow
{
"type": "Follow",
"id": "3e7e4750-afd4-4d99-a256-02f0710a0520",
"author": "https://example.com/users/6e0204a2-746c-4972-8602-c4f37fc63bbe",
"created_at": "2021-01-01T00:00:00.000Z",
"followee": "https://example.com/users/02e1e3b2-cb1f-4e4a-b82e-98866bee5de7"
}