-
Notifications
You must be signed in to change notification settings - Fork 30
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
Request to get list of replies to a post returns error #98
Comments
yup this is true. |
I'm down to try adding this feature, if ya like @benbrown ? |
@patrickmcurry ok! I think you only want direct replies? Not sure what the spec says. You would do this by groveling over the index of posts which includes the inreplyto field. There is an example of this in action on the public post page. |
Code isn't pretty yet, but I made /notes/:guid/replies return JSON like so: And I edited my rendering code to be able to read and display it like so: I didn't put any work into the naming or layout of the return data in JSON. Is there an ActivityPub spec for this type of "list of replies to a post"? Or should we try to mirror the Mastodon API for this (which might be good for eventual Mastodon mobile client support)? |
Yes, there is a prescribed format for this called "Collections" that can optionally include pagination. Take a look here: https://github.com/benbrown/shuttlecraft/blob/main/routes/outbox.js#L15 |
Sounds good. Looks straightforward. |
@patrickmcurry how goes on this? |
It looks like the ability to get a JSON list of all replies to a post isn't working. I ran into this error trying to make my Mastodon embed tools support Shuttlecraft.
Example of the site talking to a Shuttlecraft instance:
https://patrickcurry.com/socials/mastodon/comments/#url=https://social.benbrown.com/notes/eaba2b08d487db8930f56458c5f3638f
And an example of the site talking to my Glitch Shuttlecraft instance:
https://patrickcurry.com/socials/mastodon/comments/#url=https://silky-grape-sociology.glitch.me/notes/81ce6027b1e69f81bb21332b8266c64a
Original post JSON view:
https://silky-grape-sociology.glitch.me/m/81ce6027b1e69f81bb21332b8266c64a
That JSON lists this URL to get replies:
https://silky-grape-sociology.glitch.me/m/81ce6027b1e69f81bb21332b8266c64a/replies
Requesting that URL, even with the MIME type in the request headers, results in:
Cannot GET /m/81ce6027b1e69f81bb21332b8266c64a/replies
The text was updated successfully, but these errors were encountered: