xiaogang 3 роки тому
батько
коміт
65dfb2488e
1 змінених файлів з 8 додано та 8 видалено
  1. 8 8
      app/Http/Controllers/Api/ChatController.php

+ 8 - 8
app/Http/Controllers/Api/ChatController.php

xqd xqd
@@ -31,7 +31,7 @@ class ChatController extends Controller
             if(!$toUser = User::query()->where(['tencent_im_user_id'=>$request->tencent_im_user_id])->first()){
                 throw new Exception("对应用户不存在");
             }
-            if(!ChatList::query()->where(['user_id'=>$user->id,'to_user_id'=>$toUser->id])->first()){
+            //if(!ChatList::query()->where(['user_id'=>$user->id,'to_user_id'=>$toUser->id])->first()){
 
                 $tencent_account =new TencentImAccountService();
                 $tencent_friend =new TencentImFriendService();
@@ -53,13 +53,13 @@ class ChatController extends Controller
                     'atime'=>date('Y-m-d H:i:s'),
                 ]);
 
-            }else{
-                $res = [
-                    "ErrorCode"=>0,
-                    "ActionStatus"=>"OK",
-                    "ErrorInfo"=>""
-                ];
-            }
+//            }else{
+//                $res = [
+//                    "ErrorCode"=>0,
+//                    "ActionStatus"=>"OK",
+//                    "ErrorInfo"=>""
+//                ];
+//            }
             DB::commit();
         }catch (\Exception $exception){
             DB::rollBack();