· Föderation · So 15.12.2024 15:56:52
Hi, #snac author here again. I've installed Pachli and I'm experimenting the same issue than @nowster@fedi.nowster.me.uk: it keeps requesting the first page over and over again, with no max_id
nor since_id
fields to paginate, only a limit
field of 40.
CC: @justine@snac.smithies.me.uk
Föderation EN So 15.12.2024 17:51:01
@grunfink @nowster @justine The link header is not being sent by snac.
I have a test account with 4 statuses in the home timeline.
/api/v1/timelines/home returns all 4 statuses and no link header in the response.
/api/v1/timelines/home?limit=1 returns an array of 1 status, as expected, but is also missing the link header, so can't be paginated.
Föderation EN So 15.12.2024 17:51:12
@grunfink @nowster @justine The Mastodon docs are a bit ambiguous about this. Arguably, if the link header is missing a client could assume it could behave as though it did exist, with the IDs of the first and last items in the returned page.
That might be what snac is doing. For interoperability purposes it's probably better to always return the link header.
Föderation · So 15.12.2024 23:06:16
Hi. I've just implemented the link header and Pachli seems to page correctly and not get stuck requesting the first page.
This will probably also improve snac behaviour with other apps.
CC: @nowster@fedi.nowster.me.uk @justine@snac.smithies.me.uk @knapjack@elsewhere.cozysumo.space
Föderation · So 15.12.2024 20:21:22
Many apps work ok without the Link
header kludge, they just keep track of the last seen post Id, and when they need more posts to be shown, they just use a max_id
argument for the next page.
As you say, the Mastodon documentation is a bit ambiguous.
Anyway, I'll work on implementing it. Thanks for the conversation.
CC: @nowster@fedi.nowster.me.uk @justine@snac.smithies.me.uk