修复HasFile 🐛
This commit is contained in:
parent
95a4a4d188
commit
8b584b537a
@ -21,7 +21,7 @@ type Message struct {
|
|||||||
Type int
|
Type int
|
||||||
AppID string
|
AppID string
|
||||||
}
|
}
|
||||||
AppMsgType int
|
AppMsgType AppMessageType
|
||||||
HasProductId int
|
HasProductId int
|
||||||
ImgHeight int
|
ImgHeight int
|
||||||
ImgStatus int
|
ImgStatus int
|
||||||
@ -229,7 +229,7 @@ func (m *Message) StatusNotify() bool {
|
|||||||
|
|
||||||
// HasFile 判断消息是否为文件类型的消息
|
// HasFile 判断消息是否为文件类型的消息
|
||||||
func (m *Message) HasFile() bool {
|
func (m *Message) HasFile() bool {
|
||||||
return m.IsPicture() || m.IsVoice() || m.IsVideo() || m.IsMedia() || m.IsEmoticon()
|
return m.IsPicture() || m.IsVoice() || m.IsVideo() || (m.IsMedia() && m.AppMsgType == AppMsgTypeAttach) || m.IsEmoticon()
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetFile 获取文件消息的文件
|
// GetFile 获取文件消息的文件
|
||||||
|
Loading…
x
Reference in New Issue
Block a user