fix bug: cannot chat with user
fix bug: cannot chat with user
This commit is contained in:
parent
b7a4b99225
commit
1cc087643e
2
BOT.php
2
BOT.php
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
//init
|
//init
|
||||||
require('classes/Telegram/Base.php');
|
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');
|
require_once('init.php');
|
||||||
?>
|
?>
|
4
init.php
4
init.php
@ -4,9 +4,9 @@ require_once('config.inc.php');
|
|||||||
require_once('functions.php');
|
require_once('functions.php');
|
||||||
$plugins = [];
|
$plugins = [];
|
||||||
|
|
||||||
if($_GET['from'] != BOT_NAME){
|
if($_GET['from'] != escapePeer(BOT_NAME)){
|
||||||
//is group?
|
//is group?
|
||||||
if ($_GET['to'] == BOT_NAME) {
|
if ($_GET['to'] == escapePeer(BOT_NAME)) {
|
||||||
$isgroup = false;
|
$isgroup = false;
|
||||||
}else{
|
}else{
|
||||||
$isgroup = true;
|
$isgroup = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user