Skip to content

feat: cross-channel user auto-merge via mobile and email matching#340

Open
nap-liu wants to merge 1 commit intodataelement:mainfrom
nap-liu:pr/cross-channel-user-merge
Open

feat: cross-channel user auto-merge via mobile and email matching#340
nap-liu wants to merge 1 commit intodataelement:mainfrom
nap-liu:pr/cross-channel-user-merge

Conversation

@nap-liu
Copy link
Copy Markdown

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

Summary

  • When creating a user from DingTalk/Feishu/SSO, first search existing users by mobile/email
  • _enrich_user_from_extra_info(): fills missing display_name/avatar/phone/email (never overwrites)
  • DingTalk bot fetches corp API profile for mobile/email before user resolution
  • No display_name matching (only mobile and email)

Test plan

  • Code review confirmed matching logic correct
  • DingTalk E2E: user resolution with enriched extra_info

When a user messages via DingTalk bot, fetch their corp profile (mobile,
email) from the DingTalk API and pass it to channel_user_service. This
enables matching against existing users who registered via web SSO or
other channels, preventing duplicate user records for the same person.

Also enrich existing matched users with mobile/email/name from the
channel API so future cross-channel lookups succeed.

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