Clawith
Clawith copied to clipboard
连接微信后,每次发消息都会创建一个用户
Pre-checks
- [x] I have searched existing issues and this is not a duplicate.
Deployment Method
Docker
Steps to Reproduce
Expected vs Actual Behavior
不创建用户
Logs / Screenshots
No response
服务器部署版 (NODEjs+PGZSQL+RANDIS)也有这样的问题
Reviewed against the current codebase, this issue now appears resolved.
Current code evidence:
backend/app/services/wechat_channel.py:211-221resolves incoming WeChat senders throughchannel_user_service.resolve_channel_user(...)using the stablefrom_user_idasexternal_user_id.backend/app/services/channel_user_service.py:263-265and311-316explicitly treat WeChat identity lookup byexternal_id (from_user_id).backend/app/services/channel_user_service.py:318-334now avoids duplicate-match failures by selecting a single canonicalOrgMemberrow instead of raising on duplicates.- There are also dedicated tests for this WeChat path in
backend/tests/test_identity_id_mapping.py:162-212, covering existing-member lookup and lazy-registration shell creation using the WeChat external ID.
That means repeated messages from the same WeChat sender now resolve back to the same channel identity instead of creating a fresh platform user every time.