diff options
author | Joas Schilling <coding@schilljs.com> | 2020-10-30 16:03:37 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-11-26 11:46:43 +0300 |
commit | 459858a69527311bf60ffa553d45ba2a7eeec032 (patch) | |
tree | a25ef253ccc64b9b8da3e7c7597a55c8495f3c4f /lib/Activity | |
parent | 89f3f351962c2183d1cfeadedd2b6916d7958bc3 (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.php | 5 |
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; } |