Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable29] Add an error log message that notifications app isn't enabled at file… #49617

Open
wants to merge 1 commit into
base: stable29
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions apps/files_reminders/appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,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.2.0</version>
<licence>agpl</licence>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,13 @@
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,
) {
}

Expand All @@ -46,6 +48,7 @@ public function handle(Event $event): void {
}

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;
}

Expand Down
Loading