continuwuity/src/api/client
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
..
membership style: Fix formatting/clippy issues 2025-07-02 19:32:50 +01:00
room feat(space-upgrades): MSC4168: Override space child vias 2025-07-19 18:37:45 +01:00
sync Post-formatting aesthetic and spacing corrections 2025-07-02 19:17:06 +01:00
account.rs fix: Creation bug 2025-07-12 22:37:49 +01:00
account_data.rs move core::pdu and core::state_res into core::matrix:: 2025-04-05 02:44:46 +00:00
alias.rs Modernize various sender_user/sender_device lets. 2025-07-02 18:58:14 +01:00
appservice.rs add appservice MSC4190 support 2025-04-03 12:21:16 -04:00
backup.rs Dedup and parallelize current key backup count and etag fetching. 2025-07-02 19:03:26 +01:00
capabilities.rs Use integrated error instead of panic on some legacy codepaths 2025-07-02 18:58:18 +01:00
context.rs Toward abstracting Pdu into trait Event. 2025-07-02 19:03:26 +01:00
device.rs Modernize various sender_user/sender_device lets. 2025-07-02 18:58:14 +01:00
directory.rs Post-formatting aesthetic and spacing corrections 2025-07-02 19:17:06 +01:00
filter.rs Modernize various sender_user/sender_device lets. 2025-07-02 18:58:14 +01:00
keys.rs Modernize various sender_user/sender_device lets. 2025-07-02 18:58:14 +01:00
media.rs Modernize various sender_user/sender_device lets. 2025-07-02 18:58:14 +01:00
media_legacy.rs Modernize various sender_user/sender_device lets. 2025-07-02 18:58:14 +01:00
message.rs fix(relations): improve thread pagination and include root event 2025-08-10 19:12:56 +01:00
mod.rs rename config.rs to account_data.rs, refactor, add some missing checks 2024-12-11 16:38:29 -05:00
openid.rs Macroize various remaining Error constructions. 2025-07-02 19:03:24 +01:00
presence.rs remove several services.globals config wrappers 2025-03-31 03:00:53 +00:00
profile.rs Post-formatting aesthetic and spacing corrections 2025-07-02 19:17:06 +01:00
push.rs Macroize various remaining Error constructions. 2025-07-02 19:03:24 +01:00
read_marker.rs feat: #821 - Options to disable local typing and read receipts 2025-07-08 12:43:48 +02:00
redact.rs Modernize various sender_user/sender_device lets. 2025-07-02 18:58:14 +01:00
relations.rs fix(relations): improve thread pagination and include root event 2025-08-10 19:12:56 +01:00
report.rs style: Fix formatting/clippy issues 2025-07-02 19:32:50 +01:00
search.rs Toward abstracting Pdu into trait Event. 2025-07-02 19:03:26 +01:00
send.rs feat: Prevent suspended users sending events 2025-06-29 15:38:01 +00:00
session.rs Modernize various sender_user/sender_device lets. 2025-07-02 18:58:14 +01:00
space.rs fix: Only load children of nested spaces 2025-06-25 18:17:06 +01:00
state.rs Toward abstracting Pdu into trait Event. 2025-07-02 19:03:26 +01:00
tag.rs Use integrated error instead of panic on some legacy codepaths 2025-07-02 18:58:18 +01:00
thirdparty.rs move core::pdu and core::state_res into core::matrix:: 2025-04-05 02:44:46 +00:00
threads.rs Toward abstracting Pdu into trait Event. 2025-07-02 19:03:26 +01:00
to_device.rs Modernize various sender_user/sender_device lets. 2025-07-02 18:58:14 +01:00
typing.rs feat: #821 - Options to disable local typing and read receipts 2025-07-08 12:43:48 +02:00
unstable.rs Modernize various sender_user/sender_device lets. 2025-07-02 18:58:14 +01:00
unversioned.rs feat: Advertise support for spec v1.8, 1.12, 1.13, and 1.14 2025-07-01 18:38:48 +01:00
user_directory.rs Fix regression 75aadd5c6a 2025-07-02 19:17:09 +01:00
voip.rs move core::pdu and core::state_res into core::matrix:: 2025-04-05 02:44:46 +00:00
well_known.rs fix: Reference config directly 2025-05-21 21:06:44 +01:00