@ -89,8 +89,8 @@
}
const title = window.Signal.LinkPreviews.getTitleMetaTag(html);
const imageUrl = window.Signal.LinkPreviews.getImageMetaTag(html);
const title = Signal.LinkPreviews.getTitleMetaTag(html);
const imageUrl = Signal.LinkPreviews.getImageMetaTag(html);
let image;
let objectUrl;
@ -139,6 +139,8 @@
return;
// We don't want to save the base64 url in the message as it will increase the size of it
// Rather we fetch the base64 later
this.set({ preview: [result] });
} catch (e) {
window.log.warn(`Failed to load previews for message: ${this.id}`);
@ -307,6 +307,13 @@ MessageSender.prototype = {
const message = new Message(attrs);
const silent = false;
// Remove this when we add support for attachments
message.attachmentPointers = null;
message.preview = null;
if (message.quote) {
message.quote.attachments = null;
return Promise.all([
this.uploadAttachments(message),
this.uploadThumbnails(message),