Sorry for bumping an old topic, but I’m now at the stage where I’m going to be federating with myself.
I do need federated friend lists because many things in this style of social network revolve around them:
- Mutual friends are a big one. I want to be able to display mutual friends for any profile you could open. It also makes sense to do that for friend requests. In both these cases the list of mutual friends helps understand the social context. To do this, I need to have a complete friend (mutual following) list of the other user and then intersect them. I could derive that by intersecting
following
andfollowers
, and I’ll have to do that for Mastodon and such. - In groups and events, I’d like to show which friends are there. Doesn’t require any federation trickery as pertains to friends, but, btw, how do I represent the group member list?
- Same for likes. People tend to be curious and want to know who of their friends liked something.
I’m going to send friend requests (semantically “I ask you to follow me back requests”) as Offer{Relationship}
where relationship type is http://purl.org/vocab/relationship/friendOf
. I’ll only send that to compatible servers and the UI will change based on this compatibility. A server is compatible if it contains friendRequests
in metadata.capabilities
in its nodeinfo. I can’t think of a better way of capability negotiation and there’s clearly some needed.
Flow between compatible servers:
- A sends B two activities:
Follow
andOffer{Relationship}
- B sends A
Accept{Follow}
immediately because I don’t implement follower approval - The user on B sees the friend request and accepts it
3.1. If the user rejects the request, B sendsReject{Offer{Relationship}}
and the process ends here, with an unilateral follow - B sends A
Accept{Offer{Relationship}}
andFollow
- A sends B
Accept{Follow}
- Users are now friends
If the other server doesn’t support friend requests, the flow is exactly like it is between the existing microblogging servers. Follow
, then Accept{Follow}
, and that’s it.
I’m going to also add a friends
collection to my actors, where each object would be like this:
{
"type": "Relationship",
"relationship": "http://purl.org/vocab/relationship/friendOf",
"object": "https://friends.grishka.me/users/1",
"subject": "https://friends.grishka.me/users/2"
}