From 0ec5327474d7bf6f16ad5219e928e510e899d517 Mon Sep 17 00:00:00 2001 From: xianon Date: Sat, 25 Feb 2023 04:27:37 +0900 Subject: [PATCH] =?UTF-8?q?=E6=9C=AA=E7=9F=A5=E3=81=AE=E3=83=A6=E3=83=BC?= =?UTF-8?q?=E3=82=B6=E3=83=BC=E3=81=8C=20deleteActor=20=E3=81=95=E3=82=8C?= =?UTF-8?q?=E3=81=9F=E3=82=89=E5=87=A6=E7=90=86=E3=82=92=E3=82=B9=E3=82=AD?= =?UTF-8?q?=E3=83=83=E3=83=97=E3=81=99=E3=82=8B=20(#10067)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/backend/src/core/activitypub/ApInboxService.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/core/activitypub/ApInboxService.ts b/packages/backend/src/core/activitypub/ApInboxService.ts index 21d2d16ed8..6d9569bce2 100644 --- a/packages/backend/src/core/activitypub/ApInboxService.ts +++ b/packages/backend/src/core/activitypub/ApInboxService.ts @@ -450,8 +450,10 @@ export class ApInboxService { return `skip: delete actor ${actor.uri} !== ${uri}`; } - const user = await this.usersRepository.findOneByOrFail({ id: actor.id }); - if (user.isDeleted) { + const user = await this.usersRepository.findOneBy({ id: actor.id }); + if (user == null) { + return 'skip: actor not found'; + } else if (user.isDeleted) { return 'skip: already deleted'; }