mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-23 18:00:32 +08:00
Refactor code
This commit is contained in:
parent
df861b59c1
commit
c42e70686d
@ -258,7 +258,7 @@ func (s *friendServer) AddFriendResponse(ctx context.Context, req *pbFriend.AddF
|
||||
_, err = imdb.GetFriendRelationshipFromFriend(req.CommID.ToUserID, req.CommID.FromUserID)
|
||||
if err == nil {
|
||||
log.NewWarn(req.CommID.OperationID, "FindFriendRelationshipFromFriend exist", req.CommID.ToUserID, req.CommID.FromUserID)
|
||||
}
|
||||
} else {
|
||||
toInsertFollow := imdb.Friend{OwnerUserID: req.CommID.ToUserID, FriendUserID: req.CommID.FromUserID, OperatorUserID: req.CommID.OpUserID}
|
||||
err = imdb.InsertToFriend(&toInsertFollow)
|
||||
if err != nil {
|
||||
@ -267,6 +267,7 @@ func (s *friendServer) AddFriendResponse(ctx context.Context, req *pbFriend.AddF
|
||||
}
|
||||
chat.FriendAddedNotification(req.CommID.OperationID, req.CommID.OpUserID, req.CommID.FromUserID, req.CommID.ToUserID)
|
||||
}
|
||||
}
|
||||
|
||||
chat.FriendApplicationProcessedNotification(req)
|
||||
log.NewInfo(req.CommID.OperationID, "rpc AddFriendResponse ok")
|
||||
|
Loading…
x
Reference in New Issue
Block a user