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(); } }