From d4d21663ae7ea5550861950e6bbb58fdeaa42873 Mon Sep 17 00:00:00 2001 From: Maksim Sukharev Date: Fri, 24 Jan 2025 12:10:19 +0100 Subject: [PATCH] fix: allow to create public room without password if password_policy enabled Signed-off-by: Maksim Sukharev --- lib/Service/RoomService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Service/RoomService.php b/lib/Service/RoomService.php index 59b5228e421..908ff77d0bd 100644 --- a/lib/Service/RoomService.php +++ b/lib/Service/RoomService.php @@ -169,7 +169,7 @@ public function createConversation(int $type, string $name, ?IUser $owner = null throw new PasswordException(PasswordException::REASON_VALUE, $this->l10n->t('Password needs to be set')); } - if ($type !== Room::TYPE_PUBLIC) { + if ($type !== Room::TYPE_PUBLIC || $password === '') { $room = $this->manager->createRoom($type, $name, $objectType, $objectId); } else { $event = new ValidatePasswordPolicyEvent($password);