Make use of since_id param in timelines#413
Conversation
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
dahlia
left a comment
There was a problem hiding this comment.
Thanks for your contribution again!
| const nextMaxId = | ||
| timeline.length >= query.limit ? timeline[timeline.length - 1].id : null; | ||
| const nextLink = nextMaxId == null ? undefined : new URL(c.req.url); | ||
| nextLink?.searchParams.set("max_id", nextMaxId ?? ""); |
There was a problem hiding this comment.
Forward pagination still breaks for min_id requests.
The query now returns the oldest matching newer statuses first, but the Link header below still builds only rel="next" from max_id=<oldest returned> while preserving the original min_id.
For a full page, the follow-up request becomes:
id > min_idid < oldest_returned
That range is immediately empty, so clients cannot page past the first batch of newer statuses.
Please build forward-pagination links for min_id requests here as well. This affects /public, /home, /list/:list_id, and /tag/:hashtag.
There was a problem hiding this comment.
Thanks. Didn’t spot this because my main use case for since_id (polling for new statuses) doesn’t utilize link headers
It appears to work correctly on my instance