mirror of
https://forgejo.ellis.link/continuwuation/continuwuity/
synced 2026-10-22 22:31:21 +00:00
feat: Prevent suspended users creating new rooms
This commit is contained in:
1 parent
e127c4e5a2
commit
5d5350a9fe
1 file changed
+4
@@ -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),
|
||||
|
||||
Reference in new issue
Block a user