feat: Prevent suspended users creating new rooms

This commit is contained in:
nexy7574 authored and Ellis Git committed 2025-06-29 15:38:01 +00:00
1 parent e127c4e5a2
commit 5d5350a9fe
1 file changed
+4
+4
View File
@@ -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),