From ab6374ba62bcb5bb388b77b43c74a9edf3d9b487 Mon Sep 17 00:00:00 2001 From: _run Date: Sat, 15 Jun 2024 20:21:11 +0500 Subject: [PATCH 1/2] Fix 1: fixed message_thread_id for copy_messages --- telebot/async_telebot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/telebot/async_telebot.py b/telebot/async_telebot.py index be3135739..4f7593d03 100644 --- a/telebot/async_telebot.py +++ b/telebot/async_telebot.py @@ -3440,8 +3440,8 @@ async def copy_messages(self, chat_id: Union[str, int], from_chat_id: Union[str, """ disable_notification = self.disable_notification if disable_notification is None else disable_notification protect_content = self.protect_content if protect_content is None else protect_content - result = await asyncio_helper.copy_messages(self.token, chat_id, from_chat_id, message_ids, disable_notification, - protect_content, message_thread_id, remove_caption) + result = await asyncio_helper.copy_messages(self.token, chat_id, from_chat_id, message_ids, disable_notification, message_thread_id, + protect_content, remove_caption) return [types.MessageID.de_json(message_id) for message_id in result] async def send_dice( From bd36b09c5ddb789a5ff6fdbfbb0a41d228928d2d Mon Sep 17 00:00:00 2001 From: _run Date: Sat, 15 Jun 2024 20:24:49 +0500 Subject: [PATCH 2/2] Fix bug in async middlewares --- telebot/async_telebot.py | 1 - 1 file changed, 1 deletion(-) diff --git a/telebot/async_telebot.py b/telebot/async_telebot.py index 4f7593d03..6a7c5fe08 100644 --- a/telebot/async_telebot.py +++ b/telebot/async_telebot.py @@ -523,7 +523,6 @@ async def _run_middlewares_and_handlers(self, message, handlers, middlewares, up if isinstance(middleware_result, CancelUpdate): return elif isinstance(middleware_result, SkipHandler): - await middleware.post_process(message, data, handler_error) skip_handlers = True if handlers and not(skip_handlers):