diff --git a/src/TL/Conversion/BotAPI.php b/src/TL/Conversion/BotAPI.php index 3f53a548c..bdb0c0eb6 100644 --- a/src/TL/Conversion/BotAPI.php +++ b/src/TL/Conversion/BotAPI.php @@ -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']);