support voice message (#31)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -39,6 +40,7 @@ import (
|
||||
// BytesTrans BLOB
|
||||
// )
|
||||
type MessageV3 struct {
|
||||
MsgSvrID int64 `json:"MsgSvrID"` // 消息 ID
|
||||
Sequence int64 `json:"Sequence"` // 消息序号,10位时间戳 + 3位序号
|
||||
CreateTime int64 `json:"CreateTime"` // 消息创建时间,10位时间戳
|
||||
StrTalker string `json:"StrTalker"` // 聊天对象,微信 ID or 群 ID
|
||||
@@ -77,6 +79,11 @@ func (m *MessageV3) Wrap() *Message {
|
||||
|
||||
_m.ParseMediaInfo(_m.Content)
|
||||
|
||||
// 语音消息
|
||||
if _m.Type == 34 {
|
||||
_m.Contents["voice"] = fmt.Sprint(m.MsgSvrID)
|
||||
}
|
||||
|
||||
if len(m.BytesExtra) != 0 {
|
||||
if bytesExtra := ParseBytesExtra(m.BytesExtra); bytesExtra != nil {
|
||||
if _m.IsChatRoom {
|
||||
|
||||
Reference in New Issue
Block a user