Skip to content

Commit

Permalink
show video in quote (#5093)
Browse files Browse the repository at this point in the history
  • Loading branch information
mozzius authored Sep 3, 2024
1 parent dde72b4 commit bd42f77
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/view/com/util/post-embeds/QuoteEmbed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
AppBskyEmbedImages,
AppBskyEmbedRecord,
AppBskyEmbedRecordWithMedia,
AppBskyEmbedVideo,
AppBskyFeedDefs,
AppBskyFeedPost,
ModerationDecision,
Expand Down Expand Up @@ -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
}
Expand Down
3 changes: 3 additions & 0 deletions src/view/com/util/post-embeds/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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} />
}
Expand Down Expand Up @@ -178,6 +179,8 @@ export function PostEmbeds({
)
}

// video embed
// =
if (AppBskyEmbedVideo.isView(embed)) {
return (
<ContentHider modui={moderation?.ui('contentMedia')}>
Expand Down

0 comments on commit bd42f77

Please sign in to comment.