mirror of
https://gitlab.com/famedly/conduit.git
synced 2025-03-31 02:19:36 +03:00
add some flushes
This commit is contained in:
parent
7c82213ee7
commit
f4aabbdaa7
2 changed files with 15 additions and 3 deletions
|
@ -65,14 +65,18 @@ pub async fn join_room_by_id_route(
|
||||||
|
|
||||||
servers.insert(body.room_id.server_name().to_owned());
|
servers.insert(body.room_id.server_name().to_owned());
|
||||||
|
|
||||||
join_room_by_id_helper(
|
let ret = join_room_by_id_helper(
|
||||||
&db,
|
&db,
|
||||||
body.sender_user.as_ref(),
|
body.sender_user.as_ref(),
|
||||||
&body.room_id,
|
&body.room_id,
|
||||||
&servers,
|
&servers,
|
||||||
body.third_party_signed.as_ref(),
|
body.third_party_signed.as_ref(),
|
||||||
)
|
)
|
||||||
.await
|
.await;
|
||||||
|
|
||||||
|
db.flush().await?;
|
||||||
|
|
||||||
|
ret
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
|
|
|
@ -774,6 +774,8 @@ pub async fn send_transaction_message_route(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
db.flush().await?;
|
||||||
|
|
||||||
Ok(send_transaction_message::v1::Response { pdus: resolved_map }.into())
|
Ok(send_transaction_message::v1::Response { pdus: resolved_map }.into())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2160,6 +2162,8 @@ pub async fn create_join_event_route(
|
||||||
db.sending.send_pdu(&server, &pdu_id)?;
|
db.sending.send_pdu(&server, &pdu_id)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
db.flush().await?;
|
||||||
|
|
||||||
Ok(create_join_event::v2::Response {
|
Ok(create_join_event::v2::Response {
|
||||||
room_state: RoomState {
|
room_state: RoomState {
|
||||||
auth_chain: auth_chain_ids
|
auth_chain: auth_chain_ids
|
||||||
|
@ -2276,6 +2280,8 @@ pub async fn create_invite_route(
|
||||||
)?;
|
)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
db.flush().await?;
|
||||||
|
|
||||||
Ok(create_invite::v2::Response {
|
Ok(create_invite::v2::Response {
|
||||||
event: PduEvent::convert_to_outgoing_federation_event(signed_event),
|
event: PduEvent::convert_to_outgoing_federation_event(signed_event),
|
||||||
}
|
}
|
||||||
|
@ -2389,7 +2395,7 @@ pub fn get_profile_information_route(
|
||||||
post("/_matrix/federation/v1/user/keys/query", data = "<body>")
|
post("/_matrix/federation/v1/user/keys/query", data = "<body>")
|
||||||
)]
|
)]
|
||||||
#[tracing::instrument(skip(db, body))]
|
#[tracing::instrument(skip(db, body))]
|
||||||
pub fn get_keys_route(
|
pub async fn get_keys_route(
|
||||||
db: ReadGuard,
|
db: ReadGuard,
|
||||||
body: Ruma<get_keys::v1::Request>,
|
body: Ruma<get_keys::v1::Request>,
|
||||||
) -> ConduitResult<get_keys::v1::Response> {
|
) -> ConduitResult<get_keys::v1::Response> {
|
||||||
|
@ -2404,6 +2410,8 @@ pub fn get_keys_route(
|
||||||
&db,
|
&db,
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
|
db.flush().await?;
|
||||||
|
|
||||||
Ok(get_keys::v1::Response {
|
Ok(get_keys::v1::Response {
|
||||||
device_keys: result.device_keys,
|
device_keys: result.device_keys,
|
||||||
master_keys: result.master_keys,
|
master_keys: result.master_keys,
|
||||||
|
|
Loading…
Reference in a new issue