Skip to content
Merged
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
6 changes: 3 additions & 3 deletions lib/Notification/Notifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
namespace OCA\OpenAi\Notification;

use OCA\OpenAi\AppInfo\Application;
use OCP\Activity\Exceptions\UnknownActivityException;
use OCP\IURLGenerator;
use OCP\L10N\IFactory;
use OCP\Notification\IAction;
use OCP\Notification\INotification;

use OCP\Notification\INotifier;
use OCP\Notification\UnknownNotificationException;

class Notifier implements INotifier {

Expand All @@ -35,11 +35,11 @@ public function getName(): string {
public function prepare(INotification $notification, string $languageCode): INotification {
if ($notification->getApp() !== Application::APP_ID) {
// Not my app => throw
throw new UnknownActivityException();
throw new UnknownNotificationException();
}
if ($notification->getSubject() !== 'quota_exceeded') {
// Not a valid subject => throw
throw new UnknownActivityException();
throw new UnknownNotificationException();
}

$l = $this->factory->get(Application::APP_ID, $languageCode);
Expand Down
Loading