From 6acc0db583d29ec4ba410a6c6209003d824508c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=AF=BB=E6=AC=A2?= Date: Mon, 22 Jul 2024 09:08:02 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E4=BC=98=E5=8C=96@=E6=89=80=E6=9C=89?= =?UTF-8?q?=E4=BA=BA=E5=88=A4=E6=96=AD=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/dto/message.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/model/dto/message.go b/model/dto/message.go index 60c462b8..110d0c78 100644 --- a/model/dto/message.go +++ b/model/dto/message.go @@ -160,7 +160,11 @@ func (m Message) IsAtAll() bool { // 转换@用户列表为数组 atUserList := strings.Split(d.AtUserList, ",") // 判断是否包含@所有人 - return slice.Contain(atUserList, "notify@all") + if slice.Contain(atUserList, "notify@all") { + return true + } + // 数据格式变动,再检查一下字符串是否包含 @所有人 字样 + return m.IsAt() && strings.Contains(m.Content, "@所有人") } // IsPrivateText