implement several broadband loops

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-12-04 00:00:40 +00:00
commit 1d02851028
7 changed files with 47 additions and 22 deletions

View file

@ -4,7 +4,12 @@ use std::{
sync::Arc,
};
use conduit::{debug, err, implement, result::LogErr, utils::IterStream, PduEvent, Result};
use conduit::{
debug, err, implement,
result::LogErr,
utils::stream::{BroadbandExt, IterStream},
PduEvent, Result,
};
use futures::{FutureExt, StreamExt};
use ruma::{
state_res::{self, StateMap},
@ -166,7 +171,7 @@ pub(super) async fn state_at_incoming_resolved(
new_state
.iter()
.stream()
.then(|((event_type, state_key), event_id)| {
.broad_then(|((event_type, state_key), event_id)| {
self.services
.short
.get_or_create_shortstatekey(event_type, state_key)