Bug 1: Image decryption fails with Incorrect padding
WeCom aibot (智能机器人) delivers the image aeskey as a 64-char hex string, but _decrypt_file_bytes at gateway/platforms/wecom.py:997 blindly calls base64.b64decode(aes_key), which throws binascii.Error: Incorrect padding. The agent never sees the image attachment.
[Wecom] Failed to decrypt image from https://ww-aibot-img-...cos.ap-guangzhou.myqcloud.com/...: Incorrect padding
Fix: try bytes.fromhex() first (len==64), fall back to base64 for callback-app keys.
Bug 2: Slash commands don't work in group chats
WeCom group messages arrive with a plain-text @<DisplayName> prefix but no structured mention field (unlike feishu/discord). So /reset, /sethome etc. never match because the text starts with @BotName /reset.
Fix: add optional bot_display_name config / WECOM_BOT_DISPLAY_NAME env, strip the prefix in _extract_text().
Environment
- hermes v2026.4.8
- WeCom aibot (智能机器人) via websocket callback
- macOS
Bug 1: Image decryption fails with
Incorrect paddingWeCom aibot (智能机器人) delivers the image
aeskeyas a 64-char hex string, but_decrypt_file_bytesatgateway/platforms/wecom.py:997blindly callsbase64.b64decode(aes_key), which throwsbinascii.Error: Incorrect padding. The agent never sees the image attachment.Fix: try
bytes.fromhex()first (len==64), fall back to base64 for callback-app keys.Bug 2: Slash commands don't work in group chats
WeCom group messages arrive with a plain-text
@<DisplayName>prefix but no structured mention field (unlike feishu/discord). So/reset,/sethomeetc. never match because the text starts with@BotName /reset.Fix: add optional
bot_display_nameconfig /WECOM_BOT_DISPLAY_NAMEenv, strip the prefix in_extract_text().Environment