fix: incompatibility with circle v0.18.x

fix #70
pull/75/head
sualko 2020-09-02 15:00:22 +02:00
parent d1daab6333
commit 87f9cd952f
1 changed files with 2 additions and 7 deletions

View File

@ -6,12 +6,6 @@ use OCA\BigBlueButton\AppInfo\Application;
use OCP\App\IAppManager; use OCP\App\IAppManager;
class CircleHelper { class CircleHelper {
public const LEVEL_NONE = 0;
public const LEVEL_MEMBER = 1;
public const LEVEL_MODERATOR = 4;
public const LEVEL_ADMIN = 8;
public const LEVEL_OWNER = 9;
private $api; private $api;
/** @var Application */ /** @var Application */
@ -41,7 +35,8 @@ class CircleHelper {
$api = $this->getCircleAPI(); $api = $this->getCircleAPI();
if ($api !== false) { if ($api !== false) {
$circles = $api->listCircles(\OCA\Circles\Api\v1\Circles::CIRCLES_ALL, '', \OCA\Circles\Api\v1\Circles::LEVEL_MEMBER); // since v0.19.x \OCA\Circles\Api\v1\Circles can be used
$circles = $api->listCircles(\OCA\Circles\Model\Circle::CIRCLES_ALL, '', \OCA\Circles\Model\Member::LEVEL_MEMBER);
foreach ($circles as $circle) { foreach ($circles as $circle) {
$this->cache[$userId][] = $circle->getUniqueId(); $this->cache[$userId][] = $circle->getUniqueId();