GetCachedFriendInfo 获取好友信息(缓存)
(uin uint32)
| 59 | |
| 60 | // GetCachedFriendInfo 获取好友信息(缓存) |
| 61 | func (c *QQClient) GetCachedFriendInfo(uin uint32) *entity.User { |
| 62 | if c.cache.FriendCacheIsEmpty() { |
| 63 | if err := c.RefreshFriendCache(); err != nil { |
| 64 | return nil |
| 65 | } |
| 66 | } |
| 67 | if friend := c.cache.GetFriend(uin); friend != nil { |
| 68 | return friend |
| 69 | } |
| 70 | _ = c.RefreshFriendCache() |
| 71 | return c.cache.GetFriend(uin) |
| 72 | } |
| 73 | |
| 74 | // GetCachedAllFriendsInfo 获取所有好友信息(缓存) |
| 75 | func (c *QQClient) GetCachedAllFriendsInfo() map[uint32]*entity.User { |
no test coverage detected