fix: Fix pagination tokens being corrupted for backfilled PDUs

This commit is contained in:
Ginger authored and nex committed 2025-09-07 21:20:26 +00:00
1 parent e38dec5864
commit 16f4efa708
6 files changed
+18 -36

No files matched your search

+2 -2
View File
@@ -9,7 +9,7 @@ use conduwuit::{
use futures::StreamExt;
use ruma::{api::client::threads::get_threads, uint};
use crate::Ruma;
use crate::{Ruma, client::utils::pagination_token_to_count};
/// # `GET /_matrix/client/r0/rooms/{roomId}/threads`
pub(crate) async fn get_threads_route(
@@ -27,7 +27,7 @@ pub(crate) async fn get_threads_route(
let from: PduCount = body
.from
.as_deref()
.map(str::parse)
.map(pagination_token_to_count)
.transpose()?
.unwrap_or_else(PduCount::max);