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

fix: friend poke self.

This commit is contained in:
wdvxdr 2021-08-10 15:08:36 +08:00
parent 08b19e92ef
commit 6614d2383a
No known key found for this signature in database
GPG Key ID: 703F8C071DE7A1B6

View File

@ -211,10 +211,12 @@ func msgType0x210Sub27Decoder(c *QQClient, protobuf []byte) error {
func msgType0x210Sub122Decoder(c *QQClient, protobuf []byte) error { func msgType0x210Sub122Decoder(c *QQClient, protobuf []byte) error {
t := &notify.GeneralGrayTipInfo{} t := &notify.GeneralGrayTipInfo{}
_ = proto.Unmarshal(protobuf, t) _ = proto.Unmarshal(protobuf, t)
var sender int64 var sender, receiver int64
for _, templ := range t.MsgTemplParam { for _, templ := range t.MsgTemplParam {
if templ.Name == "uin_str1" { if templ.Name == "uin_str1" {
sender, _ = strconv.ParseInt(templ.Value, 10, 64) sender, _ = strconv.ParseInt(templ.Value, 10, 64)
} else if templ.Name == "uin_str2" {
receiver, _ = strconv.ParseInt(templ.Value, 10, 64)
} }
} }
if sender == 0 { if sender == 0 {
@ -222,7 +224,7 @@ func msgType0x210Sub122Decoder(c *QQClient, protobuf []byte) error {
} }
c.dispatchFriendNotifyEvent(&FriendPokeNotifyEvent{ c.dispatchFriendNotifyEvent(&FriendPokeNotifyEvent{
Sender: sender, Sender: sender,
Receiver: c.Uin, Receiver: receiver,
}) })
return nil return nil
} }