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
Joeis followingAlice,Joeis the follower. - Followee: The user who is being subscribed to. If
Joeis followingAlice,Aliceis 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
Followentity withJoeas the author andAliceas the followee. - Send the
Followentity toAlice's inbox. - Mark the relationship as "processing" in its database until
Aliceaccepts the follow request.
Accepting the Follow Request
To accept the follow request, Alice can do the following:
- Create a FollowAccept entity with
Aliceas the author andJoeas the follower. - Send the
FollowAcceptentity 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
Aliceas the author andJoeas the follower. - Send the
FollowRejectentity 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
This entity is a Transient Entity.
Example Follow
{
"type": "Follow",
"author": "6e0204a2-746c-4972-8602-c4f37fc63bbe",
"created_at": "2021-01-01T00:00:00.000Z",
"followee": "example.com:02e1e3b2-cb1f-4e4a-b82e-98866bee5de7"
}