mirror of
https://github.com/openvk/openvk
synced 2024-11-13 10:39:24 +03:00
VKAPI: Make groups.getById not require auth
Just like the original VK
This commit is contained in:
parent
2d09e0116e
commit
8ce8355784
1 changed files with 5 additions and 6 deletions
|
@ -110,8 +110,6 @@ final class Groups extends VKAPIRequestHandler
|
||||||
|
|
||||||
function getById(string $group_ids = "", string $group_id = "", string $fields = ""): ?array
|
function getById(string $group_ids = "", string $group_id = "", string $fields = ""): ?array
|
||||||
{
|
{
|
||||||
$this->requireUser();
|
|
||||||
|
|
||||||
$clubs = new ClubsRepo;
|
$clubs = new ClubsRepo;
|
||||||
|
|
||||||
if ($group_ids == NULL && $group_id != NULL)
|
if ($group_ids == NULL && $group_id != NULL)
|
||||||
|
@ -191,10 +189,11 @@ final class Groups extends VKAPIRequestHandler
|
||||||
$response[$i]->contacts = $contacts;
|
$response[$i]->contacts = $contacts;
|
||||||
break;
|
break;
|
||||||
case 'can_post':
|
case 'can_post':
|
||||||
if($clb->canBeModifiedBy($this->getUser()))
|
if(!is_null($this->getUser()))
|
||||||
$response[$i]->can_post = true;
|
if($clb->canBeModifiedBy($this->getUser()))
|
||||||
else
|
$response[$i]->can_post = true;
|
||||||
$response[$i]->can_post = $clb->canPost();
|
else
|
||||||
|
$response[$i]->can_post = $clb->canPost();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue