mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-09-12 02:33:01 +02:00
simplify get_pdu() interface; eliminate unconditional Arc
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
58be22e695
commit
6175e72f1c
16 changed files with 51 additions and 52 deletions
|
@ -4,7 +4,7 @@ use std::{
|
|||
};
|
||||
|
||||
use conduit::{debug, debug_info, err, implement, trace, warn, Err, Error, PduEvent, Result};
|
||||
use futures::future::ready;
|
||||
use futures::{future::ready, TryFutureExt};
|
||||
use ruma::{
|
||||
api::client::error::ErrorKind,
|
||||
events::StateEventType,
|
||||
|
@ -94,7 +94,7 @@ pub(super) async fn handle_outlier_pdu<'a>(
|
|||
// Build map of auth events
|
||||
let mut auth_events = HashMap::with_capacity(incoming_pdu.auth_events.len());
|
||||
for id in &incoming_pdu.auth_events {
|
||||
let Ok(auth_event) = self.services.timeline.get_pdu(id).await else {
|
||||
let Ok(auth_event) = self.services.timeline.get_pdu(id).map_ok(Arc::new).await else {
|
||||
warn!("Could not find auth event {id}");
|
||||
continue;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue