|
|
|
@ -8,7 +8,7 @@ |
|
|
|
import type { NDKEvent } from "@nostr-dev-kit/ndk"; |
|
|
|
import type { NDKEvent } from "@nostr-dev-kit/ndk"; |
|
|
|
import type { NetworkNode, NetworkLink, GraphData, GraphState } from "../types"; |
|
|
|
import type { NetworkNode, NetworkLink, GraphData, GraphState } from "../types"; |
|
|
|
import { nip19 } from "nostr-tools"; |
|
|
|
import { nip19 } from "nostr-tools"; |
|
|
|
import { standardRelays } from "$lib/consts"; |
|
|
|
import { communityRelays } from "$lib/consts"; |
|
|
|
import { getMatchingTags } from '$lib/utils/nostrUtils'; |
|
|
|
import { getMatchingTags } from '$lib/utils/nostrUtils'; |
|
|
|
import { getDisplayNameSync } from '$lib/utils/profileCache'; |
|
|
|
import { getDisplayNameSync } from '$lib/utils/profileCache'; |
|
|
|
import { createDebugFunction } from "./common"; |
|
|
|
import { createDebugFunction } from "./common"; |
|
|
|
@ -62,13 +62,13 @@ export function createNetworkNode( |
|
|
|
pubkey: event.pubkey, |
|
|
|
pubkey: event.pubkey, |
|
|
|
identifier: dTag, |
|
|
|
identifier: dTag, |
|
|
|
kind: event.kind, |
|
|
|
kind: event.kind, |
|
|
|
relays: standardRelays, |
|
|
|
relays: communityRelays, |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// Create nevent (NIP-19 event reference) for the event
|
|
|
|
// Create nevent (NIP-19 event reference) for the event
|
|
|
|
node.nevent = nip19.neventEncode({ |
|
|
|
node.nevent = nip19.neventEncode({ |
|
|
|
id: event.id, |
|
|
|
id: event.id, |
|
|
|
relays: standardRelays, |
|
|
|
relays: communityRelays, |
|
|
|
kind: event.kind, |
|
|
|
kind: event.kind, |
|
|
|
}); |
|
|
|
}); |
|
|
|
} catch (error) { |
|
|
|
} catch (error) { |
|
|
|
|