mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-05 03:23:49 +08:00
修复取出消息时LocalImageElement缺失问题 (#1884)
This commit is contained in:
parent
fc0845b16d
commit
d96f840d7f
@ -282,6 +282,18 @@ func toElements(e []message.IMessageElement, source message.Source) (r []cqcode.
|
|||||||
{K: "type", V: "sticker"},
|
{K: "type", V: "sticker"},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
case *LocalImageElement:
|
||||||
|
data := pairs{
|
||||||
|
{K: "file", V: o.File},
|
||||||
|
{K: "url", V: o.URL},
|
||||||
|
}
|
||||||
|
if o.Flash {
|
||||||
|
data = append(data, pair{K: "type", V: "flash"})
|
||||||
|
}
|
||||||
|
m = cqcode.Element{
|
||||||
|
Type: "image",
|
||||||
|
Data: data,
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user