Skip to content

feat: add DingTalk stream mode support#810

Open
xfei6868 wants to merge 2 commits intoRightNow-AI:mainfrom
xfei6868:fix/dingtalk-stream
Open

feat: add DingTalk stream mode support#810
xfei6868 wants to merge 2 commits intoRightNow-AI:mainfrom
xfei6868:fix/dingtalk-stream

Conversation

@xfei6868
Copy link

• ## Summary

Adds DingTalk stream-mode support and fixes the inbound message path so DingTalk direct messages and
@mentions are delivered into the channel bridge correctly. This also updates the default assistant
agent in local usage to use the configured DeepSeek default instead of the previously pinned Groq
model.

Changes

  • Added DingTalk stream/WebSocket connection mode alongside existing webhook mode
  • Wired DingTalk stream config through channel config, API routes, and setup UI
  • Fixed DingTalk stream subscription type to use CALLBACK for /v1.0/im/bot/messages/get
  • Parsed DingTalk stream callback payloads into ChannelMessage
  • Preserved DingTalk message IDs and session reply webhook metadata
  • Mapped DingTalk mention fields (isInAtList / atUsers) into was_mentioned so group-policy
    filtering works correctly
  • Updated ACK payload handling for DingTalk callback frames
  • Added and updated DingTalk unit tests for stream parsing and mention handling
  • Updated channel documentation and configuration examples for DingTalk stream mode

Testing

  • cargo clippy --workspace --all-targets -- -D warnings passes
  • cargo test -p openfang-channels dingtalk -- --nocapture passes
  • cargo test --workspace passes
  • Live integration tested (if applicable)

Live verification performed:

  • Confirmed DingTalk gateway registration succeeds
  • Confirmed WebSocket connection succeeds
  • Confirmed a DingTalk direct message (hello) was received and parsed by the daemon

Security

  • No new unsafe code
  • No secrets or API keys in diff
  • User input validated at boundaries

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant