diff --git a/ts/models/message.ts b/ts/models/message.ts index 7eb86a6da..b3307256f 100644 --- a/ts/models/message.ts +++ b/ts/models/message.ts @@ -626,11 +626,6 @@ export class MessageModel extends Backbone.Model { } public getPropsForPreview() { - // Don't generate link previews if user has turned them off - if (!window.storage.get('link-preview-setting', false)) { - return null; - } - const previews = this.get('preview') || []; return previews.map((preview: any) => { diff --git a/ts/session/utils/Attachments.ts b/ts/session/utils/Attachments.ts index 547311956..b2bf5b12f 100644 --- a/ts/session/utils/Attachments.ts +++ b/ts/session/utils/Attachments.ts @@ -121,7 +121,7 @@ export class AttachmentFsV2Utils { // some links does not have an image associated, and it makes the whole message fail to send if (!preview.image) { window.log.warn('tried to upload file to fsv2 without image.. skipping'); - return undefined; + return preview as any; } const image = await this.uploadToFsV2({ attachment: preview.image,