summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2023-01-24 12:34:42 +0100
committerJoas Schilling <coding@schilljs.com>2023-01-24 12:42:04 +0100
commitd277add2c01f24e2be2991bd6b6ed77779ef0d9b (patch)
tree93cd615e25ddb0336921e8fc312877abef6890ed /lib
parent63084450dbed86c7c8787ca7985573ba5c5ff6ee (diff)
Don't load any session when we don't have one
Previously this loaded a random/parallel session, which meant we would kick that session (parallel mobile client) etc. while joining. If you had timing luck, the session would be reused and then when you leave the conversation on either device the other device would loose it's session as well. Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Controller/RoomController.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Controller/RoomController.php b/lib/Controller/RoomController.php
index 4272cde23..d5f350129 100644
--- a/lib/Controller/RoomController.php
+++ b/lib/Controller/RoomController.php
@@ -1436,7 +1436,8 @@ class RoomController extends AEnvironmentAwareController {
public function joinRoom(string $token, string $password = '', bool $force = true): DataResponse {
$sessionId = $this->session->getSessionForRoom($token);
try {
- $room = $this->manager->getRoomForUserByToken($token, $this->userId, $sessionId);
+ // The participant is just joining, so enforce to not load any session
+ $room = $this->manager->getRoomForUserByToken($token, $this->userId, null);
} catch (RoomNotFoundException $e) {
return new DataResponse([], Http::STATUS_NOT_FOUND);
}