mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-04 11:07:40 +08:00
add: VoiceElement.Url
This commit is contained in:
parent
7a84cfae67
commit
4bfd7225c4
@ -118,6 +118,7 @@ func NewClientMd5(uin int64, passwordMd5 [16]byte) *QQClient {
|
||||
"friendlist.GetTroopMemberListReq": decodeGroupMemberListResponse,
|
||||
"ImgStore.GroupPicUp": decodeGroupImageStoreResponse,
|
||||
"PttStore.GroupPttUp": decodeGroupPttStoreResponse,
|
||||
"PttStore.GroupPttDown": decodeGroupPttDownResponse,
|
||||
"LongConn.OffPicUp": decodeOffPicUpResponse,
|
||||
"ProfileService.Pb.ReqSystemMsgNew.Group": decodeSystemMsgGroupPacket,
|
||||
"ProfileService.Pb.ReqSystemMsgNew.Friend": decodeSystemMsgFriendPacket,
|
||||
@ -826,7 +827,7 @@ func (c *QQClient) netLoop() {
|
||||
go func() {
|
||||
defer func() {
|
||||
if pan := recover(); pan != nil {
|
||||
//
|
||||
fmt.Println("panic on decoder:", pan)
|
||||
}
|
||||
}()
|
||||
decoder, ok := c.decoders[pkt.CommandName]
|
||||
|
@ -272,10 +272,10 @@ func (c *QQClient) parseGroupMessage(m *msg.Message) *message.GroupMessage {
|
||||
if m.Body.RichText.Ptt != nil {
|
||||
g.Elements = []message.IMessageElement{
|
||||
&message.VoiceElement{
|
||||
Name: m.Body.RichText.Ptt.FileName,
|
||||
Md5: m.Body.RichText.Ptt.FileMd5,
|
||||
Size: m.Body.RichText.Ptt.FileSize,
|
||||
DownloadPara: string(m.Body.RichText.Ptt.DownPara),
|
||||
Name: m.Body.RichText.Ptt.FileName,
|
||||
Md5: m.Body.RichText.Ptt.FileMd5,
|
||||
Size: m.Body.RichText.Ptt.FileSize,
|
||||
Url: "http://grouptalk.c2c.qq.com" + string(m.Body.RichText.Ptt.DownPara),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
1225
client/pb/data.pb.go
1225
client/pb/data.pb.go
File diff suppressed because it is too large
Load Diff
@ -43,6 +43,7 @@ message D388ReqBody {
|
||||
int32 subcmd = 2;
|
||||
repeated TryUpImgReq msgTryUpImgReq = 3;
|
||||
repeated TryUpPttReq msgTryUpPttReq = 5;
|
||||
repeated GetPttUrlReq msgGetPttReq = 6;
|
||||
int32 commandId = 7;
|
||||
bytes extension = 1001;
|
||||
}
|
||||
@ -52,6 +53,43 @@ message D388RespBody {
|
||||
int32 subCmd = 2;
|
||||
repeated TryUpImgResp msgTryUpImgRsp = 3;
|
||||
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 {
|
||||
@ -210,7 +248,7 @@ message MessageRecallReminder {
|
||||
bytes userdef = 5;
|
||||
int32 groupType = 6;
|
||||
int32 opType = 7;
|
||||
|
||||
|
||||
}
|
||||
|
||||
message RecalledMessageMeta {
|
||||
@ -219,7 +257,7 @@ message RecalledMessageMeta {
|
||||
int32 msgRandom = 3;
|
||||
int32 msgType = 4;
|
||||
int32 msgFlag = 5;
|
||||
int64 authorUin = 6;
|
||||
int64 authorUin = 6;
|
||||
}
|
||||
|
||||
message SubD4 {
|
||||
|
@ -26,10 +26,10 @@ type GroupImageElement struct {
|
||||
}
|
||||
|
||||
type VoiceElement struct {
|
||||
Name string
|
||||
Md5 []byte
|
||||
Size int32
|
||||
DownloadPara string
|
||||
Name string
|
||||
Md5 []byte
|
||||
Size int32
|
||||
Url string
|
||||
|
||||
// --- sending ---
|
||||
Data []byte
|
||||
|
Loading…
x
Reference in New Issue
Block a user