From 8e46204d91d56bfbb0e697acaacddc119283a186 Mon Sep 17 00:00:00 2001 From: okayurisotto Date: Mon, 3 Jul 2023 20:26:43 +0900 Subject: [PATCH] cleanup(`ApPersonService.ts`) --- .../src/core/activitypub/models/ApPersonService.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/packages/backend/src/core/activitypub/models/ApPersonService.ts b/packages/backend/src/core/activitypub/models/ApPersonService.ts index 8b5d19371d..f6c0a6fe1d 100644 --- a/packages/backend/src/core/activitypub/models/ApPersonService.ts +++ b/packages/backend/src/core/activitypub/models/ApPersonService.ts @@ -401,16 +401,11 @@ export class ApPersonService implements OnModuleInit { if (typeof uri !== 'string') throw new Error('uri is not string'); // URIがこのサーバーを指しているならスキップ - if (uri.startsWith(`${this.config.url}/`)) { - return; - } + if (uri.startsWith(`${this.config.url}/`)) return; //#region このサーバーに既に登録されているか const exist = await this.usersRepository.findOneBy({ uri }) as RemoteUser | null; - - if (exist === null) { - return; - } + if (exist === null) return; //#endregion // eslint-disable-next-line no-param-reassign