Skip to content
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

[bugfix] self-referencing collection pages for status replies #2364

Conversation

NyaaaWhatsUpDoc
Copy link
Member

@NyaaaWhatsUpDoc NyaaaWhatsUpDoc commented Nov 16, 2023

Description

  • updates the paging package to use "slices" instead of the old experimental slices package
  • updates StatusRepliesGet() processor function to use new collection and paging code
  • updates GetStatusChildren() to be much simpler and return in case of reply fetching errors
  • returns OrderedCollection instead of Collection from replies endpoint as our paging only works with an order ...
  • updates the /replies endpoint to follow more AP compliant logic, this should be fine even with our compliance "guarantee" since this is an AP endpoint and not a client-side one

Checklist

  • I/we have read the GoToSocial contribution guidelines.
  • I/we have discussed the proposed changes already, either in an issue on the repository, or in the Matrix chat.
  • I/we have performed a self-review of added code.
  • I/we have written code that is legible and maintainable by others.
  • I/we have commented the added code, particularly in hard-to-understand areas.
  • I/we have made any necessary changes to documentation.
  • I/we have added tests that cover new code.
  • I/we have run tests and they pass locally with the changes.
  • I/we have run go fmt ./... and golangci-lint run.

@NyaaaWhatsUpDoc NyaaaWhatsUpDoc marked this pull request as ready for review November 17, 2023 14:10
@NyaaaWhatsUpDoc
Copy link
Member Author

the new AP endpoint works as expected with other gotosocial instances, mastodon has issues though due to HTTP signatures and the fact the endpoint requires query parameters, so unrelated.

@NyaaaWhatsUpDoc NyaaaWhatsUpDoc force-pushed the bugfix/self-referencing-collection-pages branch from 800f451 to 675185c Compare November 17, 2023 20:15
Copy link
Contributor

@tsmethurst tsmethurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff! Few comments but nothing breaking I believe except for the JSON type comment (should be activitystreams content-type)

@NyaaaWhatsUpDoc NyaaaWhatsUpDoc merged commit 1627585 into superseriousbusiness:main Nov 20, 2023
2 checks passed
@NyaaaWhatsUpDoc NyaaaWhatsUpDoc deleted the bugfix/self-referencing-collection-pages branch November 20, 2023 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants