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-06-05 15:16:29 +0300
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2020-06-08 14:48:45 +0300
commit504e26574cd98594d1b7f15efbe7bc77ad3b37c4 (patch)
treed3dce85a1eeafec05c13b0e5b0d1b7c8706087f1 /lib
parent9d965729ac36bfee2e479d5f619ced9ad4b19a12 (diff)
Make sure pinging session ids only uses indexes
Since sessions are unique globally (apart from '0' which is filtered out before) we can update the ping only based on the index instead of index + additional where check Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Room.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Room.php b/lib/Room.php
index d3e9795af..9924241af 100644
--- a/lib/Room.php
+++ b/lib/Room.php
@@ -1319,8 +1319,7 @@ class Room {
$query = $this->db->getQueryBuilder();
$query->update('talk_participants')
->set('last_ping', $query->createNamedParameter($timestamp, IQueryBuilder::PARAM_INT))
- ->where($query->expr()->eq('room_id', $query->createNamedParameter($this->getId(), IQueryBuilder::PARAM_INT)))
- ->andWhere($query->expr()->in('session_id', $query->createNamedParameter($sessionIds, IQueryBuilder::PARAM_STR_ARRAY)));
+ ->where($query->expr()->in('session_id', $query->createNamedParameter($sessionIds, IQueryBuilder::PARAM_STR_ARRAY)));
$query->execute();
}