aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/private/Activity/Manager.php32
-rw-r--r--lib/private/Notification/Manager.php4
-rw-r--r--lib/private/Server.php4
3 files changed, 14 insertions, 26 deletions
diff --git a/lib/private/Activity/Manager.php b/lib/private/Activity/Manager.php
index 54d50a47dcb..5c306fe6399 100644
--- a/lib/private/Activity/Manager.php
+++ b/lib/private/Activity/Manager.php
@@ -21,20 +21,10 @@ use OCP\IL10N;
use OCP\IRequest;
use OCP\IUser;
use OCP\IUserSession;
+use OCP\RichObjectStrings\IRichTextFormatter;
use OCP\RichObjectStrings\IValidator;
class Manager implements IManager {
- /** @var IRequest */
- protected $request;
-
- /** @var IUserSession */
- protected $session;
-
- /** @var IConfig */
- protected $config;
-
- /** @var IValidator */
- protected $validator;
/** @var string */
protected $formattingObjectType;
@@ -48,20 +38,14 @@ class Manager implements IManager {
/** @var string */
protected $currentUserId;
- protected $l10n;
-
public function __construct(
- IRequest $request,
- IUserSession $session,
- IConfig $config,
- IValidator $validator,
- IL10N $l10n
+ protected IRequest $request,
+ protected IUserSession $session,
+ protected IConfig $config,
+ protected IValidator $validator,
+ protected IRichTextFormatter $richTextFormatter,
+ protected IL10N $l10n,
) {
- $this->request = $request;
- $this->session = $session;
- $this->config = $config;
- $this->validator = $validator;
- $this->l10n = $l10n;
}
/** @var \Closure[] */
@@ -104,7 +88,7 @@ class Manager implements IManager {
* @return IEvent
*/
public function generateEvent(): IEvent {
- return new Event($this->validator);
+ return new Event($this->validator, $this->richTextFormatter);
}
/**
diff --git a/lib/private/Notification/Manager.php b/lib/private/Notification/Manager.php
index 8edbca0380d..ac287e97048 100644
--- a/lib/private/Notification/Manager.php
+++ b/lib/private/Notification/Manager.php
@@ -22,6 +22,7 @@ use OCP\Notification\IncompleteParsedNotificationException;
use OCP\Notification\INotification;
use OCP\Notification\INotifier;
use OCP\Notification\UnknownNotificationException;
+use OCP\RichObjectStrings\IRichTextFormatter;
use OCP\RichObjectStrings\IValidator;
use OCP\Support\Subscription\IRegistry;
use Psr\Container\ContainerExceptionInterface;
@@ -55,6 +56,7 @@ class Manager implements IManager {
protected IRegistry $subscription,
protected LoggerInterface $logger,
private Coordinator $coordinator,
+ private IRichTextFormatter $richTextFormatter,
) {
$this->cache = $cacheFactory->createDistributed('notifications');
@@ -199,7 +201,7 @@ class Manager implements IManager {
* @since 8.2.0
*/
public function createNotification(): INotification {
- return new Notification($this->validator);
+ return new Notification($this->validator, $this->richTextFormatter);
}
/**
diff --git a/lib/private/Server.php b/lib/private/Server.php
index fb751104fd9..f48cc0d0a48 100644
--- a/lib/private/Server.php
+++ b/lib/private/Server.php
@@ -204,6 +204,7 @@ use OCP\Profile\IProfileManager;
use OCP\Profiler\IProfiler;
use OCP\Remote\Api\IApiFactory;
use OCP\Remote\IInstanceFactory;
+use OCP\RichObjectStrings\IRichTextFormatter;
use OCP\RichObjectStrings\IValidator;
use OCP\Route\IRouter;
use OCP\Security\Bruteforce\IThrottler;
@@ -648,6 +649,7 @@ class Server extends ServerContainer implements IServerContainer {
$c->get(IUserSession::class),
$c->get(\OCP\IConfig::class),
$c->get(IValidator::class),
+ $c->get(IRichTextFormatter::class),
$l10n
);
});
@@ -1285,7 +1287,7 @@ class Server extends ServerContainer implements IServerContainer {
$this->registerAlias(\OCP\Security\Ip\IFactory::class, \OC\Security\Ip\Factory::class);
- $this->registerAlias(\OCP\RichObjectStrings\IRichTextFormatter::class, \OC\RichObjectStrings\RichTextFormatter::class);
+ $this->registerAlias(IRichTextFormatter::class, \OC\RichObjectStrings\RichTextFormatter::class);
$this->connectDispatcher();
}