| xqd
@@ -4,6 +4,7 @@
|
|
|
namespace App\Http\Controllers\Api;
|
|
|
|
|
|
|
|
|
+use App\Services\TencentImAccountService;
|
|
|
use App\Services\TencentImFriendService;
|
|
|
use Illuminate\Http\Request;
|
|
|
use PHPUnit\Util\Exception;
|
| xqd
@@ -24,9 +25,14 @@ class ChatController extends Controller
|
|
|
throw new Exception("参数错误");
|
|
|
}
|
|
|
|
|
|
+ $tencent_account =new TencentImAccountService();
|
|
|
+ $tencent_friend =new TencentImFriendService();
|
|
|
|
|
|
- $tencent_im =new TencentImFriendService();
|
|
|
- $res = $tencent_im->friendAddItem($user->tencent_im_user_id,$request->tencent_im_user_id);
|
|
|
+ //检测是否已经导入IM账号
|
|
|
+ $tencent_account->accountCheck($request->tencent_im_user_id);
|
|
|
+ dd($tencent_account);
|
|
|
+
|
|
|
+ $res = $tencent_friend->friendAddItem($user->tencent_im_user_id,$request->tencent_im_user_id);
|
|
|
}catch (\Exception $exception){
|
|
|
return $this->response->errorForbidden($exception->getMessage());
|
|
|
}
|