Add condition to exit

This commit is contained in:
Ceda EI 2018-07-22 02:31:53 +05:30
parent 1637b5541f
commit aa34d174ef
1 changed files with 4 additions and 0 deletions

View File

@ -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();
}