fix: Fix pagination tokens being corrupted for backfilled PDUs

This commit is contained in:
Ginger
2025-09-04 10:33:43 -04:00
committed by nex
parent e38dec5864
commit 16f4efa708
6 changed files with 18 additions and 36 deletions
+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);