From d5b3d935a49da1ab38f1c7e57c793fd47db102c6 Mon Sep 17 00:00:00 2001 From: Jonathan Staab Date: Mon, 19 Jun 2023 12:11:06 -0700 Subject: [PATCH] Add support for kind 40 notes (because they might show up as bech32 strings) --- src/app/shared/NoteContent.svelte | 5 ++++- src/app/shared/NoteContentKind40.svelte | 29 +++++++++++++++++++++++++ src/app/views/Bech32Entity.svelte | 2 -- 3 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 src/app/shared/NoteContentKind40.svelte diff --git a/src/app/shared/NoteContent.svelte b/src/app/shared/NoteContent.svelte index 50ff089b..0818cc9b 100644 --- a/src/app/shared/NoteContent.svelte +++ b/src/app/shared/NoteContent.svelte @@ -1,5 +1,6 @@ -{#if note.kind === 1985} +{#if note.kind === 40} + +{:else if note.kind === 1985} {:else if note.kind === 9802} diff --git a/src/app/shared/NoteContentKind40.svelte b/src/app/shared/NoteContentKind40.svelte new file mode 100644 index 00000000..f81444ec --- /dev/null +++ b/src/app/shared/NoteContentKind40.svelte @@ -0,0 +1,29 @@ + + + navigate(`/chat/${noteId}`)}> + +
+ {#if $room.picture} + + {/if} +

{$room.name}

+
+ {#if $room.about} +

{$room.about}

+ {/if} +
+
diff --git a/src/app/views/Bech32Entity.svelte b/src/app/views/Bech32Entity.svelte index d32c3e2e..13964e5d 100644 --- a/src/app/views/Bech32Entity.svelte +++ b/src/app/views/Bech32Entity.svelte @@ -23,8 +23,6 @@ } catch (e) { warn(e) } - - console.log(type, data) })