Skip to content

Commit

Permalink
fixup! feat(ocs): notify of new messages and provide API endpoint to …
Browse files Browse the repository at this point in the history
…retrieve its contents
  • Loading branch information
miaulalala committed Jun 18, 2024
1 parent 8858cfc commit 3a55d75
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@
'ocs' => [
[
'name' => 'messageApi#get',
'url' => '/message/{$id}',
'url' => '/message/{id}',
'verb' => 'GET',
],
],
Expand Down
2 changes: 1 addition & 1 deletion lib/Listener/NewMessagesNotifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Check failure on line 35 in lib/Listener/NewMessagesNotifier.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis dev-master

TooManyArguments

lib/Listener/NewMessagesNotifier.php:35:32: TooManyArguments: Too many arguments for method OCP\IURLGenerator::linktoocsrouteabsolute - saw 3 (see https://psalm.dev/026)

Check failure on line 35 in lib/Listener/NewMessagesNotifier.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis dev-stable29

TooManyArguments

lib/Listener/NewMessagesNotifier.php:35:32: TooManyArguments: Too many arguments for method OCP\IURLGenerator::linktoocsrouteabsolute - saw 3 (see https://psalm.dev/026)

Check failure on line 35 in lib/Listener/NewMessagesNotifier.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis dev-stable28

TooManyArguments

lib/Listener/NewMessagesNotifier.php:35:32: TooManyArguments: Too many arguments for method OCP\IURLGenerator::linktoocsrouteabsolute - saw 3 (see https://psalm.dev/026)

Check failure on line 35 in lib/Listener/NewMessagesNotifier.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis dev-stable27

TooManyArguments

lib/Listener/NewMessagesNotifier.php:35:32: TooManyArguments: Too many arguments for method OCP\IURLGenerator::linktoocsrouteabsolute - saw 3 (see https://psalm.dev/026)
$this->eventDispatcher->dispatchTyped(new NewMessageReceivedEvent($uri));
}
}
Expand Down

0 comments on commit 3a55d75

Please sign in to comment.