remove cached public keys after deletion

This commit is contained in:
Hazelnoot 2024-10-14 14:40:54 -04:00
parent 55df1ad10f
commit 78a75171c2
1 changed files with 1 additions and 3 deletions

View File

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