enable reply (hacking method)

This commit is contained in:
dennydai 2016-01-02 19:53:39 +08:00
parent 515aacbccb
commit bef765e318
2 changed files with 6 additions and 3 deletions

View File

@ -19,6 +19,6 @@ class Base
} }
public function msg($id, $msg) 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));
} }
} }

View File

@ -1,6 +1,7 @@
<?php <?php
$BOT = new Base; $BOT = new Base;
$GET = json_decode(file_get_contents("php://input"),true); $GET = json_decode(file_get_contents("php://input"),true);
$debug = file_get_contents("php://input");
//is group? //is group?
if ($GET['message']['chat']['id'] > 0) { if ($GET['message']['chat']['id'] > 0) {
@ -9,6 +10,8 @@ if ($GET['message']['chat']['id'] > 0) {
$isgroup = true; $isgroup = true;
} }
//reply to... //reply to...
$msgid = $GET['message']['message_id'];
$from = $GET['message']['chat']['id']; $from = $GET['message']['chat']['id'];
$text = $GET['message']['text']; $text = $GET['message']['text'];
define('MSGID',$msgid);