1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-05 03:23:49 +08:00

Merge pull request #1582 from yuanyan3060/new_dev

fix a bug 使用mongodb时 image的 subtype会被存储为NumberLong类型
This commit is contained in:
Mrs4s 2022-08-03 16:20:36 +08:00 committed by GitHub
commit fe19b3a9ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -733,7 +733,12 @@ func (bot *CQBot) ConvertContentMessage(content []global.MSG, sourceType message
case *message.GroupImageElement:
img.Flash = flash
img.EffectID = id
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
}