管理后台-封禁-调试
This commit is contained in:
@@ -278,7 +278,7 @@ class User extends adminApi
|
||||
'Text' => $content
|
||||
];
|
||||
//谁发送给谁,什么消息,是否同步到发送者1是,2否,消息是否只下发给在线用户 1 是,0 否
|
||||
model('api/Tencent')->user_sendmsg("administrator",$user_id,json_encode($text),2,0,1);
|
||||
model('api/Tencent')->user_sendmsg("administrator",$user_id,json_encode($text));
|
||||
}else{
|
||||
if($type ==1) {
|
||||
$res = model('User')->where('id', $user_id)->update(['status' => 1]);
|
||||
|
||||
@@ -399,13 +399,13 @@ class Tencent extends Model
|
||||
}
|
||||
|
||||
//指定用户发送消息给用户
|
||||
public function user_sendmsg($uid, $receive_uid, $message, $machine_type = 2, $OnlineOnlyFlag = 0,$is_admin=0){
|
||||
public function user_sendmsg($uid, $receive_uid, $message, $machine_type = 2, $OnlineOnlyFlag = 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){
|
||||
if($uid == 'administrator'){
|
||||
$from_Account ="administrator";
|
||||
}else{
|
||||
$from_Account ="u".$uid;
|
||||
@@ -425,7 +425,13 @@ class Tencent extends Model
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
if($uid == 'administrator'){
|
||||
$curlPost['MsgBody']['MsgType'] = 'TIMCustomElem';
|
||||
$curlPost['SendMsgControl'] = array(
|
||||
"NoUnread","NoLastMsg","WithMuteNotifications","NoMsgCheck"
|
||||
);
|
||||
}
|
||||
if($OnlineOnlyFlag == 1){
|
||||
$curlPost['OnlineOnlyFlag'] = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user