From eb0607ec8b4cad5df2fd9caaa955869e1cca9974 Mon Sep 17 00:00:00 2001 From: okayurisotto Date: Mon, 3 Jul 2023 20:24:34 +0900 Subject: [PATCH] =?UTF-8?q?cleanup(`ApPersonService.ts`):=20=E4=B8=8D?= =?UTF-8?q?=E5=BF=85=E8=A6=81=E3=81=AA=E4=B8=89=E9=A0=85=E6=BC=94=E7=AE=97?= =?UTF-8?q?=E5=AD=90=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/core/activitypub/models/ApPersonService.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/backend/src/core/activitypub/models/ApPersonService.ts b/packages/backend/src/core/activitypub/models/ApPersonService.ts index ad72dbba55..e21dd0eac7 100644 --- a/packages/backend/src/core/activitypub/models/ApPersonService.ts +++ b/packages/backend/src/core/activitypub/models/ApPersonService.ts @@ -347,12 +347,12 @@ export class ApPersonService implements OnModuleInit { return this.apImageService.resolveImage(user, img).catch(() => null); })); - const avatarId = avatar ? avatar.id : null; - const bannerId = banner ? banner.id : null; + const avatarId = avatar?.id ?? null; + const bannerId = banner?.id ?? null; const avatarUrl = avatar ? this.driveFileEntityService.getPublicUrl(avatar, 'avatar') : null; const bannerUrl = banner ? this.driveFileEntityService.getPublicUrl(banner) : null; - const avatarBlurhash = avatar ? avatar.blurhash : null; - const bannerBlurhash = banner ? banner.blurhash : null; + const avatarBlurhash = avatar?.blurhash ?? null; + const bannerBlurhash = banner?.blurhash ?? null; await this.usersRepository.update(user.id, { avatarId,