fix(GBConversationalService, WhatsappDirectLine): update component structure to include header type and format
Some checks are pending
GBCI / build (push) Waiting to run

This commit is contained in:
Rodrigo Rodriguez (Pragmatismo) 2025-06-11 09:40:58 -03:00
parent b0517c9c94
commit aa606c0d90
2 changed files with 13 additions and 13 deletions

View file

@ -666,14 +666,14 @@ export class GBConversationalService {
let data: any = {
name: template,
components: [
// {
// type: 'header',
// parameters: [
// {
// type: mediaType
// }
// ]
// }
{
type: 'header',
parameters: [
{
type: 'TEXT'
}
]
}
]
};
//data['components'][0]['parameters'][0][mediaType] = { link: urlMedia };

View file

@ -861,11 +861,11 @@ export class WhatsappDirectLine extends GBService {
let data: any = {
name: template,
components: [
// {
// type: 'HEADER',
// format: mediaType.toUpperCase(), // Use IMAGE or VIDEO format
// example: { header_handle: [handleMedia] }
// },
{
type: 'HEADER',
format: 'TEXT',
text: 'General Bots'
},
{
type: 'BODY',
text: text