diff --git a/message/elements.go b/message/elements.go index 9d040e59..a6466e0a 100644 --- a/message/elements.go +++ b/message/elements.go @@ -2,6 +2,7 @@ package message import ( "fmt" + "github.com/Mrs4s/MiraiGo/binary" "github.com/Mrs4s/MiraiGo/client/pb/msg" "strconv" "strings" @@ -132,7 +133,7 @@ func NewGroupImage(id string, md5 []byte, fid int64, size, width, height int32) Size: size, Width: width, Height: height, - Url: "http://gchat.qpic.cn/gchatpic_new/1/0-0-" + strings.ReplaceAll(id[1:36], "-", "") + "/0?term=2", + Url: "http://gchat.qpic.cn/gchatpic_new/1/0-0-" + strings.ReplaceAll(binary.CalculateImageResourceId(md5)[1:37], "-", "") + "/0?term=2", } }