slightly simplify send_state_event route
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
080975ab0e
commit
aa9540af21
1 changed files with 9 additions and 11 deletions
|
@ -36,18 +36,16 @@ pub(crate) async fn send_state_event_for_key_route(
|
||||||
) -> Result<send_state_event::v3::Response> {
|
) -> Result<send_state_event::v3::Response> {
|
||||||
let sender_user = body.sender_user.as_ref().expect("user is authenticated");
|
let sender_user = body.sender_user.as_ref().expect("user is authenticated");
|
||||||
|
|
||||||
let event_id = send_state_event_for_key_helper(
|
Ok(send_state_event::v3::Response {
|
||||||
|
event_id: send_state_event_for_key_helper(
|
||||||
sender_user,
|
sender_user,
|
||||||
&body.room_id,
|
&body.room_id,
|
||||||
&body.event_type,
|
&body.event_type,
|
||||||
&body.body.body,
|
&body.body.body,
|
||||||
body.state_key.clone(),
|
body.state_key.clone(),
|
||||||
)
|
)
|
||||||
.await?;
|
.await?
|
||||||
|
.into(),
|
||||||
let event_id = (*event_id).to_owned();
|
|
||||||
Ok(send_state_event::v3::Response {
|
|
||||||
event_id,
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue