From b1ecaecf409c101f50c984100e1eea550385af9d Mon Sep 17 00:00:00 2001 From: okayurisotto Date: Sun, 2 Jul 2023 18:34:52 +0900 Subject: [PATCH] =?UTF-8?q?WIP(`ApPersonService.ts`):=20`as=20any`?= =?UTF-8?q?=E3=82=92=E3=81=AA=E3=81=8F=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit エラーをスローするようにせざるを得なかったのでエラーメッセージを考える必要がある。 --- .../backend/src/core/activitypub/models/ApPersonService.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/core/activitypub/models/ApPersonService.ts b/packages/backend/src/core/activitypub/models/ApPersonService.ts index 533e9d4999..f366364bfd 100644 --- a/packages/backend/src/core/activitypub/models/ApPersonService.ts +++ b/packages/backend/src/core/activitypub/models/ApPersonService.ts @@ -233,7 +233,8 @@ export class ApPersonService implements OnModuleInit { // eslint-disable-next-line no-param-reassign if (resolver == null) resolver = this.apResolverService.createResolver(); - const object = await resolver.resolve(uri) as any; + const object = await resolver.resolve(uri); + if (object.id == null) throw new Error(''); // TODO const person = this.validateActor(object, uri);