show video in quote (#5093)

zio/stable
Samuel Newman 2024-09-03 18:33:16 +01:00 committed by GitHub
parent dde72b48e1
commit bd42f770b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 2 deletions

View File

@ -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
}

View File

@ -86,6 +86,7 @@ export function PostEmbeds({
return <MaybeListCard view={embed.record} />
}
// starter pack embed
if (AppBskyGraphDefs.isStarterPackViewBasic(embed.record)) {
return <StarterPackCard starterPack={embed.record} />
}
@ -178,6 +179,8 @@ export function PostEmbeds({
)
}
// video embed
// =
if (AppBskyEmbedVideo.isView(embed)) {
return (
<ContentHider modui={moderation?.ui('contentMedia')}>