From 14f590f27f60f23b2f20e1d123a28f9906091e69 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Mon, 22 Apr 2024 16:55:43 +0200 Subject: [PATCH] Entity fix --- src/TL/Conversion/BotAPI.php | 3 +++ 1 file changed, 3 insertions(+) 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']);