diff --git a/pkg/proto/friend/friend.proto b/pkg/proto/friend/friend.proto index ada85b2fc..e7cdb1b59 100644 --- a/pkg/proto/friend/friend.proto +++ b/pkg/proto/friend/friend.proto @@ -4,18 +4,18 @@ option go_package = "Open_IM/pkg/proto/friend;friend"; package friend; message GetFriendsInfoReq{ - string ToUserID = 1; - string FromUserID = 2; + string fromUserID = 1; + repeated string toUserIDs = 2; } -message GetFriendInfoResp{ +message GetFriendsInfoResp{ repeated server_api_params.FriendInfo FriendInfoList = 1; } message AddFriendReq{ - string ToUserID = 1; - string FromUserID = 2; - string ReqMsg = 3; + string fromUserID = 1; + string toUserID = 2; + string reqMsg = 3; } message AddFriendResp{ } @@ -30,109 +30,111 @@ message ImportFriendResp{ } -message GetFriendApplyListReq{ - string ToUserID = 1; +message GetToFriendApplyListReq{ + string userID = 1; + server_api_params.RequestPagination pagination = 2; + } -message GetFriendApplyListResp{ +message GetToFriendApplyListResp{ repeated server_api_params.FriendRequest FriendRequestList = 1; + int32 total = 2; } message GetFriendListReq{ - string ToUserID = 1; - string FromUserID = 2; + server_api_params.RequestPagination pagination = 1; + string userID = 2; } message GetFriendListResp{ repeated server_api_params.FriendInfo FriendInfoList = 1; + int32 total = 2; } message AddBlacklistReq{ - string ToUserID = 1; - string FromUserID = 2; + string fromUserID = 1; + string toUserID = 2; } message AddBlacklistResp{ - } message RemoveBlacklistReq{ - string ToUserID = 1; - string FromUserID = 2; + string fromUserID = 1; + string toUserID = 2; } message RemoveBlacklistResp{ - } message GetBlacklistReq{ - string FromUserID = 1; + string userID = 1; + server_api_params.RequestPagination pagination = 1; } message GetBlacklistResp{ repeated server_api_params.PublicUserInfo BlackUserInfoList = 1; + int32 total = 2; } message IsFriendReq{ - string ToUserID = 1; - string FromUserID = 2; + string fromUserID = 1; + string toUserID = 2; } message IsFriendResp{ - bool Response = 1; + bool Response = 1; } message IsInBlackListReq{ - string ToUserID = 1; - string FromUserID = 2; + string fromUserID = 1; + string toUserID = 2; } message IsInBlackListResp{ - bool Response = 1; + bool Response = 1; } message DeleteFriendReq{ - string ToUserID = 1; - string FromUserID = 2; + string fromUserID = 1; + string toUserID = 2; } message DeleteFriendResp{ - } //process -message AddFriendResponseReq{ - string ToUserID = 1; - string FromUserID = 2; +message FriendApplyResponseReq{ + string fromUserID = 1; + string toUserID = 2; int32 handleResult = 3; string handleMsg = 4; } -message AddFriendResponseResp{ - +message FriendApplyResponseResp{ } message SetFriendRemarkReq{ - string ToUserID = 1; - string FromUserID = 2; - string Remark = 3; + string fromUserID = 1; + string toUserID = 2; + string remark = 3; } message SetFriendRemarkResp{ - } -message GetSelfApplyListReq{ - string ToUserID = 1; - string FromUserID = 2; +message GetFromFriendApplyListReq{ + string userID = 2; + server_api_params.RequestPagination pagination = 2; } -message GetSelfApplyListResp{ - repeated server_api_params.FriendRequest FriendRequestList = 1; +message GetFromFriendApplyListResp{ + repeated server_api_params.FriendRequest friendRequestList = 1; + int32 total = 2; } service friend{ //申请加好友 rpc addFriend(AddFriendReq) returns(AddFriendResp); //获取收到的好友申请列表 - rpc getFriendApplyList(GetFriendApplyListReq) returns(GetFriendApplyListResp); + rpc getToFriendApplyList(GetToFriendApplyListReq) returns(GetToFriendApplyListResp); //获取主动发出去的好友申请列表 - rpc getSelfApplyList(GetSelfApplyListReq) returns(GetSelfApplyListResp); + rpc getFromFriendApplyList(GetFromFriendApplyListReq) returns(GetFromFriendApplyListResp); //获取好友列表 rpc getFriendList(GetFriendListReq) returns(GetFriendListResp); //添加黑名单 @@ -148,9 +150,11 @@ service friend{ //删除好友 rpc deleteFriend(DeleteFriendReq) returns(DeleteFriendResp); //对好友申请响应(同意或拒绝) - rpc addFriendResponse(AddFriendResponseReq) returns(AddFriendResponseResp); + rpc friendApplyResponse(FriendApplyResponseReq) returns(FriendApplyResponseResp); //设置好友备注 rpc setFriendRemark(SetFriendRemarkReq) returns(SetFriendRemarkResp); //导入好友关系 rpc importFriend(ImportFriendReq) returns(ImportFriendResp); + //获取指定好友信息 + rpc getFriendsInfo(GetFriendsInfoReq) returns (GetFriendsInfoResp); } \ No newline at end of file