Bugfixes
This commit is contained in:
parent
79f9a59295
commit
35c0a6bd67
@ -296,6 +296,7 @@ trait PeerHandler
|
||||
switch ($partial['type']) {
|
||||
case 'user':
|
||||
case 'bot':
|
||||
if (!isset($partial['InputUser'])) throw new \danog\MadelineProto\Exception('This peer is not present in the internal peer database');
|
||||
$full = $this->method_call('users.getFullUser', ['id' => $partial['InputUser']], ['datacenter' => $this->datacenter->curdc]);
|
||||
break;
|
||||
|
||||
|
@ -137,7 +137,9 @@ trait UpdateHandler
|
||||
$this->get_channel_state($channel)['pending_pts_updates'] = [];
|
||||
}
|
||||
try {
|
||||
$input = $this->get_info('channel#'.$channel)['InputChannel'];
|
||||
$input = $this->get_info('channel#'.$channel);
|
||||
if (!isset($input['InputChannel'])) throw new \danog\MadelineProto\Exception('This peer is not present in the internal peer database');
|
||||
$input = $input['InputChannel'];
|
||||
} catch (\danog\MadelineProto\Exception $e) {
|
||||
return false;
|
||||
} catch (\danog\MadelineProto\RPCErrorException $e) {
|
||||
@ -611,7 +613,7 @@ trait UpdateHandler
|
||||
curl_setopt($ch, CURLOPT_URL, $this->hook_url);
|
||||
curl_setopt($ch, CURLOPT_POST, true);
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
|
||||
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
|
||||
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
|
||||
$parse = parse_url($this->hook_url);
|
||||
if (isset($parse['scheme']) && $parse['scheme'] == 'https') {
|
||||
if (isset($this->pem_path) && file_exists($this->pem_path)) {
|
||||
|
@ -44,7 +44,9 @@ trait AuthKeyHandler
|
||||
public function request_secret_chat($user)
|
||||
{
|
||||
$this->should_serialize = true;
|
||||
$user = $this->get_info($user)['InputUser'];
|
||||
$user = $this->get_info($user);
|
||||
if (!isset($user['InputUser'])) throw new \danog\MadelineProto\Exception('This peer is not present in the internal peer database');
|
||||
$user = $user['InputUser'];
|
||||
\danog\MadelineProto\Logger::log(['Creating secret chat with '.$user['user_id'].'...'], \danog\MadelineProto\Logger::VERBOSE);
|
||||
$dh_config = $this->get_dh_config();
|
||||
\danog\MadelineProto\Logger::log(['Generating a...'], \danog\MadelineProto\Logger::VERBOSE);
|
||||
|
@ -29,7 +29,9 @@ trait AuthKeyHandler
|
||||
|
||||
public function request_call($user)
|
||||
{
|
||||
$user = $this->get_info($user)['InputUser'];
|
||||
$user = $this->get_info($user);
|
||||
if (!isset($user['InputUser'])) throw new \danog\MadelineProto\Exception('This peer is not present in the internal peer database');
|
||||
$user = $user['InputUser'];
|
||||
\danog\MadelineProto\Logger::log(['Calling '.$user['user_id'].'...'], \danog\MadelineProto\Logger::VERBOSE);
|
||||
$dh_config = $this->get_dh_config();
|
||||
\danog\MadelineProto\Logger::log(['Generating a...'], \danog\MadelineProto\Logger::VERBOSE);
|
||||
|
Loading…
x
Reference in New Issue
Block a user