(target message.Source, image *message.ImageElement)
| 31 | } |
| 32 | |
| 33 | func (c *QQClient) UploadImage(target message.Source, image *message.ImageElement) (*message.ImageElement, error) { |
| 34 | switch target.SourceType { |
| 35 | case message.SourceGroup: |
| 36 | return c.UploadGroupImage(uint32(target.PrimaryID), image) |
| 37 | case message.SourcePrivate: |
| 38 | return c.UploadPrivateImage(c.GetUID(uint32(target.PrimaryID)), image) |
| 39 | } |
| 40 | return nil, errors.New("unknown target type") |
| 41 | } |
| 42 | |
| 43 | func (c *QQClient) UploadRecord(target message.Source, voice *message.VoiceElement) (*message.VoiceElement, error) { |
| 44 | switch target.SourceType { |
nothing calls this directly
no test coverage detected