dialogflow-fulfillment-nodejs
dialogflow-fulfillment-nodejs copied to clipboard
Multiple messages not supported with payloads
When using a payload with the V2 agent, only the payload gets sent on platforms that support multiple message responses (eg, Facebook).
Eg,:
agent.add(new Text({'text': 'hello', 'platform': 'FACEBOOK'}))
agent.add(new Payload('FACEBOOK', {...})
will only send the payload, as opposed to both 'hello' and the payload
Currently the library supports a payload or other response types but not both at the same time. I'll leave this open as a feature request
Came across this issue today. Would be great to have a update that allowed for this please
If multiple messages are supported using Dialogflow UI, then why not using library. Is there any alternate way or trick to do so?
This should be fixed by #113
Same issue here, so #113 was merged but not deployed yet?
@stevenbeck unfortunately #113 didn't fix this (at least for Facebook Messenger) Please check #146
#113 Still didn't fix this on Facebook Messenger. If there is Payload in response along with others, will display only Payload.
confirm about this issue . if mix message and payload it will response only payload type
As some you may have noticed, Facebook integration supports messages or a payload, not both.
#173 fixes the Payload.sendAsMessage option to support this.
Thanks @stevenbeck, can confirm this is now fixed. Just make sure to use:
agent.add(new Payload(agent.FACEBOOK, payload, {sendAsMessage: true}));
I've updated package to dialogflow-fulfillment@^0.6.1
Event after adding {sendAsMessage: true} , only payload is shown.
Is there anything else to modify?
@Ashwin-Kapes dialogflow-fulfillment@^0.6.1 does not include fixes from #173. Although it's already merged, you'll need to wait until package is bumped to 0.6.2 and published to be available on npm.
In the meantime, just clone from the latest commit here, and you can send text + payload like:
agent.add( new Text('Hello there') ); // or just agent.add('hello');
agent.add( new Payload(agent.FACEBOOK, payload, {sendAsMessage:true}) );
I tested with current latest commit (aaade16) and it does work, Text + Payload.
@Ashwin-Kapes
dialogflow-fulfillment@^0.6.1does not include fixes from #173. Although it's already merged, you'll need to wait until package is bumped to 0.6.2 and published to be available onnpm.In the meantime, just clone from the latest commit here, and you can send text + payload like:
agent.add( new Text('Hello there') ); // or just agent.add('hello'); agent.add( new Payload(agent.FACEBOOK, payload, {sendAsMessage:true}) );I tested with current latest commit (
aaade16) and it does work,Text+Payload.
i tested latest commit (c36cf9c), same in telegram, multiple payload not work error result Payload response for TELEGRAM already defined.
Any updates to this issue? I am still unable to send two custom payloads, e.g.
agent.add(new Payload(agent.FACEBOOK, payload1, {sendAsMessage: true}));
agent.add(new Payload(agent.FACEBOOK, payload2, {sendAsMessage: true}));
I'm still unable to send two custom payloads for Telegram, are there any fixes for this? Thanks
agent.add(new Payload(agent.TELEGRAM, payload1, {sendAsMessage: true}));
agent.add(new Payload(agent.TELEGRAM, payload2, {sendAsMessage: true}));
are there any fixes for this? Thanks
any update on this issue?
any update on this issue?
any updates?
Lol, it's been 3 years to wait for this feature