From 8b584b537afcaf3968f7ad52e2dcffb8773643fd Mon Sep 17 00:00:00 2001 From: eatmoreapple <15055461510@163.com> Date: Tue, 3 Aug 2021 17:54:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DHasFile=20:bug:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- message.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/message.go b/message.go index 1e7eac3..7738730 100644 --- a/message.go +++ b/message.go @@ -21,7 +21,7 @@ type Message struct { Type int AppID string } - AppMsgType int + AppMsgType AppMessageType HasProductId int ImgHeight int ImgStatus int @@ -229,7 +229,7 @@ func (m *Message) StatusNotify() bool { // HasFile 判断消息是否为文件类型的消息 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 获取文件消息的文件