mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-26 08:13:09 +02:00
move comment
This commit is contained in:
parent
05042a0697
commit
fc50dc7a67
1 changed files with 2 additions and 2 deletions
|
@ -270,8 +270,8 @@ export class ApPersonService implements OnModuleInit {
|
||||||
emojis: [],
|
emojis: [],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//#region アバターとヘッダー画像をフェッチ
|
||||||
try {
|
try {
|
||||||
//#region アバターとヘッダー画像をフェッチ
|
|
||||||
const [avatar, banner] = await Promise.all([person.icon, person.image].map(img => {
|
const [avatar, banner] = await Promise.all([person.icon, person.image].map(img => {
|
||||||
if (img == null) return null;
|
if (img == null) return null;
|
||||||
if (user == null) throw new Error('failed to create user: user is 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.bannerUrl = banner ? this.driveFileEntityService.getPublicUrl(banner) : null;
|
||||||
userAdditionalInfo.avatarBlurhash = avatar?.blurhash ?? null;
|
userAdditionalInfo.avatarBlurhash = avatar?.blurhash ?? null;
|
||||||
userAdditionalInfo.bannerBlurhash = banner?.blurhash ?? null;
|
userAdditionalInfo.bannerBlurhash = banner?.blurhash ?? null;
|
||||||
//#endregion
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.logger.error('error occured while fetching user avatar/banner', { stack: err });
|
this.logger.error('error occured while fetching user avatar/banner', { stack: err });
|
||||||
}
|
}
|
||||||
|
//#endregion
|
||||||
|
|
||||||
//#region カスタム絵文字取得
|
//#region カスタム絵文字取得
|
||||||
userAdditionalInfo.emojis = await this.apNoteService.extractEmojis(person.tag ?? [], host)
|
userAdditionalInfo.emojis = await this.apNoteService.extractEmojis(person.tag ?? [], host)
|
||||||
|
|
Loading…
Reference in a new issue