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

Method SetAvatar

client/operation.go:1273–1279  ·  view source on GitHub ↗

SetAvatar 设置头像

(avatar io.ReadSeeker)

Source from the content-addressed store, hash-verified

1271
1272// SetAvatar 设置头像
1273func (c *QQClient) SetAvatar(avatar io.ReadSeeker) error {
1274 if avatar == nil {
1275 return errors.New("avatar is nil")
1276 }
1277 md5, size := crypto.ComputeMd5AndLength(avatar)
1278 return c.highwayUpload(90, avatar, uint64(size), md5, nil)
1279}
1280
1281// SetGroupAvatar 设置群头像
1282func (c *QQClient) SetGroupAvatar(groupUin uint32, avatar io.ReadSeeker) error {

Callers

nothing calls this directly

Calls 2

highwayUploadMethod · 0.95
ComputeMd5AndLengthFunction · 0.92

Tested by

no test coverage detected