File tree Expand file tree Collapse file tree 2 files changed +5523
-4061
lines changed
Expand file tree Collapse file tree 2 files changed +5523
-4061
lines changed Original file line number Diff line number Diff line change 77namespace OCA \Secrets \Notification ;
88
99use Exception ;
10- use InvalidArgumentException ;
1110use OCA \Secrets \AppInfo \Application ;
1211use OCA \Secrets \Service \SecretService ;
1312use OCP \IURLGenerator ;
1413use OCP \L10N \IFactory ;
1514use OCP \Notification \AlreadyProcessedException ;
1615use OCP \Notification \INotification ;
1716use OCP \Notification \INotifier ;
17+ use OCP \Notification \UnknownNotificationException ;
1818use Psr \Log \LoggerInterface ;
1919
2020class Notifier implements INotifier {
@@ -54,13 +54,13 @@ public function getName(): string {
5454 * @param INotification $notification
5555 * @param string $languageCode The code of the language that should be used to prepare the notification
5656 * @return INotification
57- * @throws InvalidArgumentException When the notification was not prepared by a notifier
57+ * @throws UnknownNotificationException When the notification was not prepared by a notifier
5858 * @throws AlreadyProcessedException When the notification is not needed anymore and should be deleted
5959 * @since 9.0.0
6060 */
6161 public function prepare (INotification $ notification , string $ languageCode ): INotification {
6262 if ($ notification ->getApp () != Application::APP_ID ) {
63- throw new InvalidArgumentException ("Unknown app: " . $ notification ->getApp ());
63+ throw new UnknownNotificationException ("Unknown app: " . $ notification ->getApp ());
6464 }
6565 try {
6666 $ secret = $ this ->secretService ->find ($ notification ->getObjectId (), $ notification ->getUser ());
You can’t perform that action at this time.
0 commit comments