From bd42f770b8b5144b6b292495a3193369fc726389 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Tue, 3 Sep 2024 18:33:16 +0100 Subject: [PATCH] show video in quote (#5093) --- src/view/com/util/post-embeds/QuoteEmbed.tsx | 10 ++++++++-- src/view/com/util/post-embeds/index.tsx | 3 +++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/view/com/util/post-embeds/QuoteEmbed.tsx b/src/view/com/util/post-embeds/QuoteEmbed.tsx index ca9dc1c0..c61cda68 100644 --- a/src/view/com/util/post-embeds/QuoteEmbed.tsx +++ b/src/view/com/util/post-embeds/QuoteEmbed.tsx @@ -11,6 +11,7 @@ import { AppBskyEmbedImages, AppBskyEmbedRecord, AppBskyEmbedRecordWithMedia, + AppBskyEmbedVideo, AppBskyFeedDefs, AppBskyFeedPost, ModerationDecision, @@ -180,12 +181,17 @@ export function QuoteEmbed({ if (allowNestedQuotes) { return e } else { - if (AppBskyEmbedImages.isView(e) || AppBskyEmbedExternal.isView(e)) { + if ( + AppBskyEmbedImages.isView(e) || + AppBskyEmbedExternal.isView(e) || + AppBskyEmbedVideo.isView(e) + ) { return e } else if ( AppBskyEmbedRecordWithMedia.isView(e) && (AppBskyEmbedImages.isView(e.media) || - AppBskyEmbedExternal.isView(e.media)) + AppBskyEmbedExternal.isView(e.media) || + AppBskyEmbedVideo.isView(e.media)) ) { return e.media } diff --git a/src/view/com/util/post-embeds/index.tsx b/src/view/com/util/post-embeds/index.tsx index e9cbf5d0..d9e075e7 100644 --- a/src/view/com/util/post-embeds/index.tsx +++ b/src/view/com/util/post-embeds/index.tsx @@ -86,6 +86,7 @@ export function PostEmbeds({ return } + // starter pack embed if (AppBskyGraphDefs.isStarterPackViewBasic(embed.record)) { return } @@ -178,6 +179,8 @@ export function PostEmbeds({ ) } + // video embed + // = if (AppBskyEmbedVideo.isView(embed)) { return (