diff --git a/src/Extensions/KeyboardButton.php b/src/Extensions/KeyboardButton.php index d91fcbb..1ac0881 100644 --- a/src/Extensions/KeyboardButton.php +++ b/src/Extensions/KeyboardButton.php @@ -19,6 +19,11 @@ class KeyboardButton implements \JsonSerializable */ protected $url; + /** + * @var array + */ + protected $webApp; + /** * @var string */ @@ -73,6 +78,18 @@ public function url($url) return $this; } + /** + * @return $this + */ + public function webApp($url) + { + $this->webApp = [ + 'url' => $url, + ]; + + return $this; + } + /** * @param $callbackData * @return $this @@ -140,6 +157,7 @@ public function jsonSerialize() { return Collection::make([ 'url' => $this->url, + 'web_app' => $this->webApp, 'callback_data' => $this->callbackData, 'switch_inline_query' => $this->switchInlineQuery, 'switch_inline_query_current_chat' => $this->switchInlineQueryCurrentChat,