From bab54aea8bf11f91b24126c846f5f0c08853ece0 Mon Sep 17 00:00:00 2001 From: Pedro Lopez Date: Tue, 14 Apr 2020 22:42:05 -0400 Subject: [PATCH] fix: set url subtype for messages with link previews MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: João Vitor Miranda Co-authored-by: Top --- src/util/Injected.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/Injected.js b/src/util/Injected.js index 6ff31f3..68dbcc3 100644 --- a/src/util/Injected.js +++ b/src/util/Injected.js @@ -81,9 +81,9 @@ exports.LoadUtils = () => { const link = window.Store.Validators.findLink(content); if (link) { const preview = await window.Store.Wap.queryLinkPreview(link.url); - if (!preview.status) { - options = { ...options, ...preview}; - } + preview.preview = true; + preview.subtype = 'url'; + options = { ...options, ...preview }; } }