Commit 8a2884fa authored by Gabriele's avatar Gabriele
Browse files

git commit -m 'Issue #3286085 by gambry, Project Update Bot: Automated Drupal...

git commit -m 'Issue #3286085 by gambry, Project Update Bot: Automated Drupal 10 compatibility fixes' --author="Gabriele <14898-gambry@users.noreply.drupalcode.org>"
parent 901510c4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)
+1 −1
Original line number Diff line number Diff line
@@ -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)
+1 −1
Original line number Diff line number Diff line
@@ -68,7 +68,7 @@ class IntentRequestApiAiProxy implements IntentRequestInterface {
   * {@inheritdoc}
   */
  public function getIntentName() {
    return $this->original->getResult()->getMetadata()->getIntentName();
    return $this->original->getResult()->getIntent()->getIntentDisplayName();
  }

  /**
+6 −3
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ class IntentResponseApiAiProxy implements IntentResponseInterface {
   *
   * @var \DialogFlow\Model\Webhook\Response
   */
  protected $original;
  protected Response $original;

  /**
   * IntentResponseAlexaProxy constructor.
@@ -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;
  }

}
+1 −1
Original line number Diff line number Diff line
@@ -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