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
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-02-28 15:31:58 +0300
committerJoas Schilling <coding@schilljs.com>2020-02-28 15:33:51 +0300
commit1bf2e51dc8489acc53dc18dfbd97d5fd015aba05 (patch)
treec584a67ac123b6a4dff44e6c51ef7d45174e5764 /lib/Room.php
parent2ae17259feca60a0f88c064b964f6b2d088607ff (diff)
Only update the named session if it is a guest
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Room.php')
-rw-r--r--lib/Room.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Room.php b/lib/Room.php
index fa6769e92..8420b51d2 100644
--- a/lib/Room.php
+++ b/lib/Room.php
@@ -668,6 +668,11 @@ class Room {
->set('participant_type', $query->createNamedParameter($participantType, IQueryBuilder::PARAM_INT))
->where($query->expr()->eq('room_id', $query->createNamedParameter($this->getId(), IQueryBuilder::PARAM_INT)))
->andWhere($query->expr()->eq('user_id', $query->createNamedParameter($participant->getUser())));
+
+ if ($participant->getUser() === '') {
+ $query->andWhere($query->expr()->eq('session_id', $query->createNamedParameter($participant->getSessionId())));
+ }
+
$query->execute();
$this->dispatcher->dispatch(self::EVENT_AFTER_PARTICIPANT_TYPE_SET, $event);