MCPcopy Create free account
hub / github.com/LagrangeDev/LagrangeGo / QueryGroupImage

Method QueryGroupImage

client/operation.go:546–560  ·  view source on GitHub ↗

QueryGroupImage 获取群图片

(md5 []byte, fileUUID string)

Source from the content-addressed store, hash-verified

544
545// QueryGroupImage 获取群图片
546func (c *QQClient) QueryGroupImage(md5 []byte, fileUUID string) (*message2.ImageElement, error) {
547 switch {
548 case fileUUID != "":
549 rkeyInfo := c.GetCachedRkeyInfo(entity.GroupRKey)
550 return &message2.ImageElement{
551 URL: fmt.Sprintf("https://multimedia.nt.qq.com.cn/download?appid=1407&fileid=%s&rkey=%s", fileUUID, rkeyInfo.RKey),
552 }, nil
553 case len(md5) == 16:
554 return &message2.ImageElement{
555 URL: fmt.Sprintf("http://gchat.qpic.cn/gchatpic_new/0/0-0-%X/0", md5),
556 }, nil
557 default:
558 return nil, errors.New("invalid parameters")
559 }
560}
561
562// QueryFriendImage 获取私聊图片
563func (c *QQClient) QueryFriendImage(md5 []byte, fileUUID string) (*message2.ImageElement, error) {

Callers

nothing calls this directly

Calls 1

GetCachedRkeyInfoMethod · 0.95

Tested by

no test coverage detected