fix(gateway): directMsgPerMin 的写入路径 5 处透传(关掉「面板保存把 -1 静默重置为 0」)
- 缺口:后端解析与面板都已就绪,但 gateway 没让该字段通过 ⇒ 面板保存一次渠道配置就把主人手配的「关闭流控(-1)」重置为 0=保护性默认 6 条/分 - 5 处:AdminChannelAccount DTO / channelConfigRequest / config.ChannelAccount 拷贝 / adminChannelAccountOf 映射 / 微信扫码重建账号 - 语义零改动(只透传);变异实测:删拷贝 ⇒ channels.json 变 0(want -1)、删微信重建拷贝 ⇒ 同红、删 GET 映射 ⇒ 回显缺失 - 顺带登记一条负载诱发 flake(capability/plugin 的 TestManagerInstall_ConnectFailureDoesNotPersist,靠「端口被拒」断言,满载时端口被抢)⇒ 非本切片引入,已进 00-索引 §四
This commit is contained in:
1 parent
321cc3b763
commit
7aaf7731dc
3 files changed
+208
-30
No files matched your search
@@ -121,7 +121,8 @@ func (s *Server) adminWeixinLoginStatus(w http.ResponseWriter, r *http.Request)
|
||||
|
||||
// persistWeixinConfirmed 把登录获得的凭据写入该账号的
|
||||
// channels.json 配置(合并到用户精心维护的 base_url/cdn 字段之上,
|
||||
// 并保留其 allow/deny/limit 列表),再热重载该平台,
|
||||
// 并保留其 allow/deny/limit 列表 —— 含账号顶层的 directMsgPerMin,
|
||||
// 主人配的「关闭流控(-1)」因而不会被一次扫码保存重置),再热重载该平台,
|
||||
// 使 bridge 连接到这个刚配置好的适配器。ownerID 非空时它还会
|
||||
// 把扫码者绑定的 ilink_user_id 登记进主人白名单
|
||||
// (owner.yaml),使 bridge 无需手工编辑就认出它是主人。
|
||||
@@ -171,15 +172,16 @@ func (s *Server) persistWeixinConfirmed(ctx context.Context, platform, accountID
|
||||
}
|
||||
}
|
||||
acct := config.ChannelAccount{
|
||||
ID: base.ID,
|
||||
Config: cfg,
|
||||
AllowGroups: base.AllowGroups,
|
||||
DenyGroups: base.DenyGroups,
|
||||
AllowUsers: allowUsers,
|
||||
DenyUsers: base.DenyUsers,
|
||||
GroupMsgPerMin: base.GroupMsgPerMin,
|
||||
MsgPerMin: base.MsgPerMin,
|
||||
MaxMessages: base.MaxMessages,
|
||||
ID: base.ID,
|
||||
Config: cfg,
|
||||
AllowGroups: base.AllowGroups,
|
||||
DenyGroups: base.DenyGroups,
|
||||
AllowUsers: allowUsers,
|
||||
DenyUsers: base.DenyUsers,
|
||||
GroupMsgPerMin: base.GroupMsgPerMin,
|
||||
MsgPerMin: base.MsgPerMin,
|
||||
MaxMessages: base.MaxMessages,
|
||||
DirectMsgPerMin: base.DirectMsgPerMin,
|
||||
}
|
||||
if acct.ID == "" {
|
||||
acct.ID = runtimeconfig.NewID()
|
||||
|
||||
Reference in new issue
Block a user