mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-04 19:17:38 +08:00
fix: private message uid
This commit is contained in:
parent
b74e84951a
commit
8f4a2f6c3a
@ -13,6 +13,9 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/pkg/errors"
|
||||||
|
"google.golang.org/protobuf/proto"
|
||||||
|
|
||||||
"github.com/Mrs4s/MiraiGo/binary"
|
"github.com/Mrs4s/MiraiGo/binary"
|
||||||
"github.com/Mrs4s/MiraiGo/binary/jce"
|
"github.com/Mrs4s/MiraiGo/binary/jce"
|
||||||
devinfo "github.com/Mrs4s/MiraiGo/client/pb"
|
devinfo "github.com/Mrs4s/MiraiGo/client/pb"
|
||||||
@ -20,8 +23,6 @@ import (
|
|||||||
"github.com/Mrs4s/MiraiGo/client/pb/oidb"
|
"github.com/Mrs4s/MiraiGo/client/pb/oidb"
|
||||||
"github.com/Mrs4s/MiraiGo/message"
|
"github.com/Mrs4s/MiraiGo/message"
|
||||||
"github.com/Mrs4s/MiraiGo/utils"
|
"github.com/Mrs4s/MiraiGo/utils"
|
||||||
"github.com/pkg/errors"
|
|
||||||
"google.golang.org/protobuf/proto"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
@ -506,12 +507,12 @@ func (c *QQClient) parsePrivateMessage(msg *msg.Message) *message.PrivateMessage
|
|||||||
sender = &message.Sender{
|
sender = &message.Sender{
|
||||||
Uin: msg.Head.GetFromUin(),
|
Uin: msg.Head.GetFromUin(),
|
||||||
Nickname: msg.Head.GetFromNick(),
|
Nickname: msg.Head.GetFromNick(),
|
||||||
IsFriend: false,
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
sender = &message.Sender{
|
sender = &message.Sender{
|
||||||
Uin: friend.Uin,
|
Uin: friend.Uin,
|
||||||
Nickname: friend.Nickname,
|
Nickname: friend.Nickname,
|
||||||
|
IsFriend: true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ret := &message.PrivateMessage{
|
ret := &message.PrivateMessage{
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
package client
|
package client
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/pkg/errors"
|
||||||
|
"google.golang.org/protobuf/proto"
|
||||||
|
|
||||||
"github.com/Mrs4s/MiraiGo/client/pb/msg"
|
"github.com/Mrs4s/MiraiGo/client/pb/msg"
|
||||||
"github.com/Mrs4s/MiraiGo/message"
|
"github.com/Mrs4s/MiraiGo/message"
|
||||||
"github.com/Mrs4s/MiraiGo/protocol/packets"
|
"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,
|
FromUin: &c.Uin,
|
||||||
ToUin: &uin,
|
ToUin: &uin,
|
||||||
MsgTime: &ts,
|
MsgTime: &ts,
|
||||||
MsgUid: proto.Int64(int64(random)),
|
MsgUid: proto.Int64(0x01000000000000000 | (int64(random) & 0xFFFFFFFF)),
|
||||||
MsgSeq: &msgSeq,
|
MsgSeq: &msgSeq,
|
||||||
MsgRandom: &random,
|
MsgRandom: &random,
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user