summaryrefslogtreecommitdiff
path: root/packages/backend/src/core/entities
diff options
context:
space:
mode:
authorHazelnoot <acomputerdog@gmail.com>2025-04-24 14:23:45 -0400
committerHazelnoot <acomputerdog@gmail.com>2025-04-24 14:23:45 -0400
commita4dd19fdd427a5adc8fa80871d1c742aa9708730 (patch)
tree3983a0e772922042043026b4af168e8dd3525fb2 /packages/backend/src/core/entities
parentMerge branch 'develop' into merge/2025-03-24 (diff)
parentenhance(backend): DB note (userId) インデクス -> (userId, id) 複合イ... (diff)
downloadsharkey-a4dd19fdd427a5adc8fa80871d1c742aa9708730.tar.gz
sharkey-a4dd19fdd427a5adc8fa80871d1c742aa9708730.tar.bz2
sharkey-a4dd19fdd427a5adc8fa80871d1c742aa9708730.zip
merge upstream again
Diffstat (limited to 'packages/backend/src/core/entities')
-rw-r--r--packages/backend/src/core/entities/UserEntityService.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/backend/src/core/entities/UserEntityService.ts b/packages/backend/src/core/entities/UserEntityService.ts
index d11042d73b..16425bb6ce 100644
--- a/packages/backend/src/core/entities/UserEntityService.ts
+++ b/packages/backend/src/core/entities/UserEntityService.ts
@@ -584,8 +584,8 @@ export class UserEntityService implements OnModuleInit {
name: user.name,
username: user.username,
host: user.host,
- avatarUrl: user.avatarUrl ?? this.getIdenticonUrl(user),
- avatarBlurhash: user.avatarBlurhash,
+ avatarUrl: (user.avatarId == null ? null : user.avatarUrl) ?? this.getIdenticonUrl(user),
+ avatarBlurhash: (user.avatarId == null ? null : user.avatarBlurhash),
description: mastoapi ? mastoapi.description : profile ? profile.description : '',
createdAt: this.idService.parse(user.id).date.toISOString(),
avatarDecorations: user.avatarDecorations.length > 0 ? this.avatarDecorationService.getAll().then(decorations => user.avatarDecorations.filter(ud => decorations.some(d => d.id === ud.id)).map(ud => ({
@@ -643,10 +643,10 @@ export class UserEntityService implements OnModuleInit {
: null,
updatedAt: user.updatedAt ? user.updatedAt.toISOString() : null,
lastFetchedAt: user.lastFetchedAt ? user.lastFetchedAt.toISOString() : null,
- bannerUrl: user.bannerUrl,
- bannerBlurhash: user.bannerBlurhash,
- backgroundUrl: user.backgroundUrl,
- backgroundBlurhash: user.backgroundBlurhash,
+ bannerUrl: user.bannerId == null ? null : user.bannerUrl,
+ bannerBlurhash: user.bannerId == null ? null : user.bannerBlurhash,
+ backgroundUrl: user.backgroundUrl == null ? null : user.backgroundUrl,
+ backgroundBlurhash: user.backgroundBlurhash == null ? null : user.backgroundBlurhash,
isLocked: user.isLocked,
isSuspended: user.isSuspended,
location: profile!.location,