Browse Source

fix: hide amethyst drafts

the amethyst nostr client has started producing encrypted drafts,
which are spaming issue and proposal threads
master
DanConwayDev 2 years ago
parent
commit
b4186f190a
No known key found for this signature in database
GPG Key ID: 68E15486D73F75E1
  1. 2
      src/lib/stores/Issue.ts
  2. 2
      src/lib/stores/Proposal.ts

2
src/lib/stores/Issue.ts

@ -129,6 +129,8 @@ export const ensureIssueFull = (repo_identifier: string, issue_id: string) => { @@ -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) &&

2
src/lib/stores/Proposal.ts

@ -162,6 +162,8 @@ export const ensureProposalFull = ( @@ -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) &&

Loading…
Cancel
Save