Bugfixes
This commit is contained in:
parent
cec3294a3a
commit
5e5deca720
@ -234,6 +234,7 @@ trait PeerHandler
|
||||
$res['type'] = $constructor['bot'] ? 'bot' : 'user';
|
||||
break;
|
||||
case 'chat':
|
||||
case 'chatForbidden':
|
||||
$res['InputPeer'] = ['_' => 'inputPeerChat', 'chat_id' => $constructor['id']];
|
||||
$res['Peer'] = ['_' => 'peerChat', 'chat_id' => $constructor['id']];
|
||||
$res['chat_id'] = $constructor['id'];
|
||||
|
@ -34,14 +34,26 @@ trait UpdateHandler
|
||||
public function pwr_update_handler($update)
|
||||
{
|
||||
if (isset($update['message']['to_id']) && time() - $this->full_chat_last_updated($update['message']['to_id']) <= 600) {
|
||||
$full_chat = $this->get_pwr_chat($update['message']['to_id']);
|
||||
$full_chat['last_update'] = time();
|
||||
$this->full_chats[$full_chat['id']] = $full_chat;
|
||||
try {
|
||||
$full_chat = $this->get_pwr_chat($update['message']['to_id']);
|
||||
$full_chat['last_update'] = time();
|
||||
$this->full_chats[$full_chat['id']] = $full_chat;
|
||||
} catch (\danog\MadelineProto\Exception $e) {
|
||||
\danog\MadelineProto\Logger::log($e->getMessage());
|
||||
} catch (\danog\MadelineProto\RPCErrorException $e) {
|
||||
\danog\MadelineProto\Logger::log($e->getMessage());
|
||||
}
|
||||
}
|
||||
if (isset($update['message']['from_id']) && time() - $this->full_chat_last_updated($update['message']['from_id']) <= 600) {
|
||||
$full_chat = $this->get_pwr_chat($update['message']['from_id']);
|
||||
$full_chat['last_update'] = time();
|
||||
$this->full_chats[$full_chat['id']] = $full_chat;
|
||||
try {
|
||||
$full_chat = $this->get_pwr_chat($update['message']['from_id']);
|
||||
$full_chat['last_update'] = time();
|
||||
$this->full_chats[$full_chat['id']] = $full_chat;
|
||||
} catch (\danog\MadelineProto\Exception $e) {
|
||||
\danog\MadelineProto\Logger::log($e->getMessage());
|
||||
} catch (\danog\MadelineProto\RPCErrorException $e) {
|
||||
\danog\MadelineProto\Logger::log($e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user