mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-06-29 23:24:35 +02:00
feat: Prevent suspended users creating new rooms
This commit is contained in:
parent
e127c4e5a2
commit
5d5350a9fe
1 changed files with 4 additions and 0 deletions
|
@ -70,6 +70,10 @@ pub(crate) async fn create_room_route(
|
|||
));
|
||||
}
|
||||
|
||||
if services.users.is_suspended(sender_user).await? {
|
||||
return Err!(Request(UserSuspended("You cannot perform this action while suspended.")));
|
||||
}
|
||||
|
||||
let room_id: OwnedRoomId = match &body.room_id {
|
||||
| Some(custom_room_id) => custom_room_id_check(&services, custom_room_id)?,
|
||||
| _ => RoomId::new(&services.server.name),
|
||||
|
|
Loading…
Add table
Reference in a new issue