Skip to content

Commit

Permalink
Implement notifications for group members in case of moving/renaming
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Fritsche <[email protected]>
Signed-off-by: Frieder Schrempf <[email protected]>
  • Loading branch information
Chris Fritsche authored and fschrempf committed Jan 4, 2022
1 parent 1d0fba9 commit 815565d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/FilesHooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}


Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 815565d

Please sign in to comment.