|
@@ -29,7 +29,10 @@ class ChatController extends Controller
|
|
$tencent_friend =new TencentImFriendService();
|
|
$tencent_friend =new TencentImFriendService();
|
|
|
|
|
|
//检测是否已经导入IM账号
|
|
//检测是否已经导入IM账号
|
|
- dd( $tencent_account->accountCheck([$request->tencent_im_user_id]));
|
|
|
|
|
|
+ $check_result = $tencent_account->accountCheck([$request->tencent_im_user_id]);
|
|
|
|
+ if(!isset($check_result) || $check_result['AccountStatus']=="NotImported"){
|
|
|
|
+ throw new Exception("对方账户错误");
|
|
|
|
+ }
|
|
|
|
|
|
$res = $tencent_friend->friendAddItem($user->tencent_im_user_id,$request->tencent_im_user_id);
|
|
$res = $tencent_friend->friendAddItem($user->tencent_im_user_id,$request->tencent_im_user_id);
|
|
}catch (\Exception $exception){
|
|
}catch (\Exception $exception){
|