fix(config): correct secDirty clearing for Weixin channel

Fix copy-paste error in SaveConfig where Weixin.secDirty was
checked but Discord.secDirty was incorrectly cleared instead.
This caused Weixin channel token changes to be saved but the
dirty flag never cleared, leading to config persistence issues.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Huangting-xy 2026-03-25 21:06:19 +08:00
parent d4ebdb7107
commit 07f28f67ac

View file

@ -1740,7 +1740,7 @@ func SaveConfig(path string, cfg *Config) error {
cfg.security.Channels.Weixin = &WeixinSecurity{
Token: cfg.Channels.Weixin.Token(),
}
cfg.Channels.Discord.secDirty = false
cfg.Channels.Weixin.secDirty = false
}
if cfg.Channels.QQ.secDirty {
cfg.security.Channels.QQ = &QQSecurity{