管理后台-封禁-调试
This commit is contained in:
@@ -405,34 +405,44 @@ class Tencent extends Model
|
|||||||
$im_admin = 'administrator';
|
$im_admin = 'administrator';
|
||||||
$admin_sig = $this->tencent_user_sig_info($im_admin);
|
$admin_sig = $this->tencent_user_sig_info($im_admin);
|
||||||
$rand = rand(111111111,9999999999);
|
$rand = rand(111111111,9999999999);
|
||||||
|
$postUrl = 'https://console.tim.qq.com/v4/openim/sendmsg?sdkappid='.$tencentyun_im_appid.'&identifier='.$im_admin.'&usersig='.$admin_sig.'&random='.$rand.'&contenttype=json';
|
||||||
if($uid == 'administrator'){
|
if($uid == 'administrator'){
|
||||||
$from_Account ="administrator";
|
$from_Account ="administrator";
|
||||||
|
$curlPost = array(
|
||||||
|
'SyncOtherMachine' => $machine_type,
|
||||||
|
'From_Account' => strval($from_Account),
|
||||||
|
'To_Account' => strval('u'.$receive_uid),
|
||||||
|
'MsgRandom' => time(),
|
||||||
|
'MsgBody' => array(
|
||||||
|
array(
|
||||||
|
'MsgType' => 'TIMCustomElem',
|
||||||
|
'MsgContent' => array(
|
||||||
|
'Data' => $message,
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
'SendMsgControl' => array(
|
||||||
|
"NoUnread","NoLastMsg","WithMuteNotifications","NoMsgCheck"
|
||||||
|
),
|
||||||
|
);
|
||||||
}else{
|
}else{
|
||||||
$from_Account ="u".$uid;
|
$from_Account ="u".$uid;
|
||||||
}
|
$curlPost = array(
|
||||||
$postUrl = 'https://console.tim.qq.com/v4/openim/sendmsg?sdkappid='.$tencentyun_im_appid.'&identifier='.$im_admin.'&usersig='.$admin_sig.'&random='.$rand.'&contenttype=json';
|
'SyncOtherMachine' => $machine_type,
|
||||||
|
'From_Account' => strval($from_Account),
|
||||||
$curlPost = array(
|
'To_Account' => strval('u'.$receive_uid),
|
||||||
'SyncOtherMachine' => $machine_type,
|
'MsgRandom' => time(),
|
||||||
'From_Account' => strval($from_Account),
|
'MsgBody' => array(
|
||||||
'To_Account' => strval('u'.$receive_uid),
|
array(
|
||||||
'MsgRandom' => time(),
|
'MsgType' => 'TIMTextElem',
|
||||||
'MsgBody' => array(
|
'MsgContent' => array(
|
||||||
array(
|
'Text' => $message,
|
||||||
'MsgType' => 'TIMTextElem',
|
|
||||||
'MsgContent' => array(
|
|
||||||
'Text' => $message,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
|
||||||
if($uid == 'administrator'){
|
|
||||||
$curlPost['MsgBody']['MsgType'] = 'TIMCustomElem';
|
|
||||||
$curlPost['MsgBody']['MsgContent']['Data'] = $message;
|
|
||||||
$curlPost['SendMsgControl'] = array(
|
|
||||||
"NoUnread","NoLastMsg","WithMuteNotifications","NoMsgCheck"
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($OnlineOnlyFlag == 1){
|
if($OnlineOnlyFlag == 1){
|
||||||
$curlPost['OnlineOnlyFlag'] = 1;
|
$curlPost['OnlineOnlyFlag'] = 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user