Another minor fix to canChatWith...
[SonOfLokstallBot.git] / src / purjolok.php
index bc938dd..53b8146 100644 (file)
@@ -5,7 +5,7 @@ require_once('common.php');
 use Telegram\Bot\Actions;
 use Telegram\Bot\Commands\Command;
 
-if(getTelegram()->getWebHookUpdates() && !canChatWith(getTelegram()->getWebhookUpdates())) {
+if(getTelegram()->getWebHookUpdates()->get('message') && !canChatWith(getTelegram()->getWebhookUpdates())) {
     getTelegram()->sendMessage([
         'chat_id' => getTelegram()->getWebhookUpdates()->get('message')->get('chat')->get('id'),
         'text' => "Sorry, Dad says I can't talk to you."