1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-30 04:59:00 +01:00

Entity fix

This commit is contained in:
Daniil Gentili 2024-04-22 16:55:43 +02:00
parent cebebed93a
commit 14f590f27f

View File

@ -466,6 +466,9 @@ trait BotAPI
$offset = 0;
for ($k = 0; $k < \count($args['entities']); $k++) {
$entity = $args['entities'][$k];
if ($entity instanceof MessageEntity) {
$entity = $entity->toMTProto();
}
do {
while ($entity['offset'] > $offset + StrTools::mbStrlen($multiple_args[$i]['message'])) {
$offset += StrTools::mbStrlen($multiple_args[$i]['message']);