Skip to content

Commit

Permalink
fix: GetGroupMembersInfoFunc (#767)
Browse files Browse the repository at this point in the history
  • Loading branch information
icey-yu authored Nov 1, 2024
1 parent 6f8ab68 commit c858b54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/group/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func (g *Group) GetGroupMembersInfoFunc(ctx context.Context, groupID string, use
for _, userID := range userIDs {
key := g.buildGroupMemberKey(groupID, userID)
if member, ok := g.groupMemberCache.Load(key); ok {
res[key] = member
res[userID] = member
} else {
missingKeys = append(missingKeys, userIDs...)
}
Expand All @@ -36,7 +36,7 @@ func (g *Group) GetGroupMembersInfoFunc(ctx context.Context, groupID string, use

for i, data := range fetchData {
key := g.buildGroupMemberKey(groupID, data.UserID)
res[key] = fetchData[i]
res[data.UserID] = fetchData[i]
g.groupMemberCache.Store(key, fetchData[i])
}

Expand Down

0 comments on commit c858b54

Please sign in to comment.