From a42372f99bcb0cb0f0f78450ddfbc16edc69cd42 Mon Sep 17 00:00:00 2001 From: gsovereignty Date: Mon, 19 Aug 2024 00:15:20 +0800 Subject: [PATCH] problem: wrong thread root id --- src/components/MeritsAndSatflow.svelte | 3 ++- src/lib/event_helpers/help_thread.ts | 13 ++++++++----- src/routes/help/+page.svelte | 4 +--- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/components/MeritsAndSatflow.svelte b/src/components/MeritsAndSatflow.svelte index 0aac633..f7a9622 100644 --- a/src/components/MeritsAndSatflow.svelte +++ b/src/components/MeritsAndSatflow.svelte @@ -129,7 +129,8 @@ Merits and Satflow
- This graph displays the Meritization of equity in {rocket.Name()} + This graph displays the Meritization of equity in {rocket.Name()}. These npubs own the {rocket.Name()} + satflow.
diff --git a/src/lib/event_helpers/help_thread.ts b/src/lib/event_helpers/help_thread.ts index b578584..bbf0fba 100644 --- a/src/lib/event_helpers/help_thread.ts +++ b/src/lib/event_helpers/help_thread.ts @@ -3,9 +3,9 @@ import { NDKKind, type NDKEvent } from '@nostr-dev-kit/ndk'; import type NDKSvelte from '@nostr-dev-kit/ndk-svelte'; export const HELP_THREAD_ROOT_EVENT_ID = - 'f05059e5d33716c38a10b392538a592de91014b6e9610c91e5f50543f2fdb4fd'; + '850941b4b8259aea64fef1e5083dd81af0d9bf1bcf3df6e370bdddbc6f819f4c'; const HELP_THREAD_ROOT_AUTHOR_PUBKEY = - '887f827161338ef4d3e83482498664ad7454caf9bda7d080c3b32821f1394708'; + 'd91191e30e00444b942c0e82cad470b32af171764c2275bee0bd99377efd4075'; export interface TreeNote { id: string; @@ -27,7 +27,10 @@ export function buildNoteTree(notes: NDKEvent[]): TreeNote[] { noteMap.set(note.id, { id: note.id, pubkey: note.author.pubkey, - content: note.content, + content: note.content.replace( + '#nostrocket ping nostr:npub1mygerccwqpzyh9pvp6pv44rskv40zutkfs38t0hqhkvnwlhagp6s3psn5p', + '' + ), created_at: note.created_at!, root: rootTag, reply: replyTag, @@ -58,9 +61,9 @@ export function buildNoteTree(notes: NDKEvent[]): TreeNote[] { export function prepareQuestionNoteEvent(args: { ndk: NDKSvelte; content: string }) { const tags = [ ['p', HELP_THREAD_ROOT_AUTHOR_PUBKEY], - ['e', HELP_THREAD_ROOT_EVENT_ID, 'wss://relay.nostrocket.org', 'reply'], - ['e', HELP_THREAD_ROOT_EVENT_ID, 'wss://relay.nostrocket.org', 'root'] + ['e', HELP_THREAD_ROOT_EVENT_ID, 'wss://relay.nostrocket.org', 'mention'] ]; + args.content = `${args.content} #nostrocket ping nostr:npub1mygerccwqpzyh9pvp6pv44rskv40zutkfs38t0hqhkvnwlhagp6s3psn5p`; return prepareNostrEvent({ ...args, kind: NDKKind.Text, diff --git a/src/routes/help/+page.svelte b/src/routes/help/+page.svelte index 0d10cde..586dad0 100644 --- a/src/routes/help/+page.svelte +++ b/src/routes/help/+page.svelte @@ -65,9 +65,7 @@ {/if} -
- If the answers to the questions below do not address your issue, you can send your question here -
+
Ask your questions here!