Skip to content

Commit

Permalink
Merge pull request #925 from SnowCait/quoted-long-form-content
Browse files Browse the repository at this point in the history
Quoted long-form content
  • Loading branch information
SnowCait authored Dec 18, 2023
2 parents 4622626 + 5a2aa0f commit 93f0483
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

1 comment on commit 93f0483

@vercel
Copy link

@vercel vercel bot commented on 93f0483 Dec 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nostter – ./

nostter-git-main-snowcait.vercel.app
nostter.vercel.app
nostter.app
nostter-snowcait.vercel.app

Please sign in to comment.