From 78a75171c2e0a7eb42e22bb34f8194e0bb31e163 Mon Sep 17 00:00:00 2001 From: Hazelnoot Date: Mon, 14 Oct 2024 14:40:54 -0400 Subject: [PATCH] remove cached public keys after deletion --- packages/backend/src/core/activitypub/ApDbResolverService.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/backend/src/core/activitypub/ApDbResolverService.ts b/packages/backend/src/core/activitypub/ApDbResolverService.ts index 2cb558dbff..12e58efdc2 100644 --- a/packages/backend/src/core/activitypub/ApDbResolverService.ts +++ b/packages/backend/src/core/activitypub/ApDbResolverService.ts @@ -176,9 +176,7 @@ export class ApDbResolverService implements OnApplicationShutdown { public async refetchPublicKeyForApId(user: MiRemoteUser): Promise { 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; }