From 3f0d7c8453a76538b2b6bee0695b8e1b77eefcae Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Mon, 23 Oct 2023 16:28:56 +0200 Subject: [PATCH] Allow using WebAppDataCommand to handle web_app_data updates --- src/Telegram.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Telegram.php b/src/Telegram.php index 075b6fc6..e9b59751 100644 --- a/src/Telegram.php +++ b/src/Telegram.php @@ -581,7 +581,12 @@ public function handle(): bool */ protected function getCommandFromType(string $type): string { - return $this->ucFirstUnicode(str_replace('_', '', $type)); + switch ($type) { + case 'web_app_data': + return $type; + default: + return $this->ucFirstUnicode(str_replace('_', '', $type)); + } } /**