Browse Source

好有双方都发起直接同意

master
wanghongjun 2 months ago
parent
commit
90bd2fa249
  1. 14
      app/enterprise/controller/Friend.php

14
app/enterprise/controller/Friend.php

@ -71,6 +71,20 @@ class Friend extends BaseController
if($otherFriend){ if($otherFriend){
if($otherFriend->status>0){ if($otherFriend->status>0){
$status=1; $status=1;
// 双方都发起直接同意
$otherFriend->status = 1;
$otherFriend->save();
$content=lang('friend.newChat');
$userM=new User;
// 将对方的信息发送给我,把我的信息发送对方
$user=$userM->setContact($user_id,0,'event',$content);
if($user){
wsSendMsg($this->uid,'appendContact',$user);
}
$myInfo=$userM->setContact($this->uid,0,'event',$content);
if($myInfo){
wsSendMsg($user_id,'appendContact',$myInfo);
}
} }
} }
$model = new FriendModel(); $model = new FriendModel();

Loading…
Cancel
Save