Skip to content

Commit

Permalink
Quoted long-form content
Browse files Browse the repository at this point in the history
  • Loading branch information
SnowCait committed Dec 18, 2023
1 parent 4622626 commit 5a2aa0f
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion web/src/routes/(app)/timeline/EventComponent.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { Kind } from 'nostr-tools';
import { Kind, nip19 } from 'nostr-tools';
import Profile from './Profile.svelte';
import RepostedNote from './RepostedNote.svelte';
import Reaction from './Reaction.svelte';
Expand All @@ -9,6 +9,8 @@
import { Metadata, type Item } from '$lib/Items';
import CustomEmojiList from './CustomEmojiList.svelte';
import UserStatus from './UserStatus.svelte';
import LongFormContent from '../content/LongFormContent.svelte';
import { findIdentifier } from '$lib/EventHelper';
export let item: Item;
export let readonly: boolean;
Expand All @@ -24,6 +26,15 @@
<Reaction {item} {readonly} {createdAtFormat} />
{:else if item.event.kind === Kind.ChannelCreation || item.event.kind === Kind.ChannelMetadata}
<Channel {item} />
{:else if item.event.kind === Kind.Article}
<LongFormContent
event={item.event}
naddr={nip19.naddrEncode({
kind: Kind.Article,
pubkey: item.event.pubkey,
identifier: findIdentifier(item.event.tags) ?? ''
})}
/>
{:else if item.event.kind === Kind.Zap}
<Zap {item} {readonly} {createdAtFormat} />
{:else if Number(item.event.kind) === 30030}
Expand Down

0 comments on commit 5a2aa0f

Please sign in to comment.