Need to change parameter agent.UNSPECIFIED to specific channel for example
agent.add(
new Payload('FACEBOOK', response, {
rawPayload: true,
sendAsMessage: true,
})
);
agent.add("Select one");
This code is working.
Question is. Why it doesn't work when using an agent.UNSPECIFIED?
let response = { 'line': { 'type': 'image', 'originalContentUrl': 'https://vision.riverplus.com/wp-content/uploads/2020/01/qrcode.jpg', 'previewImageUrl': 'https://vision.riverplus.com/wp-content/uploads/2020/01/qrcode.jpg' }, "facebook": { "attachment": { "type": "template", "payload": { "template_type": "generic", "elements": [ { "title": "Hello world", "image_url": "https://vision.riverplus.com/wp-content/uploads/2020/01/qrcode.jpg", "subtitle": "sub title text", } ] } } } } agent.add( new Payload(agent.UNSPECIFIED, response, { rawPayload: true, sendAsMessage: true, }) ); agent.add("Select one"); This code will send only the text "Select one"
Need to change parameter agent.UNSPECIFIED to specific channel for example agent.add( new Payload('FACEBOOK', response, { rawPayload: true, sendAsMessage: true, }) ); agent.add("Select one");
This code is working.
Question is. Why it doesn't work when using an agent.UNSPECIFIED?