refactor: Fix errors in api/server/backfill.rs

This commit is contained in:
Ginger
2026-04-28 09:16:52 -04:00
parent 39b2e461be
commit db7d378a2e
+8 -8
View File
@@ -67,12 +67,7 @@ pub(crate) async fn get_backfill_route(
.ready_fold(PduCount::min(), cmp::max) .ready_fold(PduCount::min(), cmp::max)
.await; .await;
Ok(get_backfill::v1::Response { let pdus = services
origin_server_ts: MilliSecondsSinceUnixEpoch::now(),
origin: services.globals.server_name().to_owned(),
pdus: services
.rooms .rooms
.timeline .timeline
.pdus_rev(&body.room_id, Some(from.saturating_add(1))) .pdus_rev(&body.room_id, Some(from.saturating_add(1)))
@@ -109,6 +104,11 @@ pub(crate) async fn get_backfill_route(
.map(Ok) .map(Ok)
}) })
.try_collect() .try_collect()
.await?, .await?;
})
Ok(get_backfill::v1::Response::new(
services.globals.server_name().to_owned(),
MilliSecondsSinceUnixEpoch::now(),
pdus,
))
} }