Skip to content

Commit

Permalink
use new getAllShares method
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorentPoinsaut committed Oct 11, 2022
1 parent bca1c1b commit 43d37f6
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions lib/Service/ReportSender.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,7 @@ public function sendReport(

$template->addFooter('', $language);

if ($userId === null && $token === null) {
$shares = [];
$this->userManager->callForSeenUsers(function (IUser $user) use ($token, $path, $filter, &$shares) {
$tmp = $this->sharesList->getFormattedShares($user->getUID(), $filter, $path, $token);
foreach ($tmp as $share) {
$shares[] = $share;
}
});
} else {
$shares = iter\toArray($this->sharesList->getFormattedShares($userId, $filter, $path, $token));
}
$shares = iter\toArray($this->sharesList->getFormattedShares($userId, $filter, $path, $token));

$json_attachment = $this->mailer->createAttachment(
$this->sharesList->getSerializedShares($shares, 'json'),
Expand Down

0 comments on commit 43d37f6

Please sign in to comment.