From a95517fa19df9f9b3dca0e1eced0a7b0c8fd8b78 Mon Sep 17 00:00:00 2001 From: wulan17 Date: Tue, 2 Jul 2024 15:43:04 +0700 Subject: [PATCH] pyrofork: fix error when copying poll messages Signed-off-by: wulan17 --- pyrogram/types/messages_and_media/message.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pyrogram/types/messages_and_media/message.py b/pyrogram/types/messages_and_media/message.py index f89e2fcb..ee4e2187 100644 --- a/pyrogram/types/messages_and_media/message.py +++ b/pyrogram/types/messages_and_media/message.py @@ -4517,7 +4517,12 @@ class Message(Object, Update): return await self._client.send_poll( chat_id, question=self.poll.question, - options=[opt.text for opt in self.poll.options], + options=[ + types.PollOption( + text=opt.text, + entities=opt.entities + ) for opt in self.poll.options + ], disable_notification=disable_notification, message_thread_id=message_thread_id, schedule_date=schedule_date