Skip to content

Commit

Permalink
improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
pierre-lehnen-rc committed Oct 17, 2024
1 parent 8ce7c6d commit 503cfc9
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 @@ -62,7 +62,7 @@ export class ConverterCache {
this.addUser(userData.importIds[0], userData._id, userData.username);
}

addUserNameToId(username: string, id: string): void {
addUsernameToId(username: string, id: string): void {
this._userNameToIdCache.set(username, id);
}

Expand Down Expand Up @@ -215,7 +215,7 @@ export class ConverterCache {
}

const user = await Users.findOneByUsername(username, { projection: { _id: 1 } });
this._userNameToIdCache.set(username, user?._id);
this.addUsernameToId(username, user?._id);

return user?._id;
}
Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/app/livechat/server/lib/Contacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ export async function createContact(params: CreateContactParams, upsertId?: ILiv
channels,
customFields,
unknown,
importIds,
...(importIds?.length ? { importIds } : {}),
} as const;

// Use upsert when doing auto-migration so that if there's multiple requests processing at the same time, they won't interfere with each other
Expand Down

0 comments on commit 503cfc9

Please sign in to comment.