mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-07-19 04:37:28 +08:00
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:
@@ -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", {
|
||||
|
||||
Reference in New Issue
Block a user