fix(dingtalk): support dingtalk-stream 0.24+ and oapi webhooks#11257
fix(dingtalk): support dingtalk-stream 0.24+ and oapi webhooks#11257kevinskysunny wants to merge 1 commit into
Conversation
|
Additional reproduction details from the live gateway where this was diagnosed: Reproduction path
Observed symptoms
Why the second error happenedThe environment received inbound session webhooks under Validation after patchAfter applying this patch on the same live environment and restarting This is why the patch includes both:
|
|
Merged via #11471 (#11471). Your commit was cherry-picked onto current main with your authorship preserved in git log (c3d2895). Thanks for the clean, minimal fix — this was exactly the right shape for the SDK change. E2E testing against real |
Summary
api.dingtalk.comandoapi.dingtalk.comsession webhook originsDingTalkStreamClient.start()directly fordingtalk-stream0.24+process()and convertCallbackMessage.dataintoChatbotMessageRoot cause
Hermes' DingTalk adapter assumes an older
dingtalk-streamAPI shape:start()is treated as blocking and wrapped inasyncio.to_thread(...)process()is synchronous and expects aChatbotMessagehttps://api.dingtalk.com/...With
dingtalk-stream==0.24.3, this caused:RuntimeWarning: coroutine 'DingTalkStreamClient.start' was never awaitedhttps://oapi.dingtalk.com/..., which then caused replies to fail withNo session_webhook availableValidation
Reproduced on a live Hermes gateway using DingTalk and
dingtalk-stream==0.24.3.After this patch, DingTalk replies resumed working in the user's environment.