diff --git a/src/lib/stores/Issue.ts b/src/lib/stores/Issue.ts index e315381..9f23e3c 100644 --- a/src/lib/stores/Issue.ts +++ b/src/lib/stores/Issue.ts @@ -9,6 +9,7 @@ import { extractIssueTitle, } from '$lib/components/events/content/utils' import { selectRepoFromCollection } from '$lib/components/repo/utils' +import { ignore_kinds } from './utils' export const selected_issue_full: Writable = writable({ ...full_defaults, @@ -136,8 +137,7 @@ export const ensureIssueFull = ( ) const process_replies = (event: NDKEvent) => { - const amethyst_draft_kind = 31234 - if (event.kind && event.kind === amethyst_draft_kind) return + if (event.kind && ignore_kinds.includes(event.kind)) return false if ( event.kind && proposal_status_kinds.includes(event.kind) && diff --git a/src/lib/stores/Proposal.ts b/src/lib/stores/Proposal.ts index c43fc33..55e6b00 100644 --- a/src/lib/stores/Proposal.ts +++ b/src/lib/stores/Proposal.ts @@ -9,6 +9,7 @@ import { proposal_status_kinds, proposal_status_open } from '$lib/kinds' import { awaitSelectedRepoCollection } from './repo' import { extractPatchMessage } from '$lib/components/events/content/utils' import { selectRepoFromCollection } from '$lib/components/repo/utils' +import { ignore_kinds } from './utils' export const selected_proposal_full: Writable = writable({ ...full_defaults, @@ -142,8 +143,7 @@ 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 && ignore_kinds.includes(event.kind)) return false if ( event.kind && proposal_status_kinds.includes(event.kind) && diff --git a/src/lib/stores/utils.ts b/src/lib/stores/utils.ts new file mode 100644 index 0000000..553caa2 --- /dev/null +++ b/src/lib/stores/utils.ts @@ -0,0 +1,4 @@ +export const ignore_kinds = [ + 31234, // amethyst draft kind + 9978, // confidence scoring event +]