Do not handle empty messages in the example bot
This commit is contained in:
parent
94f2de3cd2
commit
692bcbcb1d
1
bot.php
1
bot.php
@ -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 == '') {
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user