Pagination for community outbox
Requirements
- [x] Is this a bug report? For questions or discussions use https://lemmy.ml/c/lemmy_support or the matrix chat.
- [x] Did you check to see if this issue already exists?
- [x] Is this only a single bug? Do not put multiple bugs in one issue.
- [x] Do you agree to follow the rules in our Code of Conduct?
- [x] Is this a backend issue? Use the lemmy-ui repo for UI / frontend issues.
Summary
It looks like when I query any community outbox it only returns the first 50 posts and it doesn't offer any form of pagination.
The endpoint should at least provide the right number for totalItems and give a full count of the activities created by the community. But to make it easier to comply with other AP software, it should be able to provide the full list of activities through pagination.
Steps to Reproduce
[
"@context",
"id",
"orderedItems",
"totalItems",
"type"
]
$ curl https://lemmy.ml/c/lemmy_support/outbox -H 'accept: application/activity+json' | jq '.totalItems'
50
Technical Details
Any instance
Version
0.19.9
Lemmy Instance URL
No response
Not a bug, this is simply not implemented yet.
Come to think of it, there are two separate issues. Pagination is indeed an enhancement, but I would argue that "totalItems" already returning 50 is an actual bug. Should I create a separate issue for it?
50 is the number of items in the Activitypub collection. It could be changed to show the total number of posts, but the spec is not really clear to me which one is correct.
https://www.w3.org/TR/activitystreams-vocabulary/#dfn-totalitems
Personally speaking, until there is proper pagination I'd rather just get the total count and not actual lists, than a limited view of the collection and no "factual" information.