1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-05-04 11:07:40 +08:00

fix: private message uid

This commit is contained in:
wdvxdr 2021-05-31 17:58:34 +08:00
parent b74e84951a
commit 8f4a2f6c3a
No known key found for this signature in database
GPG Key ID: 55FF1414A69CEBA6
2 changed files with 8 additions and 6 deletions

View File

@ -13,6 +13,9 @@ import (
"strings"
"time"
"github.com/pkg/errors"
"google.golang.org/protobuf/proto"
"github.com/Mrs4s/MiraiGo/binary"
"github.com/Mrs4s/MiraiGo/binary/jce"
devinfo "github.com/Mrs4s/MiraiGo/client/pb"
@ -20,8 +23,6 @@ import (
"github.com/Mrs4s/MiraiGo/client/pb/oidb"
"github.com/Mrs4s/MiraiGo/message"
"github.com/Mrs4s/MiraiGo/utils"
"github.com/pkg/errors"
"google.golang.org/protobuf/proto"
)
type (
@ -506,12 +507,12 @@ func (c *QQClient) parsePrivateMessage(msg *msg.Message) *message.PrivateMessage
sender = &message.Sender{
Uin: msg.Head.GetFromUin(),
Nickname: msg.Head.GetFromNick(),
IsFriend: false,
}
} else {
sender = &message.Sender{
Uin: friend.Uin,
Nickname: friend.Nickname,
IsFriend: true,
}
}
ret := &message.PrivateMessage{

View File

@ -1,11 +1,12 @@
package client
import (
"github.com/pkg/errors"
"google.golang.org/protobuf/proto"
"github.com/Mrs4s/MiraiGo/client/pb/msg"
"github.com/Mrs4s/MiraiGo/message"
"github.com/Mrs4s/MiraiGo/protocol/packets"
"github.com/pkg/errors"
"google.golang.org/protobuf/proto"
)
// 撤回相关处理逻辑
@ -75,7 +76,7 @@ func (c *QQClient) buildPrivateRecallPacket(uin, ts int64, msgSeq, random int32)
FromUin: &c.Uin,
ToUin: &uin,
MsgTime: &ts,
MsgUid: proto.Int64(int64(random)),
MsgUid: proto.Int64(0x01000000000000000 | (int64(random) & 0xFFFFFFFF)),
MsgSeq: &msgSeq,
MsgRandom: &random,
},