Skip to content

feat: enhance DingTalk user matching with senderStaffId priority and centralized token management#338

Open
nap-liu wants to merge 1 commit intodataelement:mainfrom
nap-liu:pr/dingtalk-user-matching
Open

feat: enhance DingTalk user matching with senderStaffId priority and centralized token management#338
nap-liu wants to merge 1 commit intodataelement:mainfrom
nap-liu:pr/dingtalk-user-matching

Conversation

@nap-liu
Copy link
Copy Markdown

@nap-liu nap-liu commented Apr 8, 2026

Summary

  • Use senderStaffId as primary user identifier for DingTalk bot messages
  • New DingTalkTokenManager: centralized token cache with asyncio.Lock concurrency safety
  • Corp API enrichment: fetch unionid/mobile/email for better cross-channel matching
  • dingtalk_service.py now delegates to token manager (no redundant API calls)

Test plan

  • DingTalk E2E: messages processed with correct user matching
  • Code review: token manager verified thread-safe

…centralized token management

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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