Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Use addMessageForAllParticipants instead of looping manually
Signed-off-by: Joas Schilling <[email protected]>
  • Loading branch information
nickvergessen committed Feb 24, 2021
commit 81520a678910fec10750e446ef08e989650a85cb
11 changes: 1 addition & 10 deletions lib/Signaling/Listener.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,16 +100,7 @@ protected static function registerInternalSignaling(IEventDispatcher $dispatcher

/** @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);
}
Expand Down