From b4186f190a53df82c8e26be5280910dc9eef66e6 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Mon, 22 Apr 2024 11:12:08 +0100 Subject: [PATCH] fix: hide amethyst drafts the amethyst nostr client has started producing encrypted drafts, which are spaming issue and proposal threads --- src/lib/stores/Issue.ts | 2 ++ src/lib/stores/Proposal.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/lib/stores/Issue.ts b/src/lib/stores/Issue.ts index 7c00325..8f45d6e 100644 --- a/src/lib/stores/Issue.ts +++ b/src/lib/stores/Issue.ts @@ -129,6 +129,8 @@ export const ensureIssueFull = (repo_identifier: string, issue_id: string) => { ) const process_replies = (event: NDKEvent) => { + const amethyst_draft_kind = 31234 + if (event.kind && event.kind === amethyst_draft_kind) return if ( event.kind && proposal_status_kinds.includes(event.kind) && diff --git a/src/lib/stores/Proposal.ts b/src/lib/stores/Proposal.ts index f5f82f0..c92d5f7 100644 --- a/src/lib/stores/Proposal.ts +++ b/src/lib/stores/Proposal.ts @@ -162,6 +162,8 @@ export const ensureProposalFull = ( ) const process_replies = (event: NDKEvent) => { + const amethyst_draft_kind = 31234 + if (event.kind && event.kind === amethyst_draft_kind) return false if ( event.kind && proposal_status_kinds.includes(event.kind) &&