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; }