problem: wrong thread root id

This commit is contained in:
gsovereignty
2024-08-19 00:15:20 +08:00
parent 06e6b4e8ff
commit a42372f99b
3 changed files with 11 additions and 9 deletions

View File

@@ -129,7 +129,8 @@
<Card.Title>Merits and Satflow</Card.Title>
<Card.Description class="grid grid-cols-1 lg:grid-cols-2">
<div class="col-span-1">
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.
<Pie data={$merits} />
</div>

View File

@@ -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,

View File

@@ -65,9 +65,7 @@
</div>
{/if}
<Heading title="Help" />
<div>
If the answers to the questions below do not address your issue, you can send your question here
</div>
<div>Ask your questions here!</div>
<form class="relative overflow-hidden">
<Label for="message" class="sr-only">Question</Label>
<Textarea