flatten auth chain iterations

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2025-01-29 08:39:44 +00:00
parent eb7d893c86
commit 50acfe7832
8 changed files with 90 additions and 111 deletions

View file

@ -6,8 +6,9 @@ use std::{
};
use conduwuit::{
debug_error, err, info, trace, utils, utils::string::EMPTY, warn, Error, PduEvent, PduId,
RawPduId, Result,
debug_error, err, info, trace, utils,
utils::{stream::ReadyExt, string::EMPTY},
warn, Error, PduEvent, PduId, RawPduId, Result,
};
use futures::{FutureExt, StreamExt, TryStreamExt};
use ruma::{
@ -54,7 +55,7 @@ pub(super) async fn get_auth_chain(
.rooms
.auth_chain
.event_ids_iter(room_id, once(event_id.as_ref()))
.await?
.ready_filter_map(Result::ok)
.count()
.await;