1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-05-04 19:17:38 +08:00

fix: c2c image url error

This commit is contained in:
Mrs4s 2021-10-20 22:55:01 +08:00
parent a0b4b2a4e0
commit 0ef4c01861
No known key found for this signature in database
GPG Key ID: 3186E98FA19CE3A7

View File

@ -472,7 +472,15 @@ func ParseMessageElems(elems []*msg.Elem) []IMessageElement {
if elem.NotOnlineImage.GetOrigUrl() != "" { if elem.NotOnlineImage.GetOrigUrl() != "" {
img = "https://c2cpicdw.qpic.cn" + elem.NotOnlineImage.GetOrigUrl() img = "https://c2cpicdw.qpic.cn" + elem.NotOnlineImage.GetOrigUrl()
} else { } else {
img = "https://c2cpicdw.qpic.cn/offpic_new/0/" + elem.NotOnlineImage.GetResId() + "/0?term=2" img = "https://c2cpicdw.qpic.cn/offpic_new/0"
downloadPath := elem.NotOnlineImage.GetResId()
if elem.NotOnlineImage.GetDownloadPath() != "" {
downloadPath = elem.NotOnlineImage.GetDownloadPath()
}
if !strings.HasPrefix(downloadPath, "/") {
img += "/"
}
img += downloadPath + "/0?term=3"
} }
res = append(res, &FriendImageElement{ res = append(res, &FriendImageElement{
ImageId: elem.NotOnlineImage.GetFilePath(), ImageId: elem.NotOnlineImage.GetFilePath(),