mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-05 03:23:50 +08:00
add send friend poke
This commit is contained in:
parent
4cfc7adb72
commit
92f9e10a27
@ -1019,6 +1019,24 @@ func (c *QQClient) buildGroupPokePacket(groupCode, target int64) (uint16, []byte
|
|||||||
return seq, packet
|
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
|
// OidbSvc.0x55c_1
|
||||||
func (c *QQClient) buildGroupAdminSetPacket(groupCode, member int64, flag bool) (uint16, []byte) {
|
func (c *QQClient) buildGroupAdminSetPacket(groupCode, member int64, flag bool) (uint16, []byte) {
|
||||||
seq := c.nextSeq()
|
seq := c.nextSeq()
|
||||||
|
@ -616,6 +616,10 @@ func (c *QQClient) sendGroupPoke(groupCode, target int64) {
|
|||||||
_, _ = c.sendAndWait(c.buildGroupPokePacket(groupCode, target))
|
_, _ = 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) {
|
func (c *QQClient) UploadGroupImage(groupCode int64, img []byte) (*message.GroupImageElement, error) {
|
||||||
h := md5.Sum(img)
|
h := md5.Sum(img)
|
||||||
seq, pkt := c.buildGroupImageStorePacket(groupCode, h[:], int32(len(img)))
|
seq, pkt := c.buildGroupImageStorePacket(groupCode, h[:], int32(len(img)))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user