diff --git a/README.md b/README.md index fee97fa9..664e3ff8 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,8 @@ $MadelineProto->channels->joinChannel(['channel' => '@MadelineProto']); ## Documentation - [Features](https://docs.madelineproto.xyz/FULL_README.html#features) -- [Methods](https://docs.madelineproto.xyz/FULL_README.html#methods) +- [Full method list](https://docs.madelineproto.xyz/API_docs/methods) +- [How to use these methods](https://docs.madelineproto.xyz/FULL_README.html#methods) - [Clicking inline buttons](https://docs.madelineproto.xyz/FULL_README.html#inline-buttons) - [Uploading and downloading files](https://docs.madelineproto.xyz/FULL_README.html#uploading-and-downloading-files) - [Changing settings](https://docs.madelineproto.xyz/FULL_README.html#settings) diff --git a/docs/index.md b/docs/index.md index fee97fa9..664e3ff8 100644 --- a/docs/index.md +++ b/docs/index.md @@ -47,7 +47,8 @@ $MadelineProto->channels->joinChannel(['channel' => '@MadelineProto']); ## Documentation - [Features](https://docs.madelineproto.xyz/FULL_README.html#features) -- [Methods](https://docs.madelineproto.xyz/FULL_README.html#methods) +- [Full method list](https://docs.madelineproto.xyz/API_docs/methods) +- [How to use these methods](https://docs.madelineproto.xyz/FULL_README.html#methods) - [Clicking inline buttons](https://docs.madelineproto.xyz/FULL_README.html#inline-buttons) - [Uploading and downloading files](https://docs.madelineproto.xyz/FULL_README.html#uploading-and-downloading-files) - [Changing settings](https://docs.madelineproto.xyz/FULL_README.html#settings) diff --git a/src/danog/MadelineProto/MTProtoTools/ResponseHandler.php b/src/danog/MadelineProto/MTProtoTools/ResponseHandler.php index 8bf32482..ea98a888 100644 --- a/src/danog/MadelineProto/MTProtoTools/ResponseHandler.php +++ b/src/danog/MadelineProto/MTProtoTools/ResponseHandler.php @@ -458,7 +458,17 @@ trait ResponseHandler $message = $updates; $message['_'] = 'message'; $message['from_id'] = $from_id; - $message['to_id'] = $this->get_info($to_id)['Peer']; + try { + $message['to_id'] = $this->get_info($to_id)['Peer']; + } catch (\danog\MadelineProto\Exception $e) { + \danog\MadelineProto\Logger::log('Still did not get user in database, postponing update', \danog\MadelineProto\Logger::ERROR); + $this->pending_updates[] = $updates; + break; + } catch (\danog\MadelineProto\RPCErrorException $e) { + \danog\MadelineProto\Logger::log('Still did not get user in database, postponing update', \danog\MadelineProto\Logger::ERROR); + $this->pending_updates[] = $updates; + break; + } $update = ['_' => 'updateNewMessage', 'message' => $message, 'pts' => $updates['pts'], 'pts_count' => $updates['pts_count']]; $this->handle_update($update, $opts); break;