aboutsummaryrefslogtreecommitdiffstats
path: root/apps/comments/lib/Activity
diff options
context:
space:
mode:
Diffstat (limited to 'apps/comments/lib/Activity')
-rw-r--r--apps/comments/lib/Activity/Filter.php1
-rw-r--r--apps/comments/lib/Activity/Listener.php2
-rw-r--r--apps/comments/lib/Activity/Provider.php6
-rw-r--r--apps/comments/lib/Activity/Setting.php1
4 files changed, 8 insertions, 2 deletions
diff --git a/apps/comments/lib/Activity/Filter.php b/apps/comments/lib/Activity/Filter.php
index 6f010d855cb..8dcafd872d7 100644
--- a/apps/comments/lib/Activity/Filter.php
+++ b/apps/comments/lib/Activity/Filter.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
diff --git a/apps/comments/lib/Activity/Listener.php b/apps/comments/lib/Activity/Listener.php
index b07cb19afda..45064f4a6be 100644
--- a/apps/comments/lib/Activity/Listener.php
+++ b/apps/comments/lib/Activity/Listener.php
@@ -31,7 +31,7 @@ class Listener {
public function commentEvent(CommentsEvent $event): void {
if ($event->getComment()->getObjectType() !== 'files'
|| $event->getEvent() !== CommentsEvent::EVENT_ADD
- || !$this->appManager->isInstalled('activity')) {
+ || !$this->appManager->isEnabledForAnyone('activity')) {
// Comment not for file, not adding a comment or no activity-app enabled (save the energy)
return;
}
diff --git a/apps/comments/lib/Activity/Provider.php b/apps/comments/lib/Activity/Provider.php
index f2fa84adc17..ee53357efdb 100644
--- a/apps/comments/lib/Activity/Provider.php
+++ b/apps/comments/lib/Activity/Provider.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
@@ -174,10 +175,13 @@ class Provider implements IProvider {
}
}
+ /**
+ * @return array<string, string>
+ */
protected function generateFileParameter(int $id, string $path): array {
return [
'type' => 'file',
- 'id' => $id,
+ 'id' => (string)$id,
'name' => basename($path),
'path' => $path,
'link' => $this->url->linkToRouteAbsolute('files.viewcontroller.showFile', ['fileid' => $id]),
diff --git a/apps/comments/lib/Activity/Setting.php b/apps/comments/lib/Activity/Setting.php
index 9315aedc104..7fbf4001b20 100644
--- a/apps/comments/lib/Activity/Setting.php
+++ b/apps/comments/lib/Activity/Setting.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later