fix: Updated the WeixinChannel identifier name to match the registry key name#3605
Conversation
|
Hi @celestialhorse51D, this is your 5th Pull Request. 🙌 Join Developer CommunityThanks so much for your contribution! We'd love to invite you to join the official QwenPaw developer group! You can find the Discord and DingTalk group links under the "Developer Community" section on our docs page: We truly appreciate your enthusiasm—and look forward to your future contributions! 😊 We'll review your PR soon. |
|
@celestialhorse51D Please pass the unit test |
Thanks for the review! |
|
@celestialhorse51D Maybe you need to correct and update the test accordingly |
|
Thanks for the effort, @celestialhorse51D.The cron job works correctly when using channel=wechat -- the reported issue in #3573 was caused by the user using channel=weixin which doesn't match the actual channel identifier.I'd like to keep "wechat" as the identifier since it's the internationally recognized name and changing it would be a breaking change for existing users. If anything, we can improve the error message or add documentation to clarify the correct channel name.Closing this PR. Thanks for your time! |

Description
The root cause was an identity mismatch in
WeixinChannel:"weixin"in_BUILTIN_SPECS.WeixinChannel.channelproperty was incorrectly defined as"wechat".ChannelManager.get_channel()matches tasks against the instance's.channelproperty. Since cron jobs store the target as"weixin", the lookup failed ("wechat" != "weixin").This PR changes
WeixinChannel.channelfrom"wechat"to"weixin", unifying the identifier across the registry, session IDs (which use theweixin:prefix), and task dispatch logic.Related Issue: Fixes #3573
Security Considerations: No security impact. This is a constant alignment fix; it does not alter authentication flows or environment variable handling.
Type of Change
Component(s) Affected
Checklist
pre-commit run --all-fileslocally and it passespytestor as relevant) and they passFor Channel Changes (DingTalk, Feishu, QQ, Console, etc.)
./scripts/check-channels.sh(or./scripts/check-channels.sh --changed) and it passestests/contract/channels/test_<channel>_contract.py(REQUIRED)create_instance()with proper channel initializationtests/contract/channels/__init__.py)tests/unit/channels/test_<channel>.pyfor complex internal logicTesting
[How to test these changes]
Local Verification Evidence
Additional Notes
[Optional: any other context]