mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-04 19:17:38 +08:00
fix: 修复读取合并转发私聊内容报错 (#287)
This commit is contained in:
parent
a39b3fdd96
commit
5c0e2c5773
@ -163,8 +163,12 @@ func (l *forwardMsgLinker) link(name string) *message.ForwardMessage {
|
||||
}
|
||||
}
|
||||
|
||||
gid := int64(0) // 给群号一个缺省值0,防止在读合并转发的私聊内容时候会报错
|
||||
if m.Head.GroupInfo != nil {
|
||||
gid = m.Head.GroupInfo.GroupCode.Unwrap()
|
||||
}
|
||||
nodes = append(nodes, &message.ForwardNode{
|
||||
GroupId: m.Head.GroupInfo.GroupCode.Unwrap(),
|
||||
GroupId: gid,
|
||||
SenderId: m.Head.FromUin.Unwrap(),
|
||||
SenderName: name,
|
||||
Time: m.Head.MsgTime.Unwrap(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user