Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-10-30 16:03:37 +0300
committerJoas Schilling <coding@schilljs.com>2020-11-26 11:46:43 +0300
commit459858a69527311bf60ffa553d45ba2a7eeec032 (patch)
treea25ef253ccc64b9b8da3e7c7597a55c8495f3c4f /lib/Signaling
parent89f3f351962c2183d1cfeadedd2b6916d7958bc3 (diff)
Introduce constants for the actor types
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Signaling')
-rw-r--r--lib/Signaling/BackendNotifier.php15
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/Signaling/BackendNotifier.php b/lib/Signaling/BackendNotifier.php
index 1ada571c7..e1429f9e9 100644
--- a/lib/Signaling/BackendNotifier.php
+++ b/lib/Signaling/BackendNotifier.php
@@ -26,6 +26,7 @@ declare(strict_types=1);
namespace OCA\Talk\Signaling;
use OCA\Talk\Config;
+use OCA\Talk\Model\Attendee;
use OCA\Talk\Model\Session;
use OCA\Talk\Participant;
use OCA\Talk\Room;
@@ -147,7 +148,7 @@ class BackendNotifier {
$this->logger->info('Now invited to ' . $room->getToken() . ': ' . print_r($users, true));
$userIds = [];
foreach ($users as $user) {
- if ($user['actorType'] === 'users') {
+ if ($user['actorType'] === Attendee::ACTOR_USERS) {
$userIds[] = $user['actorId'];
}
}
@@ -253,8 +254,8 @@ class BackendNotifier {
$participants = $this->participantService->getParticipantsForRoom($room);
foreach ($participants as $participant) {
$attendee = $participant->getAttendee();
- if ($attendee->getActorType() !== 'users'
- && $attendee->getActorType() !== 'guests') {
+ if ($attendee->getActorType() !== Attendee::ACTOR_USERS
+ && $attendee->getActorType() !== Attendee::ACTOR_GUESTS) {
continue;
}
@@ -264,7 +265,7 @@ class BackendNotifier {
'sessionId' => '0',
'participantType' => $attendee->getParticipantType(),
];
- if ($attendee->getActorType() === 'users') {
+ if ($attendee->getActorType() === Attendee::ACTOR_USERS) {
$data['userId'] = $attendee->getActorId();
}
@@ -313,8 +314,8 @@ class BackendNotifier {
$participants = $this->participantService->getParticipantsForRoom($room);
foreach ($participants as $participant) {
$attendee = $participant->getAttendee();
- if ($attendee->getActorType() !== 'users'
- && $attendee->getActorType() !== 'guests') {
+ if ($attendee->getActorType() !== Attendee::ACTOR_USERS
+ && $attendee->getActorType() !== Attendee::ACTOR_GUESTS) {
continue;
}
@@ -324,7 +325,7 @@ class BackendNotifier {
'sessionId' => '0',
'participantType' => $attendee->getParticipantType(),
];
- if ($attendee->getActorType() === 'users') {
+ if ($attendee->getActorType() === Attendee::ACTOR_USERS) {
$data['userId'] = $attendee->getActorId();
}