Open snarfed opened 1 year ago
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 PersonOrGroup
on thisLike
:
This also happens on follows.
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.
Background:
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 withinvalid 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
actor
s instead of compound objects.