xiaogang пре 3 година
родитељ
комит
26e654aa7a
1 измењених фајлова са 4 додато и 3 уклоњено
  1. 4 3
      app/Services/TencentImFriendService.php

+ 4 - 3
app/Services/TencentImFriendService.php

xqd
@@ -120,9 +120,10 @@ class TencentImFriendService
     {
         //TODO 请求添加好友前先拉取好友状态
         $res = $this->friendCheck($fromAccount,[$toAccount]);
-        dd($res);
-
-
+        if($res['InfoItem'][0]['Relation']=='CheckResult_Type_BothWay'){
+            $res['ResultItem'] = $res['InfoItem'];
+            return $res;
+        }
 
         $this->restApiName = self::TENCENT_REST_APIS['friendAddItem'];
         $baseApiHost = $this->getTencentImRestApiBaseHost();