mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
fix(renderReblog): render account from pubkey if there is no kind 0
This commit is contained in:
parent
5aacbe7af5
commit
2aee2e6bf6
1 changed files with 1 additions and 3 deletions
|
|
@ -123,8 +123,6 @@ 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;
|
||||||
|
|
||||||
if (!event.author) return;
|
|
||||||
|
|
||||||
const repostId = event.tags.find(([name]) => name === 'e')?.[1];
|
const repostId = event.tags.find(([name]) => name === 'e')?.[1];
|
||||||
if (!repostId) return;
|
if (!repostId) return;
|
||||||
|
|
||||||
|
|
@ -134,7 +132,7 @@ async function renderReblog(event: DittoEvent, opts: RenderStatusOpts) {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id: event.id,
|
id: event.id,
|
||||||
account: await renderAccount(event.author),
|
account: event.author ? await renderAccount(event.author) : await accountFromPubkey(event.pubkey),
|
||||||
reblogged: true,
|
reblogged: true,
|
||||||
reblog,
|
reblog,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue