diff --git a/lib/Collaboration/Collaborators/Listener.php b/lib/Collaboration/Collaborators/Listener.php index fdca86a18b8..d39101d5d05 100644 --- a/lib/Collaboration/Collaborators/Listener.php +++ b/lib/Collaboration/Collaborators/Listener.php @@ -132,7 +132,11 @@ protected function filterExistingParticipants(string $token, array $results): ar $sessionId = $this->talkSession->getSessionForRoom($token); try { $this->room = $this->manager->getRoomForUserByToken($token, $this->userId); - $this->participantService->getParticipant($this->room, $this->userId, $sessionId); + if ($this->userId !== null) { + $this->participantService->getParticipant($this->room, $this->userId, $sessionId); + } else { + $this->participantService->getParticipantBySession($this->room, $sessionId); + } } catch (RoomNotFoundException $e) { return $results; } catch (ParticipantNotFoundException $e) {