From bef765e31867cd53717831f5848d95b8b34d502e Mon Sep 17 00:00:00 2001 From: dennydai Date: Sat, 2 Jan 2016 19:53:39 +0800 Subject: [PATCH] enable reply (hacking method) --- classes/Telegram-Bot/Base.php | 2 +- classes/Telegram-Bot/init.php | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/classes/Telegram-Bot/Base.php b/classes/Telegram-Bot/Base.php index 14e625f..a3b7334 100644 --- a/classes/Telegram-Bot/Base.php +++ b/classes/Telegram-Bot/Base.php @@ -19,6 +19,6 @@ class Base } public function msg($id, $msg) { - return $this->exec('sendMessage', array('chat_id' => $id, 'text' => $msg, 'disable_web_page_preview' => 1)); + return $this->exec('sendMessage', array('chat_id' => $id, 'text' => $msg, 'reply_to_message_id' => MSGID, 'disable_web_page_preview' => 1)); } } \ No newline at end of file diff --git a/classes/Telegram-Bot/init.php b/classes/Telegram-Bot/init.php index ef160f6..2216606 100644 --- a/classes/Telegram-Bot/init.php +++ b/classes/Telegram-Bot/init.php @@ -1,6 +1,7 @@ 0) { @@ -9,6 +10,8 @@ if ($GET['message']['chat']['id'] > 0) { $isgroup = true; } //reply to... - + $msgid = $GET['message']['message_id']; $from = $GET['message']['chat']['id']; - $text = $GET['message']['text']; \ No newline at end of file + $text = $GET['message']['text']; + +define('MSGID',$msgid); \ No newline at end of file