mirror of
https://github.com/openvk/openvk
synced 2024-11-11 01:19:53 +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
|
||||
{
|
||||
$this->requireUser();
|
||||
|
||||
$clubs = new ClubsRepo;
|
||||
|
||||
if ($group_ids == NULL && $group_id != NULL)
|
||||
|
@ -191,10 +189,11 @@ final class Groups extends VKAPIRequestHandler
|
|||
$response[$i]->contacts = $contacts;
|
||||
break;
|
||||
case 'can_post':
|
||||
if($clb->canBeModifiedBy($this->getUser()))
|
||||
$response[$i]->can_post = true;
|
||||
else
|
||||
$response[$i]->can_post = $clb->canPost();
|
||||
if(!is_null($this->getUser()))
|
||||
if($clb->canBeModifiedBy($this->getUser()))
|
||||
$response[$i]->can_post = true;
|
||||
else
|
||||
$response[$i]->can_post = $clb->canPost();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue