From 1f7a4664ecf3d30fc5e3f5891ac311b0dbc3656b Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Mon, 8 Apr 2024 15:49:35 +0000 Subject: [PATCH] Apply 2 suggestion(s) to 2 file(s) --- src/controllers/api/statuses.ts | 4 +--- src/controllers/api/streaming.ts | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/controllers/api/statuses.ts b/src/controllers/api/statuses.ts index be8dbd94..91c10922 100644 --- a/src/controllers/api/statuses.ts +++ b/src/controllers/api/statuses.ts @@ -185,11 +185,9 @@ const reblogStatusController: AppController = async (c) => { return c.json({ error: 'Event not found.' }, 404); } - const tags: string[][] = [['e', event.id], ['p', event.pubkey]]; - const reblogEvent = await createEvent({ kind: 6, - tags, + tags: [['e', event.id], ['p', event.pubkey]], }, c); const status = await renderReblog(reblogEvent); diff --git a/src/controllers/api/streaming.ts b/src/controllers/api/streaming.ts index 05eaf205..2ad9eda5 100644 --- a/src/controllers/api/streaming.ts +++ b/src/controllers/api/streaming.ts @@ -63,7 +63,7 @@ const streamingController: AppController = (c) => { if (filter) { for await (const event of Sub.sub(socket, '1', [filter])) { - if (event.kind == 6) { + if (event.kind === 6) { const status = await renderReblog(event); if (status) { send('update', status);