From 2fbc9e04090845dd0eb18203f2bb83ce45f12c38 Mon Sep 17 00:00:00 2001 From: Mary Kate Fain Date: Sun, 5 Apr 2026 17:59:13 -0500 Subject: [PATCH] Add protocol:nostr to saved feed queries for latest results The previous useStreamPosts always injected 'protocol:nostr' into the NIP-50 search string, which is a Ditto relay extension that filters for native Nostr events. Without it, useTabFeed's queries return stale or fewer results because the relay doesn't scope to the Nostr protocol. Augment the resolved filter's search field with 'protocol:nostr' before passing it to useTabFeed, matching the old behavior. --- src/components/Feed.tsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/components/Feed.tsx b/src/components/Feed.tsx index d0a1cc1c..c4b7cc07 100644 --- a/src/components/Feed.tsx +++ b/src/components/Feed.tsx @@ -374,13 +374,25 @@ function SavedFeedContent({ feed }: { feed: SavedFeed }) { user?.pubkey ?? '', ); + // Augment the resolved filter with protocol:nostr (NIP-50 Ditto extension) + // to match the behavior of the core feeds and ensure latest native Nostr + // posts are returned. + const augmentedFilter = useMemo(() => { + if (!resolvedFilter) return null; + const existing = resolvedFilter.search ?? ''; + const search = existing + ? `${existing} protocol:nostr` + : 'protocol:nostr'; + return { ...resolvedFilter, search }; + }, [resolvedFilter]); + const { data: rawData, isLoading: isFeedLoading, fetchNextPage, hasNextPage, isFetchingNextPage, - } = useTabFeed(resolvedFilter, `saved-${feed.id}`, !isResolving); + } = useTabFeed(augmentedFilter, `saved-${feed.id}`, !isResolving); const isLoading = isResolving || isFeedLoading;