diff --git a/ts/util/sendStoryMessage.ts b/ts/util/sendStoryMessage.ts index df852a52a..5168a510f 100644 --- a/ts/util/sendStoryMessage.ts +++ b/ts/util/sendStoryMessage.ts @@ -29,20 +29,6 @@ import { collect } from './iterables'; import { DurationInSeconds } from './durations'; import { sanitizeLinkPreview } from '../services/LinkPreview'; -function cleanLinkPreviewIfAny(attachment: AttachmentType): AttachmentType { - if (!attachment.textAttachment || !attachment.textAttachment.preview) { - return attachment; - } - - return { - ...attachment, - textAttachment: { - ...attachment.textAttachment, - preview: undefined, - }, - }; -} - export async function sendStoryMessage( listIds: Array, conversationIds: Array, @@ -153,8 +139,7 @@ export async function sendStoryMessage( sendStateByListId.set(distributionList.id, sendStateByConversationId); }); - const cleanedAttachment = cleanLinkPreviewIfAny(attachment); - const attachments: Array = [cleanedAttachment]; + const attachments: Array = [attachment]; const linkPreview = attachment?.textAttachment?.preview; const sanitizedLinkPreview = linkPreview