QueryGroupImage 获取群图片
(md5 []byte, fileUUID string)
| 544 | |
| 545 | // QueryGroupImage 获取群图片 |
| 546 | func (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 获取私聊图片 |
| 563 | func (c *QQClient) QueryFriendImage(md5 []byte, fileUUID string) (*message2.ImageElement, error) { |
nothing calls this directly
no test coverage detected