Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions lib/Controller/PageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,20 @@ public function __construct(string $appName,
$this->config = $config;
}

/**
* @PublicPage
* @NoCSRFRequired
* @UseSession
*
* @param string $token
* @return Response
* @throws HintException
*/
public function showCall(string $token): Response {
// This is the entry point from the `/call/{token}` URL which is hardcoded in the server.
return $this->index($token);
}

/**
* @PublicPage
* @NoCSRFRequired
Expand Down Expand Up @@ -161,7 +175,7 @@ public function index(string $token = '', string $callUser = '', string $passwor
$response = $this->api->createRoom(Room::ONE_TO_ONE_CALL, $callUser);
if ($response->getStatus() !== Http::STATUS_NOT_FOUND) {
$data = $response->getData();
return $this->showCall($data['token']);
return $this->redirectToConversation($data['token']);
}
}

Expand Down Expand Up @@ -225,7 +239,14 @@ protected function guestEnterRoom(string $token, string $password): Response {
return $response;
}

protected function showCall(string $token): RedirectResponse {
/**
* @PublicPage
* @NoCSRFRequired
*
* @param string $token
* @return RedirectResponse
*/
protected function redirectToConversation(string $token): RedirectResponse {
// These redirects are already done outside of this method
if ($this->userId === null) {
try {
Expand Down