From fc50dc7a67b0ddb996dca0f3c5cd687257152022 Mon Sep 17 00:00:00 2001 From: tamaina Date: Wed, 19 Jul 2023 06:43:09 +0000 Subject: [PATCH] move comment --- .../backend/src/core/activitypub/models/ApPersonService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/core/activitypub/models/ApPersonService.ts b/packages/backend/src/core/activitypub/models/ApPersonService.ts index 22ef0b139..aa3580599 100644 --- a/packages/backend/src/core/activitypub/models/ApPersonService.ts +++ b/packages/backend/src/core/activitypub/models/ApPersonService.ts @@ -270,8 +270,8 @@ export class ApPersonService implements OnModuleInit { emojis: [], }; + //#region アバターとヘッダー画像をフェッチ try { - //#region アバターとヘッダー画像をフェッチ const [avatar, banner] = await Promise.all([person.icon, person.image].map(img => { if (img == null) return null; if (user == null) throw new Error('failed to create user: user is null'); @@ -284,10 +284,10 @@ export class ApPersonService implements OnModuleInit { userAdditionalInfo.bannerUrl = banner ? this.driveFileEntityService.getPublicUrl(banner) : null; userAdditionalInfo.avatarBlurhash = avatar?.blurhash ?? null; userAdditionalInfo.bannerBlurhash = banner?.blurhash ?? null; - //#endregion } catch (err) { this.logger.error('error occured while fetching user avatar/banner', { stack: err }); } + //#endregion //#region カスタム絵文字取得 userAdditionalInfo.emojis = await this.apNoteService.extractEmojis(person.tag ?? [], host)