diff --git a/README.md b/README.md index 3840df30..3c0cd09e 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ qq-android协议的golang实现 移植于mirai #### 消息类型 - [x] 文本 - [x] 图片 +- [ ] 语音 - [x] 表情 - [x] At - [x] 回复 diff --git a/client/client.go b/client/client.go index 0722c01e..71d86959 100644 --- a/client/client.go +++ b/client/client.go @@ -454,12 +454,14 @@ func (c *QQClient) UploadGroupPtt(groupCode int64, voice []byte, voiceLength int ok: return &message.GroupPtt{ Ptt: msg.Ptt{ - FileType: 4, - FileMd5: h[:], - FileName: "01234567890123456789012345678901.amr", // 应为MD5.amr(? - FileSize: int32(len(voice)), - BoolValid: true, - PbReserve: []byte{0}, + FileType: 4, + SrcUin: c.Uin, + FileMd5: h[:], + FileName: hex.EncodeToString(h[:]) + ".amr", + FileSize: int32(len(voice)), + GroupFileKey: rsp.FileKey, + BoolValid: true, + PbReserve: []byte{8, 0, 40, 0, 56, 0}, }}, nil }