-
Notifications
You must be signed in to change notification settings - Fork 111
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
A single object within the attachment property does not serialize as an array #150
Comments
I'd open an issue with Mastodon, as this is a valid ActivityStreams representation they should be able to handle. |
Note that there is no trivial fix for go-fed, unfortunately. The post in #139 outlines the difficulty for any property, Furthermore, if go-fed is expected to craft special ActivityStream flavors on a per-peer-software basis, things get very complicated very fast. In principle it is a problem I would rather not solve in go-fed, and instead tell peer software to handle receiving ActivityStreams data more robustly (as go-fed already does). I can walk you through why this problem is dangerously intractable: to begin, this is a major violation of go-fed's design principle of "generate once work everywhere" style of ActivityStreams solution. What this implies is that there is a Where it becomes intractable is this: let us say you want to interoperate with a second peer software, let us call it FooBarFed, and it has a conflicting style since it isn't robust enough to handle the mastodon style. How do you style the same message twice, without having to generate a second Then, this scales into brokenness as N peer softwares do not robustly handle incoming ActivityStreams data into N different I would rather the peer software simply be more robust in what ActivityStreams data it accepts. Instead of opening the above can of worms. EDIT: The robustness principle of "be conservative in what you do, be liberal in what you accept from others" applies here. |
Thanks for the clarification, that's what I figured. Closing! |
I'm guessing this is similar as #139, just with a different property.
For Mastodon it expects the
attachment
property within an actor to be an array, even just with a single item. Is there any way to force the serialization of this to be an array of items, instead of just the single object assigned to theattachment
property?Add a single object under "attachment" and it does not correctly serialize as an array:
Add multiple objects under "attachment" and it correctly serializes as an array.
The text was updated successfully, but these errors were encountered: