Skip to content

Commit e403b7a

Browse files
committed
Add an error log message that notifications app isn't enabled at files_reminders app load.
Signed-off-by: Faisal Alghamdi <[email protected]>
1 parent 17659d3 commit e403b7a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

apps/files_reminders/appinfo/info.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
<description><![CDATA[**📣 File reminders**
1212
1313
Set file reminders.
14+
15+
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.
16+
1417
]]></description>
1518
<version>1.4.0</version>
1619
<licence>agpl</licence>

apps/files_reminders/lib/Listener/LoadAdditionalScriptsListener.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@
1515
use OCP\EventDispatcher\Event;
1616
use OCP\EventDispatcher\IEventListener;
1717
use OCP\Util;
18+
use Psr\Log\LoggerInterface;
1819

1920
/** @template-implements IEventListener<LoadAdditionalScriptsEvent> */
2021
class LoadAdditionalScriptsListener implements IEventListener {
2122
public function __construct(
2223
private IAppManager $appManager,
24+
private readonly LoggerInterface $logger,
2325
) {
2426
}
2527

@@ -29,6 +31,7 @@ public function handle(Event $event): void {
2931
}
3032

3133
if (!$this->appManager->isEnabledForUser('notifications')) {
34+
$this->logger->error('Failed to register `files_reminders` app. This could happen due to the `notifications` app isn\'t enabled.', ['app' => 'files_reminders']);
3235
return;
3336
}
3437

0 commit comments

Comments
 (0)