fix: omit admin-only actions from group notices

This commit is contained in:
richjohnrambo
2026-09-24 16:47:19 +08:00
parent 6453abdbd1
commit 7405277f27
3 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -5451,11 +5451,11 @@ func serveIMGroupGovernance(wrt http.ResponseWriter, req *http.Request, topic st
text = "群聊邀请确认已启用,群成员邀请好友进群需要群主或管理员确认。"
}
publishIMConversationSystemNotice(principal.TenantID, topic,
"system_action", template, text,
"system_notice", template, text,
[]imSystemMessageActor{
{UserID: principal.Uid.UserId(), Click: map[string]any{"type": "user_profile", "target_id": principal.Uid.UserId()}},
},
[]imSystemMessageAction{{Type: "open_group_invite_settings", Label: "群聊邀请确认", TargetID: topic, MinRole: "admin"}},
nil,
map[string]any{"join_approval": *body.JoinApproval, "version": settings.Version})
}
if body.MemberPrivateChat != nil && imReliableHTTPEventsEnabled(req) {