From 15dd2fc783c2fd202288709059e06b9dec5b7777 Mon Sep 17 00:00:00 2001 From: DCloud_JSON Date: Mon, 22 Apr 2024 14:41:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E7=AB=AF=E7=9A=84=E7=94=A8=E6=88=B7=E7=A6=81=E8=A8=80=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E4=B8=8E=E4=BA=91=E7=AB=AF=E4=B8=8D=E4=B8=80=E8=87=B4?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/group/info.nvue | 4 ++++ sdk/ext/MsgManager.class.js | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/pages/group/info.nvue b/pages/group/info.nvue index 9da10de..9978260 100644 --- a/pages/group/info.nvue +++ b/pages/group/info.nvue @@ -721,6 +721,10 @@ } }, setMuteAllMembers(e) { + for (let user_id in this.conversation.group_member) { + const member = this.conversation.group_member[user_id] + member.mute_type += (e.value ? 1 : -1) + } this.updateGroupInfo({ "mute_all_members": e.value }) diff --git a/sdk/ext/MsgManager.class.js b/sdk/ext/MsgManager.class.js index 6508b21..dd31f43 100644 --- a/sdk/ext/MsgManager.class.js +++ b/sdk/ext/MsgManager.class.js @@ -379,6 +379,13 @@ export default class Message { } //更新群资料 else if (data.action.indexOf("update-group-info-") === 0) { + if(data.action === "update-group-info-mute_all_members" && _currentConversation?.group_info?.mute_all_members != data?.body?.updateData?.mute_all_members){ + const {mute_all_members} = data.body.updateData + for (let user_id in _currentConversation.group_member) { + const member = _currentConversation.group_member[user_id] + member.mute_type += (mute_all_members ? 1 : -1) + } + } _currentConversation.group_info = Object.assign(_currentConversation.group_info,data.body.updateData) const {notification} = data.body.updateData if(data.action === "update-group-info-notification"){ -- GitLab