fix: correct message payload format for mentions in Evolution API

main
brobert (aider) 3 months ago
parent 8a6ba6c84b
commit d16c34c2a9

@ -21,10 +21,19 @@ export async function sendMessage(phone: string, message: string, mentions: stri
// Add mentions if provided // Add mentions if provided
if (mentions.length > 0) { if (mentions.length > 0) {
payload.options = { payload = {
mentions: { number: phone,
everyOne: false, options: {
mentioned: mentions.map(phone => phone.split('@')[0]) // Strip @s.whatsapp.net delay: 1200,
presence: 'composing',
linkPreview: false,
mentions: {
everyOne: false,
mentioned: mentions.map(phone => phone.split('@')[0]) // Strip @s.whatsapp.net
}
},
textMessage: {
text: message
} }
}; };
} }

Loading…
Cancel
Save