Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: unshare from group activity user handling
Signed-off-by: Ferdinand Thiessen <[email protected]>
  • Loading branch information
susnux committed Mar 18, 2025
commit b84948f20ad6dfb43519345c035ca4951cdd8f03
3 changes: 1 addition & 2 deletions lib/FilesHooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -929,10 +929,9 @@ protected function unshareFromGroup(IShare $share) {

$offset = 0;
$users = $group->searchUsers('', self::USER_BATCH_SIZE, $offset);
$users = array_map(fn (IUser $user) => $user->getUID(), $users);
$shouldFlush = $this->startActivityTransaction();
while (!empty($users)) {
$userIds = array_map(fn (IUser $user) => $user->getUID(), $users);
$userIds = \array_map(fn (IUser $user) => $user->getUID(), $users);
$this->addNotificationsForUsers($userIds, $actionUser, $share->getNodeId(), $share->getNodeType(), $share->getTarget(), (int)$share->getId());
$offset += self::USER_BATCH_SIZE;
$users = $group->searchUsers('', self::USER_BATCH_SIZE, $offset);
Expand Down
Loading