Bypass possible server-side bug
This commit is contained in:
parent
c71dd59f87
commit
a4e25ecfa2
@ -114,7 +114,7 @@ trait CallHandler
|
||||
if (isset($args['multiple'])) {
|
||||
$aargs['multiple'] = true;
|
||||
}
|
||||
if (isset($args['message']) && is_string($args['message']) && mb_strlen($args['message'], 'UTF-8') > $this->config['message_length_max']) {
|
||||
if (isset($args['message']) && is_string($args['message']) && mb_strlen($args['message'], 'UTF-8') > $this->config['message_length_max'] && mb_strlen((yield $this->parse_mode_async($args))['message'], 'UTF-8') > $this->config['message_length_max']) {
|
||||
$args = yield $this->split_to_chunks_async($args);
|
||||
$promises = [];
|
||||
$aargs['queue'] = $method;
|
||||
|
@ -504,7 +504,8 @@ trait BotAPI
|
||||
if (stripos($arguments['parse_mode'], 'html') !== false) {
|
||||
$new_message = '';
|
||||
|
||||
$arguments['message'] = rtrim($this->html_fixtags($arguments['message']));
|
||||
$arguments['message'] = trim($this->html_fixtags($arguments['message']));
|
||||
|
||||
$dom = new \DOMDocument();
|
||||
if (!extension_loaded('mbstring')) {
|
||||
throw new \danog\MadelineProto\Exception(['extension', 'mbstring']);
|
||||
|
Loading…
Reference in New Issue
Block a user