diff options
author | Joas Schilling <coding@schilljs.com> | 2020-10-22 14:17:20 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-10-30 12:38:09 +0300 |
commit | 6c20e595e5c88731eb5092652a2d6d483d74a306 (patch) | |
tree | a6f6b1ca29c6ce7848ac9bcb8a1eb52d685379dd /lib/Activity | |
parent | 542c3792207c5a70ccdefc80f882b23c660cc9d8 (diff) |
Move Room::getParticipantUserIds() to participant service
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Activity')
-rw-r--r-- | lib/Activity/Listener.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Activity/Listener.php b/lib/Activity/Listener.php index bd71bf587..3ddfa9111 100644 --- a/lib/Activity/Listener.php +++ b/lib/Activity/Listener.php @@ -28,6 +28,7 @@ use OCA\Talk\Events\AddParticipantsEvent; use OCA\Talk\Events\ModifyParticipantEvent; use OCA\Talk\Events\RoomEvent; use OCA\Talk\Room; +use OCA\Talk\Service\ParticipantService; use OCP\Activity\IManager; use OCP\AppFramework\Utility\ITimeFactory; use OCP\EventDispatcher\IEventDispatcher; @@ -46,6 +47,9 @@ class Listener { /** @var ChatManager */ protected $chatManager; + /** @var ParticipantService */ + protected $participantService; + /** @var LoggerInterface */ protected $logger; @@ -55,11 +59,13 @@ class Listener { public function __construct(IManager $activityManager, IUserSession $userSession, ChatManager $chatManager, + ParticipantService $participantService, LoggerInterface $logger, ITimeFactory $timeFactory) { $this->activityManager = $activityManager; $this->userSession = $userSession; $this->chatManager = $chatManager; + $this->participantService = $participantService; $this->logger = $logger; $this->timeFactory = $timeFactory; } @@ -107,7 +113,7 @@ class Listener { } $duration = $this->timeFactory->getTime() - $activeSince->getTimestamp(); - $userIds = $room->getParticipantUserIds($activeSince); + $userIds = $this->participantService->getParticipantUserIds($room, $activeSince); if ((\count($userIds) + $room->getActiveGuests()) === 1) { // Single user pinged or guests only => no summary/activity |