From 41a08f716784eceb70bbd020061ec69e2161abe5 Mon Sep 17 00:00:00 2001 From: Jonathan Staab Date: Mon, 19 Jun 2023 04:57:00 -0700 Subject: [PATCH] Add support for kind 1063 --- src/app/shared/NoteContent.svelte | 3 +++ src/app/shared/NoteContentKind1063.svelte | 13 +++++++++++++ src/util/nostr.ts | 1 + src/util/notes.ts | 6 ------ 4 files changed, 17 insertions(+), 6 deletions(-) create mode 100644 src/app/shared/NoteContentKind1063.svelte diff --git a/src/app/shared/NoteContent.svelte b/src/app/shared/NoteContent.svelte index 733e36b2..d219ed2a 100644 --- a/src/app/shared/NoteContent.svelte +++ b/src/app/shared/NoteContent.svelte @@ -2,6 +2,7 @@ import NoteContentKind1 from "src/app/shared/NoteContentKind1.svelte" import NoteContentKind1985 from "src/app/shared/NoteContentKind1985.svelte" import NoteContentKind9802 from "src/app/shared/NoteContentKind9802.svelte" + import NoteContentKind1063 from "src/app/shared/NoteContentKind1063.svelte" import user from "src/agent/user" export let note @@ -15,6 +16,8 @@ {:else if note.kind === 9802} +{:else if note.kind === 1063} + {:else} {/if} diff --git a/src/app/shared/NoteContentKind1063.svelte b/src/app/shared/NoteContentKind1063.svelte new file mode 100644 index 00000000..a414822f --- /dev/null +++ b/src/app/shared/NoteContentKind1063.svelte @@ -0,0 +1,13 @@ + + +{#if url} + +{/if} diff --git a/src/util/nostr.ts b/src/util/nostr.ts index 020ac573..e49b4855 100644 --- a/src/util/nostr.ts +++ b/src/util/nostr.ts @@ -6,6 +6,7 @@ import {tryJson, avg} from "src/util/misc" import {invoiceAmount} from "src/util/lightning" export const noteKinds = [1, 1985, 30023, 30018, 10001, 1063, 9802] +// export const noteKinds = [1063] export const personKinds = [0, 2, 3, 10001, 10002] export const userKinds = personKinds.concat([10000, 30001, 30078]) export const appDataKeys = [ diff --git a/src/util/notes.ts b/src/util/notes.ts index e2f4bb66..778fa1bf 100644 --- a/src/util/notes.ts +++ b/src/util/notes.ts @@ -200,9 +200,3 @@ export const getLinks = parts => "value", parts.filter(x => x.type === LINK && x.canDisplay) ) - -export const isStandalone = (content, i) => - !content[i - 1] || - content[i - 1].type === NEWLINE || - !content[i + 1] || - content[i + 1].type === NEWLINE