diff options
author | Joas Schilling <coding@schilljs.com> | 2021-10-18 17:17:11 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2021-10-18 17:17:11 +0300 |
commit | 9e8d94d58f4cf230e08fbca95393040c44acbd50 (patch) | |
tree | 6f9d9afa013e3a4c7a9d92ca5dc52d7e00ffb2f8 /lib/Service | |
parent | 8c18fc16cb5ea5044f7f0d67b0693fe60b2e2eae (diff) |
Replace old type constants with new ones
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Service')
-rw-r--r-- | lib/Service/ParticipantService.php | 6 | ||||
-rw-r--r-- | lib/Service/RoomService.php | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/Service/ParticipantService.php b/lib/Service/ParticipantService.php index 8eb594270..1b007c21e 100644 --- a/lib/Service/ParticipantService.php +++ b/lib/Service/ParticipantService.php @@ -249,7 +249,7 @@ class ParticipantService { $manager = \OC::$server->get(\OCA\Talk\Manager::class); // User joining a group or public call through listing - if (($room->getType() === Room::GROUP_CALL || $room->getType() === Room::PUBLIC_CALL) && + if (($room->getType() === Room::TYPE_GROUP || $room->getType() === Room::TYPE_PUBLIC) && $manager->isRoomListableByUser($room, $user->getUID()) ) { $this->addUsers($room, [[ @@ -259,7 +259,7 @@ class ParticipantService { // need to use "USER" here, because "USER_SELF_JOINED" only works for public calls 'participantType' => Participant::USER, ]], $user); - } elseif ($room->getType() === Room::PUBLIC_CALL) { + } elseif ($room->getType() === Room::TYPE_PUBLIC) { // User joining a public room, without being invited $this->addUsers($room, [[ 'actorType' => Attendee::ACTOR_USERS, @@ -638,7 +638,7 @@ class ParticipantService { } public function ensureOneToOneRoomIsFilled(Room $room): void { - if ($room->getType() !== Room::ONE_TO_ONE_CALL) { + if ($room->getType() !== Room::TYPE_ONE_TO_ONE) { return; } diff --git a/lib/Service/RoomService.php b/lib/Service/RoomService.php index 9164f48b2..f54544b18 100644 --- a/lib/Service/RoomService.php +++ b/lib/Service/RoomService.php @@ -68,7 +68,7 @@ class RoomService { } catch (RoomNotFoundException $e) { $users = [$actor->getUID(), $targetUser->getUID()]; sort($users); - $room = $this->manager->createRoom(Room::ONE_TO_ONE_CALL, json_encode($users)); + $room = $this->manager->createRoom(Room::TYPE_ONE_TO_ONE, json_encode($users)); $this->participantService->addUsers($room, [ [ @@ -107,9 +107,9 @@ class RoomService { } if (!\in_array($type, [ - Room::GROUP_CALL, - Room::PUBLIC_CALL, - Room::CHANGELOG_CONVERSATION, + Room::TYPE_GROUP, + Room::TYPE_PUBLIC, + Room::TYPE_CHANGELOG, ], true)) { throw new InvalidArgumentException('type'); } |