Added support for message_thread_id in ChatActionSender (#1250)

* Add support for message_thread_id in ChatActionSender

The given changes add support for including the 'message_thread_id' in ChatActionSender function calls, allowing actions to be sent in specific threads rather than the main chat.

* Added changelog
This commit is contained in:
Alex Root Junior 2023-08-06 19:17:58 +03:00 committed by GitHub
parent b311d59fce
commit c9f0b36ad6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 2 deletions

View file

@ -54,7 +54,11 @@ class TestChatActionSender:
):
await asyncio.sleep(0.1)
assert mocked_send_chat_action.await_count > 1
mocked_send_chat_action.assert_awaited_with(action="typing", chat_id=42)
mocked_send_chat_action.assert_awaited_with(
action="typing",
chat_id=42,
message_thread_id=None,
)
async def test_contextmanager(self, bot: MockedBot):
sender: ChatActionSender = ChatActionSender.typing(bot=bot, chat_id=42)