diff --git a/src/hooks/useProfileFeed.ts b/src/hooks/useProfileFeed.ts index 32ad8e8d..e43ea03b 100644 --- a/src/hooks/useProfileFeed.ts +++ b/src/hooks/useProfileFeed.ts @@ -35,6 +35,7 @@ export function filterByTab(items: FeedItem[], tab: ProfileTab): FeedItem[] { return items.filter((item) => { const e = item.event; if (item.repostedBy) return true; // Always show reposts + if (e.kind === 1111) return false; // Kind 1111 comments are always replies if (e.kind === 1) return !e.tags.some(([n]) => n === 'e'); // Kind 1 without e tags return !e.tags.some(([n]) => n === 'e'); // Other kinds without e tags }); diff --git a/src/hooks/useStreamPosts.ts b/src/hooks/useStreamPosts.ts index 3068ab0d..04a4c0b0 100644 --- a/src/hooks/useStreamPosts.ts +++ b/src/hooks/useStreamPosts.ts @@ -37,8 +37,9 @@ function filterEvent(event: NostrEvent, options: StreamPostsOptions, searchQuery const now = Math.floor(Date.now() / 1000); if (event.created_at > now) return false; - // Non-kind-1 events (extra kinds) pass through without filtering - if (event.kind !== 1) return true; + // Non-text events (extra kinds) pass through without filtering + // Kind 1111 (NIP-22 comments) are treated like kind 1 for filtering purposes + if (event.kind !== 1 && event.kind !== 1111) return true; // Filter replies if (!options.includeReplies) { diff --git a/src/lib/extraKinds.ts b/src/lib/extraKinds.ts index 3c54a11a..d5e207e8 100644 --- a/src/lib/extraKinds.ts +++ b/src/lib/extraKinds.ts @@ -79,6 +79,16 @@ export const EXTRA_KINDS: ExtraKindDef[] = [ section: 'feed', feedOnly: true, }, + { + kind: 1111, + id: 'comments', + feedKey: 'feedIncludePosts', + label: 'Comments', + description: 'NIP-22 comments on posts and external content', + addressable: false, + section: 'feed', + feedOnly: true, + }, { kind: 6, id: 'reposts',