|  | @@ -163,7 +163,14 @@ class Userfollow extends Api
 | 
	
		
			
				|  |  |      public function refuse_newfriend(){
 | 
	
		
			
				|  |  |          $id = input('msg_id',0);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +        $msg_info = Db::name('message')->where('id',$id)->find();
 | 
	
		
			
				|  |  |          Db::name('message')->where('id',$id)->update(['status'=>1]);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        //拒绝给个消息
 | 
	
		
			
				|  |  | +        if($msg_info['infotype'] == 'newfriend' && !empty($msg_info['infotype_id'])){
 | 
	
		
			
				|  |  | +            $msg_id = \app\common\model\Message::addMessage($msg_info['infotype_id'],'好友申请被拒绝',$this->auth->nickname.'拒绝了您的好友请求');
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |          $this->success('已拒绝');
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -171,6 +178,7 @@ class Userfollow extends Api
 | 
	
		
			
				|  |  |      //关注某人
 | 
	
		
			
				|  |  |      public function follow_one(){
 | 
	
		
			
				|  |  |          $follow_uid = input('follow_uid',0);
 | 
	
		
			
				|  |  | +        $msg_id = input('msg_id',0);
 | 
	
		
			
				|  |  |          if(!$follow_uid){
 | 
	
		
			
				|  |  |              $this->error(__('Invalid parameters'));
 | 
	
		
			
				|  |  |          }
 | 
	
	
		
			
				|  | @@ -223,6 +231,11 @@ class Userfollow extends Api
 | 
	
		
			
				|  |  |              Db::name('message')->insertGetId($message);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +        //我从好友审核列表过来的,我又回关了
 | 
	
		
			
				|  |  | +        if(!empty($msg_id)){
 | 
	
		
			
				|  |  | +            $msg_id = \app\common\model\Message::addMessage($follow_uid,'好友申请已通过',$this->auth->nickname.'同意了您的好友请求');
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |          
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          Db::commit();
 |