diff options
Diffstat (limited to 'lib/private/Notification/Manager.php')
-rw-r--r-- | lib/private/Notification/Manager.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/private/Notification/Manager.php b/lib/private/Notification/Manager.php index 8c457db8beb..0cbda651a8b 100644 --- a/lib/private/Notification/Manager.php +++ b/lib/private/Notification/Manager.php @@ -21,6 +21,7 @@ use OCP\Notification\IncompleteNotificationException; use OCP\Notification\IncompleteParsedNotificationException; use OCP\Notification\INotification; use OCP\Notification\INotifier; +use OCP\Notification\IPreloadableNotifier; use OCP\Notification\UnknownNotificationException; use OCP\RichObjectStrings\IRichTextFormatter; use OCP\RichObjectStrings\IValidator; @@ -390,6 +391,17 @@ class Manager implements IManager { return $notification; } + public function preloadDataForParsing(array $notifications, string $languageCode): void { + $notifiers = $this->getNotifiers(); + foreach ($notifiers as $notifier) { + if (!($notifier instanceof IPreloadableNotifier)) { + continue; + } + + $notifier->preloadDataForParsing($notifications, $languageCode); + } + } + /** * @param INotification $notification */ |