1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-30 05:58:58 +01:00

Improve update management and documentation

This commit is contained in:
Daniil Gentili 2018-03-13 11:51:37 +00:00
parent 3dd038e99b
commit d53469ee0e
3 changed files with 15 additions and 3 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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;