Skip to content

Commit

Permalink
Merge pull request #556 from DiegoAlonso27/main
Browse files Browse the repository at this point in the history
fix: arreglando dir y varios mensajes en dialog flow essential
  • Loading branch information
leifermendez committed Feb 10, 2023
2 parents 405d73a + 2f07d86 commit bd90939
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions packages/contexts/src/dialogflow/dialogflow.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,19 @@ class DialogFlowContext extends CoreClass {
return
}

const ctxFromDX = {
/* const ctxFromDX = {
answer: queryResult?.fulfillmentText,
}
} */

const messagesFromCX = queryResult['fulfillmentMessages']
.map((a) => {
if (a.message === 'text') {
return { answer: a.text.text[0] }
}
})
.filter((e) => e)

this.sendFlowSimple([ctxFromDX], from)
this.sendFlowSimple(messagesFromCX, from)
}
}

Expand Down

0 comments on commit bd90939

Please sign in to comment.