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

add: VoiceElement.Url

This commit is contained in:
Mrs4s 2020-08-10 11:25:16 +08:00
parent 7a84cfae67
commit 4bfd7225c4
5 changed files with 862 additions and 424 deletions

View File

@ -118,6 +118,7 @@ func NewClientMd5(uin int64, passwordMd5 [16]byte) *QQClient {
"friendlist.GetTroopMemberListReq": decodeGroupMemberListResponse, "friendlist.GetTroopMemberListReq": decodeGroupMemberListResponse,
"ImgStore.GroupPicUp": decodeGroupImageStoreResponse, "ImgStore.GroupPicUp": decodeGroupImageStoreResponse,
"PttStore.GroupPttUp": decodeGroupPttStoreResponse, "PttStore.GroupPttUp": decodeGroupPttStoreResponse,
"PttStore.GroupPttDown": decodeGroupPttDownResponse,
"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,
@ -826,7 +827,7 @@ func (c *QQClient) netLoop() {
go func() { go func() {
defer func() { defer func() {
if pan := recover(); pan != nil { if pan := recover(); pan != nil {
// fmt.Println("panic on decoder:", pan)
} }
}() }()
decoder, ok := c.decoders[pkt.CommandName] decoder, ok := c.decoders[pkt.CommandName]

View File

@ -275,7 +275,7 @@ func (c *QQClient) parseGroupMessage(m *msg.Message) *message.GroupMessage {
Name: m.Body.RichText.Ptt.FileName, Name: m.Body.RichText.Ptt.FileName,
Md5: m.Body.RichText.Ptt.FileMd5, Md5: m.Body.RichText.Ptt.FileMd5,
Size: m.Body.RichText.Ptt.FileSize, Size: m.Body.RichText.Ptt.FileSize,
DownloadPara: string(m.Body.RichText.Ptt.DownPara), Url: "http://grouptalk.c2c.qq.com" + string(m.Body.RichText.Ptt.DownPara),
}, },
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -43,6 +43,7 @@ message D388ReqBody {
int32 subcmd = 2; int32 subcmd = 2;
repeated TryUpImgReq msgTryUpImgReq = 3; repeated TryUpImgReq msgTryUpImgReq = 3;
repeated TryUpPttReq msgTryUpPttReq = 5; repeated TryUpPttReq msgTryUpPttReq = 5;
repeated GetPttUrlReq msgGetPttReq = 6;
int32 commandId = 7; int32 commandId = 7;
bytes extension = 1001; bytes extension = 1001;
} }
@ -52,6 +53,43 @@ message D388RespBody {
int32 subCmd = 2; int32 subCmd = 2;
repeated TryUpImgResp msgTryUpImgRsp = 3; repeated TryUpImgResp msgTryUpImgRsp = 3;
repeated TryUpPttResp msgTryUpPttRsp = 5; repeated TryUpPttResp msgTryUpPttRsp = 5;
repeated GetPttUrlRsp msgGetPttUrlRsp = 6;
}
message GetPttUrlReq {
int64 groupCode = 1;
int64 dstUin = 2;
int64 fileId = 3;
bytes fileMd5 = 4;
int32 reqTerm = 5;
int32 reqPlatformType = 6;
int32 innerIp = 7;
int32 buType = 8;
bytes buildVer = 9;
//int64 fileId = 10;
bytes fileKey = 11;
int32 codec = 12;
int32 buId = 13;
int32 reqTransferType = 14;
int32 isAuto = 15;
}
message GetPttUrlRsp {
int64 fileId = 1;
bytes fileMd5 = 2;
int32 result = 3;
bytes failMsg = 4;
bytes bytesDownUrl = 5;
repeated int32 uint32DownIp = 6;
repeated int32 uint32DownPort = 7;
bytes downDomain = 8;
bytes downPara = 9;
//int64 fileId = 10;
int32 transferType = 11;
int32 allowRetry = 12;
//repeated IPv6Info msgDownIp6 = 26;
bytes clientIp6 = 27;
string strDomain = 28;
} }
message ReqDataHighwayHead { message ReqDataHighwayHead {

View File

@ -29,7 +29,7 @@ type VoiceElement struct {
Name string Name string
Md5 []byte Md5 []byte
Size int32 Size int32
DownloadPara string Url string
// --- sending --- // --- sending ---
Data []byte Data []byte