From 7a979c862f72e2e166b5d75c6319602f59568326 Mon Sep 17 00:00:00 2001 From: yuanyan3060 <1846865993@qq.com> Date: Wed, 13 Jul 2022 02:16:25 +0800 Subject: [PATCH] =?UTF-8?q?fix=20a=20bug=20=E4=BD=BF=E7=94=A8mongodb?= =?UTF-8?q?=E6=97=B6=20image=E7=9A=84=20subtype=E4=BC=9A=E8=A2=AB=E5=AD=98?= =?UTF-8?q?=E5=82=A8=E4=B8=BANumberLong=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- coolq/cqcode.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/coolq/cqcode.go b/coolq/cqcode.go index 18c70ee..7505576 100644 --- a/coolq/cqcode.go +++ b/coolq/cqcode.go @@ -733,7 +733,12 @@ func (bot *CQBot) ConvertContentMessage(content []global.MSG, sourceType message case *message.GroupImageElement: img.Flash = flash img.EffectID = id - img.ImageBizType = message.ImageBizType(data["subType"].(uint32)) + switch data["subType"].(type) { + case int64: + img.ImageBizType = message.ImageBizType(data["subType"].(int64)) + default: + img.ImageBizType = message.ImageBizType(data["subType"].(uint32)) + } case *message.FriendImageElement: img.Flash = flash }