Fix renderReblog on other Mastodon apps
This commit is contained in:
parent
3f9908449b
commit
875b678948
|
@ -131,18 +131,13 @@ async function renderStatus(event: DittoEvent, opts: RenderStatusOpts): Promise<
|
||||||
|
|
||||||
async function renderReblog(event: DittoEvent, opts: RenderStatusOpts) {
|
async function renderReblog(event: DittoEvent, opts: RenderStatusOpts) {
|
||||||
const { viewerPubkey } = opts;
|
const { viewerPubkey } = opts;
|
||||||
|
|
||||||
const repostId = event.tags.find(([name]) => name === 'e')?.[1];
|
|
||||||
if (!repostId) return;
|
|
||||||
|
|
||||||
if (!event.repost) return;
|
if (!event.repost) return;
|
||||||
|
|
||||||
|
const status = await renderStatus(event, {}); // omit viewerPubkey intentionally
|
||||||
const reblog = await renderStatus(event.repost, { viewerPubkey });
|
const reblog = await renderStatus(event.repost, { viewerPubkey });
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id: event.id,
|
...status,
|
||||||
account: event.author ? await renderAccount(event.author) : await accountFromPubkey(event.pubkey),
|
|
||||||
reblogged: true,
|
|
||||||
reblog,
|
reblog,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue