Skip to content

Commit 0af7f6f

Browse files
authored
Fix forward_messages return value in Async
1 parent 778a02c commit 0af7f6f

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

‎telebot/async_telebot.py‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2932,8 +2932,7 @@ async def forward_messages(self, chat_id: Union[str, int], from_chat_id: Union[s
29322932
disable_notification = self.disable_notification if (disable_notification is None) else disable_notification
29332933
protect_content = self.protect_content if (protect_content is None) else protect_content
29342934
result = await asyncio_helper.forward_messages(self.token, chat_id, from_chat_id, message_ids, disable_notification, protect_content, message_thread_id)
2935-
return types.MessageID.de_json(
2936-
result)
2935+
return [types.MessageID.de_json(message_id) for message_id in result]
29372936

29382937
async def copy_messages(self, chat_id: Union[str, int], from_chat_id: Union[str, int], message_ids: List[int],
29392938
disable_notification: Optional[bool] = None, message_thread_id: Optional[int] = None,
@@ -2969,8 +2968,7 @@ async def copy_messages(self, chat_id: Union[str, int], from_chat_id: Union[str,
29692968
protect_content = self.protect_content if protect_content is None else protect_content
29702969
result = await asyncio_helper.copy_messages(self.token, chat_id, from_chat_id, message_ids, disable_notification,
29712970
protect_content, message_thread_id, remove_caption)
2972-
return [types.MessageID.de_json(message_id) for message_id in
2973-
result]
2971+
return [types.MessageID.de_json(message_id) for message_id in result]
29742972

29752973
async def send_dice(
29762974
self, chat_id: Union[int, str],

0 commit comments

Comments
 (0)