Add condition to exit
This commit is contained in:
parent
1637b5541f
commit
aa34d174ef
|
@ -48,6 +48,10 @@ $decoded = json_decode($var);
|
||||||
|
|
||||||
// Store the chat ID
|
// Store the chat ID
|
||||||
$chat_id = $decoded->{"message"}->{"chat"}->{"id"};
|
$chat_id = $decoded->{"message"}->{"chat"}->{"id"};
|
||||||
|
if (!isset($decoded->{"message"}->{"forward_from"})){
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
if ($decoded->{"message"}->{"forward_from"}->{"username"} != "chtwrsbot") {
|
if ($decoded->{"message"}->{"forward_from"}->{"username"} != "chtwrsbot") {
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue