|
|
@ -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(); |
|
|
|