Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable24] ignore remnants #1128

Merged
merged 1 commit into from
Aug 30, 2022
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
20 changes: 15 additions & 5 deletions lib/ShareByCircleProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@

namespace OCA\Circles;

use OCA\Circles\Tools\Traits\TNCLogger;
use OCA\Circles\Tools\Traits\TArrayTools;
use OCA\Circles\Tools\Traits\TStringTools;
use Exception;
use OC;
use OCA\Circles\Exceptions\CircleNotFoundException;
use OCA\Circles\Exceptions\ContactAddressBookNotFoundException;
Expand Down Expand Up @@ -68,6 +66,9 @@
use OCA\Circles\Service\FederatedEventService;
use OCA\Circles\Service\FederatedUserService;
use OCA\Circles\Service\ShareWrapperService;
use OCA\Circles\Tools\Traits\TArrayTools;
use OCA\Circles\Tools\Traits\TNCLogger;
use OCA\Circles\Tools\Traits\TStringTools;
use OCP\Files\Folder;
use OCP\Files\InvalidPathException;
use OCP\Files\IRootFolder;
Expand Down Expand Up @@ -453,10 +454,19 @@ public function getSharesBy($userId, $shareType, $node, $reshares, $limit, $offs
return [];
}

$federatedUser = $this->federatedUserService->getLocalFederatedUser($userId);
$nodeId = (!is_null($node)) ? $node->getId() : 0;

try {
$federatedUser = $this->federatedUserService->getLocalFederatedUser($userId, false);
} catch (Exception $e) {
$this->e($e, ['userId' => $userId, 'shareType' => $shareType, 'nodeId' => $nodeId]);

return [];
}

$wrappedShares = $this->shareWrapperService->getSharesBy(
$federatedUser,
(!is_null($node)) ? $node->getId() : 0,
$nodeId,
$reshares,
$limit,
$offset,
Expand Down