fix bug: cannot chat with user

fix bug: cannot chat with user
This commit is contained in:
Denny Dai 2015-05-30 17:41:48 +08:00
parent b7a4b99225
commit 1cc087643e
2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
<?php
//init
require('classes/Telegram/Base.php');
$BOT = new DBot\Telegram\Client('unix:///tmp/tg.sck');
$BOT = new DBot\Telegram\Base('unix:///tmp/tg.sck');
require_once('init.php');
?>

View File

@ -4,9 +4,9 @@ require_once('config.inc.php');
require_once('functions.php');
$plugins = [];
if($_GET['from'] != BOT_NAME){
if($_GET['from'] != escapePeer(BOT_NAME)){
//is group?
if ($_GET['to'] == BOT_NAME) {
if ($_GET['to'] == escapePeer(BOT_NAME)) {
$isgroup = false;
}else{
$isgroup = true;