管理后台-封禁-调试
This commit is contained in:
@@ -399,18 +399,22 @@ class Tencent extends Model
|
||||
}
|
||||
|
||||
//指定用户发送消息给用户
|
||||
public function user_sendmsg($uid, $receive_uid, $message, $machine_type = 2, $OnlineOnlyFlag = 0){
|
||||
public function user_sendmsg($uid, $receive_uid, $message, $machine_type = 2, $OnlineOnlyFlag = 0,$is_admin=0){
|
||||
$config = get_system_config();
|
||||
$tencentyun_im_appid = $config['tencentyun_im_appid'];
|
||||
$im_admin = 'administrator';
|
||||
$admin_sig = $this->tencent_user_sig_info($im_admin);
|
||||
$rand = rand(111111111,9999999999);
|
||||
|
||||
if($is_admin == 1){
|
||||
$from_Account ="administrator";
|
||||
}else{
|
||||
$from_Account ="u".$uid;
|
||||
}
|
||||
$postUrl = 'https://console.tim.qq.com/v4/openim/sendmsg?sdkappid='.$tencentyun_im_appid.'&identifier='.$im_admin.'&usersig='.$admin_sig.'&random='.$rand.'&contenttype=json';
|
||||
|
||||
$curlPost = array(
|
||||
'SyncOtherMachine' => $machine_type,
|
||||
'From_Account' => strval('u'.$uid),
|
||||
'From_Account' => strval($from_Account),
|
||||
'To_Account' => strval('u'.$receive_uid),
|
||||
'MsgRandom' => time(),
|
||||
'MsgBody' => array(
|
||||
@@ -429,7 +433,8 @@ class Tencent extends Model
|
||||
$curlPost = json_encode($curlPost);
|
||||
|
||||
$reslut = $this->tencent_post_url($postUrl, $curlPost);
|
||||
Log::record("xitong消息信息2:".$reslut,"info");
|
||||
print_r($reslut);die;
|
||||
// Log::record("xitong消息信息2:".$reslut,"info");
|
||||
return $reslut;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user