Skip to content

Commit

Permalink
fix: allow to create public room without password if password_policy …
Browse files Browse the repository at this point in the history
…enabled

Signed-off-by: Maksim Sukharev <[email protected]>
  • Loading branch information
Antreesy authored and backportbot[bot] committed Jan 27, 2025
1 parent f7859fe commit d4d2166
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Service/RoomService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d4d2166

Please sign in to comment.