diff --git a/src/components/Post/Embed/index.tsx b/src/components/Post/Embed/index.tsx index 4d784ffbf5..ace85dc984 100644 --- a/src/components/Post/Embed/index.tsx +++ b/src/components/Post/Embed/index.tsx @@ -149,6 +149,10 @@ function RecordEmbed({ return null } case 'post': { + if (rest.isWithinQuote && !rest.allowNestedQuotes) { + return null + } + return ( ) } @@ -213,6 +219,8 @@ export function QuoteEmbed({ embed, onOpen, style, + isWithinQuote: parentIsWithinQuote, + allowNestedQuotes: parentAllowNestedQuotes, }: Omit & { embed: EmbedType<'post'> viewContext?: QuoteEmbedViewContext @@ -306,7 +314,17 @@ export function QuoteEmbed({ disableLinks /> ) : null} - {quote.embed && } + {quote.embed && ( + + )} diff --git a/src/components/Post/Embed/types.ts b/src/components/Post/Embed/types.ts index 7023258322..b719d00b4e 100644 --- a/src/components/Post/Embed/types.ts +++ b/src/components/Post/Embed/types.ts @@ -1,5 +1,5 @@ -import {StyleProp, ViewStyle} from 'react-native' -import {AppBskyFeedDefs, ModerationDecision} from '@atproto/api' +import {type StyleProp, type ViewStyle} from 'react-native' +import {type AppBskyFeedDefs, type ModerationDecision} from '@atproto/api' export enum PostEmbedViewContext { ThreadHighlighted = 'ThreadHighlighted', @@ -15,8 +15,9 @@ export type CommonProps = { moderation?: ModerationDecision onOpen?: () => void style?: StyleProp - allowNestedQuotes?: boolean viewContext?: PostEmbedViewContext + isWithinQuote?: boolean + allowNestedQuotes?: boolean } export type EmbedProps = CommonProps & {