remove cached public keys after deletion

This commit is contained in:
Hazelnoot 2024-10-14 14:40:54 -04:00
parent 55df1ad10f
commit 78a75171c2

View file

@ -176,9 +176,7 @@ export class ApDbResolverService implements OnApplicationShutdown {
public async refetchPublicKeyForApId(user: MiRemoteUser): Promise<MiUserPublickey | null> {
await this.apPersonService.updatePerson(user.uri);
const key = await this.userPublickeysRepository.findOneBy({ userId: user.id });
if (key != null) {
await this.publicKeyByUserIdCache.set(user.id, key);
}
this.publicKeyByUserIdCache.set(user.id, key);
return key;
}