Browse Source
fix(federation): Don't request user status from remote instances
Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/11745/head
Joas Schilling
2 years ago
No known key found for this signature in database
GPG Key ID: C400AAF20C1BB6FC
2 changed files with
3 additions and
6 deletions
-
lib/Controller/RoomController.php
-
lib/Federation/Proxy/TalkV1/Controller/RoomController.php
|
|
|
@ -845,7 +845,7 @@ class RoomController extends AEnvironmentAwareController { |
|
|
|
if ($this->room->getRemoteServer()) { |
|
|
|
/** @var \OCA\Talk\Federation\Proxy\TalkV1\Controller\RoomController $proxy */ |
|
|
|
$proxy = \OCP\Server::get(\OCA\Talk\Federation\Proxy\TalkV1\Controller\RoomController::class); |
|
|
|
return $proxy->getParticipants($this->room, $this->participant, $includeStatus); |
|
|
|
return $proxy->getParticipants($this->room, $this->participant); |
|
|
|
} |
|
|
|
|
|
|
|
if ($this->participant->getAttendee()->getParticipantType() === Participant::GUEST) { |
|
|
|
|
|
|
|
@ -56,20 +56,17 @@ class RoomController { |
|
|
|
* 200: Participants returned |
|
|
|
* 403: Missing permissions for getting participants |
|
|
|
*/ |
|
|
|
public function getParticipants(Room $room, Participant $participant, bool $includeStatus = false): DataResponse { |
|
|
|
public function getParticipants(Room $room, Participant $participant): DataResponse { |
|
|
|
$proxy = $this->proxy->get( |
|
|
|
$participant->getAttendee()->getInvitedCloudId(), |
|
|
|
$participant->getAttendee()->getAccessToken(), |
|
|
|
$room->getRemoteServer() . '/ocs/v2.php/apps/spreed/api/v4/room/' . $room->getRemoteToken() . '/participants', |
|
|
|
[ |
|
|
|
'includeStatus' => $includeStatus, |
|
|
|
], |
|
|
|
); |
|
|
|
|
|
|
|
/** @var TalkParticipant[] $data */ |
|
|
|
$data = $this->proxy->getOCSData($proxy); |
|
|
|
|
|
|
|
// FIXME post-load status information
|
|
|
|
// FIXME post-load status information of now local users
|
|
|
|
/** @var TalkParticipant[] $data */ |
|
|
|
$data = $this->userConverter->convertAttendees($room, $data, 'actorType', 'actorId', 'displayName'); |
|
|
|
$headers = []; |
|
|
|
|