mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-14 04:37:00 +00:00
refactor to iterator inputs for auth_chain/short batch functions
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
1 parent
5da42fb859
commit
3789d60b6a
10 files changed
+76
-71
No files matched your search
@@ -1,4 +1,4 @@
|
||||
use std::borrow::Borrow;
|
||||
use std::{borrow::Borrow, iter::once};
|
||||
|
||||
use axum::extract::State;
|
||||
use conduit::{err, result::LogErr, utils::IterStream, Result};
|
||||
@@ -52,7 +52,7 @@ pub(crate) async fn get_room_state_route(
|
||||
let auth_chain = services
|
||||
.rooms
|
||||
.auth_chain
|
||||
.event_ids_iter(&body.room_id, &[body.event_id.borrow()])
|
||||
.event_ids_iter(&body.room_id, once(body.event_id.borrow()))
|
||||
.await?
|
||||
.map(Ok)
|
||||
.and_then(|id| async move { services.rooms.timeline.get_pdu_json(&id).await })
|
||||
|
||||
Reference in new issue
Block a user