Skip to content
This repository has been archived by the owner on Jan 2, 2023. It is now read-only.

Fixed #32 #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/RichMessage/Suggestion.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ class Suggestion extends RichMessage

/** @var array */
protected $replies = [];

/** @var string */
protected $title;

/**
* Create a new Suggestion instance.
Expand All @@ -31,6 +34,17 @@ public static function create($reply = null)
return $suggestion;
}

/**
* Set the title for a Card.
*
* @param string $title
*/
public function title($title)
{
$this->title = $title;
return $this;
}

/**
* Set the reply for a Suggestion.
*
Expand Down Expand Up @@ -103,6 +117,7 @@ protected function renderV2()
} else {
$out = [
'quickReplies' => [
'title' => $this->title,
'quickReplies' => $this->replies,
],
];
Expand Down