diff --git a/pkg/rpccache/online.go b/pkg/rpccache/online.go index 5072984b0..5bacd647d 100644 --- a/pkg/rpccache/online.go +++ b/pkg/rpccache/online.go @@ -64,10 +64,6 @@ type OnlineCache struct { local lru.LRU[string, []int32] } -func (o *OnlineCache) getUserOnlineKey(userID string) string { - return "" + userID -} - func (o *OnlineCache) GetUserOnlinePlatform(ctx context.Context, userID string) ([]int32, error) { return o.local.Get(userID, func() ([]int32, error) { return o.user.GetUserOnlinePlatform(ctx, userID) @@ -117,5 +113,5 @@ func (o *OnlineCache) GetGroupOnline(ctx context.Context, groupID string) ([]str } func (o *OnlineCache) setUserOnline(userID string, platformIDs []int32) bool { - return o.local.SetHas(o.getUserOnlineKey(userID), platformIDs) + return o.local.SetHas(userID, platformIDs) }