Началр работы с переработкой
This commit is contained in:
29
sources/API/LongPoll.php
Normal file
29
sources/API/LongPoll.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace VK\API;
|
||||
|
||||
class LongPoll extends LongPollAbstract
|
||||
{
|
||||
public function __construct(object $robot, array $params = [])
|
||||
{
|
||||
return;
|
||||
echo get_class($robot), PHP_EOL;
|
||||
die;
|
||||
if ($_ENV['ROBOT_TYPE']) {
|
||||
$this->vk->auth_type = 'user';
|
||||
$this->user_id = $data['id'];
|
||||
} else {
|
||||
$this->vk->auth_type = 'group';
|
||||
$this->group_id = $this->vk->request('groups.getById', [])[0]['id'];
|
||||
$this->vk->request('groups.setLongPollSettings', [
|
||||
'group_id' => $this->group_id,
|
||||
'enabled' => 1,
|
||||
'api_version' => $this->vk->version,
|
||||
'message_new' => 1,
|
||||
]);
|
||||
}
|
||||
$this->getLongPollServer();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user