upd: change handling of masto needed desc
This commit is contained in:
parent
c18c823c95
commit
8b55fc7917
|
@ -321,7 +321,7 @@ export class UserEntityService implements OnModuleInit {
|
||||||
.getMany() : [];
|
.getMany() : [];
|
||||||
const profile = opts.detail ? (opts.userProfile ?? await this.userProfilesRepository.findOneByOrFail({ userId: user.id })) : null;
|
const profile = opts.detail ? (opts.userProfile ?? await this.userProfilesRepository.findOneByOrFail({ userId: user.id })) : null;
|
||||||
|
|
||||||
const mastoapi = opts.userProfile ?? await this.userProfilesRepository.findOneByOrFail({ userId: user.id });
|
const mastoapi = !opts.detail ? opts.userProfile ?? await this.userProfilesRepository.findOneByOrFail({ userId: user.id }) : null;
|
||||||
|
|
||||||
const followingCount = profile == null ? null :
|
const followingCount = profile == null ? null :
|
||||||
(profile.ffVisibility === 'public') || isMe ? user.followingCount :
|
(profile.ffVisibility === 'public') || isMe ? user.followingCount :
|
||||||
|
@ -346,7 +346,7 @@ export class UserEntityService implements OnModuleInit {
|
||||||
host: user.host,
|
host: user.host,
|
||||||
avatarUrl: user.avatarUrl ?? this.getIdenticonUrl(user),
|
avatarUrl: user.avatarUrl ?? this.getIdenticonUrl(user),
|
||||||
avatarBlurhash: user.avatarBlurhash,
|
avatarBlurhash: user.avatarBlurhash,
|
||||||
description: mastoapi!.description,
|
description: mastoapi ? mastoapi.description : profile ? profile.description : '',
|
||||||
createdAt: user.createdAt.toISOString(),
|
createdAt: user.createdAt.toISOString(),
|
||||||
isBot: user.isBot ?? falsy,
|
isBot: user.isBot ?? falsy,
|
||||||
isCat: user.isCat ?? falsy,
|
isCat: user.isCat ?? falsy,
|
||||||
|
|
Loading…
Reference in New Issue