diff options
author | Joas Schilling <coding@schilljs.com> | 2020-03-31 20:06:51 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-04-01 09:15:07 +0300 |
commit | 06a045ed1e82facb477caedd918200cdd4c34ea9 (patch) | |
tree | f88e1550c637a4be418f41bb65708620961645b9 /lib | |
parent | c3962421113b9ce612178ab63411c4d2ef5220b5 (diff) |
Use a query that is better indexed
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Controller/CallController.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Controller/CallController.php b/lib/Controller/CallController.php index 3f743538a..9a08f3cd1 100644 --- a/lib/Controller/CallController.php +++ b/lib/Controller/CallController.php @@ -53,10 +53,11 @@ class CallController extends AEnvironmentAwareController { * @return DataResponse */ public function getPeersForCall(): DataResponse { + $timeout = $this->timeFactory->getTime() - 30; $result = []; - $participants = $this->room->getParticipants($this->timeFactory->getTime() - 30); + $participants = $this->room->getParticipantsInCall(); foreach ($participants as $participant) { - if ($participant->getSessionId() === '0' || $participant->getInCallFlags() === Participant::FLAG_DISCONNECTED) { + if ($participant->getLastPing() < $timeout) { // User is not active in call continue; } |