aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFaisal Alghamdi <falghamdi125@gmail.com>2024-11-12 17:51:36 +0300
committerFaisal Alghamdi <falghamdi125@gmail.com>2024-11-29 10:29:29 -0500
commit3d410aaaad8290c32bf611abca1cbcc9823db860 (patch)
tree95977f81bf37dfde7fcbba73ed6c7c83f7252e8a
parent17659d327ac2d6d62405ca489fb0f1432c4e03e4 (diff)
downloadnextcloud-server-3d410aaaad8290c32bf611abca1cbcc9823db860.tar.gz
nextcloud-server-3d410aaaad8290c32bf611abca1cbcc9823db860.zip
Fix(files_reminders): Add an error log message that notifications app isn't enabled at files_reminders app load.
Signed-off-by: Faisal Alghamdi <falghamdi125@gmail.com>
-rw-r--r--apps/files_reminders/appinfo/info.xml3
-rw-r--r--apps/files_reminders/lib/Listener/LoadAdditionalScriptsListener.php3
2 files changed, 6 insertions, 0 deletions
diff --git a/apps/files_reminders/appinfo/info.xml b/apps/files_reminders/appinfo/info.xml
index a3d5fe43f94..dd149cea42d 100644
--- a/apps/files_reminders/appinfo/info.xml
+++ b/apps/files_reminders/appinfo/info.xml
@@ -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>
diff --git a/apps/files_reminders/lib/Listener/LoadAdditionalScriptsListener.php b/apps/files_reminders/lib/Listener/LoadAdditionalScriptsListener.php
index 52c39f9b04e..a0173aabc64 100644
--- a/apps/files_reminders/lib/Listener/LoadAdditionalScriptsListener.php
+++ b/apps/files_reminders/lib/Listener/LoadAdditionalScriptsListener.php
@@ -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;
}