Respond to chat instead of user when checking allowed ids
authorCameron Ball <cameron@cameron1729.xyz>
Tue, 27 Nov 2018 05:43:39 +0000 (13:43 +0800)
committerCameron Ball <cameron@cameron1729.xyz>
Tue, 27 Nov 2018 05:51:01 +0000 (13:51 +0800)
purjolok.php

index 4566cea..2b7954b 100644 (file)
@@ -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);