From 815565ded5d4bcfbd1cd07c33f49f08093d9c44d Mon Sep 17 00:00:00 2001 From: Chris Fritsche Date: Wed, 23 Sep 2020 12:24:44 +0200 Subject: [PATCH] Implement notifications for group members in case of moving/renaming Signed-off-by: Chris Fritsche Signed-off-by: Frieder Schrempf --- lib/FilesHooks.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/FilesHooks.php b/lib/FilesHooks.php index f88ec99a7..8a0d960e7 100755 --- a/lib/FilesHooks.php +++ b/lib/FilesHooks.php @@ -350,6 +350,7 @@ public function fileMove($oldPath, $newPath) { return; } $this->oldAccessList = $this->getUserPathsFromPath($this->oldParentPath, $this->oldParentOwner); + $this->oldAccessList['users'] = $this->getAffectedUsers($this->oldAccessList['users'], $this->oldParentId); } @@ -409,7 +410,7 @@ protected function fileRenaming($oldPath, $newPath) { } $this->generateRemoteActivity($renameRemotes, Files::TYPE_FILE_CHANGED, time(), $this->currentUser->getCloudId()); - $affectedUsers = $accessList['users']; + $affectedUsers = $this->getAffectedUsers($accessList['users'], $fileId); [$filteredEmailUsers, $filteredNotificationUsers] = $this->getFileChangeActivitySettings($fileId, array_keys($affectedUsers)); foreach ($affectedUsers as $user => $path) { @@ -456,7 +457,7 @@ protected function fileMoving($oldPath, $newPath) { return; } $accessList = $this->getUserPathsFromPath($parentPath, $parentOwner); - $affectedUsers = $accessList['users']; + $affectedUsers = $this->getAffectedUsers($accessList['users'], $fileId); $oldUsers = $this->oldAccessList['users']; $beforeUsers = array_keys($oldUsers);