Loading api_ai_webhook.info.yml +1 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ name: Dialogflow Webhook type: module description: Dialogflow (formal Api.AI) Webhook implementation. core: 8.x core_version_requirement: ^8 || ^9 core_version_requirement: ^8 || ^9 || ^10 package: Chatbot test_dependencies: - chatbot_api:chatbot_api (>=2.0-rc0) modules/chatbot_api_apiai/chatbot_api_apiai.info.yml +1 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ name: Chatbot API - Dialogflow type: module description: Dialogflow driver for Chatbot API core: 8.x core_version_requirement: ^8 || ^9 core_version_requirement: ^8 || ^9 || ^10 package: Chatbot dependencies: - api_ai_webhook:api_ai_webhook (>=2.0-rc0) Loading modules/chatbot_api_apiai/src/IntentRequestApiAiProxy.php +1 −1 Original line number Diff line number Diff line Loading @@ -68,7 +68,7 @@ class IntentRequestApiAiProxy implements IntentRequestInterface { * {@inheritdoc} */ public function getIntentName() { return $this->original->getResult()->getMetadata()->getIntentName(); return $this->original->getResult()->getIntent()->getIntentDisplayName(); } /** Loading modules/chatbot_api_apiai/src/IntentResponseApiAiProxy.php +6 −3 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ class IntentResponseApiAiProxy implements IntentResponseInterface { * * @var \DialogFlow\Model\Webhook\Response */ protected $original; protected Response $original; /** * IntentResponseAlexaProxy constructor. Loading Loading @@ -81,14 +81,17 @@ class IntentResponseApiAiProxy implements IntentResponseInterface { * {@inheritdoc} */ public function setIntentResponse($text) { return $this->original->setSpeech($text); $this->original->getFulfillment()->add('text', $text); return $this; } /** * {@inheritdoc} */ public function setIntentDisplayCard($content, $title = NULL) { return $this->original->setDisplayText($content); // This feature has been removed from Dialogflow. // @see \DialogFlow\Model\Webhook\Response::setDisplayText() return $this; } } src/ApiAiEvent.php +1 −1 Original line number Diff line number Diff line Loading @@ -2,9 +2,9 @@ namespace Drupal\api_ai_webhook; use Symfony\Contracts\EventDispatcher\Event; use DialogFlow\Model\Webhook\Request; use DialogFlow\Model\Webhook\Response; use Symfony\Component\EventDispatcher\Event; /** * Implements a new Symfony event. Loading Loading
api_ai_webhook.info.yml +1 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ name: Dialogflow Webhook type: module description: Dialogflow (formal Api.AI) Webhook implementation. core: 8.x core_version_requirement: ^8 || ^9 core_version_requirement: ^8 || ^9 || ^10 package: Chatbot test_dependencies: - chatbot_api:chatbot_api (>=2.0-rc0)
modules/chatbot_api_apiai/chatbot_api_apiai.info.yml +1 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ name: Chatbot API - Dialogflow type: module description: Dialogflow driver for Chatbot API core: 8.x core_version_requirement: ^8 || ^9 core_version_requirement: ^8 || ^9 || ^10 package: Chatbot dependencies: - api_ai_webhook:api_ai_webhook (>=2.0-rc0) Loading
modules/chatbot_api_apiai/src/IntentRequestApiAiProxy.php +1 −1 Original line number Diff line number Diff line Loading @@ -68,7 +68,7 @@ class IntentRequestApiAiProxy implements IntentRequestInterface { * {@inheritdoc} */ public function getIntentName() { return $this->original->getResult()->getMetadata()->getIntentName(); return $this->original->getResult()->getIntent()->getIntentDisplayName(); } /** Loading
modules/chatbot_api_apiai/src/IntentResponseApiAiProxy.php +6 −3 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ class IntentResponseApiAiProxy implements IntentResponseInterface { * * @var \DialogFlow\Model\Webhook\Response */ protected $original; protected Response $original; /** * IntentResponseAlexaProxy constructor. Loading Loading @@ -81,14 +81,17 @@ class IntentResponseApiAiProxy implements IntentResponseInterface { * {@inheritdoc} */ public function setIntentResponse($text) { return $this->original->setSpeech($text); $this->original->getFulfillment()->add('text', $text); return $this; } /** * {@inheritdoc} */ public function setIntentDisplayCard($content, $title = NULL) { return $this->original->setDisplayText($content); // This feature has been removed from Dialogflow. // @see \DialogFlow\Model\Webhook\Response::setDisplayText() return $this; } }
src/ApiAiEvent.php +1 −1 Original line number Diff line number Diff line Loading @@ -2,9 +2,9 @@ namespace Drupal\api_ai_webhook; use Symfony\Contracts\EventDispatcher\Event; use DialogFlow\Model\Webhook\Request; use DialogFlow\Model\Webhook\Response; use Symfony\Component\EventDispatcher\Event; /** * Implements a new Symfony event. Loading