Bugfixes
This commit is contained in:
parent
f1b6802676
commit
28b53ae8cf
2
phar.php
2
phar.php
@ -11,6 +11,7 @@ if (!file_exists('madeline.phar') || !file_exists('madeline.phar.version') || (f
|
||||
unset($phar);
|
||||
}
|
||||
$file = debug_backtrace(0, 1)[0]['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
|
||||
@ -18,5 +19,6 @@ if (strpos($contents, 'new \danog\MadelineProto\Server') && in_array($contents,
|
||||
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