diff --git a/src/api/client/account.rs b/src/api/client/account.rs index df938c17..12801e7d 100644 --- a/src/api/client/account.rs +++ b/src/api/client/account.rs @@ -12,14 +12,25 @@ use conduwuit_service::Services; use futures::{FutureExt, StreamExt}; use register::RegistrationKind; use ruma::{ + OwnedRoomId, UserId, api::client::{ account::{ - change_password, check_registration_token_validity, deactivate, get_3pids, get_username_availability, register::{self, LoginType}, request_3pid_management_token_via_email, request_3pid_management_token_via_msisdn, whoami, ThirdPartyIdRemovalStatus + ThirdPartyIdRemovalStatus, change_password, check_registration_token_validity, + deactivate, get_3pids, get_username_availability, + register::{self, LoginType}, + request_3pid_management_token_via_email, request_3pid_management_token_via_msisdn, + whoami, }, uiaa::{AuthFlow, AuthType, UiaaInfo}, - }, events::{ - room::{message::RoomMessageEventContent, power_levels::{RoomPowerLevels, RoomPowerLevelsEventContent}}, GlobalAccountDataEventType, StateEventType - }, push, OwnedRoomId, UserId + }, + events::{ + GlobalAccountDataEventType, StateEventType, + room::{ + message::RoomMessageEventContent, + power_levels::{RoomPowerLevels, RoomPowerLevelsEventContent}, + }, + }, + push, }; use super::{DEVICE_ID_LENGTH, SESSION_ID_LENGTH, TOKEN_LENGTH, join_room_by_id_helper}; diff --git a/src/api/client/membership/join.rs b/src/api/client/membership/join.rs index 9d19d3bc..dc170cbf 100644 --- a/src/api/client/membership/join.rs +++ b/src/api/client/membership/join.rs @@ -139,7 +139,7 @@ pub(crate) async fn join_room_by_id_or_alias_route( let sender_user = body.sender_user(); let appservice_info = &body.appservice_info; let body = &body.body; - if services.users.is_suspended(sender_user).await? { + if services.users.is_suspended(sender_user).await? { return Err!(Request(UserSuspended("You cannot perform this action while suspended."))); } diff --git a/src/api/client/report.rs b/src/api/client/report.rs index 052329d1..60a16e1a 100644 --- a/src/api/client/report.rs +++ b/src/api/client/report.rs @@ -8,7 +8,6 @@ use rand::Rng; use ruma::{ EventId, OwnedEventId, OwnedRoomId, OwnedUserId, RoomId, UserId, api::client::{ - error::ErrorKind, report_user, room::{report_content, report_room}, }, diff --git a/src/service/rooms/timeline/append.rs b/src/service/rooms/timeline/append.rs index a7b558c2..1d404e8a 100644 --- a/src/service/rooms/timeline/append.rs +++ b/src/service/rooms/timeline/append.rs @@ -348,9 +348,11 @@ where self.services.search.index_pdu(shortroomid, &pdu_id, &body); if self.services.admin.is_admin_command(pdu, &body).await { - self.services - .admin - .command_with_sender(body, Some((pdu.event_id()).into()), pdu.sender.clone().into())?; + self.services.admin.command_with_sender( + body, + Some((pdu.event_id()).into()), + pdu.sender.clone().into(), + )?; } } }, diff --git a/src/service/rooms/timeline/create.rs b/src/service/rooms/timeline/create.rs index d890e88e..20ccaf56 100644 --- a/src/service/rooms/timeline/create.rs +++ b/src/service/rooms/timeline/create.rs @@ -110,7 +110,7 @@ pub async fn create_hash_and_sign_event( // so any other events with that same depth are illegal. warn!( "Had unsafe depth {depth} when creating non-state event in {room_id}. Cowardly \ - aborting" + aborting" ); return Err!(Request(Unknown("Unsafe depth for non-state event."))); }