From eefc3c2fbd50e11d0e96f53e349a4d8c54da0231 Mon Sep 17 00:00:00 2001 From: richjohnrambo Date: Sun, 13 Sep 2026 13:12:42 +0800 Subject: [PATCH] fix: add group mute all system notice --- server/im_http.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/server/im_http.go b/server/im_http.go index eff4a51..3516fe1 100644 --- a/server/im_http.go +++ b/server/im_http.go @@ -5986,6 +5986,21 @@ func serveIMGroupGovernance(wrt http.ResponseWriter, req *http.Request, topic st nil, map[string]any{"member_private_chat": *body.MemberPrivateChat, "version": settings.Version}) } + if body.MuteAll != nil && imReliableHTTPEventsEnabled(req) { + template := "group_mute_all_disabled" + text := "全体禁言已关闭,普通成员将能发送任何消息。" + if *body.MuteAll { + template = "group_mute_all_enabled" + text = "全体禁言已开启,普通成员将不能发送任何消息。" + } + publishIMConversationSystemNotice(principal.TenantID, topic, + "system_notice", template, text, + []imSystemMessageActor{ + {UserID: principal.Uid.UserId(), Click: map[string]any{"type": "user_profile", "target_id": principal.Uid.UserId()}}, + }, + nil, + map[string]any{"mute_all": *body.MuteAll, "version": settings.Version}) + } dispatchIMGroupEvents(principal.TenantID) writeIMSuccess(wrt, req, groupGovernancePayloadFromSettings(settings, selfSub)) default: