mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-04 11:07:40 +08:00
fix private image size
This commit is contained in:
parent
758c7b8efa
commit
7c68459666
@ -227,6 +227,7 @@ func (c *QQClient) QueryFriendImage(target int64, hash []byte, size int32) (*mes
|
||||
return &message.FriendImageElement{
|
||||
ImageId: rsp.ResourceId,
|
||||
Md5: hash,
|
||||
Size: size,
|
||||
Url: "https://c2cpicdw.qpic.cn/offpic_new/0/" + rsp.ResourceId + "/0?term=2",
|
||||
}, errors.WithStack(ErrNotExists)
|
||||
}
|
||||
@ -234,6 +235,9 @@ func (c *QQClient) QueryFriendImage(target int64, hash []byte, size int32) (*mes
|
||||
ImageId: rsp.ResourceId,
|
||||
Md5: hash,
|
||||
Url: "https://c2cpicdw.qpic.cn/offpic_new/0/" + rsp.ResourceId + "/0?term=2",
|
||||
Size: size,
|
||||
Height: rsp.Height,
|
||||
Width: rsp.Width,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
@ -29,6 +29,8 @@ type FriendImageElement struct {
|
||||
ImageId string
|
||||
Md5 []byte
|
||||
Size int32
|
||||
Width int32
|
||||
Height int32
|
||||
Url string
|
||||
|
||||
Flash bool
|
||||
@ -151,6 +153,8 @@ func (e *FriendImageElement) Pack() []*msg.Elem {
|
||||
ResId: proto.Some(e.ImageId),
|
||||
OldPicMd5: proto.Some(false),
|
||||
PicMd5: e.Md5,
|
||||
PicHeight: proto.Some(e.Height),
|
||||
PicWidth: proto.Some(e.Width),
|
||||
DownloadPath: proto.Some(e.ImageId),
|
||||
Original: proto.Int32(1),
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user