Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
isamarin committed Nov 21, 2019
1 parent e67f954 commit e50756f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Alisa/Alisa.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ protected function getCommand(): bool
->getByName($this->request->getPayloadData()['NAME']);
} else {
$this->recognizedCommand = $this->triggers->getDefaultTrigger();
$this->storage->setTriggerData($this->storage->getPreviousTrigger(), $this->request->getUtterance());
}
if (array_key_exists('ASSIGN', $button)) {
$this->storage->setTriggerData($button['ASSIGN'], $button['TITLE']);
Expand All @@ -150,9 +151,7 @@ protected function getCommand(): bool
$_previousCommand = $this->triggers->getByName($previousTriggerName);
if ($_previousCommand->hasNextTrigger()) {
$this->recognizedCommand = $_previousCommand->getNextTrigger();
if ($this->request->isButtonClick() && !$this->request->isSubstitued()){
$this->storage->setItem($this->request->getUtterance(), $this->recognizedCommand->getName());
}
// $this->storage->setItem($this->request->getUtterance(), $this->recognizedCommand->getName());
return true;
}
}
Expand Down

0 comments on commit e50756f

Please sign in to comment.