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:
-rw-r--r--lib/Controller/RoomController.php26
1 files changed, 19 insertions, 7 deletions
diff --git a/lib/Controller/RoomController.php b/lib/Controller/RoomController.php
index 4698dfa25..e09a54c25 100644
--- a/lib/Controller/RoomController.php
+++ b/lib/Controller/RoomController.php
@@ -1169,14 +1169,26 @@ class RoomController extends AEnvironmentAwareController {
return new DataResponse([], Http::STATUS_NOT_FOUND);
}
- if ($force === false && $this->userId !== null) {
- try {
- $participant = $room->getParticipant($this->userId);
- if ($participant->getSessionId() !== '0') {
- return new DataResponse([], Http::STATUS_CONFLICT);
+ if ($force === false) {
+ if ($this->userId !== null) {
+ try {
+ $participant = $room->getParticipant($this->userId);
+ if ($participant->getSessionId() !== '0') {
+ return new DataResponse([], Http::STATUS_CONFLICT);
+ }
+ } catch (ParticipantNotFoundException $e) {
+ // All fine, carry on
+ }
+ } else {
+ $session = $this->session->getSessionForRoom($token);
+ try {
+ $participant = $room->getParticipantBySession($session);
+ if ($participant->getSessionId() !== '0') {
+ return new DataResponse([], Http::STATUS_CONFLICT);
+ }
+ } catch (ParticipantNotFoundException $e) {
+ // All fine, carry on
}
- } catch (ParticipantNotFoundException $e) {
- // All fine, carry on
}
}