diff --git a/src/shared/components/post/create-post.tsx b/src/shared/components/post/create-post.tsx index 9235e776b3..52a903817c 100644 --- a/src/shared/components/post/create-post.tsx +++ b/src/shared/components/post/create-post.tsx @@ -206,6 +206,7 @@ export class CreatePost extends Component< altText: locationState.altText, nsfw: locationState.nsfw, languageId: locationState.languageId, + customThumbnailUrl: locationState.customThumbnailUrl, }); this.setState(s => ({ resetCounter: s.resetCounter + 1 })); } diff --git a/src/shared/components/post/post-listing.tsx b/src/shared/components/post/post-listing.tsx index 0ef6fa3f66..a3c9230663 100644 --- a/src/shared/components/post/post-listing.tsx +++ b/src/shared/components/post/post-listing.tsx @@ -916,7 +916,8 @@ export class PostListing extends Component { } get crossPostParams(): CrossPostParams { - const { name, url, alt_text, nsfw, language_id } = this.postView.post; + const { name, url, alt_text, nsfw, language_id, thumbnail_url } = + this.postView.post; const crossPostParams: CrossPostParams = { name }; if (url) { @@ -940,6 +941,10 @@ export class PostListing extends Component { crossPostParams.languageId = language_id; } + if (thumbnail_url) { + crossPostParams.customThumbnailUrl = thumbnail_url; + } + return crossPostParams; } diff --git a/src/shared/utils/types/cross-post-params.ts b/src/shared/utils/types/cross-post-params.ts index e63e5c1a42..e38d305b76 100644 --- a/src/shared/utils/types/cross-post-params.ts +++ b/src/shared/utils/types/cross-post-params.ts @@ -7,4 +7,5 @@ export default interface CrossPostParams { altText?: string; nsfw?: StringBoolean; languageId?: number; + customThumbnailUrl?: string; }