Merge pull request #49232 from falghamdi125/files_reminders-logging-notifications-app-not-enabled

Add an error log message that notifications app isn't enabled at file…
pull/49602/head^2
John Molakvoæ 1 year ago committed by GitHub
commit 6014be44f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      apps/files_reminders/appinfo/info.xml
  2. 3
      apps/files_reminders/lib/Listener/LoadAdditionalScriptsListener.php

@ -11,6 +11,9 @@
<description><![CDATA[**📣 File reminders**
Set file reminders.
Note: to use the `File reminders` app, ensure that the `Notifications` app is installed and enabled. The `Notifications` app provides the necessary APIs for the `File reminders` app to work correctly.
]]></description>
<version>1.4.0</version>
<licence>agpl</licence>

@ -15,11 +15,13 @@ use OCP\App\IAppManager;
use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventListener;
use OCP\Util;
use Psr\Log\LoggerInterface;
/** @template-implements IEventListener<LoadAdditionalScriptsEvent> */
class LoadAdditionalScriptsListener implements IEventListener {
public function __construct(
private IAppManager $appManager,
private LoggerInterface $logger,
) {
}
@ -29,6 +31,7 @@ class LoadAdditionalScriptsListener implements IEventListener {
}
if (!$this->appManager->isEnabledForUser('notifications')) {
$this->logger->error('Failed to register the `files_reminders` app. This could happen due to the `notifications` app being disabled.', ['app' => 'files_reminders']);
return;
}

Loading…
Cancel
Save