mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
fix: only generate urlInfo if not provided
This commit is contained in:
@@ -248,7 +248,7 @@ export const generateWAMessageContent = async(
|
||||
const extContent = { text: message.text } as WATextMessage
|
||||
|
||||
let urlInfo = message.linkPreview
|
||||
if(!!options.getUrlInfo && message.text.match(URL_REGEX)) {
|
||||
if(!urlInfo && !!options.getUrlInfo && message.text.match(URL_REGEX)) {
|
||||
try {
|
||||
urlInfo = await options.getUrlInfo(message.text)
|
||||
} catch(error) { // ignore if fails
|
||||
|
||||
Reference in New Issue
Block a user