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>2021-02-24 12:15:28 +0300
committerJoas Schilling <coding@schilljs.com>2021-02-24 12:15:28 +0300
commit81520a678910fec10750e446ef08e989650a85cb (patch)
tree2771dec493fdb76cb1dd73e989a71b202ab082af /lib/Signaling
parent62aae8ad962d85a5bd14ac9eea6fe37bf78ecd4b (diff)
Use addMessageForAllParticipants instead of looping manually
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Signaling')
-rw-r--r--lib/Signaling/Listener.php11
1 files changed, 1 insertions, 10 deletions
diff --git a/lib/Signaling/Listener.php b/lib/Signaling/Listener.php
index d5625d167..333c4d7fd 100644
--- a/lib/Signaling/Listener.php
+++ b/lib/Signaling/Listener.php
@@ -100,16 +100,7 @@ class Listener {
/** @var Messages $messages */
$messages = \OC::$server->query(Messages::class);
- /** @var ParticipantService $participantService */
- $participantService = \OC::$server->query(ParticipantService::class);
-
- $participants = $participantService->getParticipantsForRoom($room);
- foreach ($participants as $participant) {
- $session = $participant->getSession();
- if ($session instanceof Session) {
- $messages->addMessage($session->getSessionId(), $session->getSessionId(), 'refresh-participant-list');
- }
- }
+ $messages->addMessageForAllParticipants($room, 'refresh-participant-list');
};
$dispatcher->addListener(Room::EVENT_BEFORE_ROOM_DELETE, $listener);
}