Closed snarfed closed 3 months ago
When I test the conversion locally, it doesn't have the bad inReplyTo
:
o = Object.get_by_id('at://did:plc:oio4hkxaop4ao4wz2pp3f4cr/app.bsky.feed.post/3kyytzhik6224')
p(ActivityPub.convert(o))
{
"@context": "https://www.w3.org/ns/activitystreams",
"type": "Note",
"id": "https://bsky.brid.gy/convert/ap/at://did:plc:oio4hkxaop4ao4wz2pp3f4cr/app.bsky.feed.post/3kyytzhik6224",
"url": "https://fed.brid.gy/r/https://bsky.app/profile/did:plc:oio4hkxaop4ao4wz2pp3f4cr/post/3kyytzhik6224",
"inReplyTo": {
"id": "https://bsky.brid.gy/convert/ap/at://did:plc:6x3sa4qcuhtc4yky2f6eu2ki/app.bsky.feed.post/3kyt3df7obk27",
"url": "https://bsky.app/profile/did:plc:6x3sa4qcuhtc4yky2f6eu2ki/post/3kyt3df7obk27"
},
"content": "<p><a href=\"https://bsky.brid.gy/ap/did:plc:6x3sa4qcuhtc4yky2f6eu2ki\">@flaky.bsky.social</a> <a href=\"https://bsky.brid.gy/ap/did:plc:esmiuxk53vmsllayghrq676w\">@o.simardcasanova.net</a> check out the last sentence here <a href=\"https://mkultra.monster/@cmdr_nova/112909755730245873\">mkultra.monster/@cmdr_nova/1...</a> \ud83e\udee0</p>",
"published": "2024-08-05T21:38:18.901Z",
"attributedTo": "https://bsky.brid.gy/ap/did:plc:oio4hkxaop4ao4wz2pp3f4cr",
"tag": [{
"type": "Mention",
"name": "@flaky.bsky.social",
"href": "https://bsky.brid.gy/ap/did:plc:6x3sa4qcuhtc4yky2f6eu2ki"
},{
"type": "Mention",
"name": "@o.simardcasanova.net",
"href": "https://bsky.brid.gy/ap/did:plc:esmiuxk53vmsllayghrq676w"
},{
"url": "https://mkultra.monster/@cmdr_nova/112909755730245873",
"type": "Article",
"name": "mkultra.monster/@cmdr_nova/1..."
}
],
"to": ["https://www.w3.org/ns/activitystreams#Public"],
"content_is_html": true
}
Reproduced!
1) https://hachyderm.io/@shreyan/112573306835667555 2) https://mastodon.social/@psionides/112916384545607094
In the second case I even got a notification on that Mastodon account 💀
wowww. what the hell is even going on here 😠
:p
Uh… so… this happened again (nothing sensitive, can stay there), but this time also the whole subthread from Bluesky of people replying to my comment with the link got all sent there to that thread too! :O https://mastodon.social/@fediversecounter/112920443483887367
Uh… so… this happened again (nothing sensitive, can stay there), but this time also the whole subthread from Bluesky of people replying to my comment with the link got all sent there to that thread too! :O https://mastodon.social/@fediversecounter/112920443483887367
The latter part is expected after the initial fault, as ActivityPub replies only encode the direct parent.
(More specifically, Mastodon does keep track of threads in its database, but it resolves them on receipt of a reply by walking (fetching) backwards until it finds a post it already has. If that fails then the reply becomes permanently detached in some ways, iirc.)
Found the problem here, the culprit is orig_obj
passed through send tasks to ActivityPub.postprocess_as2
. That method is a dark ugly corner of the codebase, especially its orig_obj
usage. Trying to incrementally clean it up a bit now.
OK, fix here should be deployed in ~5m. Thanks and props again to @mackuba for catching and investigating this!
Also, re the root cause here, orig_obj
is cursed. Gotta get rid of it. Not sure how, since most fediverse software still doesn't understand multiply-valued inReplyTo
or object
(eg https://funfedi.dev/support_tables/generated/in_reply_to/) ...but still, orig_obj
is cursed. Gotta get rid of it.
👻
This is a weird one, I still don't understand what happened. @mackuba replied (now deleted) to this Bluesky post with a link embed to this Mastodon post. When we converted that reply to AS2, we for some reason set
inReplyTo
to the linked Mastodon post, which is clearly wrong. I haven't been able to reproduce that bug locally yet.Bluesky post record:
AP inbox delivery log with full AS2 activity: