mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-13 15:14:49 -06:00
Merge pull request #1414 from onerrogus/fix_link_preview
Corrigir utilização do linkPreview no WhatsApp Business API
This commit is contained in:
commit
c74eee8e52
@ -752,7 +752,6 @@ export class BusinessStartupService extends ChannelStartupService {
|
||||
try {
|
||||
let quoted: any;
|
||||
let webhookUrl: any;
|
||||
const linkPreview = options?.linkPreview != false ? undefined : false;
|
||||
if (options?.quoted) {
|
||||
const m = options?.quoted;
|
||||
|
||||
@ -820,7 +819,7 @@ export class BusinessStartupService extends ChannelStartupService {
|
||||
to: number.replace(/\D/g, ''),
|
||||
text: {
|
||||
body: message['conversation'],
|
||||
preview_url: linkPreview,
|
||||
preview_url: Boolean(options?.linkPreview),
|
||||
},
|
||||
};
|
||||
quoted ? (content.context = { message_id: quoted.id }) : content;
|
||||
@ -837,7 +836,7 @@ export class BusinessStartupService extends ChannelStartupService {
|
||||
to: number.replace(/\D/g, ''),
|
||||
[message['mediaType']]: {
|
||||
[message['type']]: message['id'],
|
||||
preview_url: linkPreview,
|
||||
preview_url: Boolean(options?.linkPreview),
|
||||
...(message['fileName'] && !isImage && !isVideo && { filename: message['fileName'] }),
|
||||
caption: message['caption'],
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user