aboutsummaryrefslogtreecommitdiffstats
path: root/apps/comments
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2018-02-14 14:39:39 +0100
committerArthur Schiwon <blizzz@arthur-schiwon.de>2018-02-14 14:39:39 +0100
commit023d028c571720df648a3bf809cefc774d2aba16 (patch)
tree46fbf717249b0bd88b6da96f8862bc4bda974bdd /apps/comments
parenta5a0a938f2d37b1dd8fb0178a1c9700a447dcfe2 (diff)
downloadnextcloud-server-023d028c571720df648a3bf809cefc774d2aba16.tar.gz
nextcloud-server-023d028c571720df648a3bf809cefc774d2aba16.zip
fix creating comments when file is accessible to users with numeric ids
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/comments')
-rw-r--r--apps/comments/lib/Activity/Listener.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/comments/lib/Activity/Listener.php b/apps/comments/lib/Activity/Listener.php
index 1dec28c8250..b5378e996dc 100644
--- a/apps/comments/lib/Activity/Listener.php
+++ b/apps/comments/lib/Activity/Listener.php
@@ -31,7 +31,6 @@ use OCP\Files\IRootFolder;
use OCP\Files\Node;
use OCP\IUser;
use OCP\IUserSession;
-use OCP\Share;
use OCP\Share\IShareHelper;
class Listener {
@@ -99,7 +98,7 @@ class Listener {
/** @var Node $node */
$node = array_shift($nodes);
$al = $this->shareHelper->getPathsForAccessList($node);
- $users = array_merge($users, $al['users']);
+ $users += $al['users'];
}
}
@@ -120,7 +119,9 @@ class Listener {
]);
foreach ($users as $user => $path) {
- $activity->setAffectedUser($user);
+ // numerical user ids end up as integers from array keys, but string
+ // is required
+ $activity->setAffectedUser((string)$user);
$activity->setSubject('add_comment_subject', [
'actor' => $actor,