refactor(wecom_bot): config-file-only callback mode + fixed callback path

Remove the callback-mode fields (Callback Mode / Token / EncodingAESKey /
Port) from the web console channel form; these are rarely changed and are
now configured via config.json only. The console keeps Bot ID / Secret for
the long-connection setup.

Serve the callback HTTP server on a fixed path (/wecombot) instead of any
path (/.*), so unrelated requests 404 rather than being processed as
signature-failing WeCom callbacks. The bot's receive-message URL must point
at http(s)://host:<port>/wecombot.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
6vision
2026-06-15 19:47:19 +08:00
parent 018493a60b
commit 52209217fc
2 changed files with 8 additions and 6 deletions

View File

@@ -3016,10 +3016,6 @@ class ChannelsHandler:
"fields": [
{"key": "wecom_bot_id", "label": "Bot ID", "type": "text"},
{"key": "wecom_bot_secret", "label": "Secret", "type": "secret"},
{"key": "wecom_bot_callback", "label": "Callback Mode", "type": "bool", "default": False},
{"key": "wecom_bot_token", "label": "Token", "type": "secret"},
{"key": "wecom_bot_encoding_aes_key", "label": "EncodingAESKey", "type": "secret"},
{"key": "wecom_bot_port", "label": "Port", "type": "number", "default": 9892},
],
}),
("qq", {