diff options
Diffstat (limited to 'lib/Signaling/BackendNotifier.php')
-rw-r--r-- | lib/Signaling/BackendNotifier.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/Signaling/BackendNotifier.php b/lib/Signaling/BackendNotifier.php index 139107a9d..577cc7645 100644 --- a/lib/Signaling/BackendNotifier.php +++ b/lib/Signaling/BackendNotifier.php @@ -281,6 +281,33 @@ class BackendNotifier { } /** + * The given participants should switch to the given room. + * + * @param Room $room + * @param string $switchToRoomToken + * @param string[] $sessionIds + * @throws \Exception + */ + public function switchToRoom(Room $room, string $switchToRoomToken, array $sessionIds): void { + $start = microtime(true); + $this->backendRequest($room, [ + 'type' => 'switchto', + 'switchto' => [ + 'roomid' => $switchToRoomToken, + 'sessions' => $sessionIds, + ], + ]); + $duration = microtime(true) - $start; + $this->logger->debug('Switch to room: {token} {roomid} {sessions} ({duration})', [ + 'token' => $room->getToken(), + 'roomid' => $switchToRoomToken, + 'sessions' => print_r($sessionIds, true), + 'duration' => sprintf('%.2f', $duration), + 'app' => 'spreed-hpb', + ]); + } + + /** * The participant list of the given room has been modified. * * @param Room $room |