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

fix issue of forward message sending.

This commit is contained in:
Mrs4s 2020-07-28 02:46:12 +08:00
parent 9d432df098
commit a9b2454042
3 changed files with 8 additions and 3 deletions

View File

@ -282,7 +282,6 @@ func (c *QQClient) GetForwardMessage(resId string) *message.ForwardMessage {
return ret return ret
} }
// 目前手机端无法解析,可能是加密的问题,等待修复
func (c *QQClient) SendForwardMessage(groupCode int64, m *message.ForwardMessage) *message.GroupMessage { func (c *QQClient) SendForwardMessage(groupCode int64, m *message.ForwardMessage) *message.GroupMessage {
if len(m.Nodes) >= 200 { if len(m.Nodes) >= 200 {
return nil return nil

View File

@ -717,7 +717,7 @@ func decodeMultiApplyDownResponse(c *QQClient, _ uint16, payload []byte) (interf
i1 := r.ReadInt32() i1 := r.ReadInt32()
i2 := r.ReadInt32() i2 := r.ReadInt32()
if i1 > 0 { if i1 > 0 {
r.ReadBytes(int(i1)) // highway head r.ReadBytes(int(i1)) // im msg head
} }
data := tea.Decrypt(r.ReadBytes(int(i2))) data := tea.Decrypt(r.ReadBytes(int(i2)))
lb := longmsg.LongRspBody{} lb := longmsg.LongRspBody{}

View File

@ -378,7 +378,13 @@ func (forMsg *ForwardMessage) CalculateValidationData(seq, random int32, groupCo
}, },
}) })
} }
trans := &msg.PbMultiMsgTransmit{Msg: msgs} buf, _ := proto.Marshal(&msg.PbMultiMsgNew{Msg: msgs})
trans := &msg.PbMultiMsgTransmit{Msg: msgs, PbItemList: []*msg.PbMultiMsgItem{
{
FileName: "MultiMsg",
Buffer: buf,
},
}}
b, _ := proto.Marshal(trans) b, _ := proto.Marshal(trans)
data := binary.GZipCompress(b) data := binary.GZipCompress(b)
hash := md5.Sum(data) hash := md5.Sum(data)