This issue #8345 tracks the critical fixes implemented in to resolve three major bugs preventing the DingTalk bot from properly receiving and replying to messages.
Summary of Changes
Async Stream Handling:
Corrected DingTalkStreamClient.start() to be awaited directly, removing the unnecessary asyncio.to_thread() wrapper.
Made the process method fully asynchronous (async def) to prevent blocking the event loop.
Robust Message Parsing:
Updated field extraction logic to prioritize data from the data payload.
Added support for both dictionary and JSON string formats when parsing msgId, senderId, and sessionWebhook.
Domain Validation:
Updated the webhook URL regex to support both api.dingtalk.com and oapi.dingtalk.com, ensuring compatibility with different DingTalk API endpoints.
This issue #8345 tracks the critical fixes implemented in to resolve three major bugs preventing the DingTalk bot from properly receiving and replying to messages.
Summary of Changes
Async Stream Handling:
Corrected DingTalkStreamClient.start() to be awaited directly, removing the unnecessary asyncio.to_thread() wrapper.
Made the process method fully asynchronous (async def) to prevent blocking the event loop.
Robust Message Parsing:
Updated field extraction logic to prioritize data from the data payload.
Added support for both dictionary and JSON string formats when parsing msgId, senderId, and sessionWebhook.
Domain Validation:
Updated the webhook URL regex to support both api.dingtalk.com and oapi.dingtalk.com, ensuring compatibility with different DingTalk API endpoints.