I have recently added support to Lemmy for federating with two other projects which use Activitypub Group
s, Peertube and Plume. This was pretty straightforward for the most part, with one exception: the way to specify which group a specific post belongs to, and who created it, is very inconsistent. Here are the implementations I came across, if you know of others, please comment below.
Plume:
"attributedTo": [
"https://fediverse.blog/@/TheUser",
"https://fediverse.blog/~/TheGroup"
],
Both user (creator) and group are stored in attributedTo field
Lemmy:
"attributedTo": "https://lemmy.ml/u/TheUser",
"cc": ["http://lemmy.ml/c/TheGroup"],
In case of Lemmy, only the creator (Person) is stored in attributedTo
. The group id is stored in to
.
Peertube:
"attributedTo": [
{
"type": "Person",
"id": "https://framatube.org/accounts/TheUser"
},
{
"type": "Group",
"id": "https://framatube.org/video-channels/TheGroup"
}
],
Like Plume, Peertube stores both user and group in attributedTo field, but also indicates the type of each. While more complex, this makes parsing a bit easier.
Lemmy can currently handle the format used by Peertube in addition to its own. Support for Plume is also implemented, but waiting for some other compatibility changes on their side before merging.
In the interest of compatibility, it would be useful to agree on a common format for this information. Personally I dont like any of the options above very much. My choice would be something like the following, with a new field:
"attributedTo": "https://lemmy.ml/u/TheUser",
"group": "http://lemmy.ml/c/TheGroup",
What are your thoughts?