1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-06 12:03:50 +08:00

添加CQ:at显示检查

- #799 的修复
This commit is contained in:
Sam 2021-04-11 19:25:48 +08:00
parent 35860a4b11
commit 2df33118be
No known key found for this signature in database
GPG Key ID: 2057906F881702DD

View File

@ -285,7 +285,7 @@ func (bot *CQBot) CQSendGroupMessage(groupID int64, i interface{}, autoEscape bo
}
fixAt := func(elem []message.IMessageElement) {
for _, e := range elem {
if at, ok := e.(*message.AtElement); ok && at.Target != 0 {
if at, ok := e.(*message.AtElement); ok && at.Target != 0 && at.Display == "" {
at.Display = "@" + func() string {
mem := group.FindMember(at.Target)
if mem != nil {