From a5fccab128c84e61f4466cebccef406127dece82 Mon Sep 17 00:00:00 2001 From: Marie Date: Sat, 25 Nov 2023 20:59:21 +0100 Subject: [PATCH] upd: provide uri on accounts --- packages/backend/src/server/api/mastodon/converters.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/backend/src/server/api/mastodon/converters.ts b/packages/backend/src/server/api/mastodon/converters.ts index 8fc7dd001..ac211acc2 100644 --- a/packages/backend/src/server/api/mastodon/converters.ts +++ b/packages/backend/src/server/api/mastodon/converters.ts @@ -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}`; @@ -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',