From 3a55d75271850e1554f6a9a70fff38dff4ff356d Mon Sep 17 00:00:00 2001 From: Anna Larch Date: Tue, 18 Jun 2024 11:26:48 +0200 Subject: [PATCH] fixup! feat(ocs): notify of new messages and provide API endpoint to retrieve its contents --- appinfo/routes.php | 2 +- lib/Listener/NewMessagesNotifier.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/appinfo/routes.php b/appinfo/routes.php index b5266cb554..ea0cb2beea 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -496,7 +496,7 @@ 'ocs' => [ [ 'name' => 'messageApi#get', - 'url' => '/message/{$id}', + 'url' => '/message/{id}', 'verb' => 'GET', ], ], diff --git a/lib/Listener/NewMessagesNotifier.php b/lib/Listener/NewMessagesNotifier.php index 495f47833f..1f695d59fc 100644 --- a/lib/Listener/NewMessagesNotifier.php +++ b/lib/Listener/NewMessagesNotifier.php @@ -32,7 +32,7 @@ public function handle(Event $event): void { /** @var Message $message */ foreach($event->getMessages() as $message) { - $uri = $this->urlGenerator->linkToOCSRouteAbsolute('mail.messageApi.get', ['id' => $message->getId()]); + $uri = $this->urlGenerator->linkToOCSRouteAbsolute('mail.messageApi.get', ['id' => $message->getId()], 'GET'); $this->eventDispatcher->dispatchTyped(new NewMessageReceivedEvent($uri)); } }