mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-20 12:39:20 +00:00
fix: set url subtype for messages with link previews
Co-authored-by: João Vitor Miranda <joao.miranda@aluno.ufabc.edu.br> Co-authored-by: Top <shmuliktop@users.noreply.github.com>
This commit is contained in:
@@ -81,9 +81,9 @@ exports.LoadUtils = () => {
|
|||||||
const link = window.Store.Validators.findLink(content);
|
const link = window.Store.Validators.findLink(content);
|
||||||
if (link) {
|
if (link) {
|
||||||
const preview = await window.Store.Wap.queryLinkPreview(link.url);
|
const preview = await window.Store.Wap.queryLinkPreview(link.url);
|
||||||
if (!preview.status) {
|
preview.preview = true;
|
||||||
options = { ...options, ...preview};
|
preview.subtype = 'url';
|
||||||
}
|
options = { ...options, ...preview };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user