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.
This commit is contained in:
Alex Root Junior 2023-08-06 17:50:46 +03:00
parent b311d59fce
commit 15394c0c18
No known key found for this signature in database
GPG key ID: 074C1D455EBEA4AC
2 changed files with 17 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)