diff --git a/src/danog/MadelineProto/Logger.php b/src/danog/MadelineProto/Logger.php index 54783fb5..87838759 100644 --- a/src/danog/MadelineProto/Logger.php +++ b/src/danog/MadelineProto/Logger.php @@ -50,7 +50,7 @@ class Logger if (!is_string($param)) { $param = var_export($param, true); } - $param = str_pad(basename(debug_backtrace()[0]['file'], '.php').self::$prefix.': ', 16+strlen(self::$prefix))."\t".$param; + $param = str_pad(basename(debug_backtrace()[0]['file'], '.php').self::$prefix.': ', 16 + strlen(self::$prefix))."\t".$param; switch (self::$mode) { case 1: error_log($param); diff --git a/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php b/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php index 1914380f..e49ca7cf 100644 --- a/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php +++ b/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php @@ -24,11 +24,13 @@ trait UpdateHandler private $getting_state = false; public $full_chats; - - public function full_chat_last_updated($id) { + public function full_chat_last_updated($id) + { $id = $this->get_info($id)['bot_api_id']; + return isset($this->full_chats[$id]['last_update']) ? $this->full_chats[$id]['last_update'] : 0; } + public function pwr_update_handler($update) { if (isset($update['message']['to_id']) && time() - $this->full_chat_last_updated($update['message']['to_id']) <= 600) {