From 81dfe5b112ba3ca24a19162aef2b1485c5094674 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 6 Mar 2026 09:49:16 +0000 Subject: [PATCH] Filter out notifications for detached quote posts When a user detaches a quote from their post, the corresponding quote notification is now filtered out of the notifications feed. This checks the subject post's embed for a detached record view (both plain record embeds and record-with-media embeds). https://claude.ai/code/session_01PmDHPopw2eEkzznxHuDu3N --- src/state/queries/notifications/feed.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/state/queries/notifications/feed.ts b/src/state/queries/notifications/feed.ts index 57d83cb5bb..0e3b32fb99 100644 --- a/src/state/queries/notifications/feed.ts +++ b/src/state/queries/notifications/feed.ts @@ -18,6 +18,8 @@ import {useCallback, useEffect, useMemo, useRef} from 'react' import { + AppBskyEmbedRecord, + AppBskyEmbedRecordWithMedia, AppBskyFeedDefs, AppBskyFeedPost, AtUri, @@ -188,6 +190,12 @@ export function useNotificationFeedQuery(opts: { hiddenReplyUris.has(item.subjectUri) return !isHiddenReply }) + .filter(item => { + if (item.type === 'quote' && item.subject) { + return !hasDetachedQuoteEmbed(item.subject) + } + return true + }) .filter(item => { if ( item.type === 'reply' || @@ -273,6 +281,16 @@ export function useNotificationFeedQuery(opts: { return query } +function hasDetachedQuoteEmbed(subject: AppBskyFeedDefs.PostView): boolean { + if (AppBskyEmbedRecord.isView(subject.embed)) { + return AppBskyEmbedRecord.isViewDetached(subject.embed.record) + } + if (AppBskyEmbedRecordWithMedia.isView(subject.embed)) { + return AppBskyEmbedRecord.isViewDetached(subject.embed.record.record) + } + return false +} + export function* findAllPostsInQueryData( queryClient: QueryClient, uri: string,