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

Method RefreshFriendCache

client/cache.go:179–193  ·  view source on GitHub ↗

RefreshFriendCache 刷新好友缓存

()

Source from the content-addressed store, hash-verified

177
178// RefreshFriendCache 刷新好友缓存
179func (c *QQClient) RefreshFriendCache() error {
180 friends, err := c.GetFriendsData()
181 if err != nil {
182 return err
183 }
184 c.cache.RefreshAllFriend(friends)
185 unidirectionalFriends, err := c.GetUnidirectionalFriendList()
186 if err != nil {
187 return err
188 }
189 for _, f := range unidirectionalFriends {
190 c.cache.RefreshFriend(f)
191 }
192 return nil
193}
194
195// RefreshGroupMemberCache 刷新一个群的指定群成员缓存
196func (c *QQClient) RefreshGroupMemberCache(groupUin, memberUin uint32) error {

Callers 4

GetUIDMethod · 0.95
GetUinMethod · 0.95
GetCachedFriendInfoMethod · 0.95

Calls 4

GetFriendsDataMethod · 0.95
RefreshAllFriendMethod · 0.80
RefreshFriendMethod · 0.80

Tested by

no test coverage detected