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/Activity
parent89f3f351962c2183d1cfeadedd2b6916d7958bc3 (diff)
Introduce constants for the actor types
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Activity')
-rw-r--r--lib/Activity/Listener.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Activity/Listener.php b/lib/Activity/Listener.php
index cc1c69ce5..474496067 100644
--- a/lib/Activity/Listener.php
+++ b/lib/Activity/Listener.php
@@ -27,6 +27,7 @@ use OCA\Talk\Chat\ChatManager;
use OCA\Talk\Events\AddParticipantsEvent;
use OCA\Talk\Events\ModifyParticipantEvent;
use OCA\Talk\Events\RoomEvent;
+use OCA\Talk\Model\Attendee;
use OCA\Talk\Room;
use OCA\Talk\Service\ParticipantService;
use OCP\Activity\IManager;
@@ -129,7 +130,7 @@ class Listener {
}
$actorId = $userIds[0] ?? 'guests-only';
- $actorType = $actorId !== 'guests-only' ? 'users' : 'guests';
+ $actorType = $actorId !== 'guests-only' ? Attendee::ACTOR_USERS : Attendee::ACTOR_GUESTS;
$this->chatManager->addSystemMessage($room, $actorType, $actorId, json_encode([
'message' => 'call_ended',
'parameters' => [
@@ -205,7 +206,7 @@ class Listener {
}
foreach ($participants as $participant) {
- if ($participant['actorType'] !== 'users') {
+ if ($participant['actorType'] !== Attendee::ACTOR_USERS) {
// No user => no activity
continue;
}