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

add send friend poke

This commit is contained in:
wdvxdr 2020-11-14 16:09:45 +08:00
parent 4cfc7adb72
commit 92f9e10a27
2 changed files with 22 additions and 0 deletions

View File

@ -1019,6 +1019,24 @@ func (c *QQClient) buildGroupPokePacket(groupCode, target int64) (uint16, []byte
return seq, packet
}
// OidbSvc.0xed3
func (c *QQClient) buildFriendPokePacket(target int64) (uint16, []byte) {
seq := c.nextSeq()
body := &oidb.DED3ReqBody{
ToUin: target,
AioUin: target,
}
b, _ := proto.Marshal(body)
req := &oidb.OIDBSSOPkg{
Command: 3795,
ServiceType: 1,
Bodybuffer: b,
}
payload, _ := proto.Marshal(req)
packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvc.0xed3", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
return seq, packet
}
// OidbSvc.0x55c_1
func (c *QQClient) buildGroupAdminSetPacket(groupCode, member int64, flag bool) (uint16, []byte) {
seq := c.nextSeq()

View File

@ -616,6 +616,10 @@ func (c *QQClient) sendGroupPoke(groupCode, target int64) {
_, _ = c.sendAndWait(c.buildGroupPokePacket(groupCode, target))
}
func (c *QQClient) SendFriendPoke(target int64) {
_, _ = c.sendAndWait(c.buildFriendPokePacket(target))
}
func (c *QQClient) UploadGroupImage(groupCode int64, img []byte) (*message.GroupImageElement, error) {
h := md5.Sum(img)
seq, pkt := c.buildGroupImageStorePacket(groupCode, h[:], int32(len(img)))