diff --git a/webhook.php b/webhook.php index d6422d0..e5783cf 100644 --- a/webhook.php +++ b/webhook.php @@ -48,6 +48,10 @@ $decoded = json_decode($var); // Store the chat ID $chat_id = $decoded->{"message"}->{"chat"}->{"id"}; +if (!isset($decoded->{"message"}->{"forward_from"})){ + exit(); +} + if ($decoded->{"message"}->{"forward_from"}->{"username"} != "chtwrsbot") { exit(); }