1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-04 19:17:37 +08:00

Fix #2226 - 修改 coolq/cqcode.go#L54 安卓端私聊回复时r.GroupID似乎为0 (#2230)

This commit is contained in:
xiangxiangxiong9 2023-08-01 11:20:02 +08:00 committed by GitHub
parent 5cb8548487
commit 2b1d9c21cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,7 +51,7 @@ func replyID(r *message.ReplyElement, source message.Source) int32 {
}
// 私聊时,部分(不确定)的账号会在 ReplyElement 中带有 GroupID 字段。
// 这里需要判断是由于 “直接回复” 功能GroupID 为触发直接回复的来源那个群。
if source.SourceType == message.SourcePrivate && (r.Sender == source.PrimaryID || r.GroupID == source.PrimaryID) {
if source.SourceType == message.SourcePrivate && (r.Sender == source.PrimaryID || r.GroupID == source.PrimaryID || r.GroupID == 0) {
// 私聊似乎腾讯服务器有bug?
seq = int32(uint16(seq))
id = r.Sender