diff options
author | Joas Schilling <coding@schilljs.com> | 2019-10-02 13:07:07 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2019-10-02 13:07:28 +0300 |
commit | 025885c59e9cfd2b793a4bec9ff9087427b3a7e1 (patch) | |
tree | 63668c07a69aa15b140cc467e6db57d3a9150437 /lib | |
parent | 81f83f18fca2de3c5c96d72dd2f31679f36816e7 (diff) |
Only leave the call when the user is actually in the call
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Listener.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Listener.php b/lib/Listener.php index 9189155d2..7d780166d 100644 --- a/lib/Listener.php +++ b/lib/Listener.php @@ -106,7 +106,10 @@ class Listener { $sessionIds = $this->talkSession->getAllActiveSessions(); foreach ($sessionIds as $sessionId) { $room = $this->manager->getRoomForSession($user->getUID(), $sessionId); - $room->changeInCall($sessionId, Participant::FLAG_DISCONNECTED); + $participant = $room->getParticipant($user->getUID()); + if ($participant->getInCallFlags() !== Participant::FLAG_DISCONNECTED) { + $room->changeInCall($sessionId, Participant::FLAG_DISCONNECTED); + } $room->leaveRoom($user->getUID(), $sessionId); } } |