flatten auth chain iterations
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
eb7d893c86
commit
50acfe7832
8 changed files with 90 additions and 111 deletions
|
@ -44,18 +44,11 @@ pub async fn resolve_state(
|
|||
let auth_chain_sets: Vec<HashSet<OwnedEventId>> = fork_states
|
||||
.iter()
|
||||
.try_stream()
|
||||
.wide_and_then(|state| async move {
|
||||
let starting_events = state.values().map(Borrow::borrow);
|
||||
|
||||
let auth_chain = self
|
||||
.services
|
||||
.wide_and_then(|state| {
|
||||
self.services
|
||||
.auth_chain
|
||||
.get_event_ids(room_id, starting_events)
|
||||
.await?
|
||||
.into_iter()
|
||||
.collect();
|
||||
|
||||
Ok(auth_chain)
|
||||
.event_ids_iter(room_id, state.values().map(Borrow::borrow))
|
||||
.try_collect()
|
||||
})
|
||||
.try_collect()
|
||||
.await?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue