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

Merge pull request #1150 from Akegarasu/dev

fix: convert to array missing guild image
This commit is contained in:
Mrs4s 2021-11-13 12:48:00 +08:00 committed by GitHub
commit 2ed99b48f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -234,6 +234,12 @@ func ToArrayMessage(e []message.IMessageElement, source MessageSource) (r []glob
"type": "image", "type": "image",
"data": data, "data": data,
} }
case *message.GuildImageElement:
data := map[string]string{"file": hex.EncodeToString(o.Md5) + ".image", "url": o.Url}
m = global.MSG{
"type": "image",
"data": data,
}
case *message.FriendImageElement: case *message.FriendImageElement:
data := map[string]string{"file": hex.EncodeToString(o.Md5) + ".image", "url": o.Url} data := map[string]string{"file": hex.EncodeToString(o.Md5) + ".image", "url": o.Url}
if o.Flash { if o.Flash {