mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-09-11 20:33:02 +02:00
apply new rustfmt.toml changes, fix some clippy lints
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
0317cc8cc5
commit
77e0b76408
296 changed files with 7147 additions and 4300 deletions
|
@ -21,7 +21,8 @@ use crate::{
|
|||
///
|
||||
/// Submits a signed leave event.
|
||||
pub(crate) async fn create_leave_event_v1_route(
|
||||
State(services): State<crate::State>, body: Ruma<create_leave_event::v1::Request>,
|
||||
State(services): State<crate::State>,
|
||||
body: Ruma<create_leave_event::v1::Request>,
|
||||
) -> Result<create_leave_event::v1::Response> {
|
||||
create_leave_event(&services, body.origin(), &body.room_id, &body.pdu).await?;
|
||||
|
||||
|
@ -32,14 +33,20 @@ pub(crate) async fn create_leave_event_v1_route(
|
|||
///
|
||||
/// Submits a signed leave event.
|
||||
pub(crate) async fn create_leave_event_v2_route(
|
||||
State(services): State<crate::State>, body: Ruma<create_leave_event::v2::Request>,
|
||||
State(services): State<crate::State>,
|
||||
body: Ruma<create_leave_event::v2::Request>,
|
||||
) -> Result<create_leave_event::v2::Response> {
|
||||
create_leave_event(&services, body.origin(), &body.room_id, &body.pdu).await?;
|
||||
|
||||
Ok(create_leave_event::v2::Response::new())
|
||||
}
|
||||
|
||||
async fn create_leave_event(services: &Services, origin: &ServerName, room_id: &RoomId, pdu: &RawJsonValue) -> Result {
|
||||
async fn create_leave_event(
|
||||
services: &Services,
|
||||
origin: &ServerName,
|
||||
room_id: &RoomId,
|
||||
pdu: &RawJsonValue,
|
||||
) -> Result {
|
||||
if !services.rooms.metadata.exists(room_id).await {
|
||||
return Err!(Request(NotFound("Room is unknown to this server.")));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue