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

Method UploadRecord

client/richmedia.go:43–51  ·  view source on GitHub ↗
(target message.Source, voice *message.VoiceElement)

Source from the content-addressed store, hash-verified

41}
42
43func (c *QQClient) UploadRecord(target message.Source, voice *message.VoiceElement) (*message.VoiceElement, error) {
44 switch target.SourceType {
45 case message.SourceGroup:
46 return c.UploadGroupRecord(uint32(target.PrimaryID), voice)
47 case message.SourcePrivate:
48 return c.UploadPrivateRecord(c.GetUID(uint32(target.PrimaryID)), voice)
49 }
50 return nil, errors.New("unknown target type")
51}
52func (c *QQClient) UploadShortVideo(target message.Source, video *message.ShortVideoElement) (*message.ShortVideoElement, error) {
53 switch target.SourceType {
54 case message.SourceGroup:

Callers

nothing calls this directly

Calls 3

UploadGroupRecordMethod · 0.95
UploadPrivateRecordMethod · 0.95
GetUIDMethod · 0.95

Tested by

no test coverage detected