Bugfixes
This commit is contained in:
parent
f1b6802676
commit
28b53ae8cf
12
phar.php
12
phar.php
@ -11,12 +11,14 @@ if (!file_exists('madeline.phar') || !file_exists('madeline.phar.version') || (f
|
||||
unset($phar);
|
||||
}
|
||||
$file = debug_backtrace(0, 1)[0]['file'];
|
||||
$contents = file_get_contents($file);
|
||||
if (file_exists($file)) {
|
||||
$contents = file_get_contents($file);
|
||||
|
||||
// Should've added the self-update code in mtproxyd right away, but it's too late now
|
||||
if (strpos($contents, 'new \danog\MadelineProto\Server') && in_array($contents, [file_get_contents('https://github.com/danog/MadelineProtoPhar/raw/2270bd9a94d168a5e6731ffd7e61821ea244beff/mtproxyd'), file_get_contents('https://github.com/danog/MadelineProtoPhar/raw/7cabb718ec3ccb79e3c8e3d34f5bccbe3f63b0fd/mtproxyd')]) && ($mtproxyd = file_get_contents('https://phar.madelineproto.xyz/mtproxyd?v=new'))) {
|
||||
file_put_contents($file, $mtproxyd);
|
||||
unset($mtproxyd);
|
||||
// Should've added the self-update code in mtproxyd right away, but it's too late now
|
||||
if (strpos($contents, 'new \danog\MadelineProto\Server') && in_array($contents, [file_get_contents('https://github.com/danog/MadelineProtoPhar/raw/2270bd9a94d168a5e6731ffd7e61821ea244beff/mtproxyd'), file_get_contents('https://github.com/danog/MadelineProtoPhar/raw/7cabb718ec3ccb79e3c8e3d34f5bccbe3f63b0fd/mtproxyd')]) && ($mtproxyd = file_get_contents('https://phar.madelineproto.xyz/mtproxyd?v=new'))) {
|
||||
file_put_contents($file, $mtproxyd);
|
||||
unset($mtproxyd);
|
||||
}
|
||||
}
|
||||
|
||||
require 'madeline.phar';
|
||||
|
@ -45,7 +45,7 @@ trait CallHandler
|
||||
\danog\MadelineProto\Logger::log('Using media DC');
|
||||
$aargs['datacenter'] .= '_media';
|
||||
}
|
||||
if (isset($args['message']) && is_string($args['message']) && $this->mb_strlen($args['message']) > 4096) {
|
||||
if (isset($args['message']) && is_string($args['message']) && $this->mb_strlen($args['message']) > $this->config['message_length_max']) {
|
||||
$arg_chunks = $this->split_to_chunks($args);
|
||||
$args = array_shift($arg_chunks);
|
||||
}
|
||||
|
@ -486,7 +486,7 @@ trait BotAPI
|
||||
$multiple_args_base = array_merge($args, ['entities' => [], 'parse_mode' => 'text', 'message' => '']);
|
||||
$multiple_args = [$multiple_args_base];
|
||||
|
||||
$max_length = 4096;
|
||||
$max_length = $this->config['message_length_max'];
|
||||
$text_arr = [];
|
||||
foreach ($this->multipleExplodeKeepDelimiters(["\n"], $args['message']) as $word) {
|
||||
if ($this->mb_strlen($word) > $max_length) {
|
||||
|
Loading…
Reference in New Issue
Block a user