mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-04 19:17:38 +08:00
remove PttStore.GroupPttUp
This commit is contained in:
parent
2e6b21bfef
commit
6c1b622107
@ -168,7 +168,6 @@ var decoders = map[string]func(*QQClient, *incomingPacketInfo, []byte) (interfac
|
|||||||
"friendlist.GetTroopListReqV2": decodeGroupListResponse,
|
"friendlist.GetTroopListReqV2": decodeGroupListResponse,
|
||||||
"friendlist.GetTroopMemberListReq": decodeGroupMemberListResponse,
|
"friendlist.GetTroopMemberListReq": decodeGroupMemberListResponse,
|
||||||
"group_member_card.get_group_member_card_info": decodeGroupMemberInfoResponse,
|
"group_member_card.get_group_member_card_info": decodeGroupMemberInfoResponse,
|
||||||
"PttStore.GroupPttUp": decodeGroupPttStoreResponse,
|
|
||||||
"LongConn.OffPicUp": decodeOffPicUpResponse,
|
"LongConn.OffPicUp": decodeOffPicUpResponse,
|
||||||
"ProfileService.Pb.ReqSystemMsgNew.Group": decodeSystemMsgGroupPacket,
|
"ProfileService.Pb.ReqSystemMsgNew.Group": decodeSystemMsgGroupPacket,
|
||||||
"ProfileService.Pb.ReqSystemMsgNew.Friend": decodeSystemMsgFriendPacket,
|
"ProfileService.Pb.ReqSystemMsgNew.Friend": decodeSystemMsgFriendPacket,
|
||||||
|
@ -284,20 +284,6 @@ type (
|
|||||||
list []*GroupMemberInfo
|
list []*GroupMemberInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
pttUploadResponse struct {
|
|
||||||
ResultCode int32
|
|
||||||
Message string
|
|
||||||
|
|
||||||
IsExists bool
|
|
||||||
|
|
||||||
ResourceId string
|
|
||||||
UploadKey []byte
|
|
||||||
UploadIp []string
|
|
||||||
UploadPort []uint32
|
|
||||||
FileKey []byte
|
|
||||||
FileId int64
|
|
||||||
}
|
|
||||||
|
|
||||||
groupMessageReceiptEvent struct {
|
groupMessageReceiptEvent struct {
|
||||||
Rand int32
|
Rand int32
|
||||||
Seq int32
|
Seq int32
|
||||||
|
@ -8,7 +8,6 @@ import (
|
|||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
|
||||||
"github.com/Mrs4s/MiraiGo/binary"
|
|
||||||
"github.com/Mrs4s/MiraiGo/client/internal/highway"
|
"github.com/Mrs4s/MiraiGo/client/internal/highway"
|
||||||
"github.com/Mrs4s/MiraiGo/client/pb/cmd0x346"
|
"github.com/Mrs4s/MiraiGo/client/pb/cmd0x346"
|
||||||
"github.com/Mrs4s/MiraiGo/client/pb/cmd0x388"
|
"github.com/Mrs4s/MiraiGo/client/pb/cmd0x388"
|
||||||
@ -201,14 +200,6 @@ func (c *QQClient) GetShortVideoUrl(uuid, md5 []byte) string {
|
|||||||
return i.(string)
|
return i.(string)
|
||||||
}
|
}
|
||||||
|
|
||||||
// PttStore.GroupPttUp
|
|
||||||
func (c *QQClient) buildGroupPttStorePacket(groupCode int64, md5 []byte, size, codec, voiceLength int32) (uint16, []byte) {
|
|
||||||
seq := c.nextSeq()
|
|
||||||
packet := packets.BuildUniPacket(c.Uin, seq, "PttStore.GroupPttUp", 1, c.OutGoingPacketSessionId,
|
|
||||||
EmptyBytes, c.sigInfo.d2Key, c.buildGroupPttStoreBDHExt(groupCode, md5, size, codec, voiceLength))
|
|
||||||
return seq, packet
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *QQClient) buildGroupPttStoreBDHExt(groupCode int64, md5 []byte, size, codec, voiceLength int32) []byte {
|
func (c *QQClient) buildGroupPttStoreBDHExt(groupCode int64, md5 []byte, size, codec, voiceLength int32) []byte {
|
||||||
req := &cmd0x388.D388ReqBody{
|
req := &cmd0x388.D388ReqBody{
|
||||||
NetType: proto.Uint32(3),
|
NetType: proto.Uint32(3),
|
||||||
@ -302,36 +293,6 @@ func (c *QQClient) buildPttGroupShortVideoUploadReqPacket(videoHash, thumbHash [
|
|||||||
return seq, packet
|
return seq, packet
|
||||||
}
|
}
|
||||||
|
|
||||||
// PttStore.GroupPttUp
|
|
||||||
func decodeGroupPttStoreResponse(_ *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
|
|
||||||
pkt := cmd0x388.D388RspBody{}
|
|
||||||
err := proto.Unmarshal(payload, &pkt)
|
|
||||||
if err != nil {
|
|
||||||
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
|
|
||||||
}
|
|
||||||
rsp := pkt.TryupPttRsp[0]
|
|
||||||
if rsp.GetResult() != 0 {
|
|
||||||
return pttUploadResponse{
|
|
||||||
ResultCode: int32(rsp.GetResult()),
|
|
||||||
Message: utils.B2S(rsp.GetFailMsg()),
|
|
||||||
}, nil
|
|
||||||
}
|
|
||||||
if rsp.GetFileExit() {
|
|
||||||
return pttUploadResponse{IsExists: true}, nil
|
|
||||||
}
|
|
||||||
ip := make([]string, 0, len(rsp.GetUpIp()))
|
|
||||||
for _, i := range rsp.GetUpIp() {
|
|
||||||
ip = append(ip, binary.UInt32ToIPV4Address(i))
|
|
||||||
}
|
|
||||||
return pttUploadResponse{
|
|
||||||
UploadKey: rsp.UpUkey,
|
|
||||||
UploadIp: ip,
|
|
||||||
UploadPort: rsp.GetUpPort(),
|
|
||||||
FileKey: rsp.FileKey,
|
|
||||||
FileId: int64(rsp.GetFileid()),
|
|
||||||
}, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// PttCenterSvr.pb_pttCenter_CMD_REQ_APPLY_UPLOAD-500
|
// PttCenterSvr.pb_pttCenter_CMD_REQ_APPLY_UPLOAD-500
|
||||||
func (c *QQClient) buildC2CPttStoreBDHExt(target int64, md5 []byte, size, voiceLength int32) []byte {
|
func (c *QQClient) buildC2CPttStoreBDHExt(target int64, md5 []byte, size, voiceLength int32) []byte {
|
||||||
seq := c.nextSeq()
|
seq := c.nextSeq()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user