Skip to content
Merged
Show file tree
Hide file tree
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
14 changes: 14 additions & 0 deletions appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,20 @@
'url' => '/not-found',
'verb' => 'GET',
],

[
'name' => 'Page#showCall',
'url' => '/call/{token}',
'verb' => 'GET',
'root' => '',
],
[
'name' => 'Page#authenticatePassword',
'url' => '/call/{token}',
'verb' => 'POST',
'root' => '',
],

],
'ocs' => [
/**
Expand Down
2 changes: 1 addition & 1 deletion lib/Collaboration/Resources/ConversationProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function getResourceRichObject(IResource $resource): array {
'name' => $room->getDisplayName($user instanceof IUser ? $user->getUID() : ''),
'call-type' => $this->getRoomType($room),
'iconUrl' => $iconURL,
'link' => $this->urlGenerator->linkToRouteAbsolute('spreed.pagecontroller.showCall', ['token' => $room->getToken()])
'link' => $this->urlGenerator->linkToRouteAbsolute('spreed.Page.showCall', ['token' => $room->getToken()])
];
} catch (RoomNotFoundException $e) {
throw new ResourceException('Conversation not found');
Expand Down
8 changes: 4 additions & 4 deletions lib/Controller/PageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ protected function guestEnterRoom(string $token, string $password): Response {
} catch (RoomNotFoundException $e) {
$redirectUrl = $this->url->linkToRoute('spreed.Page.index');
if ($token) {
$redirectUrl = $this->url->linkToRoute('spreed.pagecontroller.showCall', ['token' => $token]);
$redirectUrl = $this->url->linkToRoute('spreed.Page.showCall', ['token' => $token]);
}
return new RedirectResponse($this->url->linkToRoute('core.login.showLoginForm', [
'redirect_url' => $redirectUrl,
Expand Down Expand Up @@ -352,13 +352,13 @@ protected function redirectToConversation(string $token): RedirectResponse {
if ($room->getType() !== Room::PUBLIC_CALL) {
throw new RoomNotFoundException();
}
return new RedirectResponse($this->url->linkToRoute('spreed.pagecontroller.showCall', ['token' => $token]));
return new RedirectResponse($this->url->linkToRoute('spreed.Page.showCall', ['token' => $token]));
} catch (RoomNotFoundException $e) {
return new RedirectResponse($this->url->linkToRoute('core.login.showLoginForm', [
'redirect_url' => $this->url->linkToRoute('spreed.pagecontroller.showCall', ['token' => $token]),
'redirect_url' => $this->url->linkToRoute('spreed.Page.showCall', ['token' => $token]),
]));
}
}
return new RedirectResponse($this->url->linkToRoute('spreed.pagecontroller.showCall', ['token' => $token]));
return new RedirectResponse($this->url->linkToRoute('spreed.Page.showCall', ['token' => $token]));
}
}
2 changes: 1 addition & 1 deletion lib/GuestManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public function inviteByEmail(Room $room, string $email): void {
$event = new AddEmailEvent($room, $email);
$this->dispatcher->dispatch(self::EVENT_BEFORE_EMAIL_INVITE, $event);

$link = $this->url->linkToRouteAbsolute('spreed.pagecontroller.showCall', ['token' => $room->getToken()]);
$link = $this->url->linkToRouteAbsolute('spreed.Page.showCall', ['token' => $room->getToken()]);

$message = $this->mailer->createMessage();

Expand Down
2 changes: 1 addition & 1 deletion lib/Notification/Notifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public function prepare(INotification $notification, string $languageCode): INot

$notification
->setIcon($this->url->getAbsoluteURL($this->url->imagePath('spreed', 'app-dark.svg')))
->setLink($this->url->linkToRouteAbsolute('spreed.pagecontroller.showCall', ['token' => $room->getToken()]));
->setLink($this->url->linkToRouteAbsolute('spreed.Page.showCall', ['token' => $room->getToken()]));

$subject = $notification->getSubject();
if ($subject === 'invitation') {
Expand Down