Commit b375d8d4 authored by Emiliano Balbuena's avatar Emiliano Balbuena
Browse files

(fix): List groups owned by Pro channel

parent 92e364cd
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -26,6 +26,7 @@ class channel implements Interfaces\Api
        //
        //


        $container_guid = $pages[0] ?? null;
        $container_guid = $pages[0] ?? null;
        $owner_guid = null;


        if (!$container_guid) {
        if (!$container_guid) {
            return Factory::response([
            return Factory::response([
@@ -60,6 +61,7 @@ class channel implements Interfaces\Api
            case 'groups':
            case 'groups':
                $type = 'group';
                $type = 'group';
                $container_guid = null;
                $container_guid = null;
                $owner_guid = $pages[0];
                break;
                break;
            case 'all':
            case 'all':
                $type = 'all';
                $type = 'all';
@@ -128,6 +130,7 @@ class channel implements Interfaces\Api
        $opts = [
        $opts = [
            'cache_key' => $currentUser ? $currentUser->guid : null,
            'cache_key' => $currentUser ? $currentUser->guid : null,
            'container_guid' => $container_guid,
            'container_guid' => $container_guid,
            'owner_guid' => $owner_guid,
            'access_id' => $isOwner && !$forcePublic ? [0, 1, 2, $container_guid] : [2, $container_guid],
            'access_id' => $isOwner && !$forcePublic ? [0, 1, 2, $container_guid] : [2, $container_guid],
            'custom_type' => $custom_type,
            'custom_type' => $custom_type,
            'limit' => $limit,
            'limit' => $limit,