summaryrefslogtreecommitdiffstats
path: root/lib/private/Activity/Manager.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Activity/Manager.php')
-rw-r--r--lib/private/Activity/Manager.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/private/Activity/Manager.php b/lib/private/Activity/Manager.php
index ffe6c335b27..cbe2d8c3eee 100644
--- a/lib/private/Activity/Manager.php
+++ b/lib/private/Activity/Manager.php
@@ -28,6 +28,7 @@
namespace OC\Activity;
+use OCP\Activity\ActivitySettings;
use OCP\Activity\IConsumer;
use OCP\Activity\IEvent;
use OCP\Activity\IFilter;
@@ -262,7 +263,7 @@ class Manager implements IManager {
}
/**
- * @return ISetting[]
+ * @return ActivitySettings[]
* @throws \InvalidArgumentException
*/
public function getSettings(): array {
@@ -271,6 +272,10 @@ class Manager implements IManager {
$setting = \OC::$server->query($class);
if (!$setting instanceof ISetting) {
+ if (!$setting instanceof ActivitySettings) {
+ $setting = new ActivitySettingsAdapter($setting);
+ }
+ } else {
throw new \InvalidArgumentException('Invalid activity filter registered');
}
@@ -283,11 +288,11 @@ class Manager implements IManager {
/**
* @param string $id
- * @return ISetting
+ * @return ActivitySettings
* @throws \InvalidArgumentException when the setting was not found
* @since 11.0.0
*/
- public function getSettingById(string $id): ISetting {
+ public function getSettingById(string $id): ActivitySettings {
$settings = $this->getSettings();
if (isset($settings[$id])) {