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

@ -1,5 +1,3 @@
use std::sync::Arc;
use axum::extract::State;
use conduwuit::{err, pdu::PduBuilder, utils::BoolExt, Err, Error, PduEvent, Result};
use ruma::{
@ -16,7 +14,7 @@ use ruma::{
AnyStateEventContent, StateEventType,
},
serde::Raw,
EventId, RoomId, UserId,
OwnedEventId, RoomId, UserId,
};
use service::Services;
@ -50,8 +48,7 @@ pub(crate) async fn send_state_event_for_key_route(
None
},
)
.await?
.into(),
.await?,
})
}
@ -177,7 +174,7 @@ async fn send_state_event_for_key_helper(
json: &Raw<AnyStateEventContent>,
state_key: String,
timestamp: Option<ruma::MilliSecondsSinceUnixEpoch>,
) -> Result<Arc<EventId>> {
) -> Result<OwnedEventId> {
allowed_to_send_state_event(services, room_id, event_type, json).await?;
let state_lock = services.rooms.state.mutex.lock(room_id).await;
let event_id = services