Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-03-31 20:06:51 +0300
committerJoas Schilling <coding@schilljs.com>2020-04-01 09:15:07 +0300
commit06a045ed1e82facb477caedd918200cdd4c34ea9 (patch)
treef88e1550c637a4be418f41bb65708620961645b9 /lib
parentc3962421113b9ce612178ab63411c4d2ef5220b5 (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.php5
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;
}