From 25fcd04d9f2619036165cf6ab68f69e07f908b80 Mon Sep 17 00:00:00 2001 From: "P. Reis" Date: Sat, 6 Apr 2024 23:12:30 -0300 Subject: [PATCH] fix: deno fmt --- src/controllers/api/timelines.ts | 2 +- src/views/mastodon/statuses.ts | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/controllers/api/timelines.ts b/src/controllers/api/timelines.ts index 78a1fa9..a2c4367 100644 --- a/src/controllers/api/timelines.ts +++ b/src/controllers/api/timelines.ts @@ -58,7 +58,7 @@ async function renderStatuses(c: AppContext, filters: NostrFilter[]) { const statuses = await Promise.all(events.map((event) => { if (event.kind === 6) { - return renderReblog(event) + return renderReblog(event); } return renderStatus(event, c.get('pubkey')); })); diff --git a/src/views/mastodon/statuses.ts b/src/views/mastodon/statuses.ts index b4126e1..e01e955 100644 --- a/src/views/mastodon/statuses.ts +++ b/src/views/mastodon/statuses.ts @@ -101,12 +101,12 @@ async function renderStatus(event: DittoEvent, viewerPubkey?: string) { async function renderReblog(event: DittoEvent) { if (!event.author) return; - for (let i = 0; i < event.tags.length; i++) { - if (event.tags[i][0] === 'e') { - event.repost = await getEvent(event.tags[i][1], {kind:1}) - break - } - } + for (let i = 0; i < event.tags.length; i++) { + if (event.tags[i][0] === 'e') { + event.repost = await getEvent(event.tags[i][1], { kind: 1 }); + break; + } + } if (!event.repost) return; @@ -115,7 +115,7 @@ async function renderReblog(event: DittoEvent) { id: event.id, account: await renderAccount(event.author), reblogged: true, - reblog + reblog, }; }