refactor various Arc<EventId> to OwnedEventId

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-12-28 00:57:02 +00:00 committed by strawberry
parent 5a335933b8
commit 6458f4b195
29 changed files with 142 additions and 152 deletions

View file

@ -6,7 +6,7 @@ use conduwuit::{
debug, debug_warn, err, error, result::LogErr, trace, utils::ReadyExt, warn, Err, Error,
Result,
};
use futures::StreamExt;
use futures::{FutureExt, StreamExt};
use ruma::{
api::{
client::error::ErrorKind,
@ -74,8 +74,13 @@ pub(crate) async fn send_transaction_message_route(
);
let resolved_map =
handle_pdus(&services, &client, &body.pdus, body.origin(), &txn_start_time).await?;
handle_edus(&services, &client, &body.edus, body.origin()).await;
handle_pdus(&services, &client, &body.pdus, body.origin(), &txn_start_time)
.boxed()
.await?;
handle_edus(&services, &client, &body.edus, body.origin())
.boxed()
.await;
debug!(
pdus = ?body.pdus.len(),

View file

@ -2,6 +2,7 @@
use axum::extract::State;
use conduwuit::{err, Err, Result};
use futures::FutureExt;
use ruma::{
api::federation::membership::create_leave_event,
events::{
@ -154,10 +155,15 @@ async fn create_leave_event(
.rooms
.event_handler
.handle_incoming_pdu(origin, room_id, &event_id, value, true)
.boxed()
.await?
.ok_or_else(|| err!(Request(InvalidParam("Could not accept as timeline event."))))?;
drop(mutex_lock);
services.sending.send_pdu_room(room_id, &pdu_id).await
services
.sending
.send_pdu_room(room_id, &pdu_id)
.boxed()
.await
}