Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Commit

Permalink
upd: provide uri on accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
Marie authored Nov 25, 2023
1 parent 7ba8529 commit a5fccab
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/backend/src/server/api/mastodon/converters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ export class MastoConverters {
const fqn = `${user.username}@${user.host ?? this.config.hostname}`;
let acct = user.username;
let acctUrl = `https://${user.host || this.config.host}/@${user.username}`;
const acctUri = `https://${this.config.host}/@${user.id}`;
if (user.host) {
acct = `${user.username}@${user.host}`;
acctUrl = `https://${user.host}/@${user.username}`;
Expand All @@ -150,6 +151,7 @@ export class MastoConverters {
statuses_count: user.notesCount,
note: profile?.description ?? '',
url: user.uri ?? acctUrl,
uri: user.uri ?? acctUri,
avatar: user.avatarUrl ? user.avatarUrl : 'https://dev.joinsharkey.org/static-assets/avatar.png',
avatar_static: user.avatarUrl ? user.avatarUrl : 'https://dev.joinsharkey.org/static-assets/avatar.png',
header: user.bannerUrl ? user.bannerUrl : 'https://dev.joinsharkey.org/static-assets/transparent.png',
Expand Down

0 comments on commit a5fccab

Please sign in to comment.