From e73c462d5c8f9584d3f94c2153a500f58035bdc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=A5=E6=B5=B7?= Date: Mon, 18 Mar 2024 22:24:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E7=BA=A7=E5=88=AB=E5=88=A4=E6=96=AD=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wclient/robot/receiver.go | 13 +++++++------ webview/src/openapi/const.ts | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/wclient/robot/receiver.go b/wclient/robot/receiver.go index 9e946a6..ba32bc9 100644 --- a/wclient/robot/receiver.go +++ b/wclient/robot/receiver.go @@ -63,16 +63,17 @@ func whiteLimit(msg *wcferry.WxMsg) bool { return false } - // 验证名单 + // 已注册用户 if msg.IsGroup { room, _ := chatroom.Fetch(&chatroom.FetchParam{Roomid: msg.Roomid}) - if room.Level < 2 { - return true + if room.Level > 1 { + return false } - } else if up.Level < 2 { - return true + } else if up.Level > 1 { + return false } - return false + // 受限制用户 + return true } diff --git a/webview/src/openapi/const.ts b/webview/src/openapi/const.ts index a7d5865..fae3b3f 100644 --- a/webview/src/openapi/const.ts +++ b/webview/src/openapi/const.ts @@ -32,13 +32,13 @@ export const BadwordLevels: Record = { }; export const RoomLevels: Record = { - '-1': { name: '未限制' }, + '-1': { name: '未注册' }, 1: { name: '待验证' }, 2: { name: '已注册' }, }; export const UserLevels: Record = { - '-1': { name: '未限制' }, + '-1': { name: '未注册' }, 1: { name: '待验证' }, 2: { name: '已注册' }, 7: { name: '管理员' },