1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-05-04 11:07:40 +08:00

Fix Ptt on PC

This commit is contained in:
LXY1226 2020-08-04 17:45:53 +08:00
parent b0f1dde18c
commit 5db0afe0ab
2 changed files with 9 additions and 6 deletions

View File

@ -16,6 +16,7 @@ qq-android协议的golang实现 移植于mirai
#### 消息类型
- [x] 文本
- [x] 图片
- [ ] 语音
- [x] 表情
- [x] At
- [x] 回复

View File

@ -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
}