diff --git a/src/danog/MadelineProto/MTProto.php b/src/danog/MadelineProto/MTProto.php index 2494a0f7..82039d75 100644 --- a/src/danog/MadelineProto/MTProto.php +++ b/src/danog/MadelineProto/MTProto.php @@ -159,7 +159,7 @@ class MTProto public function __sleep() { - return ['encrypted_layer', 'settings', 'config', 'authorization', 'authorized', 'rsa_keys', 'last_recv', 'dh_config', 'chats', 'last_stored', 'qres', 'pending_updates', 'updates_state', 'got_state', 'channels_state', 'updates', 'updates_key', 'full_chats', 'msg_ids', 'dialog_params', 'datacenter', 'v', 'constructors', 'td_constructors', 'methods', 'td_methods', 'td_descriptions', 'twoe1984', 'twoe2047', 'twoe2048', 'zero', 'one', 'two', 'three', 'four', 'temp_requested_secret_chats', 'temp_rekeyed_secret_chats', 'secret_chats', 'hook_url', 'storage', 'emojis', 'authorized_dc', 'channel_participants', 'twozerotwosixone', 'zeroeight']; + return ['encrypted_layer', 'settings', 'config', 'authorization', 'authorized', 'rsa_keys', 'last_recv', 'dh_config', 'chats', 'last_stored', 'qres', 'pending_updates', 'updates_state', 'got_state', 'channels_state', 'updates', 'updates_key', 'full_chats', 'msg_ids', 'dialog_params', 'datacenter', 'v', 'constructors', 'td_constructors', 'methods', 'td_methods', 'td_descriptions', 'twoe1984', 'twoe2047', 'twoe2048', 'zero', 'one', 'two', 'three', 'four', 'temp_requested_secret_chats', 'temp_rekeyed_secret_chats', 'secret_chats', 'hook_url', 'storage', 'emojis', 'authorized_dc', 'twozerotwosixone', 'zeroeight']; } public function __wakeup() diff --git a/src/danog/MadelineProto/MTProtoTools/CallHandler.php b/src/danog/MadelineProto/MTProtoTools/CallHandler.php index 8d9251ee..745b7cc3 100644 --- a/src/danog/MadelineProto/MTProtoTools/CallHandler.php +++ b/src/danog/MadelineProto/MTProtoTools/CallHandler.php @@ -181,6 +181,7 @@ trait CallHandler continue 2; } \danog\MadelineProto\Logger::log('An error getting response of method '.$method.': '.$e->getMessage().' in '.basename($e->getFile(), '.php').' on line '.$e->getLine().'. Retrying...', \danog\MadelineProto\Logger::WARNING); + \danog\MadelineProto\Logger::log('Full trace '.$e, \danog\MadelineProto\Logger::WARNING); continue; } catch (\danog\MadelineProto\NothingInTheSocketException $e) { $last_error = 'Nothing in the socket'; diff --git a/src/danog/MadelineProto/MTProtoTools/PeerHandler.php b/src/danog/MadelineProto/MTProtoTools/PeerHandler.php index 8ee006e7..3e2ad7ca 100644 --- a/src/danog/MadelineProto/MTProtoTools/PeerHandler.php +++ b/src/danog/MadelineProto/MTProtoTools/PeerHandler.php @@ -92,7 +92,13 @@ trait PeerHandler $bot_api_id = $this->to_supergroup($chat['id']); if (!isset($chat['access_hash'])) { if (isset($chat['username']) && !isset($this->chats[$bot_api_id])) { - $this->get_pwr_chat($chat['username'], $this->settings['peer']['full_fetch'], true); + try { + $this->get_pwr_chat($chat['username'], $this->settings['peer']['full_fetch'], true); + } catch (\danog\MadelineProto\Exception $e) { + \danog\MadelineProto\Logger::log($e->getMessage(), \danog\MadelineProto\Logger::WARNING); + } catch (\danog\MadelineProto\RPCErrorException $e) { + \danog\MadelineProto\Logger::log($e->getMessage(), \danog\MadelineProto\Logger::WARNING); + } } continue; } @@ -604,6 +610,7 @@ trait PeerHandler public function store_participants_cache($gres, $channel, $filter, $q, $offset, $limit) { + return; unset($gres['users']); if (\danog\MadelineProto\Logger::$bigint) { $hash = new \phpseclib\Math\BigInteger(0);