Skip to content

Commit

Permalink
Merge branch 'master' of github.com:botman/driver-slack
Browse files Browse the repository at this point in the history
  • Loading branch information
mpociot committed Oct 3, 2017
2 parents fc6acb6 + 91e6e2d commit d3b08b6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/SlackDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ private function convertQuestion(Question $question)
if ($button['type'] === 'select') {
return $button;
}

return array_merge([
'name' => $button['name'],
'text' => $button['text'],
Expand Down Expand Up @@ -322,10 +323,10 @@ protected function replyWithToken($message, $matchingMessage, $additionalParamet
* the text and append the question.
*/
if ($message instanceof Question) {
if (!isset($parameters['text'])) {
if (! isset($parameters['text'])) {
$parameters['text'] = '';
}
if (!isset($parameters['attachments'])) {
if (! isset($parameters['attachments'])) {
$parameters['attachments'] = json_encode([$this->convertQuestion($message)]);
}
} elseif ($message instanceof OutgoingMessage) {
Expand Down

0 comments on commit d3b08b6

Please sign in to comment.