补充公众号变更后的个人重绑状态和发送限制
Security Checks / security (push) Waiting to run

公众号身份不匹配时阻止重新启用、测试发送与邮件通知,保留停用及解绑;新增身份匹配回归源码。全量编译和相关包静态检查通过,未执行回归和实机验收。作为修复全量静态检查发现的既有用例签名错误前检查点。
This commit is contained in:
xuans committed 2026-09-28 21:31:37 +08:00
1 parent afc177132a
commit 7b6891fdbb
4 files changed
+56 -7

No files matched your search

+3 -2
View File
@@ -57,7 +57,8 @@ func weChatRequestService(ctx *appcontext.Context, w http.ResponseWriter, recent
func weChatPublicSettings(status pluginservice.WeChatUserSettingsStatus) map[string]any {
return map[string]any{"version": status.Version, "bound": status.Settings.OpenID != "", "enabled": status.Settings.Enabled,
"showContent": status.Settings.ShowContent, "displayName": status.Settings.DisplayName}
"showContent": status.Settings.ShowContent, "displayName": status.Settings.DisplayName,
"needsRebind": status.NeedsRebind}
}
func writeWeChatSettings(w http.ResponseWriter, userID int, status pluginservice.WeChatUserSettingsStatus) {
@@ -175,7 +176,7 @@ func TestWeChatMessage(ctx *appcontext.Context, w http.ResponseWriter, req *http
return
}
status, err := service.GetOwnWeChatSettings(ctx.UserID)
if err != nil || status.Settings.OpenID == "" {
if err != nil || status.Settings.OpenID == "" || status.NeedsRebind {
writeWeChatError(w, pluginservice.WeChatNotice("请先绑定本人的微信"))
return
}