diff options
author | Joas Schilling <coding@schilljs.com> | 2022-04-29 12:47:53 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2022-04-30 14:09:32 +0300 |
commit | e8cf4671684ea6f3d5762dce8d4f34da982d5fb2 (patch) | |
tree | 2a50e3f269376727f4d56d4c93a93a027fadaf8f /lib/Room.php | |
parent | 01fb3a6c834d548916032a8441e563b8eb18e147 (diff) |
Move Room::verifyPassword() to the RoomService
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Room.php')
-rw-r--r-- | lib/Room.php | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/lib/Room.php b/lib/Room.php index a8beaf51c..923821324 100644 --- a/lib/Room.php +++ b/lib/Room.php @@ -31,7 +31,6 @@ use OCA\Talk\Events\ModifyLobbyEvent; use OCA\Talk\Events\ModifyRoomEvent; use OCA\Talk\Events\RoomEvent; use OCA\Talk\Events\SignalingRoomPropertiesEvent; -use OCA\Talk\Events\VerifyRoomPasswordEvent; use OCA\Talk\Exceptions\ParticipantNotFoundException; use OCA\Talk\Model\Attendee; use OCA\Talk\Model\SelectHelper; @@ -1018,25 +1017,4 @@ class Room { return true; } - - /** - * @param string $password - * @return array - */ - public function verifyPassword(string $password): array { - $event = new VerifyRoomPasswordEvent($this, $password); - $this->dispatcher->dispatch(self::EVENT_PASSWORD_VERIFY, $event); - - if ($event->isPasswordValid() !== null) { - return [ - 'result' => $event->isPasswordValid(), - 'url' => $event->getRedirectUrl(), - ]; - } - - return [ - 'result' => !$this->hasPassword() || $this->hasher->verify($password, $this->password), - 'url' => '', - ]; - } } |