mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-08-31 08:13:11 +03:00
When config.json has no channels configuration, the WebUI QR login connect flow obtained a token but only saved it to account.json (state file). The subsequent post-connect enable step (set_channel_config_enabled) read config.json, found no weixin section, and wrote back a default config with token="" - silently losing the freshly obtained credential. Add _persist_connect_credentials to _commit_account so the token and base_url are written to config.json before the enable step runs. This covers both the WebUI connect flow and the CLI QR login path, mirroring the established Feishu save_registration_result pattern.