Closed mekpavit closed 4 years ago
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
:memo: Please visit https://cla.developers.google.com/ to sign.
Once you've signed (or fixed any issues), please reply here with @googlebot I signed it!
and we'll verify it.
ℹ️ Googlers: Go here for more info.
@googlebot I signed it!
mekpavit@, thanks for sending your pull requests. Dialogflow team will review and verify it. We will merge the request if it all looks good.
WHY
Normally, the queryParameters.payload, which is put in projects.agent.sessions.detectIntent, should be shown in the request that is sent from Dialogflow to the fulfillment webhook. The document states that the payload CAN BE BOTH ProtoStruct or JSON objects, but, when the JSON objects was implemented, no payload is received by the webhook. (session.detectIntent)
After searching for the solution, this problem was once mentioned in this StackOverflow question. It seems that converting the queryParameters.payload from JSON objects to Struct solves the issue. So, this pull request is proposed to implement this solution to the dialogflow-integration server.
WHAT
queryParams.payload
field inDialogflowSessionClient.constructRequest
(this change will convert payload from JSON object to ProtoStruct and solve the mentioned issue).