mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-04 09:05:59 +08:00
fix: redis save error when KickTokens (#3002)
This commit is contained in:
@@ -56,7 +56,7 @@ func (a *authDatabase) SetTokenMapByUidPid(ctx context.Context, userID string, p
|
||||
}
|
||||
|
||||
func (a *authDatabase) BatchSetTokenMapByUidPid(ctx context.Context, tokens []string) error {
|
||||
setMap := make(map[string]map[string]int)
|
||||
setMap := make(map[string]map[string]any)
|
||||
for _, token := range tokens {
|
||||
claims, err := tokenverify.GetClaimFromToken(token, authverify.Secret(a.accessSecret))
|
||||
key := cachekey.GetTokenKey(claims.UserID, claims.PlatformID)
|
||||
@@ -66,7 +66,7 @@ func (a *authDatabase) BatchSetTokenMapByUidPid(ctx context.Context, tokens []st
|
||||
if v, ok := setMap[key]; ok {
|
||||
v[token] = constant.KickedToken
|
||||
} else {
|
||||
setMap[key] = map[string]int{
|
||||
setMap[key] = map[string]any{
|
||||
token: constant.KickedToken,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user