From 1f5aabc339f20b499eb169010008ad49ca567eaa Mon Sep 17 00:00:00 2001 From: Julian Jelfs Date: Mon, 5 Aug 2024 08:28:37 +0100 Subject: [PATCH] small rename --- .../openchat-agent/src/services/userIndex/userIndex.client.ts | 4 ++-- frontend/openchat-agent/src/utils/userCache.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/openchat-agent/src/services/userIndex/userIndex.client.ts b/frontend/openchat-agent/src/services/userIndex/userIndex.client.ts index 193e873d47..2db6372a64 100644 --- a/frontend/openchat-agent/src/services/userIndex/userIndex.client.ts +++ b/frontend/openchat-agent/src/services/userIndex/userIndex.client.ts @@ -52,7 +52,7 @@ import { apiOptional, apiToken } from "../common/chatMappers"; import type { AgentConfig } from "../../config"; import { getCachedUsers, - getDeletedUserIds, + getCachedDeletedUserIds, getSuspendedUsersSyncedUpTo, setCachedDeletedUserIds, setCachedUsers, @@ -146,7 +146,7 @@ export class UserIndexClient extends CandidService { const allUsers = users.userGroups.flatMap((g) => g.users); const fromCache = await getCachedUsers(allUsers); - const deletedUserIds = await getDeletedUserIds(); + const deletedUserIds = await getCachedDeletedUserIds(); const suspendedUsersSyncedTo = await getSuspendedUsersSyncedUpTo(); // We throw away all of the updatedSince values passed in and instead use the values from the cache, this diff --git a/frontend/openchat-agent/src/utils/userCache.ts b/frontend/openchat-agent/src/utils/userCache.ts index f68adfc3ee..97ceffde02 100644 --- a/frontend/openchat-agent/src/utils/userCache.ts +++ b/frontend/openchat-agent/src/utils/userCache.ts @@ -71,7 +71,7 @@ async function getDeletedUserIdsList(): Promise { return (await lazyOpenUserCache()).getAll("deletedUserIds"); } -export async function getDeletedUserIds(): Promise> { +export async function getCachedDeletedUserIds(): Promise> { return getDeletedUserIdsList().then((list) => new Set(list)); }