1
0
Fork 0
mirror of https://forgejo.ellis.link/continuwuation/continuwuity.git synced 2025-09-09 17:10:57 +00:00
continuwuity/src/api
Tom Foster 9286838d23 fix(relations): improve thread pagination and include root event
Replace unreliable PduCount pagination tokens with ShortEventId throughout
the relations and messages endpoints. ShortEventId provides stable, unique
identifiers that persist across server restarts and database operations.

Key improvements:
- Add token parsing helpers that try ShortEventId first, fall back to
  PduCount for backwards compatibility
- Include thread root event when paginating backwards to thread start
- Fix off-by-one error in get_relations that was returning the starting
  event in results
- Only return next_batch/prev_batch tokens when more events are available,
  preventing clients from making unnecessary requests at thread boundaries
- Ensure consistent token format between /relations, /messages, and /sync
  endpoints for interoperability

This fixes duplicate events when scrolling at thread boundaries and ensures
the thread root message is visible when viewing a thread, matching expected
client behaviour.
2025-08-10 19:12:56 +01:00
..
client fix(relations): improve thread pagination and include root event 2025-08-10 19:12:56 +01:00
router fix(auth): prevent token collisions and optimise lookups 2025-08-10 17:10:06 +01:00
server Post-formatting aesthetic and spacing corrections 2025-07-02 19:17:06 +01:00
Cargo.toml add missing feature-projections between intra-workspace crates 2025-04-19 23:33:53 +01:00
mod.rs move core::pdu and core::state_res into core::matrix:: 2025-04-05 02:44:46 +00:00
router.rs Add /_continuwuity/ paths 2025-07-14 17:49:06 +00:00