diff --git a/packages/backend/src/server/api/mastodon/endpoints/account.ts b/packages/backend/src/server/api/mastodon/endpoints/account.ts index 36b49c900c..0e93583533 100644 --- a/packages/backend/src/server/api/mastodon/endpoints/account.ts +++ b/packages/backend/src/server/api/mastodon/endpoints/account.ts @@ -107,6 +107,7 @@ export class ApiAccountMastodon { const data = await this.client.getAccountStatuses( convertId((this.request.params as any).id, IdType.SharkeyId), convertTimelinesArgsId(argsToBools(limitToInt(this.request.query as any))), + this.BASE_URL, ); return data.data.map((status) => convertStatus(status)); } catch (e: any) { diff --git a/packages/megalodon/src/megalodon.ts b/packages/megalodon/src/megalodon.ts index 7550438c56..57ed58c3d2 100644 --- a/packages/megalodon/src/megalodon.ts +++ b/packages/megalodon/src/megalodon.ts @@ -182,7 +182,8 @@ export interface MegalodonInterface { exclude_replies?: boolean exclude_reblogs?: boolean only_media?: boolean - } + }, + host?: string ): Promise>> /** * Favourites timeline of any user. diff --git a/packages/megalodon/src/misskey.ts b/packages/megalodon/src/misskey.ts index 2891b2cd04..b40ad9a43e 100644 --- a/packages/megalodon/src/misskey.ts +++ b/packages/megalodon/src/misskey.ts @@ -291,7 +291,8 @@ export default class Misskey implements MegalodonInterface { exclude_replies: boolean exclude_reblogs: boolean only_media?: boolean - } + }, + host?: string ): Promise>> { if (options && options.pinned) { return this.client @@ -300,7 +301,7 @@ export default class Misskey implements MegalodonInterface { }) .then(res => { if (res.data.pinnedNotes) { - return { ...res, data: res.data.pinnedNotes.map(n => MisskeyAPI.Converter.note(n)) } + return { ...res, data: res.data.pinnedNotes.map(n => MisskeyAPI.Converter.note(n, host)) } } return { ...res, data: [] } }) @@ -342,7 +343,7 @@ export default class Misskey implements MegalodonInterface { } } return this.client.post>('/api/users/notes', params).then(res => { - const statuses: Array = res.data.map(note => MisskeyAPI.Converter.note(note)) + const statuses: Array = res.data.map(note => MisskeyAPI.Converter.note(note, host)) return Object.assign(res, { data: statuses })