diff --git a/src/RichMessage/RichMessage.php b/src/RichMessage/RichMessage.php index e4dbb61..d932dac 100644 --- a/src/RichMessage/RichMessage.php +++ b/src/RichMessage/RichMessage.php @@ -44,7 +44,7 @@ public function doesSupportRichMessage() } /** - * Set the fallback text if a request source doesn't support rich messages + * Set the fallback text if a request source doesn't support rich messages. */ public function setFallbackText($text) { @@ -56,12 +56,13 @@ public function setFallbackText($text) /** * Alias of setFallbackText() to fit more inline with text(), button(), image(), etc. */ - public function fallbackText($text){ + public function fallbackText($text) + { return $this->setFallbackText($text); } /** - * Get the fallback text + * Get the fallback text. * * @return string */ @@ -70,7 +71,6 @@ public function getFallbackText() return $this->fallbackText; } - protected function setAgentVersion($agentVersion) { if (self::API_V1 != $agentVersion && self::API_V2 != $agentVersion) { diff --git a/src/WebhookClient.php b/src/WebhookClient.php index 679ce42..8125472 100644 --- a/src/WebhookClient.php +++ b/src/WebhookClient.php @@ -297,7 +297,7 @@ public function reply($message) $this->text = $message; } } elseif ($message instanceof RichMessage) { - if(! $this->doesSupportRichMessage()){ + if (! $this->doesSupportRichMessage()){ $this->text = $message->getFallbackText(); }