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-11-16 22:46:33 +0300
committerJoas Schilling <coding@schilljs.com>2020-11-26 11:46:46 +0300
commit18e6072a300dc5ffa8eb8667859052c8a6213bf9 (patch)
treeb5fba733ce46c5bdc7908fcbc44e2bae81311836 /lib/Controller
parent8e031296b9ee64e7e4188331bf3c83fe53bedef0 (diff)
Refresh the peer list and take the display name from there
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Controller')
-rw-r--r--lib/Controller/CallController.php32
1 files changed, 22 insertions, 10 deletions
diff --git a/lib/Controller/CallController.php b/lib/Controller/CallController.php
index 6a43b49ff..85c85e834 100644
--- a/lib/Controller/CallController.php
+++ b/lib/Controller/CallController.php
@@ -72,17 +72,29 @@ class CallController extends AEnvironmentAwareController {
continue;
}
- $userId = '';
- if ($participant->getAttendee()->getActorType() === Attendee::ACTOR_USERS) {
- $userId = $participant->getAttendee()->getActorId();
+ if ($this->getAPIVersion() >= 3) {
+ $result[] = [
+ 'actorType' => $participant->getAttendee()->getActorType(),
+ 'actorId' => $participant->getAttendee()->getActorId(),
+ // FIXME 'displayName' => $participant->getAttendee()->getDisplayName(),
+ 'displayName' => $participant->getAttendee()->getActorId(),
+ 'token' => $this->room->getToken(),
+ 'lastPing' => $session->getLastPing(),
+ 'sessionId' => $session->getSessionId(),
+ ];
+ } else {
+ $userId = '';
+ if ($participant->getAttendee()->getActorType() === Attendee::ACTOR_USERS) {
+ $userId = $participant->getAttendee()->getActorId();
+ }
+
+ $result[] = [
+ 'userId' => $userId,
+ 'token' => $this->room->getToken(),
+ 'lastPing' => $session->getLastPing(),
+ 'sessionId' => $session->getSessionId(),
+ ];
}
-
- $result[] = [
- 'userId' => $userId,
- 'token' => $this->room->getToken(),
- 'lastPing' => $session->getLastPing(),
- 'sessionId' => $session->getSessionId(),
- ];
}
return new DataResponse($result);