mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 16:26:59 -04:00
fix creating comments when file is accessible to users with numeric ids
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
parent
a5a0a938f2
commit
023d028c57
1 changed files with 4 additions and 3 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue