mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-06-30 00:04:34 +02:00
feat: Forbid suspended users from sending state events
This commit is contained in:
parent
1ff8af8e9e
commit
d0548ec064
1 changed files with 4 additions and 0 deletions
|
@ -33,6 +33,10 @@ pub(crate) async fn send_state_event_for_key_route(
|
|||
) -> Result<send_state_event::v3::Response> {
|
||||
let sender_user = body.sender_user();
|
||||
|
||||
if services.users.is_suspended(sender_user).await? {
|
||||
return Err!(Request(UserSuspended("You cannot perform this action while suspended.")));
|
||||
}
|
||||
|
||||
Ok(send_state_event::v3::Response {
|
||||
event_id: send_state_event_for_key_helper(
|
||||
&services,
|
||||
|
|
Loading…
Add table
Reference in a new issue