From 39da1636416ddc541db258fc8fcce384acbf0e5f Mon Sep 17 00:00:00 2001 From: wfjsw Date: Tue, 17 Nov 2020 20:24:38 +0800 Subject: [PATCH] proper flash pic support --- coolq/cqcode.go | 14 ++++++++++++++ coolq/event.go | 22 ++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/coolq/cqcode.go b/coolq/cqcode.go index 3f864bb..622cd6b 100644 --- a/coolq/cqcode.go +++ b/coolq/cqcode.go @@ -183,6 +183,16 @@ func ToArrayMessage(e []message.IMessageElement, code int64, raw ...bool) (r []M "data": map[string]string{"file": o.Filename, "url": o.Url}, } } + case *message.GroupFlashImgElement: + return []MSG{MSG{ + "type": "image", + "data": map[string]string{"file": o.Filename, "type": "flash"}, + }} + case *message.FriendFlashImgElement: + return []MSG{MSG{ + "type": "image", + "data": map[string]string{"file": o.Filename, "type": "flash"}, + }} case *message.ServiceElement: if isOk := strings.Contains(o.Content, "