(userID int64)
| 212 | } |
| 213 | |
| 214 | func (c *CandyClient) getUserInfoByID(userID int64) (*UserInfo, error) { |
| 215 | req := &meta.GateGetUserInfoRequest{Type: 1, UserID: userID} |
| 216 | resp, err := c.api.GetUserInfo(context.Background(), req) |
| 217 | if err != nil { |
| 218 | return nil, err |
| 219 | } |
| 220 | |
| 221 | userInfo := &UserInfo{ID: resp.ID, Name: resp.User, NickName: resp.NickName, Avatar: resp.Avatar} |
| 222 | return userInfo, resp.Header.Error() |
| 223 | } |
| 224 | |
| 225 | // Friend 添加好友 |
| 226 | func (c *CandyClient) Friend(userID int64, operate int32, msg string) error { |
no test coverage detected