summaryrefslogtreecommitdiffstats
path: root/lib/Controller/PageController.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2022-04-29 11:47:53 +0200
committerJoas Schilling <coding@schilljs.com>2022-04-30 13:09:32 +0200
commite8cf4671684ea6f3d5762dce8d4f34da982d5fb2 (patch)
tree2a50e3f269376727f4d56d4c93a93a027fadaf8f /lib/Controller/PageController.php
parent01fb3a6c834d548916032a8441e563b8eb18e147 (diff)
Move Room::verifyPassword() to the RoomService
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Controller/PageController.php')
-rw-r--r--lib/Controller/PageController.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php
index 9b3bfa440..2ee61ccc3 100644
--- a/lib/Controller/PageController.php
+++ b/lib/Controller/PageController.php
@@ -31,6 +31,7 @@ use OCA\Talk\Config;
use OCA\Talk\Manager;
use OCA\Talk\Participant;
use OCA\Talk\Room;
+use OCA\Talk\Service\RoomService;
use OCA\Talk\TalkSession;
use OCA\Talk\TInitialState;
use OCA\Viewer\Event\LoadViewer;
@@ -66,6 +67,7 @@ class PageController extends Controller {
private IUserSession $userSession;
private LoggerInterface $logger;
private Manager $manager;
+ private RoomService $roomService;
private IURLGenerator $url;
private INotificationManager $notificationManager;
private IAppManager $appManager;
@@ -80,6 +82,7 @@ class PageController extends Controller {
?string $UserId,
LoggerInterface $logger,
Manager $manager,
+ RoomService $roomService,
IURLGenerator $url,
INotificationManager $notificationManager,
IAppManager $appManager,
@@ -96,6 +99,7 @@ class PageController extends Controller {
$this->userId = $UserId;
$this->logger = $logger;
$this->manager = $manager;
+ $this->roomService = $roomService;
$this->url = $url;
$this->notificationManager = $notificationManager;
$this->appManager = $appManager;
@@ -214,7 +218,7 @@ class PageController extends Controller {
if ($requirePassword) {
$password = $password !== '' ? $password : (string) $this->talkSession->getPasswordForRoom($token);
- $passwordVerification = $room->verifyPassword($password);
+ $passwordVerification = $this->roomService->verifyPassword($room, $password);
if ($passwordVerification['result']) {
$this->talkSession->renewSessionId();
@@ -289,7 +293,7 @@ class PageController extends Controller {
if ($room->hasPassword()) {
$password = $password !== '' ? $password : (string) $this->talkSession->getPasswordForRoom($token);
- $passwordVerification = $room->verifyPassword($password);
+ $passwordVerification = $this->roomService->verifyPassword($room, $password);
if ($passwordVerification['result']) {
$this->talkSession->renewSessionId();
$this->talkSession->setPasswordForRoom($token, $password);