support Lemmy
Background:
- https://join-lemmy.org/
- https://join-lemmy.org/docs/en/administration/federation_getting_started.html
- https://socialhub.activitypub.rocks/t/help-improving-federation-between-lemmy-and-other-projects/2308
I tried federating this like to this post on lemmy.ml (running BE 0.16.7) just now, and the AP inbox delivery to https://lemmy.ml/u/OptimusPrime/inbox returned 400 with invalid type: map, expected a string representing an URL at line 1 column 218. Bridgy Fed log here. Full AS2 object below.
Lemmy's design looks like Reddit, with up/downvotes instead of likes, so I don't know that it actually supports likes, but the error message sounds unrelated to that, more like maybe it can only handle string URLs for actors instead of compound objects.
{
"published": "2023-01-17T13:03:52-08:00",
"content": "likes <a class=\"u-like u-like-of\" href=\"https://lemmy.ml/post/713841\">[lemmy.ml](http://lemmy.ml/)</a>",
"url": "https://fed.brid.gy/r/https://snarfed.org/2023-01-17_lemmy-ml",
"actor": {
"url": "https://fed.brid.gy/r/https://snarfed.org/",
"image": {
"url": "https://secure.gravatar.com/avatar/947b5f3f323da0ef785b6f02d9c265d6?s=96&d=blank&r=g",
"type": "Image"
},
"type": "Person",
"name": "Ryan Barrett",
"icon": {
"url": "https://secure.gravatar.com/avatar/947b5f3f323da0ef785b6f02d9c265d6?s=96&d=blank&r=g",
"type": "Image"
},
"id": "https://fed.brid.gy/snarfed.org",
"preferredUsername": "[snarfed.org](http://snarfed.org/)"
},
"@context": "https://www.w3.org/ns/activitystreams",
"type": "Like",
"object": "https://lemmy.ml/post/713841",
"id": "https://fed.brid.gy/r/https://snarfed.org/2023-01-17_lemmy-ml",
"cc": [
"https://lemmy.ml/u/OptimusPrime",
"https://lemmy.ml/c/privacy",
"https://www.w3.org/ns/activitystreams#Public"
],
"to": [
"https://www.w3.org/ns/activitystreams#Public"
]
}
From https://socialhub.activitypub.rocks/t/help-improving-federation-between-lemmy-and-other-projects/2308/22 :
You are right this isnt complicated, in fact we are already doing the same thing in some other places. Unfortunately I dont have time to work on this, but if you want to make a contribution I would gladly guide you through the code.
Progress is a new error message. After #442, we're now getting HTTP 400 data did not match any variant of untagged enum PersonOrGroup on this Like:
{
"published": "2023-10-11T21:12:28-07:00",
"content": "Likes <a class=\"u-like-of\" href=\"https://lemmy.world/post/6663494\">https://lemmy.world/post/6663494</a>;..\n<div class=\"e-content\">\nA meme for math people – Lemmy.world\n</div>",
"url": "https://fed.brid.gy/r/https://snarfed.org/2023-10-11_a-meme-for-math-people-lemmy-world",
"actor": "https://fed.brid.gy/snarfed.org",
"id": "https://fed.brid.gy/r/https://snarfed.org/2023-10-11_a-meme-for-math-people-lemmy-world",
"@context": "https://www.w3.org/ns/activitystreams",
"type": "Like",
"object": "https://lemmy.world/post/6663494",
"cc": [
"https://lemmy.ml/c/memes",
"https://lemmy.world/u/hypertown",
"https://www.w3.org/ns/activitystreams#Public"
],
"to": [
"https://www.w3.org/ns/activitystreams#Public"
]
}
And for this reply, 400 Client Error: Bad Request for url: https://lemmy.world/u/hypertown/inbox ; deserializing body: ...
{
"id": "https://fed.brid.gy/r/https://snarfed.org/2023-10-11_a-meme-for-math-people-lemmy-world-3#bridgy-fed-create",
"actor": "https://fed.brid.gy/snarfed.org",
"published": "2023-10-12T04:17:52.463875+00:00",
"@context": "https://www.w3.org/ns/activitystreams",
"type": "Create",
"object": {
"published": "2023-10-11T21:17:47-07:00",
"content": "<a class=\"u-in-reply-to\" href=\"https://lemmy.world/post/6663494\"></a>\n<div class=\"e-content\">\nnice\n</div>",
"url": "https://fed.brid.gy/r/https://snarfed.org/2023-10-11_a-meme-for-math-people-lemmy-world-3",
"id": "https://fed.brid.gy/r/https://snarfed.org/2023-10-11_a-meme-for-math-people-lemmy-world-3",
"type": "Note",
"attributedTo": "https://fed.brid.gy/snarfed.org",
"inReplyTo": "https://lemmy.world/post/6663494",
"cc": [
"https://lemmy.ml/c/memes",
"https://lemmy.world/u/hypertown",
"https://www.w3.org/ns/activitystreams#Public"
],
"tag": [
{
"type": "Mention",
"href": "https://lemmy.world/u/hypertown"
}
],
"to": [
"https://www.w3.org/ns/activitystreams#Public"
]
},
"to": [
"https://www.w3.org/ns/activitystreams#Public"
]
}
Progress is a new error message. After #442, we're now getting HTTP 400
data did not match any variant of untagged enum PersonOrGroupon thisLike:
This also happens on follows.
- https://socialhub.activitypub.rocks/t/we-have-created-documentation-on-how-exactly-lemmy-federation-works/1085/46?u=snarfed
- https://github.com/LemmyNet/Lemmy/issues/2756
Is there any progress on this at all? The recent lemmy update made some heavy changes and improved the API significantly.
Exciting! Last I checked, we were blocked on Lemmy errors, details above. Feel free to test again and see if anything has changed!
Lemmy maintainer here, just came across this. I threw this activity into Lemmy tests, and it fails because the Create activity is missing cc field. You need to copy that from the inner Note.
By the way, Lemmy users view Bridgy Fed generally positively, as they consider all posts to be public anyway. So theres no need for complicated opt-in solutions in case of Lemmy. Here you can see the discussion. And another one.