-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
According to the ActivityStreams vocabulary / JSON-LD specification inReplyTo
is not limited to a single IRI
#25588
Comments
it may be indeed the case that mastodon does not support |
I'll give you that @trwnh, I'll add it (:partying_face: fixed!) to my own list of bugs, thank you. :) later edit
Looking even deeper, it looks like the collections and paged collections properties |
@mariusor i do dislike the "collapse the array when there is a single value" behavior of JSON-LD, yes -- see w3c/activitystreams#535 for more information about this regarding the as2 context. regarding regarding mastodon: i'm not being nitpicky, it's just how the spec is defined right now -- consistency with compacted form against the normative context means that in theory this is a MUST clause being violated. spec compliance is obviously something that is fast and loose in the fediverse, so there are bound to be oversights in multiple projects. following JSON-LD and AS2, any term can be either a single value/node or an unordered array, unless it is marked "functional" in AS2-Vocab, in which case it must be a single value/node. the cases you describe in mastodon are likewise technically incompliant. with that said: this is all tangential to the issue, being that mastodon has incorrect expectations regarding which properties can be arrays and which ones can't be. the most correct thing to do would be to follow postel's law and author correctly-collapsed values while accepting more leniently incorrect serializations by other implementations. this should be applied to pretty much every property (again, anything not marked functional in as2-vocab). also tangentially: if everyone is already doing the "wrong" thing, then it might be more prudent to upstream this and change the normative context as described in w3c/activitystreams#535 at least in part. you mention |
Steps to reproduce the problem
https://federated.id/objects/b21f0da2-1cfe-4a97-8fb7-af3233deaf7d, but I fixed the compaction issue mentioned below)Expected behaviour
Mastodon returns the Note object as a search result.
Actual behaviour
Reported "500 Internal Server Error" and no result.
Detailed description
The reason for the crash seems to be that the
inReplyTo
property of the object is an array instead of a single IRI and Mastodon expects it to either be null or a string.The search page URL at the time of the bug is:
/api/v2/search?q=https:%2F%2Ffederated.id%2Fobjects%2F4cf520f4-7aec-47e3-a245-24a9a31f3360&resolve=true&limit=5
The Stack trace from the logs:
Specifications
Mastodon v4.1.2
Ruby is 3.0.6p216
NodeJS is 14.21.3
The text was updated successfully, but these errors were encountered: