1
0

fix: emojis not being populated for local users

This commit is contained in:
Mar0xy
2023-09-26 13:25:55 +02:00
parent d0af17c674
commit 7481ece433
3 changed files with 15 additions and 3 deletions
@@ -339,6 +339,8 @@ export class UserEntityService implements OnModuleInit {
const falsy = opts.detail ? false : undefined;
const checkHost = user.host == null ? this.config.host : user.host;
const packed = {
id: user.id,
name: user.name,
@@ -361,7 +363,7 @@ export class UserEntityService implements OnModuleInit {
followersCount: followersCount ?? 0,
followingCount: followingCount ?? 0,
notesCount: user.notesCount,
emojis: this.customEmojiService.populateEmojis(user.emojis, user.host),
emojis: this.customEmojiService.populateEmojis(user.emojis, checkHost),
onlineStatus: this.getOnlineStatus(user),
// パフォーマンス上の理由でローカルユーザーのみ
badgeRoles: user.host == null ? this.roleService.getUserBadgeRoles(user.id).then(rs => rs.sort((a, b) => b.displayOrder - a.displayOrder).map(r => ({