Skip to content

Commit

Permalink
small rename
Browse files Browse the repository at this point in the history
  • Loading branch information
julianjelfs committed Aug 5, 2024
1 parent f827e7a commit 1f5aabc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ import { apiOptional, apiToken } from "../common/chatMappers";
import type { AgentConfig } from "../../config";
import {
getCachedUsers,
getDeletedUserIds,
getCachedDeletedUserIds,
getSuspendedUsersSyncedUpTo,
setCachedDeletedUserIds,
setCachedUsers,
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion frontend/openchat-agent/src/utils/userCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ async function getDeletedUserIdsList(): Promise<string[]> {
return (await lazyOpenUserCache()).getAll("deletedUserIds");
}

export async function getDeletedUserIds(): Promise<Set<string>> {
export async function getCachedDeletedUserIds(): Promise<Set<string>> {
return getDeletedUserIdsList().then((list) => new Set(list));
}

Expand Down

0 comments on commit 1f5aabc

Please sign in to comment.