修复当群组保存在通讯录后无法正常识别是否是被@ (#164)

This commit is contained in:
Sml2h3 2022-12-13 17:36:03 +08:00 committed by GitHub
parent e6fcd53bd4
commit f07652e6c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -74,6 +74,9 @@ func (m *Message) Sender() (*User, error) {
user = &User{Self: m.Bot.self, UserName: m.FromUserName}
err = user.Detail()
}
if m.IsSendByGroup() && len(user.MemberList) == 0 {
err = user.Detail()
}
return user, err
}