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
re-activate getMember()
Signed-off-by: Maxence Lange <[email protected]>
  • Loading branch information
ArtificialOwl authored and backportbot-nextcloud[bot] committed Nov 9, 2022
commit d08af92c4b17fa60c269ac9f7b4128d73888d65a
10 changes: 8 additions & 2 deletions lib/Api/v1/Circles.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

namespace OCA\Circles\Api\v1;

use OCA\Circles\CirclesManager;
use OCA\Circles\Exceptions\CircleNotFoundException;
use OCA\Circles\Exceptions\FederatedUserException;
use OCA\Circles\Exceptions\FederatedUserNotFoundException;
Expand All @@ -38,6 +39,7 @@
use OCA\Circles\Exceptions\SingleCircleNotFoundException;
use OCA\Circles\Model\Circle;
use OCA\Circles\Model\Member;
use OCA\Circles\Model\Membership;
use OCA\Circles\Model\Probes\CircleProbe;
use OCA\Circles\Service\CircleService;
use OCA\Circles\Service\FederatedUserService;
Expand Down Expand Up @@ -201,7 +203,7 @@ public static function detailsCircle(string $circleUniqueId, bool $forceAll = fa
* @param int $type
* @param bool $forceAll
*
* @return Member
* @return Membership
*
* @deprecated - used by apps/files_sharing/lib/Controller/ShareAPIController.php
*
Expand All @@ -212,7 +214,11 @@ public static function detailsCircle(string $circleUniqueId, bool $forceAll = fa
*
*/
public static function getMember($circleUniqueId, $ident, $type, $forceAll = false) {
throw new \BadMethodCallException('Method is deprecated and not longer works');
/** @var CirclesManager $circlesManager */
$circlesManager = \OC::$server->get(CirclesManager::class);
$federatedUser = $circlesManager->getFederatedUser($ident, $type);

return $circlesManager->getLink($circleUniqueId, $federatedUser->getSingleId());
}


Expand Down