diff --git a/packages/backend/src/server/api/mastodon/MastodonApiServerService.ts b/packages/backend/src/server/api/mastodon/MastodonApiServerService.ts index 128cb3491a..cd0fe2433d 100644 --- a/packages/backend/src/server/api/mastodon/MastodonApiServerService.ts +++ b/packages/backend/src/server/api/mastodon/MastodonApiServerService.ts @@ -93,7 +93,7 @@ export class MastodonApiServerService { }, order: { id: 'ASC' }, }); - const contact = admin == null ? null : convertAccount((await client.getAccount(admin.id)).data); + const contact = admin == null ? null : convertAccount((await client.getAccount(admin.id, BASE_URL)).data); reply.send(await getInstance(data.data, contact, this.config, await this.metaService.fetch())); } catch (e: any) { /* console.error(e); */ diff --git a/packages/megalodon/src/megalodon.ts b/packages/megalodon/src/megalodon.ts index 57ed58c3d2..d75d13cf22 100644 --- a/packages/megalodon/src/megalodon.ts +++ b/packages/megalodon/src/megalodon.ts @@ -156,7 +156,7 @@ export interface MegalodonInterface { * @param id The account ID. * @return An account. */ - getAccount(id: string): Promise> + getAccount(id: string, host?: string): Promise> /** * Statuses posted to the given account. * diff --git a/packages/megalodon/src/misskey.ts b/packages/megalodon/src/misskey.ts index b40ad9a43e..0d513651b1 100644 --- a/packages/megalodon/src/misskey.ts +++ b/packages/megalodon/src/misskey.ts @@ -266,14 +266,14 @@ export default class Misskey implements MegalodonInterface { /** * POST /api/users/show */ - public async getAccount(id: string): Promise> { + public async getAccount(id: string, host?: string): Promise> { return this.client .post('/api/users/show', { userId: id }) .then(res => { return Object.assign(res, { - data: MisskeyAPI.Converter.userDetail(res.data) + data: MisskeyAPI.Converter.userDetail(res.data, host) }) }) }