From 1bc3496e502d206d97daaf83b4a23606c4a3b8f6 Mon Sep 17 00:00:00 2001 From: Cameron Ball Date: Sat, 22 Dec 2018 22:44:00 +0800 Subject: [PATCH] Minor fix to canChatWith check --- src/purjolok.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/purjolok.php b/src/purjolok.php index acd6a42..bc938dd 100644 --- a/src/purjolok.php +++ b/src/purjolok.php @@ -5,7 +5,7 @@ require_once('common.php'); use Telegram\Bot\Actions; use Telegram\Bot\Commands\Command; -if(!canChatWith(getTelegram()->getWebhookUpdates())) { +if(getTelegram()->getWebHookUpdates() && !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." -- 2.11.0