fix(chat): 分销站点客服会话按归属租户可见
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package chat
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"testing"
|
||||
"time"
|
||||
@@ -49,8 +50,9 @@ func TestAdminConversationCountsUsesFreshSnapshot(t *testing.T) {
|
||||
ctx := tenancy.WithScope(t.Context(), tenancy.Scope{TenantID: 1})
|
||||
principal := Principal{Type: "admin", ID: admin.ID}
|
||||
cacheKey := repo.adminChatCountsCacheKey(ctx, principal, adminChatFilterMine, adminChatStageAll, "")
|
||||
_ = client.Del(context.Background(), cacheKey).Err()
|
||||
t.Cleanup(func() {
|
||||
_ = client.Del(t.Context(), cacheKey).Err()
|
||||
_ = client.Del(context.Background(), cacheKey).Err()
|
||||
})
|
||||
|
||||
first, err := repo.AdminConversationCounts(ctx, principal, adminChatFilterMine, adminChatStageAll, "")
|
||||
|
||||
Reference in New Issue
Block a user