mirror of
				https://github.com/openimsdk/open-im-server.git
				synced 2025-10-31 16:32:12 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			21 lines
		
	
	
		
			648 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			648 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package friend
 | |
| 
 | |
| import (
 | |
| 	"Open_IM/pkg/common/db/mysql_model/im_mysql_model"
 | |
| 	"Open_IM/pkg/common/log"
 | |
| 	pbFriend "Open_IM/pkg/proto/friend"
 | |
| 	"context"
 | |
| 	"fmt"
 | |
| )
 | |
| 
 | |
| func (s *friendServer) IsInBlackList(ctx context.Context, req *pbFriend.IsInBlackListReq) (*pbFriend.IsInBlackListResp, error) {
 | |
| 	log.InfoByArgs("rpc is in blacklist is server,args=%s", req.String())
 | |
| 	var isInBlacklist = false
 | |
| 	err := im_mysql_model.FindRelationshipFromBlackList(req.ReceiveUid, req.SendUid)
 | |
| 	if err == nil {
 | |
| 		isInBlacklist = true
 | |
| 	}
 | |
| 	log.InfoByArgs(fmt.Sprintf("rpc is in blackList success return"))
 | |
| 	return &pbFriend.IsInBlackListResp{Response: isInBlacklist}, nil
 | |
| }
 |