Do not handle empty messages in the example bot

This commit is contained in:
Daniil Gentili 2019-06-01 13:45:07 +00:00
parent 94f2de3cd2
commit 692bcbcb1d
2 changed files with 2 additions and 0 deletions

View File

@ -34,6 +34,7 @@ class EventHandler extends \danog\MadelineProto\EventHandler
return;
}
if ($update['_'] === 'updateReadChannelOutbox') return;
if (isset($update['message']['_']) && $update['message']['_'] === 'messageEmpty') return;
$res = json_encode($update, JSON_PRETTY_PRINT);
if ($res == '') {

View File

@ -126,6 +126,7 @@ trait UpdateHandler
public function check_msg_id($message)
{
if (!isset($message['to_id'])) return true;
try {
$peer_id = $this->get_id($message['to_id']);
} catch (\danog\MadelineProto\Exception $e) {