mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-04 11:07:40 +08:00
update.
This commit is contained in:
parent
c603318431
commit
5ead51215a
@ -288,6 +288,7 @@ func parseMessageElems(elems []*msg.Elem) []message.IMessageElement {
|
||||
if elem.CustomFace != nil {
|
||||
res = append(res, &message.ImageElement{
|
||||
Filename: elem.CustomFace.FilePath,
|
||||
Size: elem.CustomFace.Size,
|
||||
Url: func() string {
|
||||
if elem.CustomFace.OrigUrl == "" {
|
||||
return "http://gchat.qpic.cn/gchatpic_new/0/0-0-" + strings.ReplaceAll(binary.CalculateImageResourceId(elem.CustomFace.Md5)[1:37], "-", "") + "/0?term=2"
|
||||
@ -306,6 +307,7 @@ func parseMessageElems(elems []*msg.Elem) []message.IMessageElement {
|
||||
}
|
||||
res = append(res, &message.ImageElement{
|
||||
Filename: elem.NotOnlineImage.FilePath,
|
||||
Size: elem.NotOnlineImage.FileLen,
|
||||
Url: img,
|
||||
Md5: elem.NotOnlineImage.PicMd5,
|
||||
})
|
||||
|
@ -11,6 +11,7 @@ type TextElement struct {
|
||||
|
||||
type ImageElement struct {
|
||||
Filename string
|
||||
Size int32
|
||||
Url string
|
||||
Md5 []byte
|
||||
Data []byte
|
||||
|
Loading…
x
Reference in New Issue
Block a user