show images in notification if post also has record embed (#1349)

zio/stable
Samuel Newman 2023-09-01 00:44:42 +01:00 committed by GitHub
parent ba393cd642
commit f16cc9537a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -11,6 +11,7 @@ import {
AppBskyEmbedImages,
ProfileModeration,
moderateProfile,
AppBskyEmbedRecordWithMedia,
} from '@atproto/api'
import {AtUri} from '@atproto/api'
import {
@ -400,6 +401,9 @@ function AdditionalPostText({
const text = additionalPost.thread?.postRecord.text
const images = AppBskyEmbedImages.isView(additionalPost.thread.post.embed)
? additionalPost.thread.post.embed.images
: AppBskyEmbedRecordWithMedia.isView(additionalPost.thread.post.embed) &&
AppBskyEmbedImages.isView(additionalPost.thread.post.embed.media)
? additionalPost.thread.post.embed.media.images
: undefined
return (
<>