show video in quote (#5093)
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
|||||||
AppBskyEmbedImages,
|
AppBskyEmbedImages,
|
||||||
AppBskyEmbedRecord,
|
AppBskyEmbedRecord,
|
||||||
AppBskyEmbedRecordWithMedia,
|
AppBskyEmbedRecordWithMedia,
|
||||||
|
AppBskyEmbedVideo,
|
||||||
AppBskyFeedDefs,
|
AppBskyFeedDefs,
|
||||||
AppBskyFeedPost,
|
AppBskyFeedPost,
|
||||||
ModerationDecision,
|
ModerationDecision,
|
||||||
@@ -180,12 +181,17 @@ export function QuoteEmbed({
|
|||||||
if (allowNestedQuotes) {
|
if (allowNestedQuotes) {
|
||||||
return e
|
return e
|
||||||
} else {
|
} else {
|
||||||
if (AppBskyEmbedImages.isView(e) || AppBskyEmbedExternal.isView(e)) {
|
if (
|
||||||
|
AppBskyEmbedImages.isView(e) ||
|
||||||
|
AppBskyEmbedExternal.isView(e) ||
|
||||||
|
AppBskyEmbedVideo.isView(e)
|
||||||
|
) {
|
||||||
return e
|
return e
|
||||||
} else if (
|
} else if (
|
||||||
AppBskyEmbedRecordWithMedia.isView(e) &&
|
AppBskyEmbedRecordWithMedia.isView(e) &&
|
||||||
(AppBskyEmbedImages.isView(e.media) ||
|
(AppBskyEmbedImages.isView(e.media) ||
|
||||||
AppBskyEmbedExternal.isView(e.media))
|
AppBskyEmbedExternal.isView(e.media) ||
|
||||||
|
AppBskyEmbedVideo.isView(e.media))
|
||||||
) {
|
) {
|
||||||
return e.media
|
return e.media
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ export function PostEmbeds({
|
|||||||
return <MaybeListCard view={embed.record} />
|
return <MaybeListCard view={embed.record} />
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// starter pack embed
|
||||||
if (AppBskyGraphDefs.isStarterPackViewBasic(embed.record)) {
|
if (AppBskyGraphDefs.isStarterPackViewBasic(embed.record)) {
|
||||||
return <StarterPackCard starterPack={embed.record} />
|
return <StarterPackCard starterPack={embed.record} />
|
||||||
}
|
}
|
||||||
@@ -178,6 +179,8 @@ export function PostEmbeds({
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// video embed
|
||||||
|
// =
|
||||||
if (AppBskyEmbedVideo.isView(embed)) {
|
if (AppBskyEmbedVideo.isView(embed)) {
|
||||||
return (
|
return (
|
||||||
<ContentHider modui={moderation?.ui('contentMedia')}>
|
<ContentHider modui={moderation?.ui('contentMedia')}>
|
||||||
|
|||||||
Reference in New Issue
Block a user