VKAPI: Make groups.getById not require auth

Just like the original VK
This commit is contained in:
Maxim Leshchenko 2022-07-21 17:57:03 +01:00
parent 2d09e0116e
commit 8ce8355784
No known key found for this signature in database
GPG key ID: BB9C44A8733FBEEE

View file

@ -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,6 +189,7 @@ final class Groups extends VKAPIRequestHandler
$response[$i]->contacts = $contacts;
break;
case 'can_post':
if(!is_null($this->getUser()))
if($clb->canBeModifiedBy($this->getUser()))
$response[$i]->can_post = true;
else