- WeComBotSender.resolveWebhookUrl: use custom URL as-is when no %s placeholder
- WeComBotSender: treat unparseable/blank response body as failure
- ConversationService.isAccountCompatibleWithConversation: ignore scene for single chats
- SendService.selectSendAccountCandidates: apply accountTypes filter for non-conversation records
- SendService: replace account type magic numbers with AccountType constants
- WeComChannelAdapter: use AccountType.WECOM_BOT.getCode() instead of literal 6
- admin-web Conversation.vue: fallback to channelType filter when scene is unset
- add tests for single-chat null scene, webhook_url propagation, and custom URL without %s
- Copy account.ext_info into extra.webhook_url for WECOM_BOT sends.
- Allow null conversation_scene for single chats; only enforce scene-based routing for group chats.
- Harden WeComBotSender custom URL handling when placeholder is missing.
- Persist conversationScene in create/update conversation
- Make bindAccount validate by conversation scene (1=WECOM_BOT, 2=WECHAT_PERSONAL)
- Re-derive channelType from conversation_scene in dispatchRecord
- Check WeCom response errcode and HTTP status in WeComBotSender
- Support custom webhook_url from ext_info in WeComBotSender
- Configure RestTemplate with 5s connect / 10s read timeouts
- Expand WeComBotSenderTest with MockRestServiceServer coverage
Task 5 (aeb14cf) correctly added scene/person-based automatic routing,
but also introduced tag/combined-target features and changed doSendAttempt
conversationId handling that were not in the task brief.
This commit reverts those out-of-scope changes while keeping the
scene/person routing and account-type selection that belong to Task 5:
- Revert tag target resolution to single-tag logic (no tag_ids/inner_logic)
- Remove combined target type and all helper methods
- Revert doSendAttempt conversationId to use record.conversationId directly
- Keep conversation_scene routing, person_type routing, and account-type helpers
- Make frontend account filter case-insensitive in Conversation.vue
- Warn when bind dialog is submitted without selecting an account
- Reuse AccountSelector.isHealthy in resolvePersonTarget
- Expand ConversationService.bindAccount unit tests
- Update channel mismatch assertion in SendServiceResolveTargetTest
- Move currentConversationId declaration near tag binding state
- Add tag/rule options to the target type selector.
- Show tag selector + scope selector (all/conversation/person) for tag targets.
- Show rule JSON textarea for rule targets.
- Load tag list on mount.
- Update buildTargetValue to build tag_id/scope and parsed rule payloads.
- Make AccountSelector.isHealthy public static so SendService can reuse it.
- Use isHealthy for the resolved/fallback conversation account instead of
a weaker existence/status/channel check, covering risk level and PYWECHAT
heartbeat/online status.
- Add null-safe channel-type comparison in resolvePersonTarget.
- Add @Min(0) to BindConversationAccountRequest.sortOrder.
- Rename misleading conversation fallback test and add tests for
resolvePersonTarget disabled/cross-tenant/channel-mismatch cases.
- Remove unused java.util.Arrays import from test file.
- SendService.selectSendAccount now delegates to AccountSelector with
extractStrategy(channelStrategy) instead of an inline filter that only
checked tenant/status, restoring risk/online/heartbeat checks.
- ConversationService.bindAccount validates the account exists, belongs
to the same tenant, and matches the conversation channel type before
creating the binding.
- Add unit tests for ConversationService.bindAccount validation and
SendService.resolveConversationTarget strategy/health behaviors.
- BindConversationAccountRequest: restrict bindingType to 1-4
- ConversationService.bindAccount: upsert binding by account+conversation+type with sortOrder and status=1
- SendService.selectSendAccount: prefer send-primary(1), fallback send-backup(2), status=1, tenant/channel match, sortOrder asc
- SendService.resolveConversationTarget/resolvePersonTarget: verify account tenant, channel type and status; ensure person identity channel type matches for single chat
- Strengthen WeComSyncTest personType assertion by seeding a value (3)
that differs from what resolvePersonType(user001/INTERNAL) would assign (1),
so the test actually detects an overwrite.
- Remove redundant personMapper/conversationMapper selectById calls in
upsertContact and upsertConversation; preserve original business fields
by reading them from the already-loaded entity before mutation.
- Delete the manual regression shell script; the unit tests are the primary
verification and the script required manual DB edits and only covered
conversation fields.
- New module: mci-channel-wechat-personal
- Implements ChannelAdapter SPI for personal WeChat
- Calls Python channel-service pywechat HTTP APIs:
- /v1/wechat-personal/login/start for initAccount QR code
- /v1/wechat-personal/send/text and /send/image for sendMessage
- Configurable base URL via sino.channel.wechat-personal.base-url
- Added MockWebServer unit tests
- Wired module into backend parent and mci-server