From d7748f66a94898ab4fdb3c0ef97695497fc96b83 Mon Sep 17 00:00:00 2001 From: Cameron Ball Date: Tue, 27 Nov 2018 13:43:39 +0800 Subject: [PATCH] Respond to chat instead of user when checking allowed ids --- purjolok.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/purjolok.php b/purjolok.php index 4566cea..2b7954b 100644 --- a/purjolok.php +++ b/purjolok.php @@ -7,7 +7,7 @@ use Telegram\Bot\Commands\Command; if(!canChatWith(getTelegram()->getWebhookUpdates())) { getTelegram()->sendMessage([ - 'chat_id' => getTelegram()->getWebhookUpdates()->get('message')->get('from')->get('id'), + 'chat_id' => getTelegram()->getWebhookUpdates()->get('message')->get('chat')->get('id'), 'text' => "Sorry, Dad says I can't talk to you." ]); exit(0); -- 2.11.0