lip 3 miesięcy temu
rodzic
commit
6ef8f63da0
1 zmienionych plików z 8 dodań i 0 usunięć
  1. 8 0
      app/common/controller/User.php

+ 8 - 0
app/common/controller/User.php

@@ -87,6 +87,14 @@ class User
                 'last_login_time' => time(),
                 'login_count' => 1
             ]);
+
+            $content=lang('friend.newChat');
+            //把机器人添加到我的联系人中
+            $userM = new UserModel;
+            $user=$userM->setContact(1, 0,'event',$content);//机器人客服
+            if($user){
+                wsSendMsg($userInfo->user_id,'appendContact',$user);
+            }
         }
         if($userInfo['status']==0){
             return warning(lang('user.forbid'));