summaryrefslogtreecommitdiffstats
path: root/lib/Controller/PageController.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2022-10-04 12:08:48 +0200
committerJoas Schilling <coding@schilljs.com>2022-10-04 16:02:08 +0200
commit5f060687c8a0c77f1a61bf9a3462d4bfa4fe055f (patch)
treed86425eae0d2a3b3bee11262e5c3b2a52645bd89 /lib/Controller/PageController.php
parentaac298148e1cac88c1437e016f2ffe4f7e24d8d0 (diff)
Move getParticipant()
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Controller/PageController.php')
-rw-r--r--lib/Controller/PageController.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php
index 4814952e4..6585efcba 100644
--- a/lib/Controller/PageController.php
+++ b/lib/Controller/PageController.php
@@ -32,6 +32,7 @@ use OCA\Talk\Config;
use OCA\Talk\Manager;
use OCA\Talk\Participant;
use OCA\Talk\Room;
+use OCA\Talk\Service\ParticipantService;
use OCA\Talk\Service\RoomService;
use OCA\Talk\TalkSession;
use OCA\Talk\TInitialState;
@@ -70,6 +71,7 @@ class PageController extends Controller {
private IUserSession $userSession;
private LoggerInterface $logger;
private Manager $manager;
+ private ParticipantService $participantService;
private RoomService $roomService;
private IURLGenerator $url;
private INotificationManager $notificationManager;
@@ -86,6 +88,7 @@ class PageController extends Controller {
?string $UserId,
LoggerInterface $logger,
Manager $manager,
+ ParticipantService $participantService,
RoomService $roomService,
IURLGenerator $url,
INotificationManager $notificationManager,
@@ -104,6 +107,7 @@ class PageController extends Controller {
$this->userId = $UserId;
$this->logger = $logger;
$this->manager = $manager;
+ $this->participantService = $participantService;
$this->roomService = $roomService;
$this->url = $url;
$this->notificationManager = $notificationManager;
@@ -220,7 +224,7 @@ class PageController extends Controller {
if ($room instanceof Room && $room->hasPassword()) {
// If the user joined themselves or is not found, they need the password.
try {
- $participant = $room->getParticipant($this->userId, false);
+ $participant = $this->participantService->getParticipant($room, $this->userId, false);
$requirePassword = $participant->getAttendee()->getParticipantType() === Participant::USER_SELF_JOINED;
} catch (ParticipantNotFoundException $e) {
$requirePassword = true;