From ea6cfc39d2691e96eac7e27149410a9b3a1955b3 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Wed, 28 Aug 2024 14:45:57 -0500 Subject: [PATCH] Fix viewer block reference (#2758) --- packages/bsky/src/api/app/bsky/feed/getQuotes.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/bsky/src/api/app/bsky/feed/getQuotes.ts b/packages/bsky/src/api/app/bsky/feed/getQuotes.ts index 9fe316a07ef..ec6749eb665 100644 --- a/packages/bsky/src/api/app/bsky/feed/getQuotes.ts +++ b/packages/bsky/src/api/app/bsky/feed/getQuotes.ts @@ -1,3 +1,4 @@ +import { AtUri } from '@atproto/syntax' import { Server } from '../../../../lexicon' import AppContext from '../../../../context' import { createPipeline } from '../../../../pipeline' @@ -73,7 +74,8 @@ const noBlocks = (inputs: { const { ctx, skeleton, hydration } = inputs skeleton.uris = skeleton.uris.filter((uri) => { const embedBlock = hydration.postBlocks?.get(uri)?.embed - return !ctx.views.viewerBlockExists(uri, hydration) && !embedBlock + const authorDid = new AtUri(uri).hostname + return !ctx.views.viewerBlockExists(authorDid, hydration) && !embedBlock }) return skeleton }