allow receiving link previews when sending is disabled

pull/1852/head
Brice-W 4 years ago
parent aca7fc7473
commit 384eecd9dc

@ -626,11 +626,6 @@ export class MessageModel extends Backbone.Model<MessageAttributes> {
}
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) => {

@ -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,

Loading…
Cancel
Save