mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-07-05 19:55:49 +02:00
style: Fix formatting/clippy issues
Some checks failed
Documentation / Build and Deploy Documentation (push) Has been skipped
Checks / Prefligit / prefligit (push) Failing after 3s
Release Docker Image / define-variables (push) Failing after 12s
Release Docker Image / build-image (linux/amd64, release, linux-amd64, base) (push) Has been skipped
Release Docker Image / build-image (linux/arm64, release, linux-arm64, base) (push) Has been skipped
Release Docker Image / merge (push) Has been skipped
Checks / Rust / Format (push) Failing after 6s
Checks / Rust / Clippy (push) Failing after 20s
Checks / Rust / Cargo Test (push) Failing after 16s
Some checks failed
Documentation / Build and Deploy Documentation (push) Has been skipped
Checks / Prefligit / prefligit (push) Failing after 3s
Release Docker Image / define-variables (push) Failing after 12s
Release Docker Image / build-image (linux/amd64, release, linux-amd64, base) (push) Has been skipped
Release Docker Image / build-image (linux/arm64, release, linux-arm64, base) (push) Has been skipped
Release Docker Image / merge (push) Has been skipped
Checks / Rust / Format (push) Failing after 6s
Checks / Rust / Clippy (push) Failing after 20s
Checks / Rust / Cargo Test (push) Failing after 16s
This commit is contained in:
parent
143cb55ac8
commit
293e7243b3
5 changed files with 22 additions and 10 deletions
|
@ -12,14 +12,25 @@ use conduwuit_service::Services;
|
||||||
use futures::{FutureExt, StreamExt};
|
use futures::{FutureExt, StreamExt};
|
||||||
use register::RegistrationKind;
|
use register::RegistrationKind;
|
||||||
use ruma::{
|
use ruma::{
|
||||||
|
OwnedRoomId, UserId,
|
||||||
api::client::{
|
api::client::{
|
||||||
account::{
|
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},
|
uiaa::{AuthFlow, AuthType, UiaaInfo},
|
||||||
}, events::{
|
},
|
||||||
room::{message::RoomMessageEventContent, power_levels::{RoomPowerLevels, RoomPowerLevelsEventContent}}, GlobalAccountDataEventType, StateEventType
|
events::{
|
||||||
}, push, OwnedRoomId, UserId
|
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};
|
use super::{DEVICE_ID_LENGTH, SESSION_ID_LENGTH, TOKEN_LENGTH, join_room_by_id_helper};
|
||||||
|
|
|
@ -139,7 +139,7 @@ pub(crate) async fn join_room_by_id_or_alias_route(
|
||||||
let sender_user = body.sender_user();
|
let sender_user = body.sender_user();
|
||||||
let appservice_info = &body.appservice_info;
|
let appservice_info = &body.appservice_info;
|
||||||
let body = &body.body;
|
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.")));
|
return Err!(Request(UserSuspended("You cannot perform this action while suspended.")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,6 @@ use rand::Rng;
|
||||||
use ruma::{
|
use ruma::{
|
||||||
EventId, OwnedEventId, OwnedRoomId, OwnedUserId, RoomId, UserId,
|
EventId, OwnedEventId, OwnedRoomId, OwnedUserId, RoomId, UserId,
|
||||||
api::client::{
|
api::client::{
|
||||||
error::ErrorKind,
|
|
||||||
report_user,
|
report_user,
|
||||||
room::{report_content, report_room},
|
room::{report_content, report_room},
|
||||||
},
|
},
|
||||||
|
|
|
@ -348,9 +348,11 @@ where
|
||||||
self.services.search.index_pdu(shortroomid, &pdu_id, &body);
|
self.services.search.index_pdu(shortroomid, &pdu_id, &body);
|
||||||
|
|
||||||
if self.services.admin.is_admin_command(pdu, &body).await {
|
if self.services.admin.is_admin_command(pdu, &body).await {
|
||||||
self.services
|
self.services.admin.command_with_sender(
|
||||||
.admin
|
body,
|
||||||
.command_with_sender(body, Some((pdu.event_id()).into()), pdu.sender.clone().into())?;
|
Some((pdu.event_id()).into()),
|
||||||
|
pdu.sender.clone().into(),
|
||||||
|
)?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -110,7 +110,7 @@ pub async fn create_hash_and_sign_event(
|
||||||
// so any other events with that same depth are illegal.
|
// so any other events with that same depth are illegal.
|
||||||
warn!(
|
warn!(
|
||||||
"Had unsafe depth {depth} when creating non-state event in {room_id}. Cowardly \
|
"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.")));
|
return Err!(Request(Unknown("Unsafe depth for non-state event.")));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue