mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2025-04-13 09:44:40 +00:00
render profile bios in masto API
This commit is contained in:
parent
81f7346f80
commit
36dee5ff20
1 changed files with 4 additions and 1 deletions
|
@ -168,6 +168,9 @@ export class MastodonConverters {
|
|||
acct = `${user.username}@${user.host}`;
|
||||
acctUrl = `https://${user.host}/@${user.username}`;
|
||||
}
|
||||
|
||||
const bioText = profile?.description && this.mfmService.toMastoApiHtml(mfm.parse(profile.description));
|
||||
|
||||
return awaitAll({
|
||||
id: account.id,
|
||||
username: user.username,
|
||||
|
@ -179,7 +182,7 @@ export class MastodonConverters {
|
|||
followers_count: profile?.followersVisibility === 'public' ? user.followersCount : 0,
|
||||
following_count: profile?.followingVisibility === 'public' ? user.followingCount : 0,
|
||||
statuses_count: user.notesCount,
|
||||
note: profile?.description ?? '',
|
||||
note: bioText ?? '',
|
||||
url: user.uri ?? acctUrl,
|
||||
uri: user.uri ?? acctUri,
|
||||
avatar: user.avatarUrl ?? 'https://dev.joinsharkey.org/static-assets/avatar.png',
|
||||
|
|
Loading…
Add table
Reference in a new issue