diff options
author | Joachim Bauch <bauch@struktur.de> | 2018-05-08 15:41:49 +0300 |
---|---|---|
committer | Joachim Bauch <bauch@struktur.de> | 2018-05-08 15:41:49 +0300 |
commit | c12363fd9a162d4ac1053bd90b6dc0c96d82555c (patch) | |
tree | 6c9be95cdd2bc8d115298ce5ad45bcb32c564bd3 /lib/Signaling/BackendNotifier.php | |
parent | e21d86040f9e68a6bd1b0fc609252e0abd5f9b26 (diff) |
Notify standalone signaling server about sessions to remove from room.
Signed-off-by: Joachim Bauch <bauch@struktur.de>
Diffstat (limited to 'lib/Signaling/BackendNotifier.php')
-rw-r--r-- | lib/Signaling/BackendNotifier.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/Signaling/BackendNotifier.php b/lib/Signaling/BackendNotifier.php index 9efc5bc6f..df2e7949a 100644 --- a/lib/Signaling/BackendNotifier.php +++ b/lib/Signaling/BackendNotifier.php @@ -176,6 +176,30 @@ class BackendNotifier{ } /** + * The given sessions have been removed from a room. + * + * @param Room $room + * @param array $sessionIds + * @throws \Exception + */ + public function roomSessionsRemoved($room, $sessionIds) { + $this->logger->info('Removed from ' . $room->getToken() . ': ' . print_r($sessionIds, true), ['app' => 'spreed']); + $this->backendRequest('/api/v1/room/' . $room->getToken(), [ + 'type' => 'disinvite', + 'disinvite' => [ + 'sessionids' => $sessionIds, + // TODO(fancycode): We should try to get rid of 'alluserids' and + // find a better way to notify existing users to update the room. + 'alluserids' => $this->getRoomUserIds($room), + 'properties' => [ + 'name' => $room->getName(), + 'type' => $room->getType(), + ], + ], + ]); + } + + /** * The given room has been modified. * * @param Room $room |