From 3ba881f641bad5d2501c344c3ebc8f4aae6506f1 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Mon, 20 Dec 2021 16:29:24 +0800 Subject: [PATCH 001/337] pb: open_im_sdk.OfflinePushInfo --- config/config.yaml | 31 +++++++++++++++++++++++++++++++ internal/rpc/chat/send_msg.go | 27 ++++++++++++++++++++++----- pkg/proto/sdk_ws/ws.proto | 2 ++ 3 files changed, 55 insertions(+), 5 deletions(-) diff --git a/config/config.yaml b/config/config.yaml index f5edcc8e1..ca754a55b 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -171,6 +171,37 @@ messagecallback: stateChange: switch: false +iOSPush: + pushSound: "xxx" + badgeCount: 1 + +notification: + groupCreated: + conversation: + conversationChanged: 1 + unreadCount: 1 + offlinePush: + switch: true + title: "create group title" + desc: "create group desc" + ext: "create group ext" + defaultTips: + tips: "create the group" # xx create the group + + groupInfoChanged: + conversation: + conversationChanged: 1 + unreadCount: 1 + offlinePush: + switch: true + title: "group info changed title" + desc: "group info changed desc" + ext: "group info changed ext" + defaultTips: + tips: "group info changed by" # group info changed by xx + conversationChanged: 0 + + #---------------demo configuration---------------------# #The following configuration items are applied to openIM Demo configuration demoswitch: true diff --git a/internal/rpc/chat/send_msg.go b/internal/rpc/chat/send_msg.go index d237c2507..640309c91 100644 --- a/internal/rpc/chat/send_msg.go +++ b/internal/rpc/chat/send_msg.go @@ -6,6 +6,7 @@ import ( "Open_IM/pkg/common/config" "Open_IM/pkg/common/constant" "Open_IM/pkg/common/db" + "Open_IM/pkg/common/db/mysql_model/im_mysql_model" http2 "Open_IM/pkg/common/http" "Open_IM/pkg/common/log" "Open_IM/pkg/grpc-etcdv3/getcdv3" @@ -203,17 +204,33 @@ type WSToMsgSvrChatMsg struct { OperationID string `protobuf:"bytes,10,opt,name=OperationID" json:"OperationID,omitempty"` } -func CreateGroupNotification(SendID, RecvID string, tip open_im_sdk.CreateGroupTip) { +func CreateGroupNotification(sendID string, creator im_mysql_model.User, group im_mysql_model.Group, memberList []im_mysql_model.GroupMember) { var msg WSToMsgSvrChatMsg msg.OperationID = utils.OperationIDGenerator() - msg.SendID = SendID - msg.RecvID = RecvID + msg.SendID = sendID + msg.RecvID = group.GroupId msg.ContentType = constant.CreateGroupTip - msg.SessionType = constant.SysMsgType + msg.SessionType = constant.GroupChatType + msg.MsgFrom = constant.SysMsgType + var groupCreated open_im_sdk.GroupCreatedTips + groupCreated.Group = &open_im_sdk.GroupInfo{} + utils.CopyStructFields(groupCreated.Group, group) + groupCreated.Creator = &open_im_sdk.GroupMemberFullInfo{} + utils.CopyStructFields(groupCreated.Creator, creator) + for _, v := range memberList { + var groupMemberInfo open_im_sdk.GroupMemberFullInfo + utils.CopyStructFields(&groupMemberInfo, v) + groupCreated.MemberList = append(groupCreated.MemberList, &groupMemberInfo) + } + var tips open_im_sdk.TipsComm + tips.Detail = utils.StructToJsonString(groupCreated) + tips.DefaultTips = creator.Name + " " + config.Config.DefaultTips.GroupCreatedTips + msg.Content = utils.StructToJsonString(tips) + Notification(&msg, false) } -func Notification(m *WSToMsgSvrChatMsg, onlineUserOnly bool, offlineInfo open_im_sdk.OfflinePushInfo) { +func Notification(m *WSToMsgSvrChatMsg, onlineUserOnly bool) { } diff --git a/pkg/proto/sdk_ws/ws.proto b/pkg/proto/sdk_ws/ws.proto index 9b9d805b4..456195d64 100644 --- a/pkg/proto/sdk_ws/ws.proto +++ b/pkg/proto/sdk_ws/ws.proto @@ -91,6 +91,8 @@ message OfflinePushInfo{ string Title = 1; string Desc = 2; string Ext = 3; + string PushSound = 4; + bool ISBadgeCount = 5; } message GroupInfoTip{ From 2876e77a08f2548dedb2027e7a94668c00ffff99 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Mon, 20 Dec 2021 17:27:05 +0800 Subject: [PATCH 002/337] UserInfo FriendInfo GroupInfo --- pkg/proto/sdk_ws/ws.proto | 58 ++++++++++++++++++++++++++++----------- 1 file changed, 42 insertions(+), 16 deletions(-) diff --git a/pkg/proto/sdk_ws/ws.proto b/pkg/proto/sdk_ws/ws.proto index 456195d64..25d79632c 100644 --- a/pkg/proto/sdk_ws/ws.proto +++ b/pkg/proto/sdk_ws/ws.proto @@ -95,36 +95,62 @@ message OfflinePushInfo{ bool ISBadgeCount = 5; } -message GroupInfoTip{ + +message GroupInfo{ string GroupID = 1; - string GroupName = 2; + string GroupName = 2; string Notification = 3; - string Introduction = 4; + string Introduction = 4; string FaceUrl = 5; - string Ex = 6; - string OwnerID = 7; - uint64 CreateTime = 8; - uint32 MemberCount = 9; + string OwnerID = 6; + int64 CreateTime = 7; + uint32 MemberCount = 8; } - -type GroupMemberFullInfoTip struct { - string GroupId = 1 ; - string UserId = 2 ; - int Role = 3; - uint64 JoinTime = 4; +message GroupMemberFullInfo{ + string GroupID = 1 ; + string UserID = 2 ; + int32 Role = 3; + int64 JoinTime = 4; string NickName = 5; string FaceUrl =6; } +message FriendInfo{ + string UserID = 1; + string Nickname = 2; + string FaceUrl = 3; + int32 Gender = 4; + string Mobile = 5; + string Birth = 6; + string Email = 7; + string Remark = 8; +} +message UserInfo{ + string UserID = 1; + string Nickname = 2; + string FaceUrl = 3; + int32 Gender = 4; + string Mobile = 5; + string Birth = 6; + string Email = 7; +} + +message UserPublicInfo{ + string UserID = 1; + string Nickname = 2; + string FaceUrl = 3; + int32 Gender = 4; +} message CreateGroupTip{ - GroupInfoTip group = 1; - UserInfoTip creator = 2; - repeated GroupMemberFullInfoTip memberList = 3; + GroupInfo group = 1; + UserInfo creator = 2; + repeated GroupMemberFullInfo memberList = 3; } + From 75e1e2e678687500f88b76261bd7c118a59dbb85 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 21 Dec 2021 21:40:50 +0800 Subject: [PATCH 003/337] notification --- config/config.yaml | 10 +- .../api/group/group_application_response.go | 2 + internal/rpc/auth/user_register.go | 3 - internal/rpc/chat/send_msg.go | 283 ++- internal/rpc/group/create_group.go | 74 +- internal/rpc/group/group.go | 4 +- .../rpc/group/group_application_response.go | 17 +- internal/rpc/group/join_group.go | 44 +- internal/rpc/group/set_group_info.go | 38 +- pkg/common/config/config.go | 56 +- pkg/common/constant/constant.go | 3 +- .../im_mysql_model/friend_model.go | 8 +- .../im_mysql_model/group_member_model.go | 4 +- .../mysql_model/im_mysql_model/group_model.go | 54 +- .../im_mysql_model/model_struct.go | 36 +- .../im_mysql_model/user_black_list_model.go | 2 +- .../mysql_model/im_mysql_model/user_model.go | 6 +- .../im_mysql_msg_model/receive_model.go | 17 - pkg/proto/chat/chat.pb.go | 577 ++---- pkg/proto/chat/chat.proto | 30 +- pkg/proto/group/group.proto | 11 +- pkg/proto/relay/relay.proto | 4 +- pkg/proto/sdk_ws/ws.pb.go | 1695 +++++++++++++++-- pkg/proto/sdk_ws/ws.proto | 209 +- pkg/utils/strings.go | 5 + 25 files changed, 2237 insertions(+), 955 deletions(-) diff --git a/config/config.yaml b/config/config.yaml index ca754a55b..84728c201 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -173,13 +173,13 @@ messagecallback: iOSPush: pushSound: "xxx" - badgeCount: 1 + badgeCount: true notification: groupCreated: conversation: - conversationChanged: 1 - unreadCount: 1 + conversationChanged: true + unreadCount: true offlinePush: switch: true title: "create group title" @@ -190,8 +190,8 @@ notification: groupInfoChanged: conversation: - conversationChanged: 1 - unreadCount: 1 + conversationChanged: true + unreadCount: true offlinePush: switch: true title: "group info changed title" diff --git a/internal/api/group/group_application_response.go b/internal/api/group/group_application_response.go index ea38d45a1..3a7e9343c 100644 --- a/internal/api/group/group_application_response.go +++ b/internal/api/group/group_application_response.go @@ -27,6 +27,8 @@ type paramsGroupApplicationResponse struct { Type int32 `json:"type"` HandleStatus int32 `json:"handleStatus"` HandleResult int32 `json:"handleResult"` + + UserID string `json:"userID"` } func newGroupApplicationResponse(params *paramsGroupApplicationResponse) *group.GroupApplicationResponseReq { diff --git a/internal/rpc/auth/user_register.go b/internal/rpc/auth/user_register.go index 5f7aa9023..3f5de7032 100644 --- a/internal/rpc/auth/user_register.go +++ b/internal/rpc/auth/user_register.go @@ -10,9 +10,6 @@ import ( func (rpc *rpcAuth) UserRegister(_ context.Context, pb *pbAuth.UserRegisterReq) (*pbAuth.UserRegisterResp, error) { log.Info("", "", "rpc user_register start, [data: %s]", pb.String()) - //if len(pb.UID) == 0 { - // pb.UID = utils.GenID() - //} if err := im_mysql_model.UserRegister(pb); err != nil { log.Error("", "", "rpc user_register error, [data: %s] [err: %s]", pb.String(), err.Error()) return &pbAuth.UserRegisterResp{Success: false}, err diff --git a/internal/rpc/chat/send_msg.go b/internal/rpc/chat/send_msg.go index 640309c91..1f2737bf1 100644 --- a/internal/rpc/chat/send_msg.go +++ b/internal/rpc/chat/send_msg.go @@ -6,7 +6,7 @@ import ( "Open_IM/pkg/common/config" "Open_IM/pkg/common/constant" "Open_IM/pkg/common/db" - "Open_IM/pkg/common/db/mysql_model/im_mysql_model" + immysql "Open_IM/pkg/common/db/mysql_model/im_mysql_model" http2 "Open_IM/pkg/common/http" "Open_IM/pkg/common/log" "Open_IM/pkg/grpc-etcdv3/getcdv3" @@ -189,49 +189,7 @@ func (rpc *rpcChat) UserSendMsg(_ context.Context, pb *pbChat.UserSendMsgReq) (* return returnMsg(&replay, pb, 0, "", serverMsgID, pbData.SendTime) default: return returnMsg(&replay, pb, 203, "unkonwn sessionType", "", 0) - } - -} - -type WSToMsgSvrChatMsg struct { - SendID string `protobuf:"bytes,1,opt,name=SendID" json:"SendID,omitempty"` - RecvID string `protobuf:"bytes,2,opt,name=RecvID" json:"RecvID,omitempty"` - Content string `protobuf:"bytes,3,opt,name=Content" json:"Content,omitempty"` - MsgFrom int32 `protobuf:"varint,5,opt,name=MsgFrom" json:"MsgFrom,omitempty"` - ContentType int32 `protobuf:"varint,8,opt,name=ContentType" json:"ContentType,omitempty"` - SessionType int32 `protobuf:"varint,9,opt,name=SessionType" json:"SessionType,omitempty"` - OperationID string `protobuf:"bytes,10,opt,name=OperationID" json:"OperationID,omitempty"` -} - -func CreateGroupNotification(sendID string, creator im_mysql_model.User, group im_mysql_model.Group, memberList []im_mysql_model.GroupMember) { - var msg WSToMsgSvrChatMsg - msg.OperationID = utils.OperationIDGenerator() - msg.SendID = sendID - msg.RecvID = group.GroupId - msg.ContentType = constant.CreateGroupTip - msg.SessionType = constant.GroupChatType - msg.MsgFrom = constant.SysMsgType - - var groupCreated open_im_sdk.GroupCreatedTips - groupCreated.Group = &open_im_sdk.GroupInfo{} - utils.CopyStructFields(groupCreated.Group, group) - groupCreated.Creator = &open_im_sdk.GroupMemberFullInfo{} - utils.CopyStructFields(groupCreated.Creator, creator) - for _, v := range memberList { - var groupMemberInfo open_im_sdk.GroupMemberFullInfo - utils.CopyStructFields(&groupMemberInfo, v) - groupCreated.MemberList = append(groupCreated.MemberList, &groupMemberInfo) - } - var tips open_im_sdk.TipsComm - tips.Detail = utils.StructToJsonString(groupCreated) - tips.DefaultTips = creator.Name + " " + config.Config.DefaultTips.GroupCreatedTips - msg.Content = utils.StructToJsonString(tips) - Notification(&msg, false) -} - -func Notification(m *WSToMsgSvrChatMsg, onlineUserOnly bool) { - } func (rpc *rpcChat) sendMsgToKafka(m *pbChat.WSToMsgSvrChatMsg, key string) error { @@ -245,6 +203,7 @@ func GetMsgID(sendID string) string { t := time.Now().Format("2006-01-02 15:04:05") return t + "-" + sendID + "-" + strconv.Itoa(rand.Int()) } + func returnMsg(replay *pbChat.UserSendMsgResp, pb *pbChat.UserSendMsgReq, errCode int32, errMsg, serverMsgID string, sendTime int64) (*pbChat.UserSendMsgResp, error) { replay.ErrCode = errCode replay.ErrMsg = errMsg @@ -254,6 +213,7 @@ func returnMsg(replay *pbChat.UserSendMsgResp, pb *pbChat.UserSendMsgReq, errCod replay.SendTime = sendTime return replay, nil } + func modifyMessageByUserMessageReceiveOpt(userID, sourceID string, sessionType int, msg *pbChat.WSToMsgSvrChatMsg) bool { conversationID := utils.GetConversationIDBySessionType(sourceID, sessionType) opt, err := db.DB.GetSingleConversationMsgOpt(userID, conversationID) @@ -278,3 +238,240 @@ func modifyMessageByUserMessageReceiveOpt(userID, sourceID string, sessionType i return true } + +type NotificationMsg struct { + SendID string + RecvID string + Content []byte + MsgFrom int32 + ContentType int32 + SessionType int32 + OperationID string +} + +func Notification(n *NotificationMsg, onlineUserOnly bool) { + +} + +//message GroupCreatedTips{ +// GroupInfo Group = 1; +// GroupMemberFullInfo Creator = 2; +// repeated GroupMemberFullInfo MemberList = 3; +// uint64 OperationTime = 4; +//} +func GroupCreatedNotification(operationID string, creator *immysql.User, group *immysql.Group, memberList []immysql.GroupMember) { + var n NotificationMsg + n.SendID = creator.UserID + n.RecvID = group.GroupID + n.ContentType = constant.CreateGroupTip + n.SessionType = constant.GroupChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = operationID + + var groupCreated open_im_sdk.GroupCreatedTips + groupCreated.Group = &open_im_sdk.GroupInfo{} + utils.CopyStructFields(groupCreated.Group, group) + groupCreated.Creator = &open_im_sdk.GroupMemberFullInfo{} + utils.CopyStructFields(groupCreated.Creator, creator) + for _, v := range memberList { + var groupMemberInfo open_im_sdk.GroupMemberFullInfo + utils.CopyStructFields(&groupMemberInfo, v) + groupCreated.MemberList = append(groupCreated.MemberList, &groupMemberInfo) + } + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(groupCreated) + tips.DefaultTips = config.Config.Notification.GroupCreated.DefaultTips.Tips + n.Content, _ = json.Marshal(tips) + Notification(&n, false) +} + +//message ReceiveJoinApplicationTips{ +// GroupInfo Group = 1; +// PublicUserInfo Applicant = 2; +// string Reason = 3; +//} +func ReceiveJoinApplicationNotification(operationID, RecvID string, applicant *immysql.User, group *immysql.Group) { + var n NotificationMsg + n.SendID = applicant.UserID + n.RecvID = RecvID + n.ContentType = constant.ApplyJoinGroupTip + n.SessionType = constant.SingleChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = operationID + + var joniGroup open_im_sdk.ReceiveJoinApplicationTips + joniGroup.Group = &open_im_sdk.GroupInfo{} + utils.CopyStructFields(joniGroup.Group, group) + joniGroup.Applicant = &open_im_sdk.PublicUserInfo{} + utils.CopyStructFields(joniGroup.Applicant, applicant) + + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(joniGroup) + tips.DefaultTips = config.Config.Notification.ApplyJoinGroup.DefaultTips.Tips + n.Content, _ = json.Marshal(tips) + Notification(&n, false) +} + +//message ApplicationProcessedTips{ +// GroupInfo Group = 1; +// GroupMemberFullInfo OpUser = 2; +// int32 Result = 3; +// string Reason = 4; +//} +func ApplicationProcessedNotification(operationID, RecvID string, group immysql.Group, opUser immysql.GroupMember, result int32, Reason string) { + +} + +//message MemberInvitedTips{ +// GroupInfo Group = 1; +// GroupMemberFullInfo OpUser = 2; +// GroupMemberFullInfo InvitedUser = 3; +// uint64 OperationTime = 4; +//} +func MemberInvitedNotification(operationID string, group immysql.Group, opUser immysql.GroupMember, invitedUser immysql.GroupMember) { + +} + +//message MemberKickedTips{ +// GroupInfo Group = 1; +// GroupMemberFullInfo OpUser = 2; +// GroupMemberFullInfo KickedUser = 3; +// uint64 OperationTime = 4; +//} +func MemberKickedNotification(operationID string, group immysql.Group, opUser immysql.GroupMember, KickedUser immysql.GroupMember) { + +} + +//message GroupInfoChangedTips{ +// int32 ChangedType = 1; //bitwise operators: 1:groupName; 10:Notification 100:Introduction; 1000:FaceUrl +// GroupInfo Group = 2; +// GroupMemberFullInfo OpUser = 3; +//} +func GroupInfoChangedNotification(operationID string, changedType int32, group *immysql.Group, opUser *immysql.GroupMember) { + var n NotificationMsg + n.SendID = opUser.UserID + n.RecvID = group.GroupID + n.ContentType = constant.ChangeGroupInfoTip + n.SessionType = constant.GroupChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = operationID + + var groupInfoChanged open_im_sdk.GroupInfoChangedTips + groupInfoChanged.Group = &open_im_sdk.GroupInfo{} + utils.CopyStructFields(groupInfoChanged.Group, group) + groupInfoChanged.OpUser = &open_im_sdk.GroupMemberFullInfo{} + utils.CopyStructFields(groupInfoChanged.OpUser, opUser) + groupInfoChanged.ChangedType = changedType + + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(groupInfoChanged) + tips.DefaultTips = config.Config.Notification.GroupInfoChanged.DefaultTips.Tips + n.Content, _ = json.Marshal(tips) + Notification(&n, false) +} + +//message MemberLeaveTips{ +// GroupInfo Group = 1; +// GroupMemberFullInfo LeaverUser = 2; +// uint64 OperationTime = 3; +//} +func MemberLeaveNotification(operationID string, group *immysql.Group, leaverUser *immysql.GroupMember) { + +} + +//message MemberEnterTips{ +// GroupInfo Group = 1; +// GroupMemberFullInfo EntrantUser = 2; +// uint64 OperationTime = 3; +//} +func MemberEnterNotification(operationID string, group *immysql.Group, entrantUser *immysql.GroupMember) { + +} + +//message MemberInfoChangedTips{ +// int32 ChangeType = 1; //1:info changed; 2:mute +// GroupMemberFullInfo OpUser = 2; //who do this +// GroupMemberFullInfo FinalInfo = 3; // +// uint64 MuteTime = 4; +// GroupInfo Group = 5; +//} +func MemberInfoChangedNotification(operationID string, group *immysql.Group, opUser *immysql.GroupMember, userFinalInfo *immysql.GroupMember) { + +} + +//message FriendApplicationAddedTips{ +// PublicUserInfo OpUser = 1; //user1 +// FriendApplication Application = 2; +// PublicUserInfo OpedUser = 3; //user2 +//} +func FriendApplicationAddedNotification(operationID string, opUser *immysql.User, opedUser *immysql.User, application *immysql.FriendRequest) { + +} + +//message FriendApplicationProcessedTips{ +// PublicUserInfo OpUser = 1; //user2 +// PublicUserInfo OpedUser = 2; //user1 +// int32 result = 3; //1: accept; -1: reject +//} +func FriendApplicationProcessedNotification(operationID string, opUser *immysql.User, OpedUser *immysql.User, result int32) { + +} + +//message FriendAddedTips{ +// FriendInfo Friend = 1; +//} +//message FriendInfo{ +// UserInfo OwnerUser = 1; +// string Remark = 2; +// uint64 CreateTime = 3; +// UserInfo FriendUser = 4; +//} + +func FriendAddedNotification(operationID string, opUser *immysql.User, friendUser *immysql.Friend) { + +} + +//message FriendDeletedTips{ +// FriendInfo Friend = 1; +//} +func FriendDeletedNotification(operationID string, opUser *immysql.User, friendUser *immysql.Friend) { + +} + +//message FriendInfoChangedTips{ +// FriendInfo Friend = 1; +// PublicUserInfo OpUser = 2; +// uint64 OperationTime = 3; +//} +func FriendInfoChangedNotification(operationID string, opUser *immysql.User, friendUser *immysql.Friend) { + +} + +//message BlackAddedTips{ +// BlackInfo Black = 1; +//} +//message BlackInfo{ +// PublicUserInfo OwnerUser = 1; +// string Remark = 2; +// uint64 CreateTime = 3; +// PublicUserInfo BlackUser = 4; +//} +func BlackAddedNotification(operationID string, opUser *immysql.User, blackUser *immysql.User) { + +} + +//message BlackDeletedTips{ +// BlackInfo Black = 1; +//} +func BlackDeletedNotification(operationID string, opUser *immysql.User, blackUser *immysql.User) { + +} + +//message SelfInfoUpdatedTips{ +// UserInfo SelfUserInfo = 1; +// PublicUserInfo OpUser = 2; +// uint64 OperationTime = 3; +//} +func SelfInfoUpdatedNotification(operationID string, opUser *immysql.User, selfUser *immysql.User) { + +} diff --git a/internal/rpc/group/create_group.go b/internal/rpc/group/create_group.go index 35e6616ee..8edc72885 100644 --- a/internal/rpc/group/create_group.go +++ b/internal/rpc/group/create_group.go @@ -1,8 +1,7 @@ package group import ( - "Open_IM/internal/push/content_struct" - "Open_IM/internal/push/logic" + "Open_IM/internal/rpc/chat" "Open_IM/pkg/common/config" "Open_IM/pkg/common/constant" "Open_IM/pkg/common/db" @@ -10,7 +9,6 @@ import ( "Open_IM/pkg/common/log" "Open_IM/pkg/common/token_verify" "Open_IM/pkg/grpc-etcdv3/getcdv3" - pbChat "Open_IM/pkg/proto/chat" pbGroup "Open_IM/pkg/proto/group" "Open_IM/pkg/utils" "context" @@ -69,39 +67,40 @@ func (s *groupServer) Run() { } func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupReq) (*pbGroup.CreateGroupResp, error) { - log.InfoByArgs("rpc create group is server,args=%s", req.String()) + log.NewInfo(req.OperationID, "CreateGroup, args=%s", req.String()) var ( groupId string ) //Parse token, to find current user information claims, err := token_verify.ParseToken(req.Token) if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) + log.NewError(req.OperationID, "ParseToken failed, ", err.Error(), req.String()) return &pbGroup.CreateGroupResp{ErrorCode: constant.ErrParseToken.ErrCode, ErrorMsg: constant.ErrParseToken.ErrMsg}, nil } //Time stamp + MD5 to generate group chat id groupId = utils.Md5(strconv.FormatInt(time.Now().UnixNano(), 10)) err = im_mysql_model.InsertIntoGroup(groupId, req.GroupName, req.Introduction, req.Notification, req.FaceUrl, req.Ex) if err != nil { - log.ErrorByKv("create group chat failed", req.OperationID, "err=%s", err.Error()) + log.NewError(req.OperationID, "InsertIntoGroup failed, ", err.Error(), req.String()) return &pbGroup.CreateGroupResp{ErrorCode: constant.ErrCreateGroup.ErrCode, ErrorMsg: constant.ErrCreateGroup.ErrMsg}, nil } - isMagagerFlag := 0 + isManagerFlag := 0 tokenUid := claims.UID if utils.IsContain(tokenUid, config.Config.Manager.AppManagerUid) { - isMagagerFlag = 1 + isManagerFlag = 1 } - if isMagagerFlag == 0 { + us, err := im_mysql_model.FindUserByUID(claims.UID) + if err != nil { + log.Error("", req.OperationID, "find userInfo failed", err.Error()) + return &pbGroup.CreateGroupResp{ErrorCode: constant.ErrCreateGroup.ErrCode, ErrorMsg: constant.ErrCreateGroup.ErrMsg}, nil + } + + if isManagerFlag == 0 { //Add the group owner to the group first, otherwise the group creation will fail - us, err := im_mysql_model.FindUserByUID(claims.UID) - if err != nil { - log.Error("", req.OperationID, "find userInfo failed", err.Error()) - return &pbGroup.CreateGroupResp{ErrorCode: constant.ErrCreateGroup.ErrCode, ErrorMsg: constant.ErrCreateGroup.ErrMsg}, nil - } - err = im_mysql_model.InsertIntoGroupMember(groupId, claims.UID, us.Name, us.Icon, constant.GroupOwner) + err = im_mysql_model.InsertIntoGroupMember(groupId, claims.UID, us.Nickname, us.FaceUrl, constant.GroupOwner) if err != nil { log.Error("", req.OperationID, "create group chat failed,err=%s", err.Error()) return &pbGroup.CreateGroupResp{ErrorCode: constant.ErrCreateGroup.ErrCode, ErrorMsg: constant.ErrCreateGroup.ErrMsg}, nil @@ -109,7 +108,7 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR err = db.DB.AddGroupMember(groupId, claims.UID) if err != nil { - log.Error("", "", "create mongo group member failed, db.DB.AddGroupMember fail [err: %s]", err.Error()) + log.NewError(req.OperationID, "AddGroupMember failed ", err.Error(), groupId, claims.UID) return &pbGroup.CreateGroupResp{ErrorCode: constant.ErrCreateGroup.ErrCode, ErrorMsg: constant.ErrCreateGroup.ErrMsg}, nil } } @@ -118,12 +117,12 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR for _, user := range req.MemberList { us, err := im_mysql_model.FindUserByUID(user.Uid) if err != nil { - log.Error("", req.OperationID, "find userInfo failed,uid=%s", user.Uid, err.Error()) + log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), user.Uid) continue } - err = im_mysql_model.InsertIntoGroupMember(groupId, user.Uid, us.Name, us.Icon, user.SetRole) + err = im_mysql_model.InsertIntoGroupMember(groupId, user.Uid, us.Nickname, us.FaceUrl, user.SetRole) if err != nil { - log.ErrorByArgs("pull %s to group %s failed,err=%s", user.Uid, groupId, err.Error()) + log.ErrorByArgs("InsertIntoGroupMember failed", user.Uid, groupId, err.Error()) } err = db.DB.AddGroupMember(groupId, user.Uid) if err != nil { @@ -131,32 +130,21 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR } } - if isMagagerFlag == 1 { + if isManagerFlag == 1 { - //type NotificationContent struct { - // IsDisplay int32 `json:"isDisplay"` - // DefaultTips string `json:"defaultTips"` - // Detail string `json:"detail"` - //} n := NotificationContent{ - // IsDisplay: 1, - // DefaultTips: "You have joined the group chat:" + createGroupResp.Data.GroupName, - // Detail: createGroupResp.Data.GroupId, - // } - - ////Push message when create group chat - n := content_struct.NotificationContent{1, req.GroupName, groupId} - logic.SendMsgByWS(&pbChat.WSToMsgSvrChatMsg{ - SendID: claims.UID, - RecvID: groupId, - Content: n.ContentToString(), - SendTime: utils.GetCurrentTimestampByNano(), - MsgFrom: constant.SysMsgType, //Notification message identification - ContentType: constant.CreateGroupTip, //Add friend flag - SessionType: constant.GroupChatType, - OperationID: req.OperationID, - }) } + group, err := im_mysql_model.FindGroupInfoByGroupId(groupId) + if err != nil { + log.NewError(req.OperationID, "FindGroupInfoByGroupId failed ", err.Error(), groupId) + return &pbGroup.CreateGroupResp{GroupID: groupId}, nil + } + memberList, err := im_mysql_model.FindGroupMemberListByGroupId(groupId) + if err != nil { + log.NewError(req.OperationID, "FindGroupMemberListByGroupId failed ", err.Error(), groupId) + return &pbGroup.CreateGroupResp{GroupID: groupId}, nil + } + chat.GroupCreatedNotification(req.OperationID, us, group, memberList) + log.NewInfo(req.OperationID, "GroupCreatedNotification, rpc CreateGroup success return ", groupId) - log.Info(req.Token, req.OperationID, "rpc create group success return") return &pbGroup.CreateGroupResp{GroupID: groupId}, nil } diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 15740800f..e5b7cfc7d 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -384,9 +384,9 @@ func (s *groupServer) GetGroupMembersInfo(ctx context.Context, req *pbGroup.GetG } user, err := imdb.FindUserByUID(v) if err == nil && user != nil { - memberNode.FaceUrl = user.Icon + memberNode.FaceUrl = user.FaceUrl memberNode.JoinTime = uint64(memberInfo.JoinTime.Unix()) - memberNode.UserId = user.UID + memberNode.UserId = user.UserID memberNode.NickName = memberInfo.NickName memberNode.Role = memberInfo.AdministratorLevel } diff --git a/internal/rpc/group/group_application_response.go b/internal/rpc/group/group_application_response.go index 4282de51b..c8a077ae9 100644 --- a/internal/rpc/group/group_application_response.go +++ b/internal/rpc/group/group_application_response.go @@ -1,6 +1,7 @@ package group import ( + "Open_IM/internal/rpc/chat" "Open_IM/pkg/common/db" "Open_IM/pkg/common/db/mysql_model/im_mysql_model" "Open_IM/pkg/common/log" @@ -9,12 +10,11 @@ import ( ) func (s *groupServer) GroupApplicationResponse(_ context.Context, pb *group.GroupApplicationResponseReq) (*group.GroupApplicationResponseResp, error) { - log.Info("", "", "rpc GroupApplicationResponse call start..., [pb: %s]", pb.String()) - + log.NewInfo(pb.OperationID, "GroupApplicationResponse args: ", pb.String()) reply, err := im_mysql_model.GroupApplicationResponse(pb) if err != nil { - log.Error("", "", "rpc GroupApplicationResponse call..., im_mysql_model.GroupApplicationResponse fail [pb: %s] [err: %s]", pb.String(), err.Error()) - return &group.GroupApplicationResponseResp{ErrCode: 702, ErrMsg: "rpc GroupApplicationResponse failed"}, nil + log.NewError(pb.OperationID, "GroupApplicationResponse failed ", err.Error(), pb) + return &group.GroupApplicationResponseResp{ErrCode: 702, ErrMsg: err.Error()}, nil } if pb.HandleResult == 1 { @@ -32,8 +32,15 @@ func (s *groupServer) GroupApplicationResponse(_ context.Context, pb *group.Grou } } } + if pb.ToUserID == "0" { + chat.ApplicationProcessedNotification(pb.OperationID, pb.FromUserID) + } - log.Info("", "", "rpc GroupApplicationResponse call..., im_mysql_model.GroupApplicationResponse") + if pb.HandleResult == 1 { + + } + + log.NewInfo(pb.OperationID, "rpc GroupApplicationResponse ok ", reply) return reply, nil } diff --git a/internal/rpc/group/join_group.go b/internal/rpc/group/join_group.go index 0aed0d4e4..5a26181dd 100644 --- a/internal/rpc/group/join_group.go +++ b/internal/rpc/group/join_group.go @@ -1,6 +1,7 @@ package group import ( + "Open_IM/internal/rpc/chat" "Open_IM/pkg/common/constant" "Open_IM/pkg/common/db/mysql_model/im_mysql_model" "Open_IM/pkg/common/log" @@ -10,16 +11,16 @@ import ( ) func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq) (*pbGroup.CommonResp, error) { - log.Info(req.Token, req.OperationID, "rpc join group is server,args=%s", req.String()) + log.NewInfo(req.Token, req.OperationID, "JoinGroup args ", req.String()) //Parse token, to find current user information claims, err := token_verify.ParseToken(req.Token) if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) + log.NewError(req.OperationID, "ParseToken failed", err.Error(), req.String()) return &pbGroup.CommonResp{ErrorCode: constant.ErrParseToken.ErrCode, ErrorMsg: constant.ErrParseToken.ErrMsg}, nil } applicationUserInfo, err := im_mysql_model.FindUserByUID(claims.UID) if err != nil { - log.Error(req.Token, req.OperationID, "No this user,err=%s", err.Error()) + log.NewError(req.OperationID, "FindUserByUID failed", err.Error(), claims.UID) return &pbGroup.CommonResp{ErrorCode: constant.ErrSearchUserInfo.ErrCode, ErrorMsg: constant.ErrSearchUserInfo.ErrMsg}, nil } @@ -28,30 +29,23 @@ func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq) err = im_mysql_model.DelGroupRequest(req.GroupID, claims.UID, "0") } - log.Info(req.Token, req.OperationID, "args: ", req.GroupID, claims.UID, "0", req.Message, applicationUserInfo.Name, applicationUserInfo.Icon) - - if err = im_mysql_model.InsertIntoGroupRequest(req.GroupID, claims.UID, "0", req.Message, applicationUserInfo.Name, applicationUserInfo.Icon); err != nil { + if err = im_mysql_model.InsertIntoGroupRequest(req.GroupID, claims.UID, "0", req.Message, applicationUserInfo.Nickname, applicationUserInfo.FaceUrl); err != nil { log.Error(req.Token, req.OperationID, "Insert into group request failed,er=%s", err.Error()) return &pbGroup.CommonResp{ErrorCode: constant.ErrJoinGroupApplication.ErrCode, ErrorMsg: constant.ErrJoinGroupApplication.ErrMsg}, nil } - ////Find the the group owner - //groupCreatorInfo, err := im_mysql_model.FindGroupMemberListByGroupIdAndFilterInfo(req.GroupID, constant.GroupCreator) - //if err != nil { - // log.Error(req.Token, req.OperationID, "find group creator failed", err.Error()) - //} else { - // //Push message when join group chat - // logic.SendMsgByWS(&pbChat.WSToMsgSvrChatMsg{ - // SendID: claims.UID, - // RecvID: groupCreatorInfo[0].Uid, - // Content: content_struct.NewContentStructString(0, "", req.String()), - // SendTime: utils.GetCurrentTimestampBySecond(), - // MsgFrom: constant.SysMsgType, - // ContentType: constant.JoinGroupTip, - // SessionType: constant.SingleChatType, - // OperationID: req.OperationID, - // }) - //} - log.Info(req.Token, req.OperationID, "rpc join group success return") - return &pbGroup.CommonResp{}, nil + memberList, err := im_mysql_model.FindGroupMemberListByGroupIdAndFilterInfo(req.GroupID, constant.GroupOwner) + if len(memberList) == 0 { + log.NewError(req.OperationID, "FindGroupMemberListByGroupIdAndFilterInfo failed ", req.GroupID, constant.GroupOwner, err) + return &pbGroup.CommonResp{ErrorCode: 0, ErrorMsg: ""}, nil + } + group, err := im_mysql_model.FindGroupInfoByGroupId(req.GroupID) + if err != nil { + log.NewError(req.OperationID, "FindGroupInfoByGroupId failed ", req.GroupID) + return &pbGroup.CommonResp{ErrorCode: 0, ErrorMsg: ""}, nil + } + chat.ReceiveJoinApplicationNotification(req.OperationID, memberList[0].UserID, applicationUserInfo, group) + + log.NewInfo(req.OperationID, "ReceiveJoinApplicationNotification rpc JoinGroup success return") + return &pbGroup.CommonResp{ErrorCode: 0, ErrorMsg: ""}, nil } diff --git a/internal/rpc/group/set_group_info.go b/internal/rpc/group/set_group_info.go index 3e1f25854..55532a04e 100644 --- a/internal/rpc/group/set_group_info.go +++ b/internal/rpc/group/set_group_info.go @@ -1,6 +1,7 @@ package group import ( + "Open_IM/internal/rpc/chat" "Open_IM/pkg/common/constant" "Open_IM/pkg/common/db/mysql_model/im_mysql_model" "Open_IM/pkg/common/log" @@ -18,6 +19,7 @@ func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInf log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) return &pbGroup.CommonResp{ErrorCode: constant.ErrParseToken.ErrCode, ErrorMsg: constant.ErrParseToken.ErrMsg}, nil } + groupUserInfo, err := im_mysql_model.FindGroupMemberInfoByGroupIdAndUserId(req.GroupID, claims.UID) if err != nil { log.Error("", req.OperationID, "your are not in the group,can not change this group info,err=%s", err.Error()) @@ -26,21 +28,33 @@ func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInf if groupUserInfo.AdministratorLevel == constant.OrdinaryMember { return &pbGroup.CommonResp{ErrorCode: constant.ErrSetGroupInfo.ErrCode, ErrorMsg: constant.ErrAccess.ErrMsg}, nil } + group, err := im_mysql_model.FindGroupInfoByGroupId(req.GroupID) + if err != nil { + log.NewError(req.OperationID, "FindGroupInfoByGroupId failed, ", err.Error(), req.GroupID) + return &pbGroup.CommonResp{ErrorCode: constant.ErrSetGroupInfo.ErrCode, ErrorMsg: constant.ErrAccess.ErrMsg}, nil + } + ////bitwise operators: 1:groupName; 10:Notification 100:Introduction; 1000:FaceUrl + var changedType int32 + if group.GroupName != req.GroupName && req.GroupName != "" { + changedType = 1 + } + if group.Notification != req.Notification && req.Notification != "" { + changedType = changedType | (1 << 1) + } + if group.Introduction != req.Introduction && req.Introduction != "" { + changedType = changedType | (1 << 2) + } + if group.FaceUrl != req.FaceUrl && req.FaceUrl != "" { + changedType = changedType | (1 << 3) + } //only administrators can set group information if err = im_mysql_model.SetGroupInfo(req.GroupID, req.GroupName, req.Introduction, req.Notification, req.FaceUrl, ""); err != nil { return &pbGroup.CommonResp{ErrorCode: constant.ErrSetGroupInfo.ErrCode, ErrorMsg: constant.ErrSetGroupInfo.ErrMsg}, nil } - ////Push message when set group info - //jsonInfo, _ := json.Marshal(req) - //logic.SendMsgByWS(&pbChat.WSToMsgSvrChatMsg{ - // SendID: claims.UID, - // RecvID: req.GroupID, - // Content: string(jsonInfo), - // SendTime: utils.GetCurrentTimestampBySecond(), - // MsgFrom: constant.SysMsgType, - // ContentType: constant.SetGroupInfoTip, - // SessionType: constant.GroupChatType, - // OperationID: req.OperationID, - //}) + + if changedType != 0 { + chat.GroupInfoChangedNotification(req.OperationID, claims.UID, changedType, group, groupUserInfo) + } + return &pbGroup.CommonResp{}, nil } diff --git a/pkg/common/config/config.go b/pkg/common/config/config.go index 2385cffc4..8e4f198e8 100644 --- a/pkg/common/config/config.go +++ b/pkg/common/config/config.go @@ -1,6 +1,7 @@ package config import ( + "fmt" "io/ioutil" "os" "path/filepath" @@ -158,6 +159,59 @@ type config struct { CallbackUrl string `yaml:"callbackUrl"` CallBackTimeOut int `yaml:"callbackTimeOut"` } + IOSPush struct { + PushSound string `yaml:"pushSound"` + BadgeCount bool `yaml:"badgeCount"` + } + Notification struct { + GroupCreated struct { + Conversation struct { + ConversationChanged bool `yaml:"conversationChanged"` + UnreadCount bool `yaml:"unreadCount"` + } + OfflinePush struct { + PushSwitch bool `yaml:"switch"` + Title string `yaml:"title"` + Desc string `yaml:"desc"` + Ext string `yaml:"ext"` + } + DefaultTips struct { + Tips string `yaml:"tips"` + } + } + + GroupInfoChanged struct { + Conversation struct { + ConversationChanged bool `yaml:"conversationChanged"` + UnreadCount bool `yaml:"unreadCount"` + } + OfflinePush struct { + PushSwitch bool `yaml:"switch"` + Title string `yaml:"title"` + Desc string `yaml:"desc"` + Ext string `yaml:"ext"` + } + DefaultTips struct { + Tips string `yaml:"tips"` + } + } + + ApplyJoinGroup struct { + Conversation struct { + ConversationChanged bool `yaml:"conversationChanged"` + UnreadCount bool `yaml:"unreadCount"` + } + OfflinePush struct { + PushSwitch bool `yaml:"switch"` + Title string `yaml:"title"` + Desc string `yaml:"desc"` + Ext string `yaml:"ext"` + } + DefaultTips struct { + Tips string `yaml:"tips"` + } + } + } Demo struct { Port []int `yaml:"openImDemoPort"` AliSMSVerify struct { @@ -200,5 +254,5 @@ func init() { if err = yaml.Unmarshal(bytes, &Config); err != nil { panic(err.Error()) } - + fmt.Println("load config: ", Config) } diff --git a/pkg/common/constant/constant.go b/pkg/common/constant/constant.go index c00b98c7d..9cabc19b3 100644 --- a/pkg/common/constant/constant.go +++ b/pkg/common/constant/constant.go @@ -54,13 +54,14 @@ const ( TransferGroupOwnerTip = 501 CreateGroupTip = 502 GroupApplicationResponseTip = 503 - JoinGroupTip = 504 + ApplyJoinGroupTip = 504 QuitGroupTip = 505 SetGroupInfoTip = 506 AcceptGroupApplicationTip = 507 RefuseGroupApplicationTip = 508 KickGroupMemberTip = 509 InviteUserToGroupTip = 510 + ChangeGroupInfoTip = 511 //MsgFrom UserMsgType = 100 diff --git a/pkg/common/db/mysql_model/im_mysql_model/friend_model.go b/pkg/common/db/mysql_model/im_mysql_model/friend_model.go index ce029a0bb..8eefd1c63 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/friend_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/friend_model.go @@ -12,10 +12,10 @@ func InsertToFriend(ownerId, friendId string, flag int32) error { return err } toInsertFollow := Friend{ - OwnerId: ownerId, - FriendId: friendId, - FriendFlag: flag, - CreateTime: time.Now(), + OwnerUserID: ownerId, + FriendUserID: friendId, + FriendFlag: flag, + CreateTime: time.Now(), } err = dbConn.Table("friend").Create(toInsertFollow).Error if err != nil { diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go index a31f973e1..46381dd45 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go @@ -10,7 +10,7 @@ func InsertIntoGroupMember(groupId, uid, nickName, userGroupFaceUrl string, admi if err != nil { return err } - toInsertInfo := GroupMember{GroupId: groupId, Uid: uid, NickName: nickName, AdministratorLevel: administratorLevel, JoinTime: time.Now(), UserGroupFaceUrl: userGroupFaceUrl} + toInsertInfo := GroupMember{GroupID: groupId, UserID: uid, NickName: nickName, AdministratorLevel: administratorLevel, JoinTime: time.Now(), FaceUrl: userGroupFaceUrl} err = dbConn.Table("group_member").Create(toInsertInfo).Error if err != nil { return err @@ -206,7 +206,7 @@ func GetGroupOwnerByGroupId(groupId string) string { } for _, v := range omList { if v.AdministratorLevel == 1 { - return v.Uid + return v.UserID } } return "" diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_model.go index 2988741e5..798f9bf1d 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_model.go @@ -17,7 +17,7 @@ func InsertIntoGroup(groupId, name, introduction, notification, faceUrl, ex stri if name == "" { name = "groupChat" } - toInsertInfo := Group{GroupId: groupId, Name: name, Introduction: introduction, Notification: notification, FaceUrl: faceUrl, CreateTime: time.Now(), Ex: ex} + toInsertInfo := Group{GroupID: groupId, GroupName: name, Introduction: introduction, Notification: notification, FaceUrl: faceUrl, CreateTime: time.Now(), Ex: ex} err = dbConn.Table("group").Create(toInsertInfo).Error if err != nil { return err @@ -174,7 +174,7 @@ func TransferGroupOwner(pb *group.TransferGroupOwnerReq) (*group.TransferGroupOw return nil, err } - if oldOwner.Uid == newOwner.Uid { + if oldOwner.UserID == newOwner.UserID { return nil, errors.New("the self") } @@ -248,55 +248,5 @@ func GroupApplicationResponse(pb *group.GroupApplicationResponseReq) (*group.Gro } } - //if err != nil { - // err = dbConn.Raw("select * from `group_request` where handled_user = ? and group_id = ? and to_user_id = ? and from_user_id = ?", "", pb.GroupID, "0", pb.UID).Scan(&groupRequest).Error - // if err != nil { - // return nil, err - // } - // if pb.Flag == 1 { - // err = dbConn.Exec("update `group_request` set flag = ?, handled_msg = ?, handled_user = ? where group_id = ? and to_user_id = ? and from_user_id = ?", - // pb.Flag, pb.RespMsg, pb.OwnerID, pb.GroupID, "0", pb.UID).Error - // if err != nil { - // return nil, err - // } - // - // // add to group member - // err = InsertIntoGroupMember(pb.GroupID, pb.UID, groupRequest.FromUserNickname, groupRequest.FromUserFaceUrl, 0) - // if err != nil { - // return nil, err - // } - // } else if pb.Flag == -1 { - // err = dbConn.Exec("update `group_request` set flag = ?, handled_msg = ?, handled_user = ? where group_id = ? and to_user_id = ? and from_user_id = ?", - // pb.Flag, pb.RespMsg, pb.OwnerID, pb.GroupID, "0", pb.UID).Error - // if err != nil { - // return nil, err - // } - // } else { - // return nil, errors.New("flag error") - // } - //} else { - // if pb.Flag == 1 { - // err = dbConn.Exec("update `group_request` set flag = ?, handled_msg = ?, handled_user = ? where group_id = ? and to_user_id = ?", - // pb.Flag, pb.RespMsg, pb.OwnerID, pb.GroupID, pb.UID).Error - // if err != nil { - // return nil, err - // } - // - // // add to group member - // err = InsertIntoGroupMember(pb.GroupID, pb.UID, groupRequest.ToUserNickname, groupRequest.ToUserFaceUrl, 0) - // if err != nil { - // return nil, err - // } - // } else if pb.Flag == -1 { - // err = dbConn.Exec("update `group_request` set flag = ?, handled_msg = ?, handled_user = ? where group_id = ? and to_user_id = ?", - // pb.Flag, pb.RespMsg, pb.OwnerID, pb.GroupID, pb.UID).Error - // if err != nil { - // return nil, err - // } - // } else { - // return nil, errors.New("flag error") - // } - //} - return &group.GroupApplicationResponseResp{}, nil } diff --git a/pkg/common/db/mysql_model/im_mysql_model/model_struct.go b/pkg/common/db/mysql_model/im_mysql_model/model_struct.go index d8576ac19..198362ca2 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/model_struct.go +++ b/pkg/common/db/mysql_model/im_mysql_model/model_struct.go @@ -3,9 +3,9 @@ package im_mysql_model import "time" type User struct { - UID string `gorm:"column:uid;primaryKey;"` - Name string `gorm:"column:name"` - Icon string `gorm:"column:icon"` + UserID string `gorm:"column:uid;primaryKey;"` + Nickname string `gorm:"column:name"` + FaceUrl string `gorm:"column:icon"` Gender int32 `gorm:"column:gender"` Mobile string `gorm:"column:mobile"` Birth string `gorm:"column:birth"` @@ -15,28 +15,28 @@ type User struct { } type Friend struct { - OwnerId string `gorm:"column:owner_id"` - FriendId string `gorm:"column:friend_id"` - Comment string `gorm:"column:comment"` - FriendFlag int32 `gorm:"column:friend_flag"` - CreateTime time.Time `gorm:"column:create_time"` + OwnerUserID string `gorm:"column:owner_id"` + FriendUserID string `gorm:"column:friend_id"` + Remark string `gorm:"column:comment"` + FriendFlag int32 `gorm:"column:friend_flag"` + CreateTime time.Time `gorm:"column:create_time"` } type FriendRequest struct { - ReqId string `gorm:"column:req_id"` - Uid string `gorm:"column:user_id"` + ReqID string `gorm:"column:req_id"` + UserID string `gorm:"column:user_id"` Flag int32 `gorm:"column:flag"` ReqMessage string `gorm:"column:req_message"` CreateTime time.Time `gorm:"column:create_time"` } type BlackList struct { - OwnerId string `gorm:"column:owner_id"` - BlockId string `gorm:"column:block_id"` - CreateTime time.Time `gorm:"column:create_time"` + OwnerUserID string `gorm:"column:owner_id"` + BlockUserID string `gorm:"column:block_id"` + CreateTime time.Time `gorm:"column:create_time"` } type Group struct { - GroupId string `gorm:"column:group_id"` - Name string `gorm:"column:name"` + GroupID string `gorm:"column:group_id"` + GroupName string `gorm:"column:name"` Introduction string `gorm:"column:introduction"` Notification string `gorm:"column:notification"` FaceUrl string `gorm:"column:face_url"` @@ -45,12 +45,12 @@ type Group struct { } type GroupMember struct { - GroupId string `gorm:"column:group_id"` - Uid string `gorm:"column:uid"` + GroupID string `gorm:"column:group_id"` + UserID string `gorm:"column:uid"` NickName string `gorm:"column:nickname"` AdministratorLevel int32 `gorm:"column:administrator_level"` JoinTime time.Time `gorm:"column:join_time"` - UserGroupFaceUrl string `gorm:"user_group_face_url"` + FaceUrl string `gorm:"user_group_face_url"` } type GroupRequest struct { diff --git a/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go b/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go index 907b0f223..39ad51a13 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go @@ -10,7 +10,7 @@ func InsertInToUserBlackList(ownerID, blockID string) error { if err != nil { return err } - toInsertInfo := BlackList{OwnerId: ownerID, BlockId: blockID, CreateTime: time.Now()} + toInsertInfo := BlackList{OwnerUserID: ownerID, BlockUserID: blockID, CreateTime: time.Now()} err = dbConn.Table("user_black_list").Create(toInsertInfo).Error return err } diff --git a/pkg/common/db/mysql_model/im_mysql_model/user_model.go b/pkg/common/db/mysql_model/im_mysql_model/user_model.go index be4e60069..98ddcb7fc 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/user_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/user_model.go @@ -30,9 +30,9 @@ func UserRegister(pb *pbAuth.UserRegisterReq) error { return err } addUser := User{ - UID: pb.UID, - Name: pb.Name, - Icon: pb.Icon, + UserID: pb.UID, + Nickname: pb.Name, + FaceUrl: pb.Icon, Gender: pb.Gender, Mobile: pb.Mobile, Birth: pb.Birth, diff --git a/pkg/common/db/mysql_model/im_mysql_msg_model/receive_model.go b/pkg/common/db/mysql_model/im_mysql_msg_model/receive_model.go index 3973f71ef..48d5f6c4d 100644 --- a/pkg/common/db/mysql_model/im_mysql_msg_model/receive_model.go +++ b/pkg/common/db/mysql_model/im_mysql_msg_model/receive_model.go @@ -17,20 +17,3 @@ type Receive struct { MsgId string CreateTime *time.Time } - -//func InsertMessageToReceive(seq int64, userid, msgid string) error { -// conn := db.NewDbConnection() -// receive := Receive{ -// UID: userid, -// Seq: seq, -// MsgId: msgid, -// } -// err := conn.Table("receive").Create(&receive).Error -// return err -//} -//func GetBiggestSeqFromReceive(userid string) (seq int64, err error) { -// //得到数据库的连接(并非真连接,调用时才连接,由gorm自动维护数据库连接池) -// conn := db.NewDbConnection() -// err = conn.Raw("select max(seq) from receive where user_id = ?", userid).Row().Scan(&seq) -// return seq, err -//} diff --git a/pkg/proto/chat/chat.pb.go b/pkg/proto/chat/chat.pb.go index dfe51b472..d208317a5 100644 --- a/pkg/proto/chat/chat.pb.go +++ b/pkg/proto/chat/chat.pb.go @@ -1,16 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// source: chat/chat.proto +// source: chat.proto -package pbChat // import "./chat" +package pbChat import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" - -import ( - context "golang.org/x/net/context" - grpc "google.golang.org/grpc" -) +import sdk_ws "Open_IM/pkg/proto/sdk_ws" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -50,7 +46,7 @@ func (m *WSToMsgSvrChatMsg) Reset() { *m = WSToMsgSvrChatMsg{} } func (m *WSToMsgSvrChatMsg) String() string { return proto.CompactTextString(m) } func (*WSToMsgSvrChatMsg) ProtoMessage() {} func (*WSToMsgSvrChatMsg) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_163a8d226aa6edb5, []int{0} + return fileDescriptor_chat_955d1f0dcca586dd, []int{0} } func (m *WSToMsgSvrChatMsg) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_WSToMsgSvrChatMsg.Unmarshal(m, b) @@ -215,7 +211,7 @@ func (m *MsgSvrToPushSvrChatMsg) Reset() { *m = MsgSvrToPushSvrChatMsg{} func (m *MsgSvrToPushSvrChatMsg) String() string { return proto.CompactTextString(m) } func (*MsgSvrToPushSvrChatMsg) ProtoMessage() {} func (*MsgSvrToPushSvrChatMsg) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_163a8d226aa6edb5, []int{1} + return fileDescriptor_chat_955d1f0dcca586dd, []int{1} } func (m *MsgSvrToPushSvrChatMsg) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgSvrToPushSvrChatMsg.Unmarshal(m, b) @@ -361,7 +357,7 @@ func (m *PullMessageReq) Reset() { *m = PullMessageReq{} } func (m *PullMessageReq) String() string { return proto.CompactTextString(m) } func (*PullMessageReq) ProtoMessage() {} func (*PullMessageReq) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_163a8d226aa6edb5, []int{2} + return fileDescriptor_chat_955d1f0dcca586dd, []int{2} } func (m *PullMessageReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageReq.Unmarshal(m, b) @@ -425,7 +421,7 @@ func (m *PullMessageResp) Reset() { *m = PullMessageResp{} } func (m *PullMessageResp) String() string { return proto.CompactTextString(m) } func (*PullMessageResp) ProtoMessage() {} func (*PullMessageResp) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_163a8d226aa6edb5, []int{3} + return fileDescriptor_chat_955d1f0dcca586dd, []int{3} } func (m *PullMessageResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageResp.Unmarshal(m, b) @@ -500,7 +496,7 @@ func (m *PullMessageBySeqListReq) Reset() { *m = PullMessageBySeqListReq func (m *PullMessageBySeqListReq) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListReq) ProtoMessage() {} func (*PullMessageBySeqListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_163a8d226aa6edb5, []int{4} + return fileDescriptor_chat_955d1f0dcca586dd, []int{4} } func (m *PullMessageBySeqListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListReq.Unmarshal(m, b) @@ -553,7 +549,7 @@ func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} } func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqReq) ProtoMessage() {} func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_163a8d226aa6edb5, []int{5} + return fileDescriptor_chat_955d1f0dcca586dd, []int{5} } func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) @@ -601,7 +597,7 @@ func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} } func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqResp) ProtoMessage() {} func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_163a8d226aa6edb5, []int{6} + return fileDescriptor_chat_955d1f0dcca586dd, []int{6} } func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) @@ -651,9 +647,9 @@ func (m *GetMaxAndMinSeqResp) GetMinSeq() int64 { type GatherFormat struct { // @inject_tag: json:"id" - ID string `protobuf:"bytes,1,opt,name=ID" json:"id"` + ID string `protobuf:"bytes,1,opt,name=ID" json:"ID,omitempty"` // @inject_tag: json:"list" - List []*MsgFormat `protobuf:"bytes,2,rep,name=List" json:"list"` + List []*MsgFormat `protobuf:"bytes,2,rep,name=List" json:"List,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -663,7 +659,7 @@ func (m *GatherFormat) Reset() { *m = GatherFormat{} } func (m *GatherFormat) String() string { return proto.CompactTextString(m) } func (*GatherFormat) ProtoMessage() {} func (*GatherFormat) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_163a8d226aa6edb5, []int{7} + return fileDescriptor_chat_955d1f0dcca586dd, []int{7} } func (m *GatherFormat) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GatherFormat.Unmarshal(m, b) @@ -699,29 +695,29 @@ func (m *GatherFormat) GetList() []*MsgFormat { type MsgFormat struct { // @inject_tag: json:"sendID" - SendID string `protobuf:"bytes,1,opt,name=SendID" json:"sendID"` + SendID string `protobuf:"bytes,1,opt,name=SendID" json:"SendID,omitempty"` // @inject_tag: json:"recvID" - RecvID string `protobuf:"bytes,2,opt,name=RecvID" json:"recvID"` + RecvID string `protobuf:"bytes,2,opt,name=RecvID" json:"RecvID,omitempty"` // @inject_tag: json:"msgFrom" - MsgFrom int32 `protobuf:"varint,3,opt,name=MsgFrom" json:"msgFrom"` + MsgFrom int32 `protobuf:"varint,3,opt,name=MsgFrom" json:"MsgFrom,omitempty"` // @inject_tag: json:"contentType" - ContentType int32 `protobuf:"varint,4,opt,name=ContentType" json:"contentType"` + ContentType int32 `protobuf:"varint,4,opt,name=ContentType" json:"ContentType,omitempty"` // @inject_tag: json:"serverMsgID" - ServerMsgID string `protobuf:"bytes,5,opt,name=ServerMsgID" json:"serverMsgID"` + ServerMsgID string `protobuf:"bytes,5,opt,name=ServerMsgID" json:"ServerMsgID,omitempty"` // @inject_tag: json:"content" - Content string `protobuf:"bytes,6,opt,name=Content" json:"content"` + Content string `protobuf:"bytes,6,opt,name=Content" json:"Content,omitempty"` // @inject_tag: json:"seq" - Seq int64 `protobuf:"varint,7,opt,name=Seq" json:"seq"` + Seq int64 `protobuf:"varint,7,opt,name=Seq" json:"Seq,omitempty"` // @inject_tag: json:"sendTime" - SendTime int64 `protobuf:"varint,8,opt,name=SendTime" json:"sendTime"` + SendTime int64 `protobuf:"varint,8,opt,name=SendTime" json:"SendTime,omitempty"` // @inject_tag: json:"senderPlatformID" - SenderPlatformID int32 `protobuf:"varint,9,opt,name=SenderPlatformID" json:"senderPlatformID"` + SenderPlatformID int32 `protobuf:"varint,9,opt,name=SenderPlatformID" json:"SenderPlatformID,omitempty"` // @inject_tag: json:"senderNickName" - SenderNickName string `protobuf:"bytes,10,opt,name=SenderNickName" json:"senderNickName"` + SenderNickName string `protobuf:"bytes,10,opt,name=SenderNickName" json:"SenderNickName,omitempty"` // @inject_tag: json:"senderFaceUrl" - SenderFaceURL string `protobuf:"bytes,11,opt,name=SenderFaceURL" json:"senderFaceUrl"` + SenderFaceURL string `protobuf:"bytes,11,opt,name=SenderFaceURL" json:"SenderFaceURL,omitempty"` // @inject_tag: json:"clientMsgID" - ClientMsgID string `protobuf:"bytes,12,opt,name=ClientMsgID" json:"clientMsgID"` + ClientMsgID string `protobuf:"bytes,12,opt,name=ClientMsgID" json:"ClientMsgID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -731,7 +727,7 @@ func (m *MsgFormat) Reset() { *m = MsgFormat{} } func (m *MsgFormat) String() string { return proto.CompactTextString(m) } func (*MsgFormat) ProtoMessage() {} func (*MsgFormat) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_163a8d226aa6edb5, []int{8} + return fileDescriptor_chat_955d1f0dcca586dd, []int{8} } func (m *MsgFormat) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgFormat.Unmarshal(m, b) @@ -835,181 +831,61 @@ func (m *MsgFormat) GetClientMsgID() string { return "" } -type UserSendMsgReq struct { - ReqIdentifier int32 `protobuf:"varint,1,opt,name=ReqIdentifier" json:"ReqIdentifier,omitempty"` - Token string `protobuf:"bytes,2,opt,name=Token" json:"Token,omitempty"` - SendID string `protobuf:"bytes,3,opt,name=SendID" json:"SendID,omitempty"` - OperationID string `protobuf:"bytes,4,opt,name=OperationID" json:"OperationID,omitempty"` - SenderNickName string `protobuf:"bytes,5,opt,name=SenderNickName" json:"SenderNickName,omitempty"` - SenderFaceURL string `protobuf:"bytes,6,opt,name=SenderFaceURL" json:"SenderFaceURL,omitempty"` - PlatformID int32 `protobuf:"varint,7,opt,name=PlatformID" json:"PlatformID,omitempty"` - SessionType int32 `protobuf:"varint,8,opt,name=SessionType" json:"SessionType,omitempty"` - MsgFrom int32 `protobuf:"varint,9,opt,name=MsgFrom" json:"MsgFrom,omitempty"` - ContentType int32 `protobuf:"varint,10,opt,name=ContentType" json:"ContentType,omitempty"` - RecvID string `protobuf:"bytes,11,opt,name=RecvID" json:"RecvID,omitempty"` - ForceList []string `protobuf:"bytes,12,rep,name=ForceList" json:"ForceList,omitempty"` - Content string `protobuf:"bytes,13,opt,name=Content" json:"Content,omitempty"` - Options string `protobuf:"bytes,14,opt,name=Options" json:"Options,omitempty"` - ClientMsgID string `protobuf:"bytes,15,opt,name=ClientMsgID" json:"ClientMsgID,omitempty"` - OffLineInfo string `protobuf:"bytes,16,opt,name=OffLineInfo" json:"OffLineInfo,omitempty"` - Ex string `protobuf:"bytes,17,opt,name=Ex" json:"Ex,omitempty"` - SendTime int64 `protobuf:"varint,18,opt,name=sendTime" json:"sendTime,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +type SendMsgReq struct { + Token string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"` + OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` + MsgData *sdk_ws.MsgData `protobuf:"bytes,3,opt,name=msgData" json:"msgData,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *UserSendMsgReq) Reset() { *m = UserSendMsgReq{} } -func (m *UserSendMsgReq) String() string { return proto.CompactTextString(m) } -func (*UserSendMsgReq) ProtoMessage() {} -func (*UserSendMsgReq) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_163a8d226aa6edb5, []int{9} +func (m *SendMsgReq) Reset() { *m = SendMsgReq{} } +func (m *SendMsgReq) String() string { return proto.CompactTextString(m) } +func (*SendMsgReq) ProtoMessage() {} +func (*SendMsgReq) Descriptor() ([]byte, []int) { + return fileDescriptor_chat_955d1f0dcca586dd, []int{9} } -func (m *UserSendMsgReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UserSendMsgReq.Unmarshal(m, b) +func (m *SendMsgReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SendMsgReq.Unmarshal(m, b) } -func (m *UserSendMsgReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UserSendMsgReq.Marshal(b, m, deterministic) +func (m *SendMsgReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SendMsgReq.Marshal(b, m, deterministic) } -func (dst *UserSendMsgReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_UserSendMsgReq.Merge(dst, src) +func (dst *SendMsgReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_SendMsgReq.Merge(dst, src) } -func (m *UserSendMsgReq) XXX_Size() int { - return xxx_messageInfo_UserSendMsgReq.Size(m) +func (m *SendMsgReq) XXX_Size() int { + return xxx_messageInfo_SendMsgReq.Size(m) } -func (m *UserSendMsgReq) XXX_DiscardUnknown() { - xxx_messageInfo_UserSendMsgReq.DiscardUnknown(m) +func (m *SendMsgReq) XXX_DiscardUnknown() { + xxx_messageInfo_SendMsgReq.DiscardUnknown(m) } -var xxx_messageInfo_UserSendMsgReq proto.InternalMessageInfo +var xxx_messageInfo_SendMsgReq proto.InternalMessageInfo -func (m *UserSendMsgReq) GetReqIdentifier() int32 { - if m != nil { - return m.ReqIdentifier - } - return 0 -} - -func (m *UserSendMsgReq) GetToken() string { +func (m *SendMsgReq) GetToken() string { if m != nil { return m.Token } return "" } -func (m *UserSendMsgReq) GetSendID() string { - if m != nil { - return m.SendID - } - return "" -} - -func (m *UserSendMsgReq) GetOperationID() string { +func (m *SendMsgReq) GetOperationID() string { if m != nil { return m.OperationID } return "" } -func (m *UserSendMsgReq) GetSenderNickName() string { +func (m *SendMsgReq) GetMsgData() *sdk_ws.MsgData { if m != nil { - return m.SenderNickName - } - return "" -} - -func (m *UserSendMsgReq) GetSenderFaceURL() string { - if m != nil { - return m.SenderFaceURL - } - return "" -} - -func (m *UserSendMsgReq) GetPlatformID() int32 { - if m != nil { - return m.PlatformID - } - return 0 -} - -func (m *UserSendMsgReq) GetSessionType() int32 { - if m != nil { - return m.SessionType - } - return 0 -} - -func (m *UserSendMsgReq) GetMsgFrom() int32 { - if m != nil { - return m.MsgFrom - } - return 0 -} - -func (m *UserSendMsgReq) GetContentType() int32 { - if m != nil { - return m.ContentType - } - return 0 -} - -func (m *UserSendMsgReq) GetRecvID() string { - if m != nil { - return m.RecvID - } - return "" -} - -func (m *UserSendMsgReq) GetForceList() []string { - if m != nil { - return m.ForceList + return m.MsgData } return nil } -func (m *UserSendMsgReq) GetContent() string { - if m != nil { - return m.Content - } - return "" -} - -func (m *UserSendMsgReq) GetOptions() string { - if m != nil { - return m.Options - } - return "" -} - -func (m *UserSendMsgReq) GetClientMsgID() string { - if m != nil { - return m.ClientMsgID - } - return "" -} - -func (m *UserSendMsgReq) GetOffLineInfo() string { - if m != nil { - return m.OffLineInfo - } - return "" -} - -func (m *UserSendMsgReq) GetEx() string { - if m != nil { - return m.Ex - } - return "" -} - -func (m *UserSendMsgReq) GetSendTime() int64 { - if m != nil { - return m.SendTime - } - return 0 -} - -type UserSendMsgResp struct { +type SendMsgResp struct { ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` ReqIdentifier int32 `protobuf:"varint,3,opt,name=ReqIdentifier" json:"ReqIdentifier,omitempty"` @@ -1021,66 +897,66 @@ type UserSendMsgResp struct { XXX_sizecache int32 `json:"-"` } -func (m *UserSendMsgResp) Reset() { *m = UserSendMsgResp{} } -func (m *UserSendMsgResp) String() string { return proto.CompactTextString(m) } -func (*UserSendMsgResp) ProtoMessage() {} -func (*UserSendMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_163a8d226aa6edb5, []int{10} +func (m *SendMsgResp) Reset() { *m = SendMsgResp{} } +func (m *SendMsgResp) String() string { return proto.CompactTextString(m) } +func (*SendMsgResp) ProtoMessage() {} +func (*SendMsgResp) Descriptor() ([]byte, []int) { + return fileDescriptor_chat_955d1f0dcca586dd, []int{10} } -func (m *UserSendMsgResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UserSendMsgResp.Unmarshal(m, b) +func (m *SendMsgResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SendMsgResp.Unmarshal(m, b) } -func (m *UserSendMsgResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UserSendMsgResp.Marshal(b, m, deterministic) +func (m *SendMsgResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SendMsgResp.Marshal(b, m, deterministic) } -func (dst *UserSendMsgResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_UserSendMsgResp.Merge(dst, src) +func (dst *SendMsgResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_SendMsgResp.Merge(dst, src) } -func (m *UserSendMsgResp) XXX_Size() int { - return xxx_messageInfo_UserSendMsgResp.Size(m) +func (m *SendMsgResp) XXX_Size() int { + return xxx_messageInfo_SendMsgResp.Size(m) } -func (m *UserSendMsgResp) XXX_DiscardUnknown() { - xxx_messageInfo_UserSendMsgResp.DiscardUnknown(m) +func (m *SendMsgResp) XXX_DiscardUnknown() { + xxx_messageInfo_SendMsgResp.DiscardUnknown(m) } -var xxx_messageInfo_UserSendMsgResp proto.InternalMessageInfo +var xxx_messageInfo_SendMsgResp proto.InternalMessageInfo -func (m *UserSendMsgResp) GetErrCode() int32 { +func (m *SendMsgResp) GetErrCode() int32 { if m != nil { return m.ErrCode } return 0 } -func (m *UserSendMsgResp) GetErrMsg() string { +func (m *SendMsgResp) GetErrMsg() string { if m != nil { return m.ErrMsg } return "" } -func (m *UserSendMsgResp) GetReqIdentifier() int32 { +func (m *SendMsgResp) GetReqIdentifier() int32 { if m != nil { return m.ReqIdentifier } return 0 } -func (m *UserSendMsgResp) GetServerMsgID() string { +func (m *SendMsgResp) GetServerMsgID() string { if m != nil { return m.ServerMsgID } return "" } -func (m *UserSendMsgResp) GetClientMsgID() string { +func (m *SendMsgResp) GetClientMsgID() string { if m != nil { return m.ClientMsgID } return "" } -func (m *UserSendMsgResp) GetSendTime() int64 { +func (m *SendMsgResp) GetSendTime() int64 { if m != nil { return m.SendTime } @@ -1097,245 +973,70 @@ func init() { proto.RegisterType((*GetMaxAndMinSeqResp)(nil), "pbChat.GetMaxAndMinSeqResp") proto.RegisterType((*GatherFormat)(nil), "pbChat.GatherFormat") proto.RegisterType((*MsgFormat)(nil), "pbChat.MsgFormat") - proto.RegisterType((*UserSendMsgReq)(nil), "pbChat.UserSendMsgReq") - proto.RegisterType((*UserSendMsgResp)(nil), "pbChat.UserSendMsgResp") + proto.RegisterType((*SendMsgReq)(nil), "pbChat.SendMsgReq") + proto.RegisterType((*SendMsgResp)(nil), "pbChat.SendMsgResp") } -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn +func init() { proto.RegisterFile("chat.proto", fileDescriptor_chat_955d1f0dcca586dd) } -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// Client API for Chat service - -type ChatClient interface { - GetMaxAndMinSeq(ctx context.Context, in *GetMaxAndMinSeqReq, opts ...grpc.CallOption) (*GetMaxAndMinSeqResp, error) - PullMessage(ctx context.Context, in *PullMessageReq, opts ...grpc.CallOption) (*PullMessageResp, error) - PullMessageBySeqList(ctx context.Context, in *PullMessageBySeqListReq, opts ...grpc.CallOption) (*PullMessageResp, error) - UserSendMsg(ctx context.Context, in *UserSendMsgReq, opts ...grpc.CallOption) (*UserSendMsgResp, error) -} - -type chatClient struct { - cc *grpc.ClientConn -} - -func NewChatClient(cc *grpc.ClientConn) ChatClient { - return &chatClient{cc} -} - -func (c *chatClient) GetMaxAndMinSeq(ctx context.Context, in *GetMaxAndMinSeqReq, opts ...grpc.CallOption) (*GetMaxAndMinSeqResp, error) { - out := new(GetMaxAndMinSeqResp) - err := grpc.Invoke(ctx, "/pbChat.Chat/GetMaxAndMinSeq", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *chatClient) PullMessage(ctx context.Context, in *PullMessageReq, opts ...grpc.CallOption) (*PullMessageResp, error) { - out := new(PullMessageResp) - err := grpc.Invoke(ctx, "/pbChat.Chat/PullMessage", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *chatClient) PullMessageBySeqList(ctx context.Context, in *PullMessageBySeqListReq, opts ...grpc.CallOption) (*PullMessageResp, error) { - out := new(PullMessageResp) - err := grpc.Invoke(ctx, "/pbChat.Chat/PullMessageBySeqList", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *chatClient) UserSendMsg(ctx context.Context, in *UserSendMsgReq, opts ...grpc.CallOption) (*UserSendMsgResp, error) { - out := new(UserSendMsgResp) - err := grpc.Invoke(ctx, "/pbChat.Chat/UserSendMsg", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// Server API for Chat service - -type ChatServer interface { - GetMaxAndMinSeq(context.Context, *GetMaxAndMinSeqReq) (*GetMaxAndMinSeqResp, error) - PullMessage(context.Context, *PullMessageReq) (*PullMessageResp, error) - PullMessageBySeqList(context.Context, *PullMessageBySeqListReq) (*PullMessageResp, error) - UserSendMsg(context.Context, *UserSendMsgReq) (*UserSendMsgResp, error) -} - -func RegisterChatServer(s *grpc.Server, srv ChatServer) { - s.RegisterService(&_Chat_serviceDesc, srv) -} - -func _Chat_GetMaxAndMinSeq_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetMaxAndMinSeqReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ChatServer).GetMaxAndMinSeq(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pbChat.Chat/GetMaxAndMinSeq", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ChatServer).GetMaxAndMinSeq(ctx, req.(*GetMaxAndMinSeqReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Chat_PullMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PullMessageReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ChatServer).PullMessage(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pbChat.Chat/PullMessage", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ChatServer).PullMessage(ctx, req.(*PullMessageReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Chat_PullMessageBySeqList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PullMessageBySeqListReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ChatServer).PullMessageBySeqList(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pbChat.Chat/PullMessageBySeqList", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ChatServer).PullMessageBySeqList(ctx, req.(*PullMessageBySeqListReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Chat_UserSendMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UserSendMsgReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ChatServer).UserSendMsg(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pbChat.Chat/UserSendMsg", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ChatServer).UserSendMsg(ctx, req.(*UserSendMsgReq)) - } - return interceptor(ctx, in, info, handler) -} - -var _Chat_serviceDesc = grpc.ServiceDesc{ - ServiceName: "pbChat.Chat", - HandlerType: (*ChatServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetMaxAndMinSeq", - Handler: _Chat_GetMaxAndMinSeq_Handler, - }, - { - MethodName: "PullMessage", - Handler: _Chat_PullMessage_Handler, - }, - { - MethodName: "PullMessageBySeqList", - Handler: _Chat_PullMessageBySeqList_Handler, - }, - { - MethodName: "UserSendMsg", - Handler: _Chat_UserSendMsg_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "chat/chat.proto", -} - -func init() { proto.RegisterFile("chat/chat.proto", fileDescriptor_chat_163a8d226aa6edb5) } - -var fileDescriptor_chat_163a8d226aa6edb5 = []byte{ - // 981 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0xdd, 0x6a, 0xe3, 0x46, - 0x14, 0xc6, 0x92, 0x2d, 0xdb, 0xc7, 0xbf, 0x99, 0x86, 0xec, 0x90, 0x96, 0xd6, 0x88, 0x6d, 0x31, - 0xb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, 0xa1, 0x27, 0x91, 0x73, 0x77, 0x41, 0x5e, 0x3b, - 0x97, 0xb8, 0x29, 0xd2, 0xf2, 0x20, 0x1a, 0x41, 0x27, 0xb9, 0xce, 0xfc, 0x5d, 0x44, 0x70, 0x4b, - 0x9c, 0xa5, 0x42, 0x3c, 0x63, 0x46, 0x18, 0xf3, 0xc3, 0x40, 0x64, 0xb4, 0x65, 0x86, 0x02, 0xf1, - 0x8c, 0x57, 0x11, 0xa1, 0x6e, 0xec, 0x87, 0x81, 0x35, 0xc1, 0x20, 0xce, 0x51, 0x21, 0x74, 0x08, - 0x0d, 0x9b, 0x79, 0xd6, 0x04, 0x77, 0xc4, 0x37, 0x19, 0x70, 0x74, 0x1e, 0xbe, 0x25, 0x01, 0xee, - 0x4a, 0x54, 0x04, 0x62, 0xb7, 0xd5, 0x6a, 0xed, 0x07, 0xc4, 0x0a, 0x56, 0x21, 0xee, 0x25, 0xbb, - 0x65, 0x10, 0xef, 0xcd, 0xab, 0x88, 0xef, 0xcc, 0x70, 0x5f, 0x76, 0x34, 0x09, 0xd1, 0xe7, 0x00, - 0xd7, 0x6b, 0x37, 0x5e, 0x85, 0x74, 0x63, 0x4d, 0xf0, 0x40, 0x5c, 0x55, 0x41, 0xd0, 0x67, 0xd0, - 0x3e, 0x0f, 0xe9, 0x82, 0x5c, 0xfa, 0x2c, 0xc6, 0xc3, 0x91, 0x3e, 0x6e, 0x3b, 0x19, 0x20, 0x7a, - 0xb1, 0xf6, 0x49, 0x10, 0xcb, 0xbb, 0x1e, 0xc8, 0x93, 0x15, 0xc8, 0xfc, 0x47, 0x87, 0x23, 0xa9, - 0x86, 0x79, 0x78, 0x7d, 0xcb, 0x6e, 0x3e, 0x88, 0x2c, 0x30, 0x34, 0x79, 0xce, 0x8c, 0x6c, 0x13, - 0x55, 0xa4, 0x61, 0x4e, 0x30, 0x8d, 0xfd, 0x82, 0x31, 0x1e, 0x13, 0x4c, 0xf3, 0x69, 0x82, 0x69, - 0x3d, 0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06, 0x6a, 0x65, 0x51, 0x61, 0x68, 0x32, 0xb9, 0x0f, - 0xd6, 0x47, 0x3a, 0x7f, 0x58, 0x49, 0x68, 0x5e, 0x01, 0xba, 0x20, 0xb1, 0xed, 0xde, 0xff, 0x18, - 0x2c, 0x65, 0xdd, 0xff, 0xeb, 0x24, 0xf3, 0x57, 0xf8, 0xa4, 0xb4, 0xdf, 0xc7, 0x60, 0xcb, 0x9c, - 0x42, 0x57, 0xed, 0x2a, 0xea, 0x83, 0xb6, 0xbb, 0xbe, 0x66, 0x4d, 0xd0, 0x97, 0x50, 0x17, 0xf5, - 0x6b, 0x82, 0x89, 0x83, 0x94, 0x09, 0x6e, 0x15, 0x92, 0x06, 0xf1, 0xd9, 0xfc, 0x57, 0x83, 0xf6, - 0x0e, 0x7b, 0x1f, 0x6b, 0x4b, 0xad, 0x48, 0xcf, 0x5b, 0x51, 0xc1, 0x3c, 0xea, 0x7b, 0xcc, 0x83, - 0xde, 0x09, 0x15, 0x58, 0x13, 0xe1, 0x72, 0x6d, 0x47, 0x85, 0x54, 0xe3, 0x34, 0xf2, 0xc6, 0x39, - 0x04, 0x9d, 0x77, 0xa4, 0x29, 0x3a, 0xa2, 0x17, 0x0d, 0xb3, 0x55, 0x30, 0xcc, 0xaf, 0x61, 0x28, - 0x9d, 0x4d, 0xb1, 0x05, 0xe9, 0x66, 0x25, 0xbc, 0xc2, 0x42, 0xe1, 0x69, 0x16, 0xda, 0xd9, 0x67, - 0xa1, 0x8a, 0xd5, 0x74, 0xcb, 0x56, 0xf3, 0x67, 0x1d, 0xfa, 0x5c, 0x6c, 0x7c, 0x9d, 0xcd, 0x3c, - 0x2e, 0xc6, 0xe7, 0xd0, 0x73, 0xc8, 0xd6, 0x5a, 0x92, 0x20, 0xf6, 0x57, 0x3e, 0xa1, 0x89, 0x82, - 0xf2, 0x60, 0x36, 0x52, 0x35, 0x75, 0xa4, 0x66, 0x04, 0xea, 0x39, 0x02, 0x1f, 0xf5, 0x9c, 0x8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0xef, 0xe9, 0xe0, 0x97, 0xde, 0x89, 0xf8, 0x9f, 0xe5, 0x07, 0x99, - 0xf0, 0xc6, 0x10, 0xff, 0xbb, 0x7c, 0xfb, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc2, 0x44, 0x4e, - 0x52, 0xce, 0x0c, 0x00, 0x00, +var fileDescriptor_chat_955d1f0dcca586dd = []byte{ + // 927 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcb, 0x6e, 0xe3, 0x36, + 0x14, 0x85, 0x2d, 0x3f, 0xe2, 0x6b, 0xe7, 0xc5, 0x09, 0x32, 0x84, 0x5b, 0xb4, 0xae, 0x30, 0x2d, + 0x8c, 0x2e, 0x12, 0x20, 0xdd, 0x14, 0x5d, 0x14, 0xe8, 0xc4, 0x49, 0xa0, 0x62, 0x94, 0x04, 0xb2, + 0x07, 0x5d, 0x06, 0x1a, 0x9b, 0x56, 0x04, 0xdb, 0xa2, 0x4c, 0x32, 0xc9, 0xcc, 0xa6, 0xbf, 0xd0, + 0x6d, 0x7f, 0xa8, 0x1f, 0xd3, 0x5f, 0x28, 0x50, 0xa0, 0xb8, 0xa4, 0x14, 0xeb, 0x11, 0x27, 0xc1, + 0x14, 0x33, 0xcb, 0x73, 0x78, 0x79, 0x49, 0xdd, 0x73, 0x78, 0x6c, 0x80, 0xf1, 0xb5, 0xaf, 0x0e, + 0x62, 0xc1, 0x15, 0x27, 0x8d, 0xf8, 0xdd, 0xf1, 0xb5, 0xaf, 0xba, 0xdf, 0x5c, 0xc4, 0x2c, 0xba, + 0x72, 0xdc, 0xc3, 0x78, 0x16, 0x1c, 0xea, 0xa5, 0x43, 0x39, 0x99, 0x5d, 0xdd, 0xc9, 0xc3, 0x3b, + 0x69, 0x4a, 0xed, 0x3f, 0x6a, 0xb0, 0xfb, 0xdb, 0x70, 0xc4, 0x5d, 0x19, 0x0c, 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f7, 0xe5, 0x83, 0xbc, 0x8c, 0xc9, 0x25, 0xec, + 0x3d, 0x94, 0x68, 0xe4, 0xeb, 0x07, 0x36, 0x64, 0xf3, 0x6e, 0x7d, 0xc7, 0x23, 0x68, 0x26, 0x6a, + 0x11, 0x92, 0xd6, 0xac, 0x5c, 0xd3, 0x7d, 0x51, 0xe2, 0x64, 0xfc, 0xae, 0xa1, 0xff, 0xd9, 0xfe, + 0xf0, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9c, 0x2f, 0xc4, 0xa9, 0x12, 0x0b, 0x00, 0x00, } diff --git a/pkg/proto/chat/chat.proto b/pkg/proto/chat/chat.proto index 3c66c99dc..0f5638bd9 100644 --- a/pkg/proto/chat/chat.proto +++ b/pkg/proto/chat/chat.proto @@ -1,6 +1,7 @@ syntax = "proto3"; +import "Open_IM/pkg/proto/sdk_ws/ws.proto"; package pbChat;//The package name to which the proto file belongs -option go_package = "./chat;pbChat";//The generated go pb file is in the current directory, and the package name is pbChat +//option go_package = ".;pbChat";//The generated go pb file is in the current directory, and the package name is pbChat message WSToMsgSvrChatMsg{ string SendID = 1; @@ -106,31 +107,16 @@ message MsgFormat{ string ClientMsgID = 12; } -message UserSendMsgReq { +message SendMsgReq { - int32 ReqIdentifier = 1; - string Token = 2; - string SendID = 3; - string OperationID = 4; - string SenderNickName = 5; - string SenderFaceURL = 6; - int32 PlatformID = 7; - int32 SessionType = 8; - int32 MsgFrom = 9; - int32 ContentType = 10; - string RecvID = 11; - repeated string ForceList = 12; - string Content = 13; - string Options = 14; - string ClientMsgID = 15; - string OffLineInfo = 16; - string Ex = 17; - int64 sendTime = 18; +string token =1; +string operationID = 2; +open_im_sdk.MsgData msgData = 3; } -message UserSendMsgResp { +message SendMsgResp { int32 ErrCode = 1; string ErrMsg = 2; int32 ReqIdentifier = 3; @@ -143,5 +129,5 @@ service Chat { rpc GetMaxAndMinSeq(GetMaxAndMinSeqReq) returns(GetMaxAndMinSeqResp); rpc PullMessage(PullMessageReq) returns(PullMessageResp); rpc PullMessageBySeqList(PullMessageBySeqListReq) returns(PullMessageResp); - rpc UserSendMsg(UserSendMsgReq) returns(UserSendMsgResp); + rpc SendMsg(SendMsgReq) returns(SendMsgResp); } diff --git a/pkg/proto/group/group.proto b/pkg/proto/group/group.proto index ff1821ec2..f767c5220 100644 --- a/pkg/proto/group/group.proto +++ b/pkg/proto/group/group.proto @@ -15,8 +15,10 @@ message CreateGroupReq{ string faceUrl = 5; string token = 6; string operationID = 7; - string ex = 8; + string CreatorUserID = 8; } + + message GroupAddMemberInfo{ string uid = 1; int32 setRole = 2; @@ -31,6 +33,7 @@ message GetGroupsInfoReq{ repeated string groupIDList = 1; string token = 2; string operationID = 3; + string UserID = 4; } message GetGroupsInfoResp{ int32 ErrorCode = 1; @@ -105,12 +108,12 @@ message JoinGroupReq{ message GroupApplicationResponseReq{ string OperationID = 1; - string OwnerID = 2; + string UserID = 2; string GroupID = 3; - string FromUserID = 4; + string FromUserID = 4; //请求加群:请求者,邀请加群:邀请人 string FromUserNickName = 5; string FromUserFaceUrl = 6; - string ToUserID = 7; + string ToUserID = 7; //请求加群:0,邀请加群:被邀请人 string ToUserNickName = 8; string ToUserFaceUrl = 9; int64 AddTime = 10; diff --git a/pkg/proto/relay/relay.proto b/pkg/proto/relay/relay.proto index a3464e077..704c323ce 100644 --- a/pkg/proto/relay/relay.proto +++ b/pkg/proto/relay/relay.proto @@ -20,8 +20,7 @@ message MsgToUserReq { } message MsgToUserResp{ repeated SingleMsgToUser resp = 1; -} -//message SendMsgByWSReq{ +}//message SendMsgByWSReq{ // string SendID = 1; // string RecvID = 2; // string Content = 3; @@ -32,6 +31,7 @@ repeated SingleMsgToUser resp = 1; // string OperationID = 8; // int64 PlatformID = 9; //} + message SingleMsgToUser{ int64 ResultCode = 1; string RecvID = 2; diff --git a/pkg/proto/sdk_ws/ws.pb.go b/pkg/proto/sdk_ws/ws.pb.go index 7e1115f94..5a4ae90c5 100644 --- a/pkg/proto/sdk_ws/ws.pb.go +++ b/pkg/proto/sdk_ws/ws.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// source: sdk_ws/ws.proto +// source: ws.proto -package open_im_sdk // import "./sdk_ws" +package open_im_sdk import proto "github.com/golang/protobuf/proto" import fmt "fmt" @@ -32,7 +32,7 @@ func (m *PullMessageBySeqListResp) Reset() { *m = PullMessageBySeqListRe func (m *PullMessageBySeqListResp) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListResp) ProtoMessage() {} func (*PullMessageBySeqListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_d55c44e342c7a2b5, []int{0} + return fileDescriptor_ws_e1a0eca386827677, []int{0} } func (m *PullMessageBySeqListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListResp.Unmarshal(m, b) @@ -91,7 +91,7 @@ func (m *PullMessageBySeqListReq) Reset() { *m = PullMessageBySeqListReq func (m *PullMessageBySeqListReq) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListReq) ProtoMessage() {} func (*PullMessageBySeqListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_d55c44e342c7a2b5, []int{1} + return fileDescriptor_ws_e1a0eca386827677, []int{1} } func (m *PullMessageBySeqListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListReq.Unmarshal(m, b) @@ -128,7 +128,7 @@ func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} } func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqReq) ProtoMessage() {} func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_d55c44e342c7a2b5, []int{2} + return fileDescriptor_ws_e1a0eca386827677, []int{2} } func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) @@ -160,7 +160,7 @@ func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} } func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqResp) ProtoMessage() {} func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_d55c44e342c7a2b5, []int{3} + return fileDescriptor_ws_e1a0eca386827677, []int{3} } func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) @@ -196,9 +196,9 @@ func (m *GetMaxAndMinSeqResp) GetMinSeq() int64 { type GatherFormat struct { // @inject_tag: json:"id" - ID string `protobuf:"bytes,1,opt,name=ID" json:"id"` + ID string `protobuf:"bytes,1,opt,name=ID" json:"ID,omitempty"` // @inject_tag: json:"list" - List []*MsgFormat `protobuf:"bytes,2,rep,name=List" json:"list"` + List []*MsgFormat `protobuf:"bytes,2,rep,name=List" json:"List,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -208,7 +208,7 @@ func (m *GatherFormat) Reset() { *m = GatherFormat{} } func (m *GatherFormat) String() string { return proto.CompactTextString(m) } func (*GatherFormat) ProtoMessage() {} func (*GatherFormat) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_d55c44e342c7a2b5, []int{4} + return fileDescriptor_ws_e1a0eca386827677, []int{4} } func (m *GatherFormat) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GatherFormat.Unmarshal(m, b) @@ -244,29 +244,29 @@ func (m *GatherFormat) GetList() []*MsgFormat { type MsgFormat struct { // @inject_tag: json:"sendID" - SendID string `protobuf:"bytes,1,opt,name=SendID" json:"sendID"` + SendID string `protobuf:"bytes,1,opt,name=SendID" json:"SendID,omitempty"` // @inject_tag: json:"recvID" - RecvID string `protobuf:"bytes,2,opt,name=RecvID" json:"recvID"` + RecvID string `protobuf:"bytes,2,opt,name=RecvID" json:"RecvID,omitempty"` // @inject_tag: json:"msgFrom" - MsgFrom int32 `protobuf:"varint,3,opt,name=MsgFrom" json:"msgFrom"` + MsgFrom int32 `protobuf:"varint,3,opt,name=MsgFrom" json:"MsgFrom,omitempty"` // @inject_tag: json:"contentType" - ContentType int32 `protobuf:"varint,4,opt,name=ContentType" json:"contentType"` + ContentType int32 `protobuf:"varint,4,opt,name=ContentType" json:"ContentType,omitempty"` // @inject_tag: json:"serverMsgID" - ServerMsgID string `protobuf:"bytes,5,opt,name=ServerMsgID" json:"serverMsgID"` + ServerMsgID string `protobuf:"bytes,5,opt,name=ServerMsgID" json:"ServerMsgID,omitempty"` // @inject_tag: json:"content" - Content string `protobuf:"bytes,6,opt,name=Content" json:"content"` + Content string `protobuf:"bytes,6,opt,name=Content" json:"Content,omitempty"` // @inject_tag: json:"seq" - Seq int64 `protobuf:"varint,7,opt,name=Seq" json:"seq"` + Seq int64 `protobuf:"varint,7,opt,name=Seq" json:"Seq,omitempty"` // @inject_tag: json:"sendTime" - SendTime int64 `protobuf:"varint,8,opt,name=SendTime" json:"sendTime"` + SendTime int64 `protobuf:"varint,8,opt,name=SendTime" json:"SendTime,omitempty"` // @inject_tag: json:"senderPlatformID" - SenderPlatformID int32 `protobuf:"varint,9,opt,name=SenderPlatformID" json:"senderPlatformID"` + SenderPlatformID int32 `protobuf:"varint,9,opt,name=SenderPlatformID" json:"SenderPlatformID,omitempty"` // @inject_tag: json:"senderNickName" - SenderNickName string `protobuf:"bytes,10,opt,name=SenderNickName" json:"senderNickName"` + SenderNickName string `protobuf:"bytes,10,opt,name=SenderNickName" json:"SenderNickName,omitempty"` // @inject_tag: json:"senderFaceUrl" - SenderFaceURL string `protobuf:"bytes,11,opt,name=SenderFaceURL" json:"senderFaceUrl"` + SenderFaceURL string `protobuf:"bytes,11,opt,name=SenderFaceURL" json:"SenderFaceURL,omitempty"` // @inject_tag: json:"clientMsgID" - ClientMsgID string `protobuf:"bytes,12,opt,name=ClientMsgID" json:"clientMsgID"` + ClientMsgID string `protobuf:"bytes,12,opt,name=ClientMsgID" json:"ClientMsgID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -276,7 +276,7 @@ func (m *MsgFormat) Reset() { *m = MsgFormat{} } func (m *MsgFormat) String() string { return proto.CompactTextString(m) } func (*MsgFormat) ProtoMessage() {} func (*MsgFormat) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_d55c44e342c7a2b5, []int{5} + return fileDescriptor_ws_e1a0eca386827677, []int{5} } func (m *MsgFormat) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgFormat.Unmarshal(m, b) @@ -401,7 +401,7 @@ func (m *UserSendMsgReq) Reset() { *m = UserSendMsgReq{} } func (m *UserSendMsgReq) String() string { return proto.CompactTextString(m) } func (*UserSendMsgReq) ProtoMessage() {} func (*UserSendMsgReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_d55c44e342c7a2b5, []int{6} + return fileDescriptor_ws_e1a0eca386827677, []int{6} } func (m *UserSendMsgReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserSendMsgReq.Unmarshal(m, b) @@ -511,7 +511,7 @@ func (m *UserSendMsgResp) Reset() { *m = UserSendMsgResp{} } func (m *UserSendMsgResp) String() string { return proto.CompactTextString(m) } func (*UserSendMsgResp) ProtoMessage() {} func (*UserSendMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_d55c44e342c7a2b5, []int{7} + return fileDescriptor_ws_e1a0eca386827677, []int{7} } func (m *UserSendMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserSendMsgResp.Unmarshal(m, b) @@ -559,7 +559,7 @@ type MsgData struct { MsgFrom int32 `protobuf:"varint,4,opt,name=msgFrom" json:"msgFrom,omitempty"` ContentType int32 `protobuf:"varint,5,opt,name=contentType" json:"contentType,omitempty"` ServerMsgID string `protobuf:"bytes,6,opt,name=serverMsgID" json:"serverMsgID,omitempty"` - Content string `protobuf:"bytes,7,opt,name=content" json:"content,omitempty"` + Content []byte `protobuf:"bytes,7,opt,name=content,proto3" json:"content,omitempty"` SendTime int64 `protobuf:"varint,8,opt,name=sendTime" json:"sendTime,omitempty"` Seq int64 `protobuf:"varint,9,opt,name=seq" json:"seq,omitempty"` SenderPlatformID int32 `protobuf:"varint,10,opt,name=senderPlatformID" json:"senderPlatformID,omitempty"` @@ -575,7 +575,7 @@ func (m *MsgData) Reset() { *m = MsgData{} } func (m *MsgData) String() string { return proto.CompactTextString(m) } func (*MsgData) ProtoMessage() {} func (*MsgData) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_d55c44e342c7a2b5, []int{8} + return fileDescriptor_ws_e1a0eca386827677, []int{8} } func (m *MsgData) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgData.Unmarshal(m, b) @@ -637,11 +637,11 @@ func (m *MsgData) GetServerMsgID() string { return "" } -func (m *MsgData) GetContent() string { +func (m *MsgData) GetContent() []byte { if m != nil { return m.Content } - return "" + return nil } func (m *MsgData) GetSendTime() int64 { @@ -690,6 +690,8 @@ type OfflinePushInfo struct { Title string `protobuf:"bytes,1,opt,name=Title" json:"Title,omitempty"` Desc string `protobuf:"bytes,2,opt,name=Desc" json:"Desc,omitempty"` Ext string `protobuf:"bytes,3,opt,name=Ext" json:"Ext,omitempty"` + IOSPushSound string `protobuf:"bytes,4,opt,name=iOSPushSound" json:"iOSPushSound,omitempty"` + IOSBadgeCount bool `protobuf:"varint,5,opt,name=iOSBadgeCount" json:"iOSBadgeCount,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -699,7 +701,7 @@ func (m *OfflinePushInfo) Reset() { *m = OfflinePushInfo{} } func (m *OfflinePushInfo) String() string { return proto.CompactTextString(m) } func (*OfflinePushInfo) ProtoMessage() {} func (*OfflinePushInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_d55c44e342c7a2b5, []int{9} + return fileDescriptor_ws_e1a0eca386827677, []int{9} } func (m *OfflinePushInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OfflinePushInfo.Unmarshal(m, b) @@ -740,109 +742,204 @@ func (m *OfflinePushInfo) GetExt() string { return "" } -type GroupInfoTip struct { - GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` - GroupName string `protobuf:"bytes,2,opt,name=GroupName" json:"GroupName,omitempty"` - Notification string `protobuf:"bytes,3,opt,name=Notification" json:"Notification,omitempty"` - Introduction string `protobuf:"bytes,4,opt,name=Introduction" json:"Introduction,omitempty"` - FaceUrl string `protobuf:"bytes,5,opt,name=FaceUrl" json:"FaceUrl,omitempty"` - Ex string `protobuf:"bytes,6,opt,name=Ex" json:"Ex,omitempty"` - OwnerID string `protobuf:"bytes,7,opt,name=OwnerID" json:"OwnerID,omitempty"` - CreateTime uint64 `protobuf:"varint,8,opt,name=CreateTime" json:"CreateTime,omitempty"` - MemberCount uint32 `protobuf:"varint,9,opt,name=MemberCount" json:"MemberCount,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (m *OfflinePushInfo) GetIOSPushSound() string { + if m != nil { + return m.IOSPushSound + } + return "" } -func (m *GroupInfoTip) Reset() { *m = GroupInfoTip{} } -func (m *GroupInfoTip) String() string { return proto.CompactTextString(m) } -func (*GroupInfoTip) ProtoMessage() {} -func (*GroupInfoTip) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_d55c44e342c7a2b5, []int{10} -} -func (m *GroupInfoTip) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GroupInfoTip.Unmarshal(m, b) -} -func (m *GroupInfoTip) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GroupInfoTip.Marshal(b, m, deterministic) -} -func (dst *GroupInfoTip) XXX_Merge(src proto.Message) { - xxx_messageInfo_GroupInfoTip.Merge(dst, src) -} -func (m *GroupInfoTip) XXX_Size() int { - return xxx_messageInfo_GroupInfoTip.Size(m) -} -func (m *GroupInfoTip) XXX_DiscardUnknown() { - xxx_messageInfo_GroupInfoTip.DiscardUnknown(m) +func (m *OfflinePushInfo) GetIOSBadgeCount() bool { + if m != nil { + return m.IOSBadgeCount + } + return false } -var xxx_messageInfo_GroupInfoTip proto.InternalMessageInfo +// public +type GroupInfo struct { + GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` + GroupName string `protobuf:"bytes,2,opt,name=GroupName" json:"GroupName,omitempty"` + Notification string `protobuf:"bytes,3,opt,name=Notification" json:"Notification,omitempty"` + Introduction string `protobuf:"bytes,4,opt,name=Introduction" json:"Introduction,omitempty"` + FaceUrl string `protobuf:"bytes,5,opt,name=FaceUrl" json:"FaceUrl,omitempty"` + Owner *PublicUserInfo `protobuf:"bytes,6,opt,name=Owner" json:"Owner,omitempty"` + CreateTime uint64 `protobuf:"varint,7,opt,name=CreateTime" json:"CreateTime,omitempty"` + MemberCount uint32 `protobuf:"varint,8,opt,name=MemberCount" json:"MemberCount,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} -func (m *GroupInfoTip) GetGroupID() string { +func (m *GroupInfo) Reset() { *m = GroupInfo{} } +func (m *GroupInfo) String() string { return proto.CompactTextString(m) } +func (*GroupInfo) ProtoMessage() {} +func (*GroupInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_e1a0eca386827677, []int{10} +} +func (m *GroupInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupInfo.Unmarshal(m, b) +} +func (m *GroupInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupInfo.Marshal(b, m, deterministic) +} +func (dst *GroupInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupInfo.Merge(dst, src) +} +func (m *GroupInfo) XXX_Size() int { + return xxx_messageInfo_GroupInfo.Size(m) +} +func (m *GroupInfo) XXX_DiscardUnknown() { + xxx_messageInfo_GroupInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupInfo proto.InternalMessageInfo + +func (m *GroupInfo) GetGroupID() string { if m != nil { return m.GroupID } return "" } -func (m *GroupInfoTip) GetGroupName() string { +func (m *GroupInfo) GetGroupName() string { if m != nil { return m.GroupName } return "" } -func (m *GroupInfoTip) GetNotification() string { +func (m *GroupInfo) GetNotification() string { if m != nil { return m.Notification } return "" } -func (m *GroupInfoTip) GetIntroduction() string { +func (m *GroupInfo) GetIntroduction() string { if m != nil { return m.Introduction } return "" } -func (m *GroupInfoTip) GetFaceUrl() string { +func (m *GroupInfo) GetFaceUrl() string { if m != nil { return m.FaceUrl } return "" } -func (m *GroupInfoTip) GetEx() string { +func (m *GroupInfo) GetOwner() *PublicUserInfo { if m != nil { - return m.Ex + return m.Owner } - return "" + return nil } -func (m *GroupInfoTip) GetOwnerID() string { - if m != nil { - return m.OwnerID - } - return "" -} - -func (m *GroupInfoTip) GetCreateTime() uint64 { +func (m *GroupInfo) GetCreateTime() uint64 { if m != nil { return m.CreateTime } return 0 } -func (m *GroupInfoTip) GetMemberCount() uint32 { +func (m *GroupInfo) GetMemberCount() uint32 { if m != nil { return m.MemberCount } return 0 } -type UserInfoTip struct { +// private, Group members have permission to view +type GroupMemberFullInfo struct { + GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` + UserID string `protobuf:"bytes,2,opt,name=UserID" json:"UserID,omitempty"` + AdministratorLevel int32 `protobuf:"varint,3,opt,name=AdministratorLevel" json:"AdministratorLevel,omitempty"` + JoinTime uint64 `protobuf:"varint,4,opt,name=JoinTime" json:"JoinTime,omitempty"` + NickName string `protobuf:"bytes,5,opt,name=NickName" json:"NickName,omitempty"` + FaceUrl string `protobuf:"bytes,6,opt,name=FaceUrl" json:"FaceUrl,omitempty"` + FriendRemark string `protobuf:"bytes,7,opt,name=FriendRemark" json:"FriendRemark,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GroupMemberFullInfo) Reset() { *m = GroupMemberFullInfo{} } +func (m *GroupMemberFullInfo) String() string { return proto.CompactTextString(m) } +func (*GroupMemberFullInfo) ProtoMessage() {} +func (*GroupMemberFullInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_e1a0eca386827677, []int{11} +} +func (m *GroupMemberFullInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupMemberFullInfo.Unmarshal(m, b) +} +func (m *GroupMemberFullInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupMemberFullInfo.Marshal(b, m, deterministic) +} +func (dst *GroupMemberFullInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupMemberFullInfo.Merge(dst, src) +} +func (m *GroupMemberFullInfo) XXX_Size() int { + return xxx_messageInfo_GroupMemberFullInfo.Size(m) +} +func (m *GroupMemberFullInfo) XXX_DiscardUnknown() { + xxx_messageInfo_GroupMemberFullInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupMemberFullInfo proto.InternalMessageInfo + +func (m *GroupMemberFullInfo) GetGroupID() string { + if m != nil { + return m.GroupID + } + return "" +} + +func (m *GroupMemberFullInfo) GetUserID() string { + if m != nil { + return m.UserID + } + return "" +} + +func (m *GroupMemberFullInfo) GetAdministratorLevel() int32 { + if m != nil { + return m.AdministratorLevel + } + return 0 +} + +func (m *GroupMemberFullInfo) GetJoinTime() uint64 { + if m != nil { + return m.JoinTime + } + return 0 +} + +func (m *GroupMemberFullInfo) GetNickName() string { + if m != nil { + return m.NickName + } + return "" +} + +func (m *GroupMemberFullInfo) GetFaceUrl() string { + if m != nil { + return m.FaceUrl + } + return "" +} + +func (m *GroupMemberFullInfo) GetFriendRemark() string { + if m != nil { + return m.FriendRemark + } + return "" +} + +// private, Friends have permission to view +type UserInfo struct { UserID string `protobuf:"bytes,1,opt,name=UserID" json:"UserID,omitempty"` Name string `protobuf:"bytes,2,opt,name=Name" json:"Name,omitempty"` Icon string `protobuf:"bytes,3,opt,name=Icon" json:"Icon,omitempty"` @@ -850,146 +947,1263 @@ type UserInfoTip struct { Mobile string `protobuf:"bytes,5,opt,name=Mobile" json:"Mobile,omitempty"` Birth string `protobuf:"bytes,6,opt,name=Birth" json:"Birth,omitempty"` Email string `protobuf:"bytes,7,opt,name=Email" json:"Email,omitempty"` - Ex string `protobuf:"bytes,8,opt,name=Ex" json:"Ex,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *UserInfoTip) Reset() { *m = UserInfoTip{} } -func (m *UserInfoTip) String() string { return proto.CompactTextString(m) } -func (*UserInfoTip) ProtoMessage() {} -func (*UserInfoTip) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_d55c44e342c7a2b5, []int{11} +func (m *UserInfo) Reset() { *m = UserInfo{} } +func (m *UserInfo) String() string { return proto.CompactTextString(m) } +func (*UserInfo) ProtoMessage() {} +func (*UserInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_e1a0eca386827677, []int{12} } -func (m *UserInfoTip) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UserInfoTip.Unmarshal(m, b) +func (m *UserInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UserInfo.Unmarshal(m, b) } -func (m *UserInfoTip) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UserInfoTip.Marshal(b, m, deterministic) +func (m *UserInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UserInfo.Marshal(b, m, deterministic) } -func (dst *UserInfoTip) XXX_Merge(src proto.Message) { - xxx_messageInfo_UserInfoTip.Merge(dst, src) +func (dst *UserInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_UserInfo.Merge(dst, src) } -func (m *UserInfoTip) XXX_Size() int { - return xxx_messageInfo_UserInfoTip.Size(m) +func (m *UserInfo) XXX_Size() int { + return xxx_messageInfo_UserInfo.Size(m) } -func (m *UserInfoTip) XXX_DiscardUnknown() { - xxx_messageInfo_UserInfoTip.DiscardUnknown(m) +func (m *UserInfo) XXX_DiscardUnknown() { + xxx_messageInfo_UserInfo.DiscardUnknown(m) } -var xxx_messageInfo_UserInfoTip proto.InternalMessageInfo +var xxx_messageInfo_UserInfo proto.InternalMessageInfo -func (m *UserInfoTip) GetUserID() string { +func (m *UserInfo) GetUserID() string { if m != nil { return m.UserID } return "" } -func (m *UserInfoTip) GetName() string { +func (m *UserInfo) GetName() string { if m != nil { return m.Name } return "" } -func (m *UserInfoTip) GetIcon() string { +func (m *UserInfo) GetIcon() string { if m != nil { return m.Icon } return "" } -func (m *UserInfoTip) GetGender() int32 { +func (m *UserInfo) GetGender() int32 { if m != nil { return m.Gender } return 0 } -func (m *UserInfoTip) GetMobile() string { +func (m *UserInfo) GetMobile() string { if m != nil { return m.Mobile } return "" } -func (m *UserInfoTip) GetBirth() string { +func (m *UserInfo) GetBirth() string { if m != nil { return m.Birth } return "" } -func (m *UserInfoTip) GetEmail() string { +func (m *UserInfo) GetEmail() string { if m != nil { return m.Email } return "" } -func (m *UserInfoTip) GetEx() string { +// No permissions required +type PublicUserInfo struct { + UserID string `protobuf:"bytes,1,opt,name=UserID" json:"UserID,omitempty"` + Nickname string `protobuf:"bytes,2,opt,name=Nickname" json:"Nickname,omitempty"` + FaceUrl string `protobuf:"bytes,3,opt,name=FaceUrl" json:"FaceUrl,omitempty"` + Gender int32 `protobuf:"varint,4,opt,name=Gender" json:"Gender,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PublicUserInfo) Reset() { *m = PublicUserInfo{} } +func (m *PublicUserInfo) String() string { return proto.CompactTextString(m) } +func (*PublicUserInfo) ProtoMessage() {} +func (*PublicUserInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_e1a0eca386827677, []int{13} +} +func (m *PublicUserInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PublicUserInfo.Unmarshal(m, b) +} +func (m *PublicUserInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PublicUserInfo.Marshal(b, m, deterministic) +} +func (dst *PublicUserInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_PublicUserInfo.Merge(dst, src) +} +func (m *PublicUserInfo) XXX_Size() int { + return xxx_messageInfo_PublicUserInfo.Size(m) +} +func (m *PublicUserInfo) XXX_DiscardUnknown() { + xxx_messageInfo_PublicUserInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_PublicUserInfo proto.InternalMessageInfo + +func (m *PublicUserInfo) GetUserID() string { if m != nil { - return m.Ex + return m.UserID } return "" } -type CreateGroupTip struct { - Group *GroupInfoTip `protobuf:"bytes,1,opt,name=group" json:"group,omitempty"` - Creator *UserInfoTip `protobuf:"bytes,2,opt,name=creator" json:"creator,omitempty"` - MemberList []*UserInfoTip `protobuf:"bytes,3,rep,name=memberList" json:"memberList,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (m *PublicUserInfo) GetNickname() string { + if m != nil { + return m.Nickname + } + return "" } -func (m *CreateGroupTip) Reset() { *m = CreateGroupTip{} } -func (m *CreateGroupTip) String() string { return proto.CompactTextString(m) } -func (*CreateGroupTip) ProtoMessage() {} -func (*CreateGroupTip) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_d55c44e342c7a2b5, []int{12} -} -func (m *CreateGroupTip) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateGroupTip.Unmarshal(m, b) -} -func (m *CreateGroupTip) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateGroupTip.Marshal(b, m, deterministic) -} -func (dst *CreateGroupTip) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateGroupTip.Merge(dst, src) -} -func (m *CreateGroupTip) XXX_Size() int { - return xxx_messageInfo_CreateGroupTip.Size(m) -} -func (m *CreateGroupTip) XXX_DiscardUnknown() { - xxx_messageInfo_CreateGroupTip.DiscardUnknown(m) +func (m *PublicUserInfo) GetFaceUrl() string { + if m != nil { + return m.FaceUrl + } + return "" } -var xxx_messageInfo_CreateGroupTip proto.InternalMessageInfo +func (m *PublicUserInfo) GetGender() int32 { + if m != nil { + return m.Gender + } + return 0 +} -func (m *CreateGroupTip) GetGroup() *GroupInfoTip { +type TipsComm struct { + Detail []byte `protobuf:"bytes,1,opt,name=Detail,proto3" json:"Detail,omitempty"` + DefaultTips string `protobuf:"bytes,2,opt,name=DefaultTips" json:"DefaultTips,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TipsComm) Reset() { *m = TipsComm{} } +func (m *TipsComm) String() string { return proto.CompactTextString(m) } +func (*TipsComm) ProtoMessage() {} +func (*TipsComm) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_e1a0eca386827677, []int{14} +} +func (m *TipsComm) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TipsComm.Unmarshal(m, b) +} +func (m *TipsComm) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TipsComm.Marshal(b, m, deterministic) +} +func (dst *TipsComm) XXX_Merge(src proto.Message) { + xxx_messageInfo_TipsComm.Merge(dst, src) +} +func (m *TipsComm) XXX_Size() int { + return xxx_messageInfo_TipsComm.Size(m) +} +func (m *TipsComm) XXX_DiscardUnknown() { + xxx_messageInfo_TipsComm.DiscardUnknown(m) +} + +var xxx_messageInfo_TipsComm proto.InternalMessageInfo + +func (m *TipsComm) GetDetail() []byte { + if m != nil { + return m.Detail + } + return nil +} + +func (m *TipsComm) GetDefaultTips() string { + if m != nil { + return m.DefaultTips + } + return "" +} + +// ////////////////////group///////////////////// +// Actively join the group +type MemberEnterTips struct { + Group *GroupInfo `protobuf:"bytes,1,opt,name=Group" json:"Group,omitempty"` + Member *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=Member" json:"Member,omitempty"` + OperationTime uint64 `protobuf:"varint,3,opt,name=OperationTime" json:"OperationTime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MemberEnterTips) Reset() { *m = MemberEnterTips{} } +func (m *MemberEnterTips) String() string { return proto.CompactTextString(m) } +func (*MemberEnterTips) ProtoMessage() {} +func (*MemberEnterTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_e1a0eca386827677, []int{15} +} +func (m *MemberEnterTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MemberEnterTips.Unmarshal(m, b) +} +func (m *MemberEnterTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MemberEnterTips.Marshal(b, m, deterministic) +} +func (dst *MemberEnterTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_MemberEnterTips.Merge(dst, src) +} +func (m *MemberEnterTips) XXX_Size() int { + return xxx_messageInfo_MemberEnterTips.Size(m) +} +func (m *MemberEnterTips) XXX_DiscardUnknown() { + xxx_messageInfo_MemberEnterTips.DiscardUnknown(m) +} + +var xxx_messageInfo_MemberEnterTips proto.InternalMessageInfo + +func (m *MemberEnterTips) GetGroup() *GroupInfo { if m != nil { return m.Group } return nil } -func (m *CreateGroupTip) GetCreator() *UserInfoTip { +func (m *MemberEnterTips) GetMember() *GroupMemberFullInfo { + if m != nil { + return m.Member + } + return nil +} + +func (m *MemberEnterTips) GetOperationTime() uint64 { + if m != nil { + return m.OperationTime + } + return 0 +} + +// Actively leave the group +type MemberLeaveTips struct { + Group *GroupInfo `protobuf:"bytes,1,opt,name=Group" json:"Group,omitempty"` + Member *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=Member" json:"Member,omitempty"` + OperationTime uint64 `protobuf:"varint,3,opt,name=OperationTime" json:"OperationTime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MemberLeaveTips) Reset() { *m = MemberLeaveTips{} } +func (m *MemberLeaveTips) String() string { return proto.CompactTextString(m) } +func (*MemberLeaveTips) ProtoMessage() {} +func (*MemberLeaveTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_e1a0eca386827677, []int{16} +} +func (m *MemberLeaveTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MemberLeaveTips.Unmarshal(m, b) +} +func (m *MemberLeaveTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MemberLeaveTips.Marshal(b, m, deterministic) +} +func (dst *MemberLeaveTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_MemberLeaveTips.Merge(dst, src) +} +func (m *MemberLeaveTips) XXX_Size() int { + return xxx_messageInfo_MemberLeaveTips.Size(m) +} +func (m *MemberLeaveTips) XXX_DiscardUnknown() { + xxx_messageInfo_MemberLeaveTips.DiscardUnknown(m) +} + +var xxx_messageInfo_MemberLeaveTips proto.InternalMessageInfo + +func (m *MemberLeaveTips) GetGroup() *GroupInfo { + if m != nil { + return m.Group + } + return nil +} + +func (m *MemberLeaveTips) GetMember() *GroupMemberFullInfo { + if m != nil { + return m.Member + } + return nil +} + +func (m *MemberLeaveTips) GetOperationTime() uint64 { + if m != nil { + return m.OperationTime + } + return 0 +} + +type MemberInvitedTips struct { + Group *GroupInfo `protobuf:"bytes,1,opt,name=Group" json:"Group,omitempty"` + OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=OpUser" json:"OpUser,omitempty"` + Member *GroupMemberFullInfo `protobuf:"bytes,3,opt,name=Member" json:"Member,omitempty"` + OperationTime uint64 `protobuf:"varint,4,opt,name=OperationTime" json:"OperationTime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MemberInvitedTips) Reset() { *m = MemberInvitedTips{} } +func (m *MemberInvitedTips) String() string { return proto.CompactTextString(m) } +func (*MemberInvitedTips) ProtoMessage() {} +func (*MemberInvitedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_e1a0eca386827677, []int{17} +} +func (m *MemberInvitedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MemberInvitedTips.Unmarshal(m, b) +} +func (m *MemberInvitedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MemberInvitedTips.Marshal(b, m, deterministic) +} +func (dst *MemberInvitedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_MemberInvitedTips.Merge(dst, src) +} +func (m *MemberInvitedTips) XXX_Size() int { + return xxx_messageInfo_MemberInvitedTips.Size(m) +} +func (m *MemberInvitedTips) XXX_DiscardUnknown() { + xxx_messageInfo_MemberInvitedTips.DiscardUnknown(m) +} + +var xxx_messageInfo_MemberInvitedTips proto.InternalMessageInfo + +func (m *MemberInvitedTips) GetGroup() *GroupInfo { + if m != nil { + return m.Group + } + return nil +} + +func (m *MemberInvitedTips) GetOpUser() *GroupMemberFullInfo { + if m != nil { + return m.OpUser + } + return nil +} + +func (m *MemberInvitedTips) GetMember() *GroupMemberFullInfo { + if m != nil { + return m.Member + } + return nil +} + +func (m *MemberInvitedTips) GetOperationTime() uint64 { + if m != nil { + return m.OperationTime + } + return 0 +} + +type MemberKickedTips struct { + Group *GroupInfo `protobuf:"bytes,1,opt,name=Group" json:"Group,omitempty"` + OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=OpUser" json:"OpUser,omitempty"` + Member *GroupMemberFullInfo `protobuf:"bytes,3,opt,name=Member" json:"Member,omitempty"` + OperationTime uint64 `protobuf:"varint,4,opt,name=OperationTime" json:"OperationTime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MemberKickedTips) Reset() { *m = MemberKickedTips{} } +func (m *MemberKickedTips) String() string { return proto.CompactTextString(m) } +func (*MemberKickedTips) ProtoMessage() {} +func (*MemberKickedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_e1a0eca386827677, []int{18} +} +func (m *MemberKickedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MemberKickedTips.Unmarshal(m, b) +} +func (m *MemberKickedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MemberKickedTips.Marshal(b, m, deterministic) +} +func (dst *MemberKickedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_MemberKickedTips.Merge(dst, src) +} +func (m *MemberKickedTips) XXX_Size() int { + return xxx_messageInfo_MemberKickedTips.Size(m) +} +func (m *MemberKickedTips) XXX_DiscardUnknown() { + xxx_messageInfo_MemberKickedTips.DiscardUnknown(m) +} + +var xxx_messageInfo_MemberKickedTips proto.InternalMessageInfo + +func (m *MemberKickedTips) GetGroup() *GroupInfo { + if m != nil { + return m.Group + } + return nil +} + +func (m *MemberKickedTips) GetOpUser() *GroupMemberFullInfo { + if m != nil { + return m.OpUser + } + return nil +} + +func (m *MemberKickedTips) GetMember() *GroupMemberFullInfo { + if m != nil { + return m.Member + } + return nil +} + +func (m *MemberKickedTips) GetOperationTime() uint64 { + if m != nil { + return m.OperationTime + } + return 0 +} + +type GroupMemberChangeInfo struct { + ChangeType int32 `protobuf:"varint,1,opt,name=ChangeType" json:"ChangeType,omitempty"` + OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=OpUser" json:"OpUser,omitempty"` + Member *GroupMemberFullInfo `protobuf:"bytes,3,opt,name=Member" json:"Member,omitempty"` + MuteTime uint64 `protobuf:"varint,4,opt,name=MuteTime" json:"MuteTime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GroupMemberChangeInfo) Reset() { *m = GroupMemberChangeInfo{} } +func (m *GroupMemberChangeInfo) String() string { return proto.CompactTextString(m) } +func (*GroupMemberChangeInfo) ProtoMessage() {} +func (*GroupMemberChangeInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_e1a0eca386827677, []int{19} +} +func (m *GroupMemberChangeInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupMemberChangeInfo.Unmarshal(m, b) +} +func (m *GroupMemberChangeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupMemberChangeInfo.Marshal(b, m, deterministic) +} +func (dst *GroupMemberChangeInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupMemberChangeInfo.Merge(dst, src) +} +func (m *GroupMemberChangeInfo) XXX_Size() int { + return xxx_messageInfo_GroupMemberChangeInfo.Size(m) +} +func (m *GroupMemberChangeInfo) XXX_DiscardUnknown() { + xxx_messageInfo_GroupMemberChangeInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupMemberChangeInfo proto.InternalMessageInfo + +func (m *GroupMemberChangeInfo) GetChangeType() int32 { + if m != nil { + return m.ChangeType + } + return 0 +} + +func (m *GroupMemberChangeInfo) GetOpUser() *GroupMemberFullInfo { + if m != nil { + return m.OpUser + } + return nil +} + +func (m *GroupMemberChangeInfo) GetMember() *GroupMemberFullInfo { + if m != nil { + return m.Member + } + return nil +} + +func (m *GroupMemberChangeInfo) GetMuteTime() uint64 { + if m != nil { + return m.MuteTime + } + return 0 +} + +type MemberInfoChangedTips struct { + Group *GroupInfo `protobuf:"bytes,1,opt,name=Group" json:"Group,omitempty"` + MemberChanged *GroupMemberChangeInfo `protobuf:"bytes,2,opt,name=MemberChanged" json:"MemberChanged,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MemberInfoChangedTips) Reset() { *m = MemberInfoChangedTips{} } +func (m *MemberInfoChangedTips) String() string { return proto.CompactTextString(m) } +func (*MemberInfoChangedTips) ProtoMessage() {} +func (*MemberInfoChangedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_e1a0eca386827677, []int{20} +} +func (m *MemberInfoChangedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MemberInfoChangedTips.Unmarshal(m, b) +} +func (m *MemberInfoChangedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MemberInfoChangedTips.Marshal(b, m, deterministic) +} +func (dst *MemberInfoChangedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_MemberInfoChangedTips.Merge(dst, src) +} +func (m *MemberInfoChangedTips) XXX_Size() int { + return xxx_messageInfo_MemberInfoChangedTips.Size(m) +} +func (m *MemberInfoChangedTips) XXX_DiscardUnknown() { + xxx_messageInfo_MemberInfoChangedTips.DiscardUnknown(m) +} + +var xxx_messageInfo_MemberInfoChangedTips proto.InternalMessageInfo + +func (m *MemberInfoChangedTips) GetGroup() *GroupInfo { + if m != nil { + return m.Group + } + return nil +} + +func (m *MemberInfoChangedTips) GetMemberChanged() *GroupMemberChangeInfo { + if m != nil { + return m.MemberChanged + } + return nil +} + +type GroupCreatedTips struct { + Group *GroupInfo `protobuf:"bytes,1,opt,name=Group" json:"Group,omitempty"` + Creator *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=Creator" json:"Creator,omitempty"` + MemberList []*GroupMemberFullInfo `protobuf:"bytes,3,rep,name=MemberList" json:"MemberList,omitempty"` + OperationTime uint64 `protobuf:"varint,4,opt,name=OperationTime" json:"OperationTime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GroupCreatedTips) Reset() { *m = GroupCreatedTips{} } +func (m *GroupCreatedTips) String() string { return proto.CompactTextString(m) } +func (*GroupCreatedTips) ProtoMessage() {} +func (*GroupCreatedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_e1a0eca386827677, []int{21} +} +func (m *GroupCreatedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupCreatedTips.Unmarshal(m, b) +} +func (m *GroupCreatedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupCreatedTips.Marshal(b, m, deterministic) +} +func (dst *GroupCreatedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupCreatedTips.Merge(dst, src) +} +func (m *GroupCreatedTips) XXX_Size() int { + return xxx_messageInfo_GroupCreatedTips.Size(m) +} +func (m *GroupCreatedTips) XXX_DiscardUnknown() { + xxx_messageInfo_GroupCreatedTips.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupCreatedTips proto.InternalMessageInfo + +func (m *GroupCreatedTips) GetGroup() *GroupInfo { + if m != nil { + return m.Group + } + return nil +} + +func (m *GroupCreatedTips) GetCreator() *GroupMemberFullInfo { if m != nil { return m.Creator } return nil } -func (m *CreateGroupTip) GetMemberList() []*UserInfoTip { +func (m *GroupCreatedTips) GetMemberList() []*GroupMemberFullInfo { if m != nil { return m.MemberList } return nil } +func (m *GroupCreatedTips) GetOperationTime() uint64 { + if m != nil { + return m.OperationTime + } + return 0 +} + +type GroupInfoChangedTips struct { + ChangedType int32 `protobuf:"varint,1,opt,name=ChangedType" json:"ChangedType,omitempty"` + Group *GroupInfo `protobuf:"bytes,2,opt,name=Group" json:"Group,omitempty"` + OpUser *GroupMemberFullInfo `protobuf:"bytes,3,opt,name=OpUser" json:"OpUser,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GroupInfoChangedTips) Reset() { *m = GroupInfoChangedTips{} } +func (m *GroupInfoChangedTips) String() string { return proto.CompactTextString(m) } +func (*GroupInfoChangedTips) ProtoMessage() {} +func (*GroupInfoChangedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_e1a0eca386827677, []int{22} +} +func (m *GroupInfoChangedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupInfoChangedTips.Unmarshal(m, b) +} +func (m *GroupInfoChangedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupInfoChangedTips.Marshal(b, m, deterministic) +} +func (dst *GroupInfoChangedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupInfoChangedTips.Merge(dst, src) +} +func (m *GroupInfoChangedTips) XXX_Size() int { + return xxx_messageInfo_GroupInfoChangedTips.Size(m) +} +func (m *GroupInfoChangedTips) XXX_DiscardUnknown() { + xxx_messageInfo_GroupInfoChangedTips.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupInfoChangedTips proto.InternalMessageInfo + +func (m *GroupInfoChangedTips) GetChangedType() int32 { + if m != nil { + return m.ChangedType + } + return 0 +} + +func (m *GroupInfoChangedTips) GetGroup() *GroupInfo { + if m != nil { + return m.Group + } + return nil +} + +func (m *GroupInfoChangedTips) GetOpUser() *GroupMemberFullInfo { + if m != nil { + return m.OpUser + } + return nil +} + +type ReceiveJoinApplicationTips struct { + Group *GroupInfo `protobuf:"bytes,1,opt,name=Group" json:"Group,omitempty"` + Applicant *PublicUserInfo `protobuf:"bytes,2,opt,name=Applicant" json:"Applicant,omitempty"` + Reason string `protobuf:"bytes,3,opt,name=Reason" json:"Reason,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ReceiveJoinApplicationTips) Reset() { *m = ReceiveJoinApplicationTips{} } +func (m *ReceiveJoinApplicationTips) String() string { return proto.CompactTextString(m) } +func (*ReceiveJoinApplicationTips) ProtoMessage() {} +func (*ReceiveJoinApplicationTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_e1a0eca386827677, []int{23} +} +func (m *ReceiveJoinApplicationTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ReceiveJoinApplicationTips.Unmarshal(m, b) +} +func (m *ReceiveJoinApplicationTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ReceiveJoinApplicationTips.Marshal(b, m, deterministic) +} +func (dst *ReceiveJoinApplicationTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReceiveJoinApplicationTips.Merge(dst, src) +} +func (m *ReceiveJoinApplicationTips) XXX_Size() int { + return xxx_messageInfo_ReceiveJoinApplicationTips.Size(m) +} +func (m *ReceiveJoinApplicationTips) XXX_DiscardUnknown() { + xxx_messageInfo_ReceiveJoinApplicationTips.DiscardUnknown(m) +} + +var xxx_messageInfo_ReceiveJoinApplicationTips proto.InternalMessageInfo + +func (m *ReceiveJoinApplicationTips) GetGroup() *GroupInfo { + if m != nil { + return m.Group + } + return nil +} + +func (m *ReceiveJoinApplicationTips) GetApplicant() *PublicUserInfo { + if m != nil { + return m.Applicant + } + return nil +} + +func (m *ReceiveJoinApplicationTips) GetReason() string { + if m != nil { + return m.Reason + } + return "" +} + +type ApplicationProcessedTips struct { + Group *GroupInfo `protobuf:"bytes,1,opt,name=Group" json:"Group,omitempty"` + OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=OpUser" json:"OpUser,omitempty"` + Result int32 `protobuf:"varint,3,opt,name=Result" json:"Result,omitempty"` + Reason string `protobuf:"bytes,4,opt,name=Reason" json:"Reason,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ApplicationProcessedTips) Reset() { *m = ApplicationProcessedTips{} } +func (m *ApplicationProcessedTips) String() string { return proto.CompactTextString(m) } +func (*ApplicationProcessedTips) ProtoMessage() {} +func (*ApplicationProcessedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_e1a0eca386827677, []int{24} +} +func (m *ApplicationProcessedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ApplicationProcessedTips.Unmarshal(m, b) +} +func (m *ApplicationProcessedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ApplicationProcessedTips.Marshal(b, m, deterministic) +} +func (dst *ApplicationProcessedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_ApplicationProcessedTips.Merge(dst, src) +} +func (m *ApplicationProcessedTips) XXX_Size() int { + return xxx_messageInfo_ApplicationProcessedTips.Size(m) +} +func (m *ApplicationProcessedTips) XXX_DiscardUnknown() { + xxx_messageInfo_ApplicationProcessedTips.DiscardUnknown(m) +} + +var xxx_messageInfo_ApplicationProcessedTips proto.InternalMessageInfo + +func (m *ApplicationProcessedTips) GetGroup() *GroupInfo { + if m != nil { + return m.Group + } + return nil +} + +func (m *ApplicationProcessedTips) GetOpUser() *GroupMemberFullInfo { + if m != nil { + return m.OpUser + } + return nil +} + +func (m *ApplicationProcessedTips) GetResult() int32 { + if m != nil { + return m.Result + } + return 0 +} + +func (m *ApplicationProcessedTips) GetReason() string { + if m != nil { + return m.Reason + } + return "" +} + +// ////////////////////friend///////////////////// +type FriendInfo struct { + OwnerUserID string `protobuf:"bytes,1,opt,name=OwnerUserID" json:"OwnerUserID,omitempty"` + Remark string `protobuf:"bytes,2,opt,name=Remark" json:"Remark,omitempty"` + CreateTime uint64 `protobuf:"varint,3,opt,name=CreateTime" json:"CreateTime,omitempty"` + FriendUserInfo *UserInfo `protobuf:"bytes,4,opt,name=FriendUserInfo" json:"FriendUserInfo,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FriendInfo) Reset() { *m = FriendInfo{} } +func (m *FriendInfo) String() string { return proto.CompactTextString(m) } +func (*FriendInfo) ProtoMessage() {} +func (*FriendInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_e1a0eca386827677, []int{25} +} +func (m *FriendInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FriendInfo.Unmarshal(m, b) +} +func (m *FriendInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FriendInfo.Marshal(b, m, deterministic) +} +func (dst *FriendInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_FriendInfo.Merge(dst, src) +} +func (m *FriendInfo) XXX_Size() int { + return xxx_messageInfo_FriendInfo.Size(m) +} +func (m *FriendInfo) XXX_DiscardUnknown() { + xxx_messageInfo_FriendInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_FriendInfo proto.InternalMessageInfo + +func (m *FriendInfo) GetOwnerUserID() string { + if m != nil { + return m.OwnerUserID + } + return "" +} + +func (m *FriendInfo) GetRemark() string { + if m != nil { + return m.Remark + } + return "" +} + +func (m *FriendInfo) GetCreateTime() uint64 { + if m != nil { + return m.CreateTime + } + return 0 +} + +func (m *FriendInfo) GetFriendUserInfo() *UserInfo { + if m != nil { + return m.FriendUserInfo + } + return nil +} + +type FriendApplication struct { + AddTime uint64 `protobuf:"varint,4,opt,name=AddTime" json:"AddTime,omitempty"` + AddSource string `protobuf:"bytes,5,opt,name=AddSource" json:"AddSource,omitempty"` + AddWording string `protobuf:"bytes,6,opt,name=AddWording" json:"AddWording,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FriendApplication) Reset() { *m = FriendApplication{} } +func (m *FriendApplication) String() string { return proto.CompactTextString(m) } +func (*FriendApplication) ProtoMessage() {} +func (*FriendApplication) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_e1a0eca386827677, []int{26} +} +func (m *FriendApplication) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FriendApplication.Unmarshal(m, b) +} +func (m *FriendApplication) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FriendApplication.Marshal(b, m, deterministic) +} +func (dst *FriendApplication) XXX_Merge(src proto.Message) { + xxx_messageInfo_FriendApplication.Merge(dst, src) +} +func (m *FriendApplication) XXX_Size() int { + return xxx_messageInfo_FriendApplication.Size(m) +} +func (m *FriendApplication) XXX_DiscardUnknown() { + xxx_messageInfo_FriendApplication.DiscardUnknown(m) +} + +var xxx_messageInfo_FriendApplication proto.InternalMessageInfo + +func (m *FriendApplication) GetAddTime() uint64 { + if m != nil { + return m.AddTime + } + return 0 +} + +func (m *FriendApplication) GetAddSource() string { + if m != nil { + return m.AddSource + } + return "" +} + +func (m *FriendApplication) GetAddWording() string { + if m != nil { + return m.AddWording + } + return "" +} + +// user1 add user2 +type FriendApplicationListAddedTips struct { + OpUser *PublicUserInfo `protobuf:"bytes,1,opt,name=OpUser" json:"OpUser,omitempty"` + Application *FriendApplication `protobuf:"bytes,2,opt,name=Application" json:"Application,omitempty"` + OpedUser *PublicUserInfo `protobuf:"bytes,3,opt,name=OpedUser" json:"OpedUser,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FriendApplicationListAddedTips) Reset() { *m = FriendApplicationListAddedTips{} } +func (m *FriendApplicationListAddedTips) String() string { return proto.CompactTextString(m) } +func (*FriendApplicationListAddedTips) ProtoMessage() {} +func (*FriendApplicationListAddedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_e1a0eca386827677, []int{27} +} +func (m *FriendApplicationListAddedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FriendApplicationListAddedTips.Unmarshal(m, b) +} +func (m *FriendApplicationListAddedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FriendApplicationListAddedTips.Marshal(b, m, deterministic) +} +func (dst *FriendApplicationListAddedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_FriendApplicationListAddedTips.Merge(dst, src) +} +func (m *FriendApplicationListAddedTips) XXX_Size() int { + return xxx_messageInfo_FriendApplicationListAddedTips.Size(m) +} +func (m *FriendApplicationListAddedTips) XXX_DiscardUnknown() { + xxx_messageInfo_FriendApplicationListAddedTips.DiscardUnknown(m) +} + +var xxx_messageInfo_FriendApplicationListAddedTips proto.InternalMessageInfo + +func (m *FriendApplicationListAddedTips) GetOpUser() *PublicUserInfo { + if m != nil { + return m.OpUser + } + return nil +} + +func (m *FriendApplicationListAddedTips) GetApplication() *FriendApplication { + if m != nil { + return m.Application + } + return nil +} + +func (m *FriendApplicationListAddedTips) GetOpedUser() *PublicUserInfo { + if m != nil { + return m.OpedUser + } + return nil +} + +// user2 accept +type FriendApplicationListAcceptTips struct { + OpUser *PublicUserInfo `protobuf:"bytes,1,opt,name=OpUser" json:"OpUser,omitempty"` + OpedUser *PublicUserInfo `protobuf:"bytes,2,opt,name=OpedUser" json:"OpedUser,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FriendApplicationListAcceptTips) Reset() { *m = FriendApplicationListAcceptTips{} } +func (m *FriendApplicationListAcceptTips) String() string { return proto.CompactTextString(m) } +func (*FriendApplicationListAcceptTips) ProtoMessage() {} +func (*FriendApplicationListAcceptTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_e1a0eca386827677, []int{28} +} +func (m *FriendApplicationListAcceptTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FriendApplicationListAcceptTips.Unmarshal(m, b) +} +func (m *FriendApplicationListAcceptTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FriendApplicationListAcceptTips.Marshal(b, m, deterministic) +} +func (dst *FriendApplicationListAcceptTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_FriendApplicationListAcceptTips.Merge(dst, src) +} +func (m *FriendApplicationListAcceptTips) XXX_Size() int { + return xxx_messageInfo_FriendApplicationListAcceptTips.Size(m) +} +func (m *FriendApplicationListAcceptTips) XXX_DiscardUnknown() { + xxx_messageInfo_FriendApplicationListAcceptTips.DiscardUnknown(m) +} + +var xxx_messageInfo_FriendApplicationListAcceptTips proto.InternalMessageInfo + +func (m *FriendApplicationListAcceptTips) GetOpUser() *PublicUserInfo { + if m != nil { + return m.OpUser + } + return nil +} + +func (m *FriendApplicationListAcceptTips) GetOpedUser() *PublicUserInfo { + if m != nil { + return m.OpedUser + } + return nil +} + +// user2 reject +type FriendApplicationListRejectTips struct { + OpUser *PublicUserInfo `protobuf:"bytes,1,opt,name=OpUser" json:"OpUser,omitempty"` + OpedUser *PublicUserInfo `protobuf:"bytes,2,opt,name=OpedUser" json:"OpedUser,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FriendApplicationListRejectTips) Reset() { *m = FriendApplicationListRejectTips{} } +func (m *FriendApplicationListRejectTips) String() string { return proto.CompactTextString(m) } +func (*FriendApplicationListRejectTips) ProtoMessage() {} +func (*FriendApplicationListRejectTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_e1a0eca386827677, []int{29} +} +func (m *FriendApplicationListRejectTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FriendApplicationListRejectTips.Unmarshal(m, b) +} +func (m *FriendApplicationListRejectTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FriendApplicationListRejectTips.Marshal(b, m, deterministic) +} +func (dst *FriendApplicationListRejectTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_FriendApplicationListRejectTips.Merge(dst, src) +} +func (m *FriendApplicationListRejectTips) XXX_Size() int { + return xxx_messageInfo_FriendApplicationListRejectTips.Size(m) +} +func (m *FriendApplicationListRejectTips) XXX_DiscardUnknown() { + xxx_messageInfo_FriendApplicationListRejectTips.DiscardUnknown(m) +} + +var xxx_messageInfo_FriendApplicationListRejectTips proto.InternalMessageInfo + +func (m *FriendApplicationListRejectTips) GetOpUser() *PublicUserInfo { + if m != nil { + return m.OpUser + } + return nil +} + +func (m *FriendApplicationListRejectTips) GetOpedUser() *PublicUserInfo { + if m != nil { + return m.OpedUser + } + return nil +} + +type FriendListAddedTips struct { + Friend *FriendInfo `protobuf:"bytes,1,opt,name=Friend" json:"Friend,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FriendListAddedTips) Reset() { *m = FriendListAddedTips{} } +func (m *FriendListAddedTips) String() string { return proto.CompactTextString(m) } +func (*FriendListAddedTips) ProtoMessage() {} +func (*FriendListAddedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_e1a0eca386827677, []int{30} +} +func (m *FriendListAddedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FriendListAddedTips.Unmarshal(m, b) +} +func (m *FriendListAddedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FriendListAddedTips.Marshal(b, m, deterministic) +} +func (dst *FriendListAddedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_FriendListAddedTips.Merge(dst, src) +} +func (m *FriendListAddedTips) XXX_Size() int { + return xxx_messageInfo_FriendListAddedTips.Size(m) +} +func (m *FriendListAddedTips) XXX_DiscardUnknown() { + xxx_messageInfo_FriendListAddedTips.DiscardUnknown(m) +} + +var xxx_messageInfo_FriendListAddedTips proto.InternalMessageInfo + +func (m *FriendListAddedTips) GetFriend() *FriendInfo { + if m != nil { + return m.Friend + } + return nil +} + +type FriendListDeletedTips struct { + Friend *FriendInfo `protobuf:"bytes,1,opt,name=Friend" json:"Friend,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FriendListDeletedTips) Reset() { *m = FriendListDeletedTips{} } +func (m *FriendListDeletedTips) String() string { return proto.CompactTextString(m) } +func (*FriendListDeletedTips) ProtoMessage() {} +func (*FriendListDeletedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_e1a0eca386827677, []int{31} +} +func (m *FriendListDeletedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FriendListDeletedTips.Unmarshal(m, b) +} +func (m *FriendListDeletedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FriendListDeletedTips.Marshal(b, m, deterministic) +} +func (dst *FriendListDeletedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_FriendListDeletedTips.Merge(dst, src) +} +func (m *FriendListDeletedTips) XXX_Size() int { + return xxx_messageInfo_FriendListDeletedTips.Size(m) +} +func (m *FriendListDeletedTips) XXX_DiscardUnknown() { + xxx_messageInfo_FriendListDeletedTips.DiscardUnknown(m) +} + +var xxx_messageInfo_FriendListDeletedTips proto.InternalMessageInfo + +func (m *FriendListDeletedTips) GetFriend() *FriendInfo { + if m != nil { + return m.Friend + } + return nil +} + +type BlackListAddTips struct { + Friend *FriendInfo `protobuf:"bytes,1,opt,name=Friend" json:"Friend,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BlackListAddTips) Reset() { *m = BlackListAddTips{} } +func (m *BlackListAddTips) String() string { return proto.CompactTextString(m) } +func (*BlackListAddTips) ProtoMessage() {} +func (*BlackListAddTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_e1a0eca386827677, []int{32} +} +func (m *BlackListAddTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BlackListAddTips.Unmarshal(m, b) +} +func (m *BlackListAddTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BlackListAddTips.Marshal(b, m, deterministic) +} +func (dst *BlackListAddTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_BlackListAddTips.Merge(dst, src) +} +func (m *BlackListAddTips) XXX_Size() int { + return xxx_messageInfo_BlackListAddTips.Size(m) +} +func (m *BlackListAddTips) XXX_DiscardUnknown() { + xxx_messageInfo_BlackListAddTips.DiscardUnknown(m) +} + +var xxx_messageInfo_BlackListAddTips proto.InternalMessageInfo + +func (m *BlackListAddTips) GetFriend() *FriendInfo { + if m != nil { + return m.Friend + } + return nil +} + +type BlackListDeletedTips struct { + Friend *FriendInfo `protobuf:"bytes,1,opt,name=Friend" json:"Friend,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BlackListDeletedTips) Reset() { *m = BlackListDeletedTips{} } +func (m *BlackListDeletedTips) String() string { return proto.CompactTextString(m) } +func (*BlackListDeletedTips) ProtoMessage() {} +func (*BlackListDeletedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_e1a0eca386827677, []int{33} +} +func (m *BlackListDeletedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BlackListDeletedTips.Unmarshal(m, b) +} +func (m *BlackListDeletedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BlackListDeletedTips.Marshal(b, m, deterministic) +} +func (dst *BlackListDeletedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_BlackListDeletedTips.Merge(dst, src) +} +func (m *BlackListDeletedTips) XXX_Size() int { + return xxx_messageInfo_BlackListDeletedTips.Size(m) +} +func (m *BlackListDeletedTips) XXX_DiscardUnknown() { + xxx_messageInfo_BlackListDeletedTips.DiscardUnknown(m) +} + +var xxx_messageInfo_BlackListDeletedTips proto.InternalMessageInfo + +func (m *BlackListDeletedTips) GetFriend() *FriendInfo { + if m != nil { + return m.Friend + } + return nil +} + +type FriendInfoChangedTips struct { + Friend *FriendInfo `protobuf:"bytes,1,opt,name=Friend" json:"Friend,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FriendInfoChangedTips) Reset() { *m = FriendInfoChangedTips{} } +func (m *FriendInfoChangedTips) String() string { return proto.CompactTextString(m) } +func (*FriendInfoChangedTips) ProtoMessage() {} +func (*FriendInfoChangedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_e1a0eca386827677, []int{34} +} +func (m *FriendInfoChangedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FriendInfoChangedTips.Unmarshal(m, b) +} +func (m *FriendInfoChangedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FriendInfoChangedTips.Marshal(b, m, deterministic) +} +func (dst *FriendInfoChangedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_FriendInfoChangedTips.Merge(dst, src) +} +func (m *FriendInfoChangedTips) XXX_Size() int { + return xxx_messageInfo_FriendInfoChangedTips.Size(m) +} +func (m *FriendInfoChangedTips) XXX_DiscardUnknown() { + xxx_messageInfo_FriendInfoChangedTips.DiscardUnknown(m) +} + +var xxx_messageInfo_FriendInfoChangedTips proto.InternalMessageInfo + +func (m *FriendInfoChangedTips) GetFriend() *FriendInfo { + if m != nil { + return m.Friend + } + return nil +} + +// ////////////////////user///////////////////// +type SelfInfoUpdatedTips struct { + SelfUserInfo *UserInfo `protobuf:"bytes,1,opt,name=SelfUserInfo" json:"SelfUserInfo,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SelfInfoUpdatedTips) Reset() { *m = SelfInfoUpdatedTips{} } +func (m *SelfInfoUpdatedTips) String() string { return proto.CompactTextString(m) } +func (*SelfInfoUpdatedTips) ProtoMessage() {} +func (*SelfInfoUpdatedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_e1a0eca386827677, []int{35} +} +func (m *SelfInfoUpdatedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SelfInfoUpdatedTips.Unmarshal(m, b) +} +func (m *SelfInfoUpdatedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SelfInfoUpdatedTips.Marshal(b, m, deterministic) +} +func (dst *SelfInfoUpdatedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_SelfInfoUpdatedTips.Merge(dst, src) +} +func (m *SelfInfoUpdatedTips) XXX_Size() int { + return xxx_messageInfo_SelfInfoUpdatedTips.Size(m) +} +func (m *SelfInfoUpdatedTips) XXX_DiscardUnknown() { + xxx_messageInfo_SelfInfoUpdatedTips.DiscardUnknown(m) +} + +var xxx_messageInfo_SelfInfoUpdatedTips proto.InternalMessageInfo + +func (m *SelfInfoUpdatedTips) GetSelfUserInfo() *UserInfo { + if m != nil { + return m.SelfUserInfo + } + return nil +} + func init() { proto.RegisterType((*PullMessageBySeqListResp)(nil), "open_im_sdk.PullMessageBySeqListResp") proto.RegisterType((*PullMessageBySeqListReq)(nil), "open_im_sdk.PullMessageBySeqListReq") @@ -1002,77 +2216,142 @@ func init() { proto.RegisterType((*UserSendMsgResp)(nil), "open_im_sdk.UserSendMsgResp") proto.RegisterType((*MsgData)(nil), "open_im_sdk.MsgData") proto.RegisterType((*OfflinePushInfo)(nil), "open_im_sdk.OfflinePushInfo") - proto.RegisterType((*GroupInfoTip)(nil), "open_im_sdk.GroupInfoTip") - proto.RegisterType((*UserInfoTip)(nil), "open_im_sdk.UserInfoTip") - proto.RegisterType((*CreateGroupTip)(nil), "open_im_sdk.CreateGroupTip") + proto.RegisterType((*GroupInfo)(nil), "open_im_sdk.GroupInfo") + proto.RegisterType((*GroupMemberFullInfo)(nil), "open_im_sdk.GroupMemberFullInfo") + proto.RegisterType((*UserInfo)(nil), "open_im_sdk.UserInfo") + proto.RegisterType((*PublicUserInfo)(nil), "open_im_sdk.PublicUserInfo") + proto.RegisterType((*TipsComm)(nil), "open_im_sdk.TipsComm") + proto.RegisterType((*MemberEnterTips)(nil), "open_im_sdk.MemberEnterTips") + proto.RegisterType((*MemberLeaveTips)(nil), "open_im_sdk.MemberLeaveTips") + proto.RegisterType((*MemberInvitedTips)(nil), "open_im_sdk.MemberInvitedTips") + proto.RegisterType((*MemberKickedTips)(nil), "open_im_sdk.MemberKickedTips") + proto.RegisterType((*GroupMemberChangeInfo)(nil), "open_im_sdk.GroupMemberChangeInfo") + proto.RegisterType((*MemberInfoChangedTips)(nil), "open_im_sdk.MemberInfoChangedTips") + proto.RegisterType((*GroupCreatedTips)(nil), "open_im_sdk.GroupCreatedTips") + proto.RegisterType((*GroupInfoChangedTips)(nil), "open_im_sdk.GroupInfoChangedTips") + proto.RegisterType((*ReceiveJoinApplicationTips)(nil), "open_im_sdk.ReceiveJoinApplicationTips") + proto.RegisterType((*ApplicationProcessedTips)(nil), "open_im_sdk.ApplicationProcessedTips") + proto.RegisterType((*FriendInfo)(nil), "open_im_sdk.FriendInfo") + proto.RegisterType((*FriendApplication)(nil), "open_im_sdk.FriendApplication") + proto.RegisterType((*FriendApplicationListAddedTips)(nil), "open_im_sdk.FriendApplicationListAddedTips") + proto.RegisterType((*FriendApplicationListAcceptTips)(nil), "open_im_sdk.FriendApplicationListAcceptTips") + proto.RegisterType((*FriendApplicationListRejectTips)(nil), "open_im_sdk.FriendApplicationListRejectTips") + proto.RegisterType((*FriendListAddedTips)(nil), "open_im_sdk.FriendListAddedTips") + proto.RegisterType((*FriendListDeletedTips)(nil), "open_im_sdk.FriendListDeletedTips") + proto.RegisterType((*BlackListAddTips)(nil), "open_im_sdk.BlackListAddTips") + proto.RegisterType((*BlackListDeletedTips)(nil), "open_im_sdk.BlackListDeletedTips") + proto.RegisterType((*FriendInfoChangedTips)(nil), "open_im_sdk.FriendInfoChangedTips") + proto.RegisterType((*SelfInfoUpdatedTips)(nil), "open_im_sdk.SelfInfoUpdatedTips") } -func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_d55c44e342c7a2b5) } +func init() { proto.RegisterFile("ws.proto", fileDescriptor_ws_e1a0eca386827677) } -var fileDescriptor_ws_d55c44e342c7a2b5 = []byte{ - // 1021 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x56, 0xcb, 0x6e, 0x23, 0xb7, - 0x12, 0x85, 0xba, 0xf5, 0x2c, 0xc9, 0xf6, 0x80, 0xd7, 0xf0, 0xed, 0x0c, 0x82, 0x40, 0x68, 0x04, - 0x81, 0x30, 0x0b, 0x19, 0xf0, 0x6c, 0x06, 0x13, 0x04, 0x41, 0x6c, 0xc9, 0x86, 0x82, 0x91, 0x6d, - 0xb4, 0x3c, 0x9b, 0x6c, 0x8c, 0x76, 0x8b, 0x92, 0x1b, 0xee, 0x87, 0xd4, 0xa4, 0x6c, 0xf9, 0x3f, - 0xb2, 0xcd, 0x37, 0x64, 0x9d, 0x5f, 0xc8, 0x22, 0x7f, 0x14, 0x20, 0xa8, 0x22, 0x5b, 0x26, 0x25, - 0xe7, 0xb1, 0xe3, 0x39, 0xaa, 0x22, 0x59, 0xe7, 0x54, 0xb5, 0x08, 0x07, 0x62, 0xfa, 0x70, 0xfb, - 0x24, 0x8e, 0x9f, 0x44, 0x7f, 0x51, 0xe4, 0x32, 0x67, 0xed, 0x7c, 0xc1, 0xb3, 0xdb, 0x38, 0xbd, - 0x15, 0xd3, 0x07, 0xff, 0xf7, 0x0a, 0x78, 0xd7, 0xab, 0x24, 0x19, 0x73, 0x21, 0xc2, 0x39, 0x3f, - 0x7d, 0x9e, 0xf0, 0xe5, 0xa7, 0x58, 0xc8, 0x80, 0x8b, 0x05, 0x3b, 0x82, 0xfa, 0x38, 0x5c, 0x4f, - 0xf8, 0xd2, 0xab, 0x74, 0x2b, 0x3d, 0x37, 0xd0, 0x88, 0xf8, 0x38, 0x43, 0xde, 0xd1, 0x3c, 0x21, - 0xf6, 0x3d, 0xec, 0x4d, 0xe2, 0x6c, 0x9e, 0xf0, 0xcf, 0x82, 0x17, 0x63, 0x31, 0xf7, 0xdc, 0xae, - 0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, 0xf9, 0x5d, 0x9c, 0x70, 0x5d, 0xac, 0x46, - 0x68, 0xe9, 0x69, 0x5c, 0xc8, 0x7b, 0x5d, 0xae, 0x02, 0xc8, 0x0e, 0xd3, 0x30, 0x4e, 0x74, 0xbd, - 0x0a, 0x68, 0x5d, 0x9a, 0xa5, 0x2e, 0xfe, 0xaf, 0x15, 0xd8, 0x57, 0xc5, 0x92, 0x3b, 0x78, 0xfd, - 0x63, 0xa8, 0xcd, 0x71, 0x4d, 0xb7, 0xdf, 0x79, 0xae, 0x18, 0xf6, 0x07, 0x2a, 0x8e, 0x9d, 0x40, - 0x23, 0xc2, 0x2d, 0xf2, 0x82, 0x4a, 0x6b, 0x9f, 0x78, 0x3b, 0x7f, 0x1b, 0x65, 0x46, 0x19, 0xc8, - 0x3e, 0x00, 0xa4, 0x24, 0x21, 0x7d, 0x43, 0xd5, 0xc3, 0xea, 0xef, 0xd3, 0x8c, 0xd8, 0xd3, 0xa3, - 0x9f, 0x0e, 0xfb, 0xc7, 0xea, 0x11, 0xf8, 0xad, 0x11, 0x7f, 0x57, 0xa7, 0xe7, 0xe0, 0xfb, 0xbf, - 0x02, 0x00, 0x00, 0xff, 0xff, 0xc2, 0x41, 0x03, 0xcb, 0x21, 0x0a, 0x00, 0x00, +var fileDescriptor_ws_e1a0eca386827677 = []byte{ + // 1689 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xd7, 0x7a, 0x1d, 0xc7, 0x7e, 0x76, 0xd2, 0x74, 0x93, 0xb4, 0x4b, 0x40, 0xc5, 0x5a, 0x21, + 0x14, 0x55, 0x28, 0x88, 0xf4, 0x40, 0x5b, 0xa9, 0xa2, 0x49, 0x9c, 0xa4, 0x2e, 0x71, 0x1d, 0xad, + 0x53, 0x71, 0xac, 0x36, 0xbb, 0x63, 0x67, 0xc9, 0xfe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, 0x99, + 0xd6, 0x0a, 0x18, 0xfb, 0x24, 0x6d, 0x39, 0x2f, 0xb6, 0x22, 0x8f, 0xc7, 0x61, 0x93, 0x33, 0x6b, + 0x17, 0x96, 0x27, 0x50, 0x9e, 0x91, 0x50, 0xc9, 0x48, 0x98, 0x67, 0x24, 0x54, 0x32, 0xc2, 0x2d, + 0xeb, 0x31, 0xd4, 0x64, 0xbe, 0xc6, 0x22, 0x14, 0x9a, 0x0d, 0xb6, 0xb7, 0x62, 0x17, 0x9a, 0x0d, + 0xe3, 0x36, 0x14, 0x19, 0xa7, 0x02, 0x0b, 0xf4, 0x86, 0x12, 0x68, 0x8b, 0xf6, 0x44, 0x94, 0xcc, + 0xc7, 0xfa, 0xab, 0x00, 0x95, 0x1c, 0xc3, 0x2f, 0x76, 0x48, 0xe4, 0xe5, 0xa7, 0x09, 0x0b, 0x71, + 0x9b, 0xb8, 0xc3, 0x66, 0x83, 0x31, 0xa9, 0xd8, 0xc2, 0xc2, 0x04, 0xe0, 0xe6, 0x24, 0x0e, 0x4d, + 0xbd, 0xae, 0xad, 0xcf, 0xd9, 0x99, 0x69, 0xd4, 0xa1, 0xba, 0x13, 0x47, 0x29, 0x89, 0xd2, 0xa3, + 0xf3, 0x3e, 0x31, 0x8b, 0xec, 0x57, 0x19, 0x42, 0x8f, 0x0e, 0x49, 0x86, 0x2c, 0xc9, 0xcd, 0x86, + 0x39, 0xc7, 0x0e, 0x96, 0x21, 0x3c, 0x5d, 0x6c, 0x30, 0x4b, 0xec, 0xd7, 0xcc, 0x34, 0x96, 0x40, + 0xc7, 0xb4, 0xcc, 0xb3, 0xb4, 0xe0, 0xd2, 0x58, 0x83, 0x32, 0x72, 0x3d, 0xf2, 0x43, 0x62, 0x96, + 0x19, 0x9c, 0xdb, 0xc6, 0x6d, 0x58, 0xc2, 0x35, 0x49, 0x0e, 0x03, 0x27, 0xed, 0xc6, 0x49, 0xd8, + 0x6c, 0x98, 0x15, 0x46, 0x68, 0x02, 0x37, 0x3e, 0x84, 0x45, 0x8e, 0x3d, 0xf1, 0xdd, 0xd3, 0x27, + 0x4e, 0x48, 0x4c, 0x60, 0x9f, 0x1e, 0x43, 0x8d, 0x0f, 0x60, 0x81, 0x23, 0x7b, 0x8e, 0x4b, 0x9e, + 0xda, 0x07, 0x66, 0x95, 0xb9, 0xa9, 0x20, 0xcb, 0x42, 0xe0, 0x93, 0x28, 0xe5, 0x31, 0xd6, 0x78, + 0x8c, 0x12, 0x64, 0xfd, 0xa2, 0xc3, 0x22, 0x2a, 0x0d, 0xf7, 0xb5, 0x68, 0x0f, 0x55, 0xb5, 0x0d, + 0xf3, 0xed, 0x7e, 0xea, 0xc7, 0x11, 0x65, 0xaa, 0xaa, 0x6e, 0xae, 0x2b, 0x15, 0x54, 0xbd, 0x37, + 0x84, 0xeb, 0x6e, 0x94, 0x26, 0xe7, 0x76, 0xb6, 0x71, 0x4a, 0x18, 0x85, 0xab, 0x85, 0xa1, 0x4f, + 0x0b, 0xe3, 0x16, 0x80, 0x94, 0x3a, 0x5e, 0x4b, 0x09, 0xe1, 0xa5, 0xa4, 0xd4, 0x8f, 0x23, 0x56, + 0xec, 0x39, 0x5e, 0x6c, 0x09, 0x92, 0x85, 0x52, 0xba, 0x50, 0x28, 0xf3, 0x93, 0x42, 0x19, 0x89, + 0xaf, 0xac, 0x88, 0xef, 0x3d, 0xa8, 0xec, 0xc5, 0x89, 0x4b, 0x98, 0xd6, 0x2b, 0x75, 0x7d, 0xbd, + 0x62, 0x8f, 0x00, 0x59, 0x3c, 0xa0, 0x8a, 0x67, 0xac, 0x28, 0xd5, 0x89, 0xa2, 0xac, 0xdd, 0x87, + 0x9a, 0x9c, 0x56, 0x94, 0xdb, 0x29, 0x39, 0x17, 0x3d, 0x81, 0x4b, 0x63, 0x05, 0xe6, 0x86, 0x4e, + 0x30, 0xe0, 0x69, 0x9d, 0xb3, 0xb9, 0x71, 0xbf, 0x70, 0x57, 0xb3, 0xce, 0xe0, 0x9a, 0x52, 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 0xe2, 0x41, 0xe4, 0xb1, 0xb2, 0x54, 0x6c, 0x05, 0x43, 0xee, 0x7e, + 0xbb, 0xb3, 0xed, 0x78, 0x3d, 0xb2, 0x13, 0x0f, 0xa2, 0x94, 0x55, 0xa7, 0x6c, 0xab, 0xa0, 0xf5, + 0x4d, 0x01, 0x2a, 0xec, 0xb1, 0x63, 0x9c, 0x4c, 0x98, 0xe7, 0x46, 0x26, 0x9e, 0xcc, 0xc4, 0x56, + 0x63, 0x4b, 0xe9, 0x26, 0x19, 0x01, 0xc8, 0xe7, 0x49, 0x9c, 0xfa, 0x5d, 0xdf, 0x75, 0xb0, 0x69, + 0x04, 0x55, 0x05, 0x43, 0x9f, 0x66, 0x94, 0x26, 0xb1, 0x37, 0x70, 0x99, 0x8f, 0xe0, 0x2c, 0x63, + 0xf8, 0x7d, 0x96, 0xd4, 0x24, 0x10, 0xaf, 0x41, 0x66, 0x1a, 0x9f, 0xc0, 0x5c, 0xfb, 0x79, 0x44, + 0x12, 0xa6, 0xa0, 0xea, 0xe6, 0xbb, 0xca, 0x85, 0x78, 0x38, 0x38, 0x0e, 0x7c, 0x17, 0x9b, 0x0e, + 0xa3, 0xb0, 0xb9, 0x27, 0xde, 0x59, 0x3b, 0x09, 0x71, 0x52, 0xc2, 0x04, 0x84, 0xda, 0x2a, 0xda, + 0x12, 0x82, 0x65, 0x6b, 0x91, 0xf0, 0x98, 0x24, 0x3c, 0x3d, 0xa8, 0xb0, 0x05, 0x5b, 0x86, 0xac, + 0x3f, 0x35, 0x58, 0x66, 0x41, 0x72, 0x70, 0x6f, 0x10, 0x04, 0x97, 0xa4, 0xe9, 0x06, 0x94, 0x18, + 0x8d, 0xbc, 0xc9, 0xb8, 0x65, 0x6c, 0x80, 0xb1, 0xe5, 0x85, 0x7e, 0xe4, 0xd3, 0x34, 0x71, 0xd2, + 0x38, 0x39, 0x20, 0x43, 0x12, 0x88, 0x5e, 0x9b, 0xf2, 0x0b, 0x4a, 0xff, 0x71, 0xec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x33, 0x6d, 0x79, 0x9e, 0xa8, 0xe7, 0x9d, 0xbc, 0x42, 0xda, 0xe5, 0xe2, 0xc9, 0x8a, + 0xf3, 0x10, 0xaa, 0xd2, 0x81, 0xa2, 0xb6, 0xb7, 0x94, 0x9d, 0x13, 0x9f, 0xb5, 0xe5, 0x2d, 0xc6, + 0xa7, 0x50, 0x6e, 0xf7, 0x89, 0x27, 0xf5, 0xcf, 0x85, 0x1f, 0xce, 0x9d, 0xf1, 0x62, 0x7d, 0x7f, + 0x7a, 0x48, 0xae, 0x4b, 0xfa, 0xe9, 0xec, 0x31, 0xc9, 0x8c, 0x0a, 0xff, 0x08, 0x23, 0x9b, 0x7c, + 0x49, 0xdc, 0xb7, 0xc1, 0x68, 0x0f, 0x96, 0x39, 0x21, 0xb5, 0xd4, 0x1f, 0x43, 0x89, 0xc3, 0x82, + 0xc4, 0xcd, 0x29, 0x05, 0xe3, 0x04, 0xf8, 0xda, 0x7a, 0x04, 0xab, 0xa3, 0x73, 0x1a, 0x24, 0x20, + 0xe9, 0xac, 0x27, 0xed, 0xc0, 0xd2, 0x76, 0xe0, 0xb8, 0xa7, 0x82, 0xd0, 0x6c, 0x87, 0xec, 0xc3, + 0x4a, 0x7e, 0xc8, 0x1b, 0xb1, 0xc9, 0xe3, 0x1a, 0x7f, 0x23, 0x5e, 0xfb, 0xa4, 0x43, 0x58, 0xee, + 0x90, 0xa0, 0x8b, 0xd8, 0xd3, 0xbe, 0x97, 0x3f, 0xab, 0xf7, 0xa0, 0x86, 0x70, 0x7e, 0x43, 0x68, + 0x17, 0xdd, 0x10, 0x8a, 0xeb, 0x71, 0x89, 0xfd, 0xcb, 0xfc, 0xce, 0xdf, 0x01, 0x00, 0x00, 0xff, + 0xff, 0xca, 0x9b, 0xa2, 0xe6, 0x3e, 0x17, 0x00, 0x00, } diff --git a/pkg/proto/sdk_ws/ws.proto b/pkg/proto/sdk_ws/ws.proto index 25d79632c..6f276be87 100644 --- a/pkg/proto/sdk_ws/ws.proto +++ b/pkg/proto/sdk_ws/ws.proto @@ -1,6 +1,6 @@ syntax = "proto3"; package open_im_sdk;//The package name to which the proto file belongs -option go_package = "./sdk_ws;open_im_sdk";//The generated go pb file is in the current directory, and the package name is open_im_sdk +//option go_package = "./sdk_ws;open_im_sdk";//The generated go pb file is in the current directory, and the package name is open_im_sdk message PullMessageBySeqListResp { @@ -78,7 +78,7 @@ message MsgData { int32 msgFrom = 4; int32 contentType = 5; string serverMsgID = 6; - string content =7; + bytes content =7; int64 sendTime =8; int64 seq =9; int32 senderPlatformID =10; @@ -91,66 +91,187 @@ message OfflinePushInfo{ string Title = 1; string Desc = 2; string Ext = 3; - string PushSound = 4; - bool ISBadgeCount = 5; + string iOSPushSound = 4; + bool iOSBadgeCount = 5; } - +//public message GroupInfo{ - string GroupID = 1; - string GroupName = 2; - string Notification = 3; - string Introduction = 4; - string FaceUrl = 5; - string OwnerID = 6; - int64 CreateTime = 7; - uint32 MemberCount = 8; + string GroupID = 1; + string GroupName = 2; + string Notification = 3; + string Introduction = 4; + string FaceUrl = 5; + PublicUserInfo Owner = 6; + uint64 CreateTime = 7; + uint32 MemberCount = 8; } -message GroupMemberFullInfo{ +//private, Group members have permission to view +message GroupMemberFullInfo { string GroupID = 1 ; string UserID = 2 ; - int32 Role = 3; - int64 JoinTime = 4; + int32 AdministratorLevel = 3; + uint64 JoinTime = 4; string NickName = 5; - string FaceUrl =6; -} - -message FriendInfo{ - string UserID = 1; - string Nickname = 2; - string FaceUrl = 3; - int32 Gender = 4; - string Mobile = 5; - string Birth = 6; - string Email = 7; - string Remark = 8; + string FaceUrl = 6; + string FriendRemark = 7; } +//private, Friends have permission to view message UserInfo{ - string UserID = 1; - string Nickname = 2; - string FaceUrl = 3; - int32 Gender = 4; - string Mobile = 5; - string Birth = 6; - string Email = 7; + string UserID = 1; + string Nickname = 2; + string FaceUrl = 3; + int32 Gender = 4; + string Mobile = 5; + string Birth = 6; + string Email = 7; } -message UserPublicInfo{ - string UserID = 1; - string Nickname = 2; - string FaceUrl = 3; - int32 Gender = 4; +//No permissions required +message PublicUserInfo{ + string UserID = 1; + string Nickname = 2; + string FaceUrl = 3; + int32 Gender = 4; } -message CreateGroupTip{ - GroupInfo group = 1; - UserInfo creator = 2; - repeated GroupMemberFullInfo memberList = 3; +message TipsComm{ + bytes Detail = 1; + string DefaultTips = 2; +} + +//////////////////////group///////////////////// +//Actively join the group +message MemberEnterTips{ + GroupInfo Group = 1; + GroupMemberFullInfo EntrantUser = 2; + uint64 OperationTime = 3; } +//Actively leave the group +message MemberLeaveTips{ + GroupInfo Group = 1; + GroupMemberFullInfo LeaverUser = 2; + uint64 OperationTime = 3; +} + +message MemberInvitedTips{ + GroupInfo Group = 1; + GroupMemberFullInfo OpUser = 2; + GroupMemberFullInfo InvitedUser = 3; + uint64 OperationTime = 4; +} + +message MemberKickedTips{ + GroupInfo Group = 1; + GroupMemberFullInfo OpUser = 2; + GroupMemberFullInfo KickedUser = 3; + uint64 OperationTime = 4; +} +message MemberInfoChangedTips{ + int32 ChangeType = 1; //1:info changed; 2:mute + GroupMemberFullInfo OpUser = 2; //who do this + GroupMemberFullInfo FinalInfo = 3; // + uint64 MuteTime = 4; + GroupInfo Group = 5; +} + +message GroupCreatedTips{ + GroupInfo Group = 1; + GroupMemberFullInfo Creator = 2; + repeated GroupMemberFullInfo MemberList = 3; + uint64 OperationTime = 4; +} + +message GroupInfoChangedTips{ + int32 ChangedType = 1; //bitwise operators: 1:groupName; 10:Notification 100:Introduction; 1000:FaceUrl + GroupInfo Group = 2; + GroupMemberFullInfo OpUser = 3; +} + +message ReceiveJoinApplicationTips{ + GroupInfo Group = 1; + PublicUserInfo Applicant = 2; + string Reason = 3; +} + +message ApplicationProcessedTips{ + GroupInfo Group = 1; + GroupMemberFullInfo OpUser = 2; + int32 Result = 3; + string Reason = 4; +} + +//////////////////////friend///////////////////// +message FriendInfo{ + UserInfo OwnerUser = 1; + string Remark = 2; + uint64 CreateTime = 3; + UserInfo FriendUser = 4; +} + +message FriendApplication{ + uint64 AddTime = 1; + string AddSource = 2; + string AddWording = 3; +} + +//user1 add user2 +message FriendApplicationAddedTips{ + PublicUserInfo OpUser = 1; //user1 + FriendApplication Application = 2; + PublicUserInfo OpedUser = 3; //user2 + uint64 OperationTime = 4; +} + +// user2 accept or reject +message FriendApplicationProcessedTips{ + PublicUserInfo OpUser = 1; //user2 + PublicUserInfo OpedUser = 2; //user1 + int32 result = 3; //1: accept; -1: reject + uint64 OperationTime = 4; +} + +message FriendAddedTips{ + FriendInfo Friend = 1; + uint64 OperationTime = 2; +} + +message FriendDeletedTips{ + FriendInfo Friend = 1; + uint64 OperationTime = 2; +} + +message BlackInfo{ + PublicUserInfo OwnerUser = 1; + uint64 CreateTime = 3; + PublicUserInfo BlackUser = 4; +} + +message BlackAddedTips{ + BlackInfo Black = 1; + uint64 OperationTime = 2; +} + +message BlackDeletedTips{ + BlackInfo Black = 1; + uint64 OperationTime = 2; +} + +message FriendInfoChangedTips{ + FriendInfo Friend = 1; + PublicUserInfo OpUser = 2; + uint64 OperationTime = 3; +} +//////////////////////user///////////////////// +message SelfInfoUpdatedTips{ + UserInfo SelfUserInfo = 1; + PublicUserInfo OpUser = 2; + uint64 OperationTime = 3; +} diff --git a/pkg/utils/strings.go b/pkg/utils/strings.go index 5ee2a6503..9eec1ab94 100644 --- a/pkg/utils/strings.go +++ b/pkg/utils/strings.go @@ -54,6 +54,11 @@ func StructToJsonString(param interface{}) string { return dataString } +func StructToJsonBytes(param interface{}) []byte { + dataType, _ := json.Marshal(param) + return dataType +} + //The incoming parameter must be a pointer func JsonStringToStruct(s string, args interface{}) error { err := json.Unmarshal([]byte(s), args) From 7db98e55c50e01715ec88deae3b31cb965130251 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 22 Dec 2021 09:31:33 +0800 Subject: [PATCH 004/337] proto file --- pkg/proto/sdk_ws/ws.proto | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/pkg/proto/sdk_ws/ws.proto b/pkg/proto/sdk_ws/ws.proto index 25d79632c..1f3ef1124 100644 --- a/pkg/proto/sdk_ws/ws.proto +++ b/pkg/proto/sdk_ws/ws.proto @@ -74,17 +74,21 @@ message UserSendMsgResp { message MsgData { string sendID = 1; string recvID = 2; - int32 sessionType = 3; - int32 msgFrom = 4; - int32 contentType = 5; - string serverMsgID = 6; - string content =7; - int64 sendTime =8; - int64 seq =9; - int32 senderPlatformID =10; - string senderNickName =11; - string senderFaceURL =12; - string clientMsgID =13; + string groupID = 3; + string clientMsgID =4; + string serverMsgID =5; + int32 senderPlatformID =6; + string senderNickName =7; + string senderFaceURL =8; + int32 sessionType = 9; + int32 msgFrom = 10; + int32 contentType = 11; + string content =12; + repeated string forceList = 13; + int64 seq =14; + int64 sendTime = 15; + int64 createTime = 16; + OfflinePushInfo offlinePushInfo =17; } message OfflinePushInfo{ From 5f18723e2ce24e3d5b949ea2de51a65e7b13b597 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 22 Dec 2021 09:37:19 +0800 Subject: [PATCH 005/337] proto file --- pkg/proto/sdk_ws/ws.proto | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/proto/sdk_ws/ws.proto b/pkg/proto/sdk_ws/ws.proto index 1f3ef1124..819e036fd 100644 --- a/pkg/proto/sdk_ws/ws.proto +++ b/pkg/proto/sdk_ws/ws.proto @@ -83,12 +83,13 @@ message MsgData { int32 sessionType = 9; int32 msgFrom = 10; int32 contentType = 11; - string content =12; + bytes content =12; repeated string forceList = 13; int64 seq =14; int64 sendTime = 15; int64 createTime = 16; - OfflinePushInfo offlinePushInfo =17; + map Options= 17; + OfflinePushInfo offlinePushInfo =18; } message OfflinePushInfo{ From fb5ea3be847205bb6b96b0b4eb215f75aa9e6083 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 22 Dec 2021 10:47:07 +0800 Subject: [PATCH 006/337] proto file --- pkg/proto/chat/chat.proto | 47 +++++++++---------------------------- pkg/proto/push/push.proto | 18 ++------------ pkg/proto/relay/relay.proto | 22 ++++------------- 3 files changed, 18 insertions(+), 69 deletions(-) diff --git a/pkg/proto/chat/chat.proto b/pkg/proto/chat/chat.proto index 0f5638bd9..7dc88d9c4 100644 --- a/pkg/proto/chat/chat.proto +++ b/pkg/proto/chat/chat.proto @@ -1,48 +1,23 @@ syntax = "proto3"; import "Open_IM/pkg/proto/sdk_ws/ws.proto"; package pbChat;//The package name to which the proto file belongs -//option go_package = ".;pbChat";//The generated go pb file is in the current directory, and the package name is pbChat +option go_package = "./msg;pbChat";//The generated go pb file is in the current directory, and the package name is pbChat -message WSToMsgSvrChatMsg{ - string SendID = 1; - string RecvID = 2; - string Content = 3; - int64 SendTime = 4; - int32 MsgFrom = 5; - string SenderNickName = 6; - string SenderFaceURL = 7; - int32 ContentType = 8; - int32 SessionType = 9; - string OperationID = 10; - string MsgID = 11; - string Token = 12; - string OfflineInfo =13; - string Options = 14; - int32 PlatformID =15; - repeated string ForceList = 16; - string ClientMsgID = 17; +message MsgDataToMQ{ + string token =1; + string operationID = 2; + open_im_sdk.MsgData msgData = 3; } -message MsgSvrToPushSvrChatMsg { - string SendID = 1; - string RecvID = 2; - string Content = 3; - int64 RecvSeq = 4; - int64 SendTime = 5; - int32 MsgFrom = 6; - string SenderNickName = 7; - string SenderFaceURL = 8; - int32 ContentType = 9; - int32 SessionType = 10; - string OperationID = 11; - string MsgID = 12; - string OfflineInfo = 13; - string Options =14; - int32 PlatformID =15; - string ClientMsgID = 16; +message MsgDataToDB { + open_im_sdk.MsgData msgData = 1; } +message PushMsgDataToMQ{ + string OperationID = 1; + open_im_sdk.MsgData msgData = 2; +} message PullMessageReq { string UserID = 1; diff --git a/pkg/proto/push/push.proto b/pkg/proto/push/push.proto index 60fddfe3b..1116c3e05 100644 --- a/pkg/proto/push/push.proto +++ b/pkg/proto/push/push.proto @@ -3,22 +3,8 @@ option go_package = "./push;pbPush"; package push; message PushMsgReq { - string SendID = 1; - string RecvID = 2; - string Content = 3; - int64 RecvSeq = 4; - int64 SendTime = 5; - int32 MsgFrom = 6; - int32 ContentType = 7; - int32 SessionType = 8; - string OperationID = 9; - string MsgID = 10; - string OfflineInfo = 11; - string Options =12; - int32 PlatformID =13; - string SenderNickName = 14; - string SenderFaceURL = 15; - string ClientMsgID = 16; + string operationID = 1; + open_im_sdk.MsgData msgData = 2; } message PushMsgResp{ int32 ResultCode = 1; diff --git a/pkg/proto/relay/relay.proto b/pkg/proto/relay/relay.proto index 704c323ce..0cbfcd0e1 100644 --- a/pkg/proto/relay/relay.proto +++ b/pkg/proto/relay/relay.proto @@ -2,23 +2,11 @@ syntax = "proto3"; option go_package = "./relay;pbRelay"; package relay; -message MsgToUserReq { - string SendID = 1; - string RecvID = 2; - string Content = 5; - int64 RecvSeq = 6; - int64 SendTime = 7; - int32 MsgFrom = 8; - int32 ContentType = 9; - int32 SessionType = 10; - string OperationID = 11; - string ServerMsgID = 12; - int32 PlatformID = 13; - string SenderNickName = 14; - string SenderFaceURL = 15; - string ClientMsgID = 16; +message OnlinePushMsgReq { + string OperationID = 1; + open_im_sdk.MsgData msgData = 2; } -message MsgToUserResp{ +message OnlinePushMsgResp{ repeated SingleMsgToUser resp = 1; }//message SendMsgByWSReq{ // string SendID = 1; @@ -63,7 +51,7 @@ message GetUsersOnlineStatusResp{ } } service OnlineMessageRelayService { - rpc MsgToUser(MsgToUserReq) returns(MsgToUserResp); + rpc OnlinePushMsg(OnlinePushMsgReq) returns(OnlinePushMsgResp); rpc GetUsersOnlineStatus(GetUsersOnlineStatusReq)returns(GetUsersOnlineStatusResp); // rpc SendMsgByWS(SendMsgByWSReq) returns(MsgToUserResp); } From 57e08e282c3c39035591bf41ce041ebeb716a20e Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 22 Dec 2021 10:50:03 +0800 Subject: [PATCH 007/337] proto file --- pkg/proto/chat/chat.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/proto/chat/chat.proto b/pkg/proto/chat/chat.proto index 7dc88d9c4..aec58df7d 100644 --- a/pkg/proto/chat/chat.proto +++ b/pkg/proto/chat/chat.proto @@ -1,7 +1,7 @@ syntax = "proto3"; import "Open_IM/pkg/proto/sdk_ws/ws.proto"; package pbChat;//The package name to which the proto file belongs -option go_package = "./msg;pbChat";//The generated go pb file is in the current directory, and the package name is pbChat +option go_package = "./chat;pbChat";//The generated go pb file is in the current directory, and the package name is pbChat message MsgDataToMQ{ string token =1; From 777805fc1a4c30d57128b35fefabffa176f9f30d Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 22 Dec 2021 11:10:13 +0800 Subject: [PATCH 008/337] proto file --- pkg/proto/auto_proto.sh | 2 +- pkg/proto/push/push.proto | 1 + pkg/proto/relay/relay.pb.go | 316 ++++++++++++------------------------ pkg/proto/relay/relay.proto | 1 + 4 files changed, 105 insertions(+), 215 deletions(-) diff --git a/pkg/proto/auto_proto.sh b/pkg/proto/auto_proto.sh index 309186817..25408d46e 100644 --- a/pkg/proto/auto_proto.sh +++ b/pkg/proto/auto_proto.sh @@ -4,7 +4,7 @@ source ./proto_dir.cfg for ((i = 0; i < ${#all_proto[*]}; i++)); do proto=${all_proto[$i]} - protoc --go_out=plugins=grpc:. $proto + protoc -I ../../../ -I ./ --go_out=plugins=grpc:. $proto s=`echo $proto | sed 's/ //g'` v=${s//proto/pb.go} protoc-go-inject-tag -input=./$v diff --git a/pkg/proto/push/push.proto b/pkg/proto/push/push.proto index 1116c3e05..99b2a170a 100644 --- a/pkg/proto/push/push.proto +++ b/pkg/proto/push/push.proto @@ -1,4 +1,5 @@ syntax = "proto3"; +import "Open_IM/pkg/proto/sdk_ws/ws.proto"; option go_package = "./push;pbPush"; package push; diff --git a/pkg/proto/relay/relay.pb.go b/pkg/proto/relay/relay.pb.go index d56aae9e0..02eb997e0 100644 --- a/pkg/proto/relay/relay.pb.go +++ b/pkg/proto/relay/relay.pb.go @@ -6,6 +6,7 @@ package pbRelay // import "./relay" import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" +import sdk_ws "Open_IM/pkg/proto/sdk_ws" import ( context "golang.org/x/net/context" @@ -23,197 +24,90 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package -type MsgToUserReq struct { - SendID string `protobuf:"bytes,1,opt,name=SendID" json:"SendID,omitempty"` - RecvID string `protobuf:"bytes,2,opt,name=RecvID" json:"RecvID,omitempty"` - Content string `protobuf:"bytes,5,opt,name=Content" json:"Content,omitempty"` - RecvSeq int64 `protobuf:"varint,6,opt,name=RecvSeq" json:"RecvSeq,omitempty"` - SendTime int64 `protobuf:"varint,7,opt,name=SendTime" json:"SendTime,omitempty"` - MsgFrom int32 `protobuf:"varint,8,opt,name=MsgFrom" json:"MsgFrom,omitempty"` - ContentType int32 `protobuf:"varint,9,opt,name=ContentType" json:"ContentType,omitempty"` - SessionType int32 `protobuf:"varint,10,opt,name=SessionType" json:"SessionType,omitempty"` - OperationID string `protobuf:"bytes,11,opt,name=OperationID" json:"OperationID,omitempty"` - ServerMsgID string `protobuf:"bytes,12,opt,name=ServerMsgID" json:"ServerMsgID,omitempty"` - PlatformID int32 `protobuf:"varint,13,opt,name=PlatformID" json:"PlatformID,omitempty"` - SenderNickName string `protobuf:"bytes,14,opt,name=SenderNickName" json:"SenderNickName,omitempty"` - SenderFaceURL string `protobuf:"bytes,15,opt,name=SenderFaceURL" json:"SenderFaceURL,omitempty"` - ClientMsgID string `protobuf:"bytes,16,opt,name=ClientMsgID" json:"ClientMsgID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +type OnlinePushMsgReq struct { + OperationID string `protobuf:"bytes,1,opt,name=OperationID" json:"OperationID,omitempty"` + MsgData *sdk_ws.MsgData `protobuf:"bytes,2,opt,name=msgData" json:"msgData,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *MsgToUserReq) Reset() { *m = MsgToUserReq{} } -func (m *MsgToUserReq) String() string { return proto.CompactTextString(m) } -func (*MsgToUserReq) ProtoMessage() {} -func (*MsgToUserReq) Descriptor() ([]byte, []int) { - return fileDescriptor_relay_709d2b3cc3a7ad83, []int{0} +func (m *OnlinePushMsgReq) Reset() { *m = OnlinePushMsgReq{} } +func (m *OnlinePushMsgReq) String() string { return proto.CompactTextString(m) } +func (*OnlinePushMsgReq) ProtoMessage() {} +func (*OnlinePushMsgReq) Descriptor() ([]byte, []int) { + return fileDescriptor_relay_f80d9497f96c724f, []int{0} } -func (m *MsgToUserReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_MsgToUserReq.Unmarshal(m, b) +func (m *OnlinePushMsgReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OnlinePushMsgReq.Unmarshal(m, b) } -func (m *MsgToUserReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_MsgToUserReq.Marshal(b, m, deterministic) +func (m *OnlinePushMsgReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OnlinePushMsgReq.Marshal(b, m, deterministic) } -func (dst *MsgToUserReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgToUserReq.Merge(dst, src) +func (dst *OnlinePushMsgReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_OnlinePushMsgReq.Merge(dst, src) } -func (m *MsgToUserReq) XXX_Size() int { - return xxx_messageInfo_MsgToUserReq.Size(m) +func (m *OnlinePushMsgReq) XXX_Size() int { + return xxx_messageInfo_OnlinePushMsgReq.Size(m) } -func (m *MsgToUserReq) XXX_DiscardUnknown() { - xxx_messageInfo_MsgToUserReq.DiscardUnknown(m) +func (m *OnlinePushMsgReq) XXX_DiscardUnknown() { + xxx_messageInfo_OnlinePushMsgReq.DiscardUnknown(m) } -var xxx_messageInfo_MsgToUserReq proto.InternalMessageInfo +var xxx_messageInfo_OnlinePushMsgReq proto.InternalMessageInfo -func (m *MsgToUserReq) GetSendID() string { - if m != nil { - return m.SendID - } - return "" -} - -func (m *MsgToUserReq) GetRecvID() string { - if m != nil { - return m.RecvID - } - return "" -} - -func (m *MsgToUserReq) GetContent() string { - if m != nil { - return m.Content - } - return "" -} - -func (m *MsgToUserReq) GetRecvSeq() int64 { - if m != nil { - return m.RecvSeq - } - return 0 -} - -func (m *MsgToUserReq) GetSendTime() int64 { - if m != nil { - return m.SendTime - } - return 0 -} - -func (m *MsgToUserReq) GetMsgFrom() int32 { - if m != nil { - return m.MsgFrom - } - return 0 -} - -func (m *MsgToUserReq) GetContentType() int32 { - if m != nil { - return m.ContentType - } - return 0 -} - -func (m *MsgToUserReq) GetSessionType() int32 { - if m != nil { - return m.SessionType - } - return 0 -} - -func (m *MsgToUserReq) GetOperationID() string { +func (m *OnlinePushMsgReq) GetOperationID() string { if m != nil { return m.OperationID } return "" } -func (m *MsgToUserReq) GetServerMsgID() string { +func (m *OnlinePushMsgReq) GetMsgData() *sdk_ws.MsgData { if m != nil { - return m.ServerMsgID + return m.MsgData } - return "" + return nil } -func (m *MsgToUserReq) GetPlatformID() int32 { - if m != nil { - return m.PlatformID - } - return 0 -} - -func (m *MsgToUserReq) GetSenderNickName() string { - if m != nil { - return m.SenderNickName - } - return "" -} - -func (m *MsgToUserReq) GetSenderFaceURL() string { - if m != nil { - return m.SenderFaceURL - } - return "" -} - -func (m *MsgToUserReq) GetClientMsgID() string { - if m != nil { - return m.ClientMsgID - } - return "" -} - -type MsgToUserResp struct { +type OnlinePushMsgResp struct { Resp []*SingleMsgToUser `protobuf:"bytes,1,rep,name=resp" json:"resp,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *MsgToUserResp) Reset() { *m = MsgToUserResp{} } -func (m *MsgToUserResp) String() string { return proto.CompactTextString(m) } -func (*MsgToUserResp) ProtoMessage() {} -func (*MsgToUserResp) Descriptor() ([]byte, []int) { - return fileDescriptor_relay_709d2b3cc3a7ad83, []int{1} +func (m *OnlinePushMsgResp) Reset() { *m = OnlinePushMsgResp{} } +func (m *OnlinePushMsgResp) String() string { return proto.CompactTextString(m) } +func (*OnlinePushMsgResp) ProtoMessage() {} +func (*OnlinePushMsgResp) Descriptor() ([]byte, []int) { + return fileDescriptor_relay_f80d9497f96c724f, []int{1} } -func (m *MsgToUserResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_MsgToUserResp.Unmarshal(m, b) +func (m *OnlinePushMsgResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OnlinePushMsgResp.Unmarshal(m, b) } -func (m *MsgToUserResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_MsgToUserResp.Marshal(b, m, deterministic) +func (m *OnlinePushMsgResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OnlinePushMsgResp.Marshal(b, m, deterministic) } -func (dst *MsgToUserResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgToUserResp.Merge(dst, src) +func (dst *OnlinePushMsgResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_OnlinePushMsgResp.Merge(dst, src) } -func (m *MsgToUserResp) XXX_Size() int { - return xxx_messageInfo_MsgToUserResp.Size(m) +func (m *OnlinePushMsgResp) XXX_Size() int { + return xxx_messageInfo_OnlinePushMsgResp.Size(m) } -func (m *MsgToUserResp) XXX_DiscardUnknown() { - xxx_messageInfo_MsgToUserResp.DiscardUnknown(m) +func (m *OnlinePushMsgResp) XXX_DiscardUnknown() { + xxx_messageInfo_OnlinePushMsgResp.DiscardUnknown(m) } -var xxx_messageInfo_MsgToUserResp proto.InternalMessageInfo +var xxx_messageInfo_OnlinePushMsgResp proto.InternalMessageInfo -func (m *MsgToUserResp) GetResp() []*SingleMsgToUser { +func (m *OnlinePushMsgResp) GetResp() []*SingleMsgToUser { if m != nil { return m.Resp } return nil } -// message SendMsgByWSReq{ -// string SendID = 1; -// string RecvID = 2; -// string Content = 3; -// int64 SendTime = 4; -// int64 MsgFrom = 5; -// int64 ContentType = 6; -// int64 SessionType = 7; -// string OperationID = 8; -// int64 PlatformID = 9; -// } type SingleMsgToUser struct { ResultCode int64 `protobuf:"varint,1,opt,name=ResultCode" json:"ResultCode,omitempty"` RecvID string `protobuf:"bytes,2,opt,name=RecvID" json:"RecvID,omitempty"` @@ -227,7 +121,7 @@ func (m *SingleMsgToUser) Reset() { *m = SingleMsgToUser{} } func (m *SingleMsgToUser) String() string { return proto.CompactTextString(m) } func (*SingleMsgToUser) ProtoMessage() {} func (*SingleMsgToUser) Descriptor() ([]byte, []int) { - return fileDescriptor_relay_709d2b3cc3a7ad83, []int{2} + return fileDescriptor_relay_f80d9497f96c724f, []int{2} } func (m *SingleMsgToUser) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SingleMsgToUser.Unmarshal(m, b) @@ -280,7 +174,7 @@ func (m *GetUsersOnlineStatusReq) Reset() { *m = GetUsersOnlineStatusReq func (m *GetUsersOnlineStatusReq) String() string { return proto.CompactTextString(m) } func (*GetUsersOnlineStatusReq) ProtoMessage() {} func (*GetUsersOnlineStatusReq) Descriptor() ([]byte, []int) { - return fileDescriptor_relay_709d2b3cc3a7ad83, []int{3} + return fileDescriptor_relay_f80d9497f96c724f, []int{3} } func (m *GetUsersOnlineStatusReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUsersOnlineStatusReq.Unmarshal(m, b) @@ -328,7 +222,7 @@ func (m *GetUsersOnlineStatusResp) Reset() { *m = GetUsersOnlineStatusRe func (m *GetUsersOnlineStatusResp) String() string { return proto.CompactTextString(m) } func (*GetUsersOnlineStatusResp) ProtoMessage() {} func (*GetUsersOnlineStatusResp) Descriptor() ([]byte, []int) { - return fileDescriptor_relay_709d2b3cc3a7ad83, []int{4} + return fileDescriptor_relay_f80d9497f96c724f, []int{4} } func (m *GetUsersOnlineStatusResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUsersOnlineStatusResp.Unmarshal(m, b) @@ -390,7 +284,7 @@ func (m *GetUsersOnlineStatusResp_SuccessDetail) Reset() { func (m *GetUsersOnlineStatusResp_SuccessDetail) String() string { return proto.CompactTextString(m) } func (*GetUsersOnlineStatusResp_SuccessDetail) ProtoMessage() {} func (*GetUsersOnlineStatusResp_SuccessDetail) Descriptor() ([]byte, []int) { - return fileDescriptor_relay_709d2b3cc3a7ad83, []int{4, 0} + return fileDescriptor_relay_f80d9497f96c724f, []int{4, 0} } func (m *GetUsersOnlineStatusResp_SuccessDetail) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUsersOnlineStatusResp_SuccessDetail.Unmarshal(m, b) @@ -437,7 +331,7 @@ func (m *GetUsersOnlineStatusResp_FailedDetail) Reset() { *m = GetUsersO func (m *GetUsersOnlineStatusResp_FailedDetail) String() string { return proto.CompactTextString(m) } func (*GetUsersOnlineStatusResp_FailedDetail) ProtoMessage() {} func (*GetUsersOnlineStatusResp_FailedDetail) Descriptor() ([]byte, []int) { - return fileDescriptor_relay_709d2b3cc3a7ad83, []int{4, 1} + return fileDescriptor_relay_f80d9497f96c724f, []int{4, 1} } func (m *GetUsersOnlineStatusResp_FailedDetail) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUsersOnlineStatusResp_FailedDetail.Unmarshal(m, b) @@ -493,7 +387,7 @@ func (m *GetUsersOnlineStatusResp_SuccessResult) Reset() { func (m *GetUsersOnlineStatusResp_SuccessResult) String() string { return proto.CompactTextString(m) } func (*GetUsersOnlineStatusResp_SuccessResult) ProtoMessage() {} func (*GetUsersOnlineStatusResp_SuccessResult) Descriptor() ([]byte, []int) { - return fileDescriptor_relay_709d2b3cc3a7ad83, []int{4, 2} + return fileDescriptor_relay_f80d9497f96c724f, []int{4, 2} } func (m *GetUsersOnlineStatusResp_SuccessResult) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUsersOnlineStatusResp_SuccessResult.Unmarshal(m, b) @@ -535,8 +429,8 @@ func (m *GetUsersOnlineStatusResp_SuccessResult) GetDetailPlatformStatus() []*Ge } func init() { - proto.RegisterType((*MsgToUserReq)(nil), "relay.MsgToUserReq") - proto.RegisterType((*MsgToUserResp)(nil), "relay.MsgToUserResp") + proto.RegisterType((*OnlinePushMsgReq)(nil), "relay.OnlinePushMsgReq") + proto.RegisterType((*OnlinePushMsgResp)(nil), "relay.OnlinePushMsgResp") proto.RegisterType((*SingleMsgToUser)(nil), "relay.SingleMsgToUser") proto.RegisterType((*GetUsersOnlineStatusReq)(nil), "relay.GetUsersOnlineStatusReq") proto.RegisterType((*GetUsersOnlineStatusResp)(nil), "relay.GetUsersOnlineStatusResp") @@ -556,7 +450,7 @@ const _ = grpc.SupportPackageIsVersion4 // Client API for OnlineMessageRelayService service type OnlineMessageRelayServiceClient interface { - MsgToUser(ctx context.Context, in *MsgToUserReq, opts ...grpc.CallOption) (*MsgToUserResp, error) + OnlinePushMsg(ctx context.Context, in *OnlinePushMsgReq, opts ...grpc.CallOption) (*OnlinePushMsgResp, error) GetUsersOnlineStatus(ctx context.Context, in *GetUsersOnlineStatusReq, opts ...grpc.CallOption) (*GetUsersOnlineStatusResp, error) } @@ -568,9 +462,9 @@ func NewOnlineMessageRelayServiceClient(cc *grpc.ClientConn) OnlineMessageRelayS return &onlineMessageRelayServiceClient{cc} } -func (c *onlineMessageRelayServiceClient) MsgToUser(ctx context.Context, in *MsgToUserReq, opts ...grpc.CallOption) (*MsgToUserResp, error) { - out := new(MsgToUserResp) - err := grpc.Invoke(ctx, "/relay.OnlineMessageRelayService/MsgToUser", in, out, c.cc, opts...) +func (c *onlineMessageRelayServiceClient) OnlinePushMsg(ctx context.Context, in *OnlinePushMsgReq, opts ...grpc.CallOption) (*OnlinePushMsgResp, error) { + out := new(OnlinePushMsgResp) + err := grpc.Invoke(ctx, "/relay.OnlineMessageRelayService/OnlinePushMsg", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -589,7 +483,7 @@ func (c *onlineMessageRelayServiceClient) GetUsersOnlineStatus(ctx context.Conte // Server API for OnlineMessageRelayService service type OnlineMessageRelayServiceServer interface { - MsgToUser(context.Context, *MsgToUserReq) (*MsgToUserResp, error) + OnlinePushMsg(context.Context, *OnlinePushMsgReq) (*OnlinePushMsgResp, error) GetUsersOnlineStatus(context.Context, *GetUsersOnlineStatusReq) (*GetUsersOnlineStatusResp, error) } @@ -597,20 +491,20 @@ func RegisterOnlineMessageRelayServiceServer(s *grpc.Server, srv OnlineMessageRe s.RegisterService(&_OnlineMessageRelayService_serviceDesc, srv) } -func _OnlineMessageRelayService_MsgToUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgToUserReq) +func _OnlineMessageRelayService_OnlinePushMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OnlinePushMsgReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(OnlineMessageRelayServiceServer).MsgToUser(ctx, in) + return srv.(OnlineMessageRelayServiceServer).OnlinePushMsg(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/relay.OnlineMessageRelayService/MsgToUser", + FullMethod: "/relay.OnlineMessageRelayService/OnlinePushMsg", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(OnlineMessageRelayServiceServer).MsgToUser(ctx, req.(*MsgToUserReq)) + return srv.(OnlineMessageRelayServiceServer).OnlinePushMsg(ctx, req.(*OnlinePushMsgReq)) } return interceptor(ctx, in, info, handler) } @@ -638,8 +532,8 @@ var _OnlineMessageRelayService_serviceDesc = grpc.ServiceDesc{ HandlerType: (*OnlineMessageRelayServiceServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "MsgToUser", - Handler: _OnlineMessageRelayService_MsgToUser_Handler, + MethodName: "OnlinePushMsg", + Handler: _OnlineMessageRelayService_OnlinePushMsg_Handler, }, { MethodName: "GetUsersOnlineStatus", @@ -650,48 +544,42 @@ var _OnlineMessageRelayService_serviceDesc = grpc.ServiceDesc{ Metadata: "relay/relay.proto", } -func init() { proto.RegisterFile("relay/relay.proto", fileDescriptor_relay_709d2b3cc3a7ad83) } +func init() { proto.RegisterFile("relay/relay.proto", fileDescriptor_relay_f80d9497f96c724f) } -var fileDescriptor_relay_709d2b3cc3a7ad83 = []byte{ - // 628 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x41, 0x6b, 0xdb, 0x4c, - 0x10, 0x45, 0x9f, 0xe2, 0x24, 0x9e, 0xd8, 0xc9, 0x97, 0x6d, 0x48, 0xb7, 0x3a, 0xa4, 0xc6, 0x94, - 0x60, 0x4a, 0xeb, 0x42, 0x0a, 0xbd, 0xe4, 0x56, 0x0b, 0x17, 0x41, 0x9c, 0x84, 0x95, 0x43, 0x4b, - 0x7b, 0x52, 0xe4, 0x89, 0x11, 0x95, 0x25, 0x79, 0x77, 0x1d, 0xc8, 0xdf, 0xe9, 0xb9, 0xf7, 0x5e, - 0xfb, 0xd3, 0xca, 0xee, 0x4a, 0xf6, 0xda, 0xb5, 0x1b, 0x72, 0x31, 0x7e, 0x6f, 0x66, 0xdf, 0xcc, - 0xbc, 0xd9, 0x15, 0x1c, 0x72, 0x4c, 0xa3, 0x87, 0x77, 0xfa, 0xb7, 0x5b, 0xf0, 0x5c, 0xe6, 0xa4, - 0xa6, 0x41, 0xfb, 0xb7, 0x0b, 0x8d, 0x81, 0x18, 0x0f, 0xf3, 0x1b, 0x81, 0x9c, 0xe1, 0x94, 0x1c, - 0xc3, 0x76, 0x88, 0xd9, 0x28, 0xf0, 0xa9, 0xd3, 0x72, 0x3a, 0x75, 0x56, 0x22,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x3b, 0x9e, 0x63, 0x35, 0xab, 0xd0, - 0xaa, 0xd5, 0xac, 0x06, 0x79, 0x5f, 0xa0, 0x61, 0x97, 0x50, 0x79, 0xc6, 0x7a, 0xbd, 0xc7, 0x3a, - 0x2b, 0xd1, 0xd3, 0x5d, 0xf4, 0x7e, 0x38, 0xf3, 0xfe, 0x4a, 0x0b, 0x16, 0xda, 0xce, 0x92, 0xf6, - 0x86, 0xde, 0x48, 0x04, 0x47, 0x23, 0xdd, 0x55, 0xf5, 0xce, 0x8c, 0x2f, 0x4f, 0x5c, 0x47, 0xe9, - 0xdd, 0x5a, 0xa9, 0xb3, 0x9f, 0x0e, 0xbc, 0x30, 0x07, 0x07, 0x28, 0x44, 0x34, 0x46, 0xa6, 0x34, - 0xd5, 0xc3, 0x4f, 0x62, 0x24, 0x1f, 0xa0, 0xbe, 0x78, 0x21, 0xcf, 0xca, 0x7a, 0xf6, 0x87, 0xd3, - 0x3b, 0xfa, 0x9b, 0x14, 0x05, 0xf9, 0x0c, 0x47, 0xeb, 0xba, 0x22, 0x27, 0xff, 0x6c, 0x79, 0xea, - 0xbd, 0x7c, 0x64, 0xa4, 0x8f, 0x87, 0x5f, 0x0f, 0xba, 0xe6, 0x83, 0x7e, 0x5e, 0xdc, 0xea, 0x56, - 0x6f, 0xb7, 0xf5, 0x97, 0xfd, 0xfd, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x4e, 0xe4, 0x7c, 0xdc, - 0xee, 0x05, 0x00, 0x00, +var fileDescriptor_relay_f80d9497f96c724f = []byte{ + // 531 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x5f, 0x6f, 0xd2, 0x50, + 0x14, 0x4f, 0x65, 0x6c, 0x72, 0x18, 0x4e, 0x6e, 0xc8, 0x56, 0xfb, 0x80, 0xc8, 0x83, 0x21, 0x46, + 0x4b, 0x82, 0x8f, 0x3e, 0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x01, 0x6b, 0x03, 0x70, 0xa4, 0x2c, 0x56, 0x17, 0x49, + 0x80, 0x5a, 0x64, 0x85, 0x97, 0x3a, 0xec, 0x14, 0x0e, 0x39, 0xce, 0x6e, 0x86, 0x9e, 0x96, 0x58, + 0xe3, 0x45, 0xc5, 0x5e, 0xc2, 0x93, 0xfc, 0xdf, 0x38, 0x16, 0xea, 0x32, 0x91, 0x8b, 0xa1, 0x67, + 0x57, 0x3a, 0x56, 0xaf, 0xca, 0x77, 0xba, 0xdd, 0xef, 0x70, 0xf6, 0x01, 0x55, 0x4e, 0x45, 0x46, + 0xfb, 0x44, 0x09, 0x95, 0x51, 0x1e, 0x50, 0x1b, 0x20, 0x23, 0x94, 0x43, 0xef, 0x63, 0x44, 0x4a, + 0xeb, 0xaf, 0xf1, 0x52, 0x27, 0x0f, 0x30, 0x29, 0x05, 0x68, 0xf8, 0xcb, 0xad, 0xee, 0xef, 0x03, + 0xb0, 0xf7, 0xa3, 0x53, 0xca, 0x6c, 0x38, 0x42, 0x29, 0x37, 0xb6, 0xaa, 0x7c, 0x5d, 0xe6, 0x9e, + 0x50, 0x4a, 0x9f, 0xc2, 0xb5, 0x27, 0x53, 0xb1, 0x09, 0x34, 0x28, 0x9b, 0xcd, 0x90, 0xc8, 0x04, + 0x60, 0x57, 0x74, 0xa6, 0x6f, 0x8a, 0x4c, 0xef, 0x62, 0x72, 0x27, 0xe5, 0x43, 0x7c, 0x1b, 0x83, + 0x8d, 0xe1, 0xf8, 0x5a, 0x44, 0x31, 0x06, 0x05, 0xe6, 0x81, 0xc6, 0x7c, 0x7d, 0x1f, 0xe6, 0xa5, + 0x3e, 0xe3, 0xa1, 0x12, 0x51, 0xcc, 0xb7, 0x10, 0x9c, 0x0b, 0x68, 0x14, 0x8c, 0x66, 0xcc, 0x1c, + 0x78, 0x9c, 0xc6, 0x42, 0x5d, 0x27, 0x72, 0x51, 0xbc, 0x66, 0x9b, 0x3a, 0xf7, 0x4a, 0x1a, 0x75, + 0xed, 0xd5, 0x54, 0xce, 0x57, 0x38, 0x2e, 0x53, 0xe4, 0x7b, 0x26, 0x7a, 0xfd, 0x1c, 0x6b, 0xbc, + 0xa8, 0x1e, 0x9e, 0xa2, 0xf3, 0xcb, 0xda, 0xe8, 0x2b, 0x22, 0xf8, 0x87, 0x6d, 0x6d, 0x61, 0xdf, + 0xa1, 0x8d, 0x09, 0x68, 0x05, 0x5a, 0xd5, 0xb8, 0x70, 0x61, 0x72, 0x79, 0xe0, 0xe3, 0x28, 0xb2, + 0xdb, 0x0b, 0x35, 0xf8, 0x63, 0xc1, 0x33, 0x73, 0xd0, 0x47, 0x22, 0x11, 0x22, 0xcf, 0x31, 0x27, + 0x28, 0x6f, 0xa2, 0x19, 0xb2, 0x73, 0x68, 0x6c, 0x7d, 0x68, 0xec, 0xac, 0xe0, 0xdc, 0xfd, 0xc8, + 0x1d, 0x7b, 0xff, 0x80, 0x52, 0xf6, 0x05, 0x5a, 0xfb, 0x14, 0xb2, 0xf6, 0x7f, 0xe5, 0xaf, 0x9c, + 0xe7, 0xf7, 0xd8, 0x3b, 0x6f, 0x7e, 0x3b, 0x71, 0xcd, 0x35, 0xf5, 0x2e, 0xbd, 0xd2, 0xb2, 0xaf, + 0x0e, 0xf5, 0x2d, 0xf4, 0xf6, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x81, 0xe6, 0x3c, 0x27, 0xc4, + 0x04, 0x00, 0x00, } diff --git a/pkg/proto/relay/relay.proto b/pkg/proto/relay/relay.proto index 0cbfcd0e1..c3215db3f 100644 --- a/pkg/proto/relay/relay.proto +++ b/pkg/proto/relay/relay.proto @@ -1,4 +1,5 @@ syntax = "proto3"; +import "Open_IM/pkg/proto/sdk_ws/ws.proto"; option go_package = "./relay;pbRelay"; package relay; From 26640b3b07e3d8c05b40995e1f4c40ea14a691b3 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 22 Dec 2021 11:13:51 +0800 Subject: [PATCH 009/337] proto file --- pkg/proto/chat/chat.pb.go | 743 +++++++++++++++++++------------------- 1 file changed, 362 insertions(+), 381 deletions(-) diff --git a/pkg/proto/chat/chat.pb.go b/pkg/proto/chat/chat.pb.go index d208317a5..63c35ae18 100644 --- a/pkg/proto/chat/chat.pb.go +++ b/pkg/proto/chat/chat.pb.go @@ -1,13 +1,18 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// source: chat.proto +// source: chat/chat.proto -package pbChat +package pbChat // import "./chat" import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" import sdk_ws "Open_IM/pkg/proto/sdk_ws" +import ( + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) + // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf @@ -19,328 +24,142 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package -type WSToMsgSvrChatMsg struct { - SendID string `protobuf:"bytes,1,opt,name=SendID" json:"SendID,omitempty"` - RecvID string `protobuf:"bytes,2,opt,name=RecvID" json:"RecvID,omitempty"` - Content string `protobuf:"bytes,3,opt,name=Content" json:"Content,omitempty"` - SendTime int64 `protobuf:"varint,4,opt,name=SendTime" json:"SendTime,omitempty"` - MsgFrom int32 `protobuf:"varint,5,opt,name=MsgFrom" json:"MsgFrom,omitempty"` - SenderNickName string `protobuf:"bytes,6,opt,name=SenderNickName" json:"SenderNickName,omitempty"` - SenderFaceURL string `protobuf:"bytes,7,opt,name=SenderFaceURL" json:"SenderFaceURL,omitempty"` - ContentType int32 `protobuf:"varint,8,opt,name=ContentType" json:"ContentType,omitempty"` - SessionType int32 `protobuf:"varint,9,opt,name=SessionType" json:"SessionType,omitempty"` - OperationID string `protobuf:"bytes,10,opt,name=OperationID" json:"OperationID,omitempty"` - MsgID string `protobuf:"bytes,11,opt,name=MsgID" json:"MsgID,omitempty"` - Token string `protobuf:"bytes,12,opt,name=Token" json:"Token,omitempty"` - OfflineInfo string `protobuf:"bytes,13,opt,name=OfflineInfo" json:"OfflineInfo,omitempty"` - Options string `protobuf:"bytes,14,opt,name=Options" json:"Options,omitempty"` - PlatformID int32 `protobuf:"varint,15,opt,name=PlatformID" json:"PlatformID,omitempty"` - ForceList []string `protobuf:"bytes,16,rep,name=ForceList" json:"ForceList,omitempty"` - ClientMsgID string `protobuf:"bytes,17,opt,name=ClientMsgID" json:"ClientMsgID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +type MsgDataToMQ struct { + Token string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"` + OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` + MsgData *sdk_ws.MsgData `protobuf:"bytes,3,opt,name=msgData" json:"msgData,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *WSToMsgSvrChatMsg) Reset() { *m = WSToMsgSvrChatMsg{} } -func (m *WSToMsgSvrChatMsg) String() string { return proto.CompactTextString(m) } -func (*WSToMsgSvrChatMsg) ProtoMessage() {} -func (*WSToMsgSvrChatMsg) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_955d1f0dcca586dd, []int{0} +func (m *MsgDataToMQ) Reset() { *m = MsgDataToMQ{} } +func (m *MsgDataToMQ) String() string { return proto.CompactTextString(m) } +func (*MsgDataToMQ) ProtoMessage() {} +func (*MsgDataToMQ) Descriptor() ([]byte, []int) { + return fileDescriptor_chat_e46047b47969b559, []int{0} } -func (m *WSToMsgSvrChatMsg) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_WSToMsgSvrChatMsg.Unmarshal(m, b) +func (m *MsgDataToMQ) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MsgDataToMQ.Unmarshal(m, b) } -func (m *WSToMsgSvrChatMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_WSToMsgSvrChatMsg.Marshal(b, m, deterministic) +func (m *MsgDataToMQ) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MsgDataToMQ.Marshal(b, m, deterministic) } -func (dst *WSToMsgSvrChatMsg) XXX_Merge(src proto.Message) { - xxx_messageInfo_WSToMsgSvrChatMsg.Merge(dst, src) +func (dst *MsgDataToMQ) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDataToMQ.Merge(dst, src) } -func (m *WSToMsgSvrChatMsg) XXX_Size() int { - return xxx_messageInfo_WSToMsgSvrChatMsg.Size(m) +func (m *MsgDataToMQ) XXX_Size() int { + return xxx_messageInfo_MsgDataToMQ.Size(m) } -func (m *WSToMsgSvrChatMsg) XXX_DiscardUnknown() { - xxx_messageInfo_WSToMsgSvrChatMsg.DiscardUnknown(m) +func (m *MsgDataToMQ) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDataToMQ.DiscardUnknown(m) } -var xxx_messageInfo_WSToMsgSvrChatMsg proto.InternalMessageInfo +var xxx_messageInfo_MsgDataToMQ proto.InternalMessageInfo -func (m *WSToMsgSvrChatMsg) GetSendID() string { - if m != nil { - return m.SendID - } - return "" -} - -func (m *WSToMsgSvrChatMsg) GetRecvID() string { - if m != nil { - return m.RecvID - } - return "" -} - -func (m *WSToMsgSvrChatMsg) GetContent() string { - if m != nil { - return m.Content - } - return "" -} - -func (m *WSToMsgSvrChatMsg) GetSendTime() int64 { - if m != nil { - return m.SendTime - } - return 0 -} - -func (m *WSToMsgSvrChatMsg) GetMsgFrom() int32 { - if m != nil { - return m.MsgFrom - } - return 0 -} - -func (m *WSToMsgSvrChatMsg) GetSenderNickName() string { - if m != nil { - return m.SenderNickName - } - return "" -} - -func (m *WSToMsgSvrChatMsg) GetSenderFaceURL() string { - if m != nil { - return m.SenderFaceURL - } - return "" -} - -func (m *WSToMsgSvrChatMsg) GetContentType() int32 { - if m != nil { - return m.ContentType - } - return 0 -} - -func (m *WSToMsgSvrChatMsg) GetSessionType() int32 { - if m != nil { - return m.SessionType - } - return 0 -} - -func (m *WSToMsgSvrChatMsg) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - -func (m *WSToMsgSvrChatMsg) GetMsgID() string { - if m != nil { - return m.MsgID - } - return "" -} - -func (m *WSToMsgSvrChatMsg) GetToken() string { +func (m *MsgDataToMQ) GetToken() string { if m != nil { return m.Token } return "" } -func (m *WSToMsgSvrChatMsg) GetOfflineInfo() string { - if m != nil { - return m.OfflineInfo - } - return "" -} - -func (m *WSToMsgSvrChatMsg) GetOptions() string { - if m != nil { - return m.Options - } - return "" -} - -func (m *WSToMsgSvrChatMsg) GetPlatformID() int32 { - if m != nil { - return m.PlatformID - } - return 0 -} - -func (m *WSToMsgSvrChatMsg) GetForceList() []string { - if m != nil { - return m.ForceList - } - return nil -} - -func (m *WSToMsgSvrChatMsg) GetClientMsgID() string { - if m != nil { - return m.ClientMsgID - } - return "" -} - -type MsgSvrToPushSvrChatMsg struct { - SendID string `protobuf:"bytes,1,opt,name=SendID" json:"SendID,omitempty"` - RecvID string `protobuf:"bytes,2,opt,name=RecvID" json:"RecvID,omitempty"` - Content string `protobuf:"bytes,3,opt,name=Content" json:"Content,omitempty"` - RecvSeq int64 `protobuf:"varint,4,opt,name=RecvSeq" json:"RecvSeq,omitempty"` - SendTime int64 `protobuf:"varint,5,opt,name=SendTime" json:"SendTime,omitempty"` - MsgFrom int32 `protobuf:"varint,6,opt,name=MsgFrom" json:"MsgFrom,omitempty"` - SenderNickName string `protobuf:"bytes,7,opt,name=SenderNickName" json:"SenderNickName,omitempty"` - SenderFaceURL string `protobuf:"bytes,8,opt,name=SenderFaceURL" json:"SenderFaceURL,omitempty"` - ContentType int32 `protobuf:"varint,9,opt,name=ContentType" json:"ContentType,omitempty"` - SessionType int32 `protobuf:"varint,10,opt,name=SessionType" json:"SessionType,omitempty"` - OperationID string `protobuf:"bytes,11,opt,name=OperationID" json:"OperationID,omitempty"` - MsgID string `protobuf:"bytes,12,opt,name=MsgID" json:"MsgID,omitempty"` - OfflineInfo string `protobuf:"bytes,13,opt,name=OfflineInfo" json:"OfflineInfo,omitempty"` - Options string `protobuf:"bytes,14,opt,name=Options" json:"Options,omitempty"` - PlatformID int32 `protobuf:"varint,15,opt,name=PlatformID" json:"PlatformID,omitempty"` - ClientMsgID string `protobuf:"bytes,16,opt,name=ClientMsgID" json:"ClientMsgID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MsgSvrToPushSvrChatMsg) Reset() { *m = MsgSvrToPushSvrChatMsg{} } -func (m *MsgSvrToPushSvrChatMsg) String() string { return proto.CompactTextString(m) } -func (*MsgSvrToPushSvrChatMsg) ProtoMessage() {} -func (*MsgSvrToPushSvrChatMsg) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_955d1f0dcca586dd, []int{1} -} -func (m *MsgSvrToPushSvrChatMsg) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_MsgSvrToPushSvrChatMsg.Unmarshal(m, b) -} -func (m *MsgSvrToPushSvrChatMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_MsgSvrToPushSvrChatMsg.Marshal(b, m, deterministic) -} -func (dst *MsgSvrToPushSvrChatMsg) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSvrToPushSvrChatMsg.Merge(dst, src) -} -func (m *MsgSvrToPushSvrChatMsg) XXX_Size() int { - return xxx_messageInfo_MsgSvrToPushSvrChatMsg.Size(m) -} -func (m *MsgSvrToPushSvrChatMsg) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSvrToPushSvrChatMsg.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgSvrToPushSvrChatMsg proto.InternalMessageInfo - -func (m *MsgSvrToPushSvrChatMsg) GetSendID() string { - if m != nil { - return m.SendID - } - return "" -} - -func (m *MsgSvrToPushSvrChatMsg) GetRecvID() string { - if m != nil { - return m.RecvID - } - return "" -} - -func (m *MsgSvrToPushSvrChatMsg) GetContent() string { - if m != nil { - return m.Content - } - return "" -} - -func (m *MsgSvrToPushSvrChatMsg) GetRecvSeq() int64 { - if m != nil { - return m.RecvSeq - } - return 0 -} - -func (m *MsgSvrToPushSvrChatMsg) GetSendTime() int64 { - if m != nil { - return m.SendTime - } - return 0 -} - -func (m *MsgSvrToPushSvrChatMsg) GetMsgFrom() int32 { - if m != nil { - return m.MsgFrom - } - return 0 -} - -func (m *MsgSvrToPushSvrChatMsg) GetSenderNickName() string { - if m != nil { - return m.SenderNickName - } - return "" -} - -func (m *MsgSvrToPushSvrChatMsg) GetSenderFaceURL() string { - if m != nil { - return m.SenderFaceURL - } - return "" -} - -func (m *MsgSvrToPushSvrChatMsg) GetContentType() int32 { - if m != nil { - return m.ContentType - } - return 0 -} - -func (m *MsgSvrToPushSvrChatMsg) GetSessionType() int32 { - if m != nil { - return m.SessionType - } - return 0 -} - -func (m *MsgSvrToPushSvrChatMsg) GetOperationID() string { +func (m *MsgDataToMQ) GetOperationID() string { if m != nil { return m.OperationID } return "" } -func (m *MsgSvrToPushSvrChatMsg) GetMsgID() string { +func (m *MsgDataToMQ) GetMsgData() *sdk_ws.MsgData { if m != nil { - return m.MsgID + return m.MsgData + } + return nil +} + +type MsgDataToDB struct { + MsgData *sdk_ws.MsgData `protobuf:"bytes,1,opt,name=msgData" json:"msgData,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MsgDataToDB) Reset() { *m = MsgDataToDB{} } +func (m *MsgDataToDB) String() string { return proto.CompactTextString(m) } +func (*MsgDataToDB) ProtoMessage() {} +func (*MsgDataToDB) Descriptor() ([]byte, []int) { + return fileDescriptor_chat_e46047b47969b559, []int{1} +} +func (m *MsgDataToDB) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MsgDataToDB.Unmarshal(m, b) +} +func (m *MsgDataToDB) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MsgDataToDB.Marshal(b, m, deterministic) +} +func (dst *MsgDataToDB) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDataToDB.Merge(dst, src) +} +func (m *MsgDataToDB) XXX_Size() int { + return xxx_messageInfo_MsgDataToDB.Size(m) +} +func (m *MsgDataToDB) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDataToDB.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDataToDB proto.InternalMessageInfo + +func (m *MsgDataToDB) GetMsgData() *sdk_ws.MsgData { + if m != nil { + return m.MsgData + } + return nil +} + +type PushMsgDataToMQ struct { + OperationID string `protobuf:"bytes,1,opt,name=OperationID" json:"OperationID,omitempty"` + MsgData *sdk_ws.MsgData `protobuf:"bytes,2,opt,name=msgData" json:"msgData,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PushMsgDataToMQ) Reset() { *m = PushMsgDataToMQ{} } +func (m *PushMsgDataToMQ) String() string { return proto.CompactTextString(m) } +func (*PushMsgDataToMQ) ProtoMessage() {} +func (*PushMsgDataToMQ) Descriptor() ([]byte, []int) { + return fileDescriptor_chat_e46047b47969b559, []int{2} +} +func (m *PushMsgDataToMQ) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PushMsgDataToMQ.Unmarshal(m, b) +} +func (m *PushMsgDataToMQ) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PushMsgDataToMQ.Marshal(b, m, deterministic) +} +func (dst *PushMsgDataToMQ) XXX_Merge(src proto.Message) { + xxx_messageInfo_PushMsgDataToMQ.Merge(dst, src) +} +func (m *PushMsgDataToMQ) XXX_Size() int { + return xxx_messageInfo_PushMsgDataToMQ.Size(m) +} +func (m *PushMsgDataToMQ) XXX_DiscardUnknown() { + xxx_messageInfo_PushMsgDataToMQ.DiscardUnknown(m) +} + +var xxx_messageInfo_PushMsgDataToMQ proto.InternalMessageInfo + +func (m *PushMsgDataToMQ) GetOperationID() string { + if m != nil { + return m.OperationID } return "" } -func (m *MsgSvrToPushSvrChatMsg) GetOfflineInfo() string { +func (m *PushMsgDataToMQ) GetMsgData() *sdk_ws.MsgData { if m != nil { - return m.OfflineInfo + return m.MsgData } - return "" -} - -func (m *MsgSvrToPushSvrChatMsg) GetOptions() string { - if m != nil { - return m.Options - } - return "" -} - -func (m *MsgSvrToPushSvrChatMsg) GetPlatformID() int32 { - if m != nil { - return m.PlatformID - } - return 0 -} - -func (m *MsgSvrToPushSvrChatMsg) GetClientMsgID() string { - if m != nil { - return m.ClientMsgID - } - return "" + return nil } type PullMessageReq struct { @@ -357,7 +176,7 @@ func (m *PullMessageReq) Reset() { *m = PullMessageReq{} } func (m *PullMessageReq) String() string { return proto.CompactTextString(m) } func (*PullMessageReq) ProtoMessage() {} func (*PullMessageReq) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_955d1f0dcca586dd, []int{2} + return fileDescriptor_chat_e46047b47969b559, []int{3} } func (m *PullMessageReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageReq.Unmarshal(m, b) @@ -421,7 +240,7 @@ func (m *PullMessageResp) Reset() { *m = PullMessageResp{} } func (m *PullMessageResp) String() string { return proto.CompactTextString(m) } func (*PullMessageResp) ProtoMessage() {} func (*PullMessageResp) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_955d1f0dcca586dd, []int{3} + return fileDescriptor_chat_e46047b47969b559, []int{4} } func (m *PullMessageResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageResp.Unmarshal(m, b) @@ -496,7 +315,7 @@ func (m *PullMessageBySeqListReq) Reset() { *m = PullMessageBySeqListReq func (m *PullMessageBySeqListReq) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListReq) ProtoMessage() {} func (*PullMessageBySeqListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_955d1f0dcca586dd, []int{4} + return fileDescriptor_chat_e46047b47969b559, []int{5} } func (m *PullMessageBySeqListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListReq.Unmarshal(m, b) @@ -549,7 +368,7 @@ func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} } func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqReq) ProtoMessage() {} func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_955d1f0dcca586dd, []int{5} + return fileDescriptor_chat_e46047b47969b559, []int{6} } func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) @@ -597,7 +416,7 @@ func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} } func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqResp) ProtoMessage() {} func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_955d1f0dcca586dd, []int{6} + return fileDescriptor_chat_e46047b47969b559, []int{7} } func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) @@ -647,9 +466,9 @@ func (m *GetMaxAndMinSeqResp) GetMinSeq() int64 { type GatherFormat struct { // @inject_tag: json:"id" - ID string `protobuf:"bytes,1,opt,name=ID" json:"ID,omitempty"` + ID string `protobuf:"bytes,1,opt,name=ID" json:"id"` // @inject_tag: json:"list" - List []*MsgFormat `protobuf:"bytes,2,rep,name=List" json:"List,omitempty"` + List []*MsgFormat `protobuf:"bytes,2,rep,name=List" json:"list"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -659,7 +478,7 @@ func (m *GatherFormat) Reset() { *m = GatherFormat{} } func (m *GatherFormat) String() string { return proto.CompactTextString(m) } func (*GatherFormat) ProtoMessage() {} func (*GatherFormat) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_955d1f0dcca586dd, []int{7} + return fileDescriptor_chat_e46047b47969b559, []int{8} } func (m *GatherFormat) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GatherFormat.Unmarshal(m, b) @@ -695,29 +514,29 @@ func (m *GatherFormat) GetList() []*MsgFormat { type MsgFormat struct { // @inject_tag: json:"sendID" - SendID string `protobuf:"bytes,1,opt,name=SendID" json:"SendID,omitempty"` + SendID string `protobuf:"bytes,1,opt,name=SendID" json:"sendID"` // @inject_tag: json:"recvID" - RecvID string `protobuf:"bytes,2,opt,name=RecvID" json:"RecvID,omitempty"` + RecvID string `protobuf:"bytes,2,opt,name=RecvID" json:"recvID"` // @inject_tag: json:"msgFrom" - MsgFrom int32 `protobuf:"varint,3,opt,name=MsgFrom" json:"MsgFrom,omitempty"` + MsgFrom int32 `protobuf:"varint,3,opt,name=MsgFrom" json:"msgFrom"` // @inject_tag: json:"contentType" - ContentType int32 `protobuf:"varint,4,opt,name=ContentType" json:"ContentType,omitempty"` + ContentType int32 `protobuf:"varint,4,opt,name=ContentType" json:"contentType"` // @inject_tag: json:"serverMsgID" - ServerMsgID string `protobuf:"bytes,5,opt,name=ServerMsgID" json:"ServerMsgID,omitempty"` + ServerMsgID string `protobuf:"bytes,5,opt,name=ServerMsgID" json:"serverMsgID"` // @inject_tag: json:"content" - Content string `protobuf:"bytes,6,opt,name=Content" json:"Content,omitempty"` + Content string `protobuf:"bytes,6,opt,name=Content" json:"content"` // @inject_tag: json:"seq" - Seq int64 `protobuf:"varint,7,opt,name=Seq" json:"Seq,omitempty"` + Seq int64 `protobuf:"varint,7,opt,name=Seq" json:"seq"` // @inject_tag: json:"sendTime" - SendTime int64 `protobuf:"varint,8,opt,name=SendTime" json:"SendTime,omitempty"` + SendTime int64 `protobuf:"varint,8,opt,name=SendTime" json:"sendTime"` // @inject_tag: json:"senderPlatformID" - SenderPlatformID int32 `protobuf:"varint,9,opt,name=SenderPlatformID" json:"SenderPlatformID,omitempty"` + SenderPlatformID int32 `protobuf:"varint,9,opt,name=SenderPlatformID" json:"senderPlatformID"` // @inject_tag: json:"senderNickName" - SenderNickName string `protobuf:"bytes,10,opt,name=SenderNickName" json:"SenderNickName,omitempty"` + SenderNickName string `protobuf:"bytes,10,opt,name=SenderNickName" json:"senderNickName"` // @inject_tag: json:"senderFaceUrl" - SenderFaceURL string `protobuf:"bytes,11,opt,name=SenderFaceURL" json:"SenderFaceURL,omitempty"` + SenderFaceURL string `protobuf:"bytes,11,opt,name=SenderFaceURL" json:"senderFaceUrl"` // @inject_tag: json:"clientMsgID" - ClientMsgID string `protobuf:"bytes,12,opt,name=ClientMsgID" json:"ClientMsgID,omitempty"` + ClientMsgID string `protobuf:"bytes,12,opt,name=ClientMsgID" json:"clientMsgID"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -727,7 +546,7 @@ func (m *MsgFormat) Reset() { *m = MsgFormat{} } func (m *MsgFormat) String() string { return proto.CompactTextString(m) } func (*MsgFormat) ProtoMessage() {} func (*MsgFormat) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_955d1f0dcca586dd, []int{8} + return fileDescriptor_chat_e46047b47969b559, []int{9} } func (m *MsgFormat) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgFormat.Unmarshal(m, b) @@ -844,7 +663,7 @@ func (m *SendMsgReq) Reset() { *m = SendMsgReq{} } func (m *SendMsgReq) String() string { return proto.CompactTextString(m) } func (*SendMsgReq) ProtoMessage() {} func (*SendMsgReq) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_955d1f0dcca586dd, []int{9} + return fileDescriptor_chat_e46047b47969b559, []int{10} } func (m *SendMsgReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SendMsgReq.Unmarshal(m, b) @@ -901,7 +720,7 @@ func (m *SendMsgResp) Reset() { *m = SendMsgResp{} } func (m *SendMsgResp) String() string { return proto.CompactTextString(m) } func (*SendMsgResp) ProtoMessage() {} func (*SendMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_955d1f0dcca586dd, []int{10} + return fileDescriptor_chat_e46047b47969b559, []int{11} } func (m *SendMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SendMsgResp.Unmarshal(m, b) @@ -964,8 +783,9 @@ func (m *SendMsgResp) GetSendTime() int64 { } func init() { - proto.RegisterType((*WSToMsgSvrChatMsg)(nil), "pbChat.WSToMsgSvrChatMsg") - proto.RegisterType((*MsgSvrToPushSvrChatMsg)(nil), "pbChat.MsgSvrToPushSvrChatMsg") + proto.RegisterType((*MsgDataToMQ)(nil), "pbChat.MsgDataToMQ") + proto.RegisterType((*MsgDataToDB)(nil), "pbChat.MsgDataToDB") + proto.RegisterType((*PushMsgDataToMQ)(nil), "pbChat.PushMsgDataToMQ") proto.RegisterType((*PullMessageReq)(nil), "pbChat.PullMessageReq") proto.RegisterType((*PullMessageResp)(nil), "pbChat.PullMessageResp") proto.RegisterType((*PullMessageBySeqListReq)(nil), "pbChat.PullMessageBySeqListReq") @@ -977,66 +797,227 @@ func init() { proto.RegisterType((*SendMsgResp)(nil), "pbChat.SendMsgResp") } -func init() { proto.RegisterFile("chat.proto", fileDescriptor_chat_955d1f0dcca586dd) } +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn -var fileDescriptor_chat_955d1f0dcca586dd = []byte{ - // 927 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcb, 0x6e, 0xe3, 0x36, - 0x14, 0x85, 0x2d, 0x3f, 0xe2, 0x6b, 0xe7, 0xc5, 0x09, 0x32, 0x84, 0x5b, 0xb4, 0xae, 0x30, 0x2d, - 0x8c, 0x2e, 0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 0xc5, 0xc4, 0x79, 0x38, 0x9e, 0x9d, 0xfb, - 0x0b, 0x46, 0x1b, 0xba, 0x6d, 0x81, 0x25, 0xaf, 0x60, 0xd3, 0x30, 0xa7, 0xfe, 0x98, 0xbd, 0xf5, - 0xde, 0xd0, 0xa6, 0x2e, 0xcb, 0x93, 0xa4, 0x07, 0xed, 0xe4, 0x3a, 0xa3, 0x0f, 0x31, 0xa3, 0x1b, - 0xfa, 0xac, 0x2c, 0x85, 0x15, 0x43, 0x26, 0x65, 0xc8, 0x23, 0x5d, 0xd1, 0x32, 0x15, 0x19, 0x0a, - 0x2b, 0x2e, 0x62, 0x26, 0x7c, 0x15, 0xf2, 0xc8, 0x19, 0x50, 0xd0, 0xe7, 0x64, 0x29, 0xb2, 0x07, - 0x75, 0x57, 0x06, 0xce, 0x80, 0xb6, 0xf5, 0x9a, 0x01, 0xc8, 0x8e, 0xf8, 0x8c, 0x45, 0xb4, 0x63, - 0x58, 0x0d, 0x74, 0xb7, 0xe9, 0x74, 0x1e, 0x46, 0xcc, 0x89, 0xa6, 0x9c, 0x6e, 0x26, 0xdd, 0x56, - 0x14, 0xce, 0xe6, 0x22, 0xc6, 0xce, 0x92, 0x6e, 0x99, 0x89, 0x26, 0x90, 0x7c, 0x05, 0x70, 0x39, - 0xf7, 0xd5, 0x94, 0x8b, 0x85, 0x33, 0xa0, 0xdb, 0xfa, 0xaa, 0x19, 0x86, 0x7c, 0x09, 0xad, 0x53, - 0x2e, 0xc6, 0xec, 0x4d, 0x28, 0x15, 0xdd, 0xe9, 0x59, 0xfd, 0x96, 0xb7, 0x22, 0xf4, 0x2c, 0xe6, - 0x21, 0x8b, 0x94, 0xb9, 0xeb, 0xae, 0x39, 0x39, 0x43, 0xd9, 0xff, 0x58, 0xb0, 0x6f, 0xdc, 0x30, - 0xe2, 0x97, 0x37, 0xf2, 0xfa, 0x93, 0xd8, 0x82, 0x42, 0x13, 0x6b, 0x86, 0x6c, 0x99, 0xb8, 0x22, - 0x85,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 0x72, 0x00, 0xcd, - 0x85, 0x0c, 0x06, 0xbe, 0xf2, 0xb5, 0x0e, 0xf8, 0xf2, 0x38, 0xfe, 0xe9, 0x09, 0x17, 0x57, 0x72, - 0x32, 0x43, 0xd1, 0x71, 0xcd, 0x4b, 0x8b, 0xec, 0xbf, 0x2a, 0x38, 0xfc, 0xe4, 0xd8, 0x8f, 0xb2, - 0xeb, 0x2b, 0xd8, 0xf4, 0xd8, 0xd2, 0x99, 0xb0, 0x48, 0x85, 0xd3, 0x90, 0x89, 0x44, 0xff, 0x3c, - 0x59, 0xd4, 0xb8, 0x56, 0xd6, 0xb8, 0x30, 0xa1, 0x7a, 0x69, 0x42, 0xa8, 0xac, 0x4c, 0x95, 0x6d, - 0x18, 0x65, 0x53, 0x7c, 0xf4, 0x67, 0x15, 0x6a, 0x68, 0x6b, 0xf2, 0x2b, 0x6c, 0x17, 0x9e, 0x21, - 0xe9, 0xde, 0x87, 0x4f, 0xe9, 0xbd, 0x77, 0xbf, 0x58, 0xbb, 0x26, 0x63, 0xf2, 0x33, 0xb4, 0x33, - 0x89, 0x44, 0xf6, 0xd3, 0xda, 0xfc, 0x4f, 0x42, 0xf7, 0xe5, 0x83, 0xbc, 0x8c, 0xc9, 0x25, 0xec, - 0x3d, 0x94, 0x68, 0xe4, 0xeb, 0x07, 0x36, 0x64, 0xf3, 0x6e, 0x7d, 0xc7, 0x23, 0x68, 0x26, 0x6a, - 0x11, 0x92, 0xd6, 0xac, 0x5c, 0xd3, 0x7d, 0x51, 0xe2, 0x64, 0xfc, 0xae, 0xa1, 0xff, 0xd9, 0xfe, - 0xf0, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9c, 0x2f, 0xc4, 0xa9, 0x12, 0x0b, 0x00, 0x00, +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// Client API for Chat service + +type ChatClient interface { + GetMaxAndMinSeq(ctx context.Context, in *GetMaxAndMinSeqReq, opts ...grpc.CallOption) (*GetMaxAndMinSeqResp, error) + PullMessage(ctx context.Context, in *PullMessageReq, opts ...grpc.CallOption) (*PullMessageResp, error) + PullMessageBySeqList(ctx context.Context, in *PullMessageBySeqListReq, opts ...grpc.CallOption) (*PullMessageResp, error) + SendMsg(ctx context.Context, in *SendMsgReq, opts ...grpc.CallOption) (*SendMsgResp, error) +} + +type chatClient struct { + cc *grpc.ClientConn +} + +func NewChatClient(cc *grpc.ClientConn) ChatClient { + return &chatClient{cc} +} + +func (c *chatClient) GetMaxAndMinSeq(ctx context.Context, in *GetMaxAndMinSeqReq, opts ...grpc.CallOption) (*GetMaxAndMinSeqResp, error) { + out := new(GetMaxAndMinSeqResp) + err := grpc.Invoke(ctx, "/pbChat.Chat/GetMaxAndMinSeq", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *chatClient) PullMessage(ctx context.Context, in *PullMessageReq, opts ...grpc.CallOption) (*PullMessageResp, error) { + out := new(PullMessageResp) + err := grpc.Invoke(ctx, "/pbChat.Chat/PullMessage", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *chatClient) PullMessageBySeqList(ctx context.Context, in *PullMessageBySeqListReq, opts ...grpc.CallOption) (*PullMessageResp, error) { + out := new(PullMessageResp) + err := grpc.Invoke(ctx, "/pbChat.Chat/PullMessageBySeqList", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *chatClient) SendMsg(ctx context.Context, in *SendMsgReq, opts ...grpc.CallOption) (*SendMsgResp, error) { + out := new(SendMsgResp) + err := grpc.Invoke(ctx, "/pbChat.Chat/SendMsg", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for Chat service + +type ChatServer interface { + GetMaxAndMinSeq(context.Context, *GetMaxAndMinSeqReq) (*GetMaxAndMinSeqResp, error) + PullMessage(context.Context, *PullMessageReq) (*PullMessageResp, error) + PullMessageBySeqList(context.Context, *PullMessageBySeqListReq) (*PullMessageResp, error) + SendMsg(context.Context, *SendMsgReq) (*SendMsgResp, error) +} + +func RegisterChatServer(s *grpc.Server, srv ChatServer) { + s.RegisterService(&_Chat_serviceDesc, srv) +} + +func _Chat_GetMaxAndMinSeq_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetMaxAndMinSeqReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ChatServer).GetMaxAndMinSeq(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pbChat.Chat/GetMaxAndMinSeq", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ChatServer).GetMaxAndMinSeq(ctx, req.(*GetMaxAndMinSeqReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Chat_PullMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PullMessageReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ChatServer).PullMessage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pbChat.Chat/PullMessage", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ChatServer).PullMessage(ctx, req.(*PullMessageReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Chat_PullMessageBySeqList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PullMessageBySeqListReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ChatServer).PullMessageBySeqList(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pbChat.Chat/PullMessageBySeqList", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ChatServer).PullMessageBySeqList(ctx, req.(*PullMessageBySeqListReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Chat_SendMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SendMsgReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ChatServer).SendMsg(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pbChat.Chat/SendMsg", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ChatServer).SendMsg(ctx, req.(*SendMsgReq)) + } + return interceptor(ctx, in, info, handler) +} + +var _Chat_serviceDesc = grpc.ServiceDesc{ + ServiceName: "pbChat.Chat", + HandlerType: (*ChatServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetMaxAndMinSeq", + Handler: _Chat_GetMaxAndMinSeq_Handler, + }, + { + MethodName: "PullMessage", + Handler: _Chat_PullMessage_Handler, + }, + { + MethodName: "PullMessageBySeqList", + Handler: _Chat_PullMessageBySeqList_Handler, + }, + { + MethodName: "SendMsg", + Handler: _Chat_SendMsg_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "chat/chat.proto", +} + +func init() { proto.RegisterFile("chat/chat.proto", fileDescriptor_chat_e46047b47969b559) } + +var fileDescriptor_chat_e46047b47969b559 = []byte{ + // 766 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcd, 0x4e, 0xdb, 0x4a, + 0x14, 0x56, 0xec, 0x38, 0x81, 0x13, 0x42, 0xb8, 0x03, 0x02, 0x2b, 0x77, 0x71, 0x73, 0x2d, 0xee, + 0x15, 0xea, 0x22, 0x91, 0xe8, 0xa6, 0x6a, 0xd5, 0x4a, 0x0d, 0x09, 0x28, 0x15, 0x86, 0xd4, 0x81, + 0x4d, 0x37, 0xc8, 0xc4, 0x83, 0x63, 0x25, 0xfe, 0xc9, 0xcc, 0x84, 0x9f, 0x4d, 0x9f, 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x01, 0x70, 0x17, 0x9b, 0xfa, 0x7c, 0x0f, 0x5f, 0xea, 0x11, 0xfe, 0x5e, 0xe0, 0xe2, + 0xa7, 0x69, 0x7f, 0x6b, 0x5d, 0x77, 0xa1, 0xea, 0xe0, 0x69, 0xcf, 0xc3, 0x11, 0x0b, 0xae, 0x02, + 0x4c, 0xd2, 0xf9, 0x2f, 0x92, 0xcb, 0x33, 0x2e, 0xe6, 0x67, 0xbc, 0xa4, 0x90, 0x91, 0x53, 0x88, + 0x4f, 0x96, 0x66, 0x93, 0x2d, 0xc9, 0xc9, 0x66, 0x78, 0xff, 0x9b, 0x06, 0x45, 0xbe, 0xd6, 0xe8, + 0x13, 0xd4, 0x96, 0xae, 0x21, 0xaa, 0xcf, 0x1f, 0x9f, 0xdc, 0x7d, 0xaf, 0xff, 0xfd, 0xe8, 0x19, + 0x4d, 0xd0, 0x07, 0xa8, 0x28, 0x2f, 0x12, 0xda, 0xce, 0x6c, 0x17, 0x3f, 0x09, 0xf5, 0x9d, 0x07, + 0x79, 0x9a, 0xa0, 0x3e, 0x6c, 0x3d, 0xf4, 0xa2, 0xa1, 0x7f, 0x1e, 0x70, 0x50, 0xdf, 0xbb, 0xc7, + 0x23, 0xee, 0x43, 0x39, 0x9d, 0x16, 0x42, 0x99, 0xcd, 0xfd, 0xd6, 0xd4, 0x37, 0x73, 0x1c, 0x4d, + 0xda, 0xb5, 0x2f, 0xd5, 0xa6, 0xf8, 0xcf, 0xe0, 0x9d, 0x3c, 0xbc, 0x2c, 0x89, 0xcf, 0xfe, 0xeb, + 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x48, 0x7f, 0xf6, 0xd7, 0x34, 0x08, 0x00, 0x00, } From 6bdfc570a87b98e94b372d97ca940762e51fc6e2 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 22 Dec 2021 11:14:03 +0800 Subject: [PATCH 010/337] proto file --- pkg/proto/push/push.pb.go | 177 ++++++-------------------------------- 1 file changed, 28 insertions(+), 149 deletions(-) diff --git a/pkg/proto/push/push.pb.go b/pkg/proto/push/push.pb.go index b53d2b8a1..f4ef70cfb 100644 --- a/pkg/proto/push/push.pb.go +++ b/pkg/proto/push/push.pb.go @@ -6,6 +6,7 @@ package pbPush // import "./push" import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" +import sdk_ws "Open_IM/pkg/proto/sdk_ws" import ( context "golang.org/x/net/context" @@ -24,32 +25,18 @@ var _ = math.Inf const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type PushMsgReq struct { - SendID string `protobuf:"bytes,1,opt,name=SendID" json:"SendID,omitempty"` - RecvID string `protobuf:"bytes,2,opt,name=RecvID" json:"RecvID,omitempty"` - Content string `protobuf:"bytes,3,opt,name=Content" json:"Content,omitempty"` - RecvSeq int64 `protobuf:"varint,4,opt,name=RecvSeq" json:"RecvSeq,omitempty"` - SendTime int64 `protobuf:"varint,5,opt,name=SendTime" json:"SendTime,omitempty"` - MsgFrom int32 `protobuf:"varint,6,opt,name=MsgFrom" json:"MsgFrom,omitempty"` - ContentType int32 `protobuf:"varint,7,opt,name=ContentType" json:"ContentType,omitempty"` - SessionType int32 `protobuf:"varint,8,opt,name=SessionType" json:"SessionType,omitempty"` - OperationID string `protobuf:"bytes,9,opt,name=OperationID" json:"OperationID,omitempty"` - MsgID string `protobuf:"bytes,10,opt,name=MsgID" json:"MsgID,omitempty"` - OfflineInfo string `protobuf:"bytes,11,opt,name=OfflineInfo" json:"OfflineInfo,omitempty"` - Options string `protobuf:"bytes,12,opt,name=Options" json:"Options,omitempty"` - PlatformID int32 `protobuf:"varint,13,opt,name=PlatformID" json:"PlatformID,omitempty"` - SenderNickName string `protobuf:"bytes,14,opt,name=SenderNickName" json:"SenderNickName,omitempty"` - SenderFaceURL string `protobuf:"bytes,15,opt,name=SenderFaceURL" json:"SenderFaceURL,omitempty"` - ClientMsgID string `protobuf:"bytes,16,opt,name=ClientMsgID" json:"ClientMsgID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + OperationID string `protobuf:"bytes,1,opt,name=operationID" json:"operationID,omitempty"` + MsgData *sdk_ws.MsgData `protobuf:"bytes,2,opt,name=msgData" json:"msgData,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *PushMsgReq) Reset() { *m = PushMsgReq{} } func (m *PushMsgReq) String() string { return proto.CompactTextString(m) } func (*PushMsgReq) ProtoMessage() {} func (*PushMsgReq) Descriptor() ([]byte, []int) { - return fileDescriptor_push_e44270f7d93180b9, []int{0} + return fileDescriptor_push_e9dec9fedbbc6360, []int{0} } func (m *PushMsgReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PushMsgReq.Unmarshal(m, b) @@ -69,62 +56,6 @@ func (m *PushMsgReq) XXX_DiscardUnknown() { var xxx_messageInfo_PushMsgReq proto.InternalMessageInfo -func (m *PushMsgReq) GetSendID() string { - if m != nil { - return m.SendID - } - return "" -} - -func (m *PushMsgReq) GetRecvID() string { - if m != nil { - return m.RecvID - } - return "" -} - -func (m *PushMsgReq) GetContent() string { - if m != nil { - return m.Content - } - return "" -} - -func (m *PushMsgReq) GetRecvSeq() int64 { - if m != nil { - return m.RecvSeq - } - return 0 -} - -func (m *PushMsgReq) GetSendTime() int64 { - if m != nil { - return m.SendTime - } - return 0 -} - -func (m *PushMsgReq) GetMsgFrom() int32 { - if m != nil { - return m.MsgFrom - } - return 0 -} - -func (m *PushMsgReq) GetContentType() int32 { - if m != nil { - return m.ContentType - } - return 0 -} - -func (m *PushMsgReq) GetSessionType() int32 { - if m != nil { - return m.SessionType - } - return 0 -} - func (m *PushMsgReq) GetOperationID() string { if m != nil { return m.OperationID @@ -132,53 +63,11 @@ func (m *PushMsgReq) GetOperationID() string { return "" } -func (m *PushMsgReq) GetMsgID() string { +func (m *PushMsgReq) GetMsgData() *sdk_ws.MsgData { if m != nil { - return m.MsgID + return m.MsgData } - return "" -} - -func (m *PushMsgReq) GetOfflineInfo() string { - if m != nil { - return m.OfflineInfo - } - return "" -} - -func (m *PushMsgReq) GetOptions() string { - if m != nil { - return m.Options - } - return "" -} - -func (m *PushMsgReq) GetPlatformID() int32 { - if m != nil { - return m.PlatformID - } - return 0 -} - -func (m *PushMsgReq) GetSenderNickName() string { - if m != nil { - return m.SenderNickName - } - return "" -} - -func (m *PushMsgReq) GetSenderFaceURL() string { - if m != nil { - return m.SenderFaceURL - } - return "" -} - -func (m *PushMsgReq) GetClientMsgID() string { - if m != nil { - return m.ClientMsgID - } - return "" + return nil } type PushMsgResp struct { @@ -192,7 +81,7 @@ func (m *PushMsgResp) Reset() { *m = PushMsgResp{} } func (m *PushMsgResp) String() string { return proto.CompactTextString(m) } func (*PushMsgResp) ProtoMessage() {} func (*PushMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_push_e44270f7d93180b9, []int{1} + return fileDescriptor_push_e9dec9fedbbc6360, []int{1} } func (m *PushMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PushMsgResp.Unmarshal(m, b) @@ -296,32 +185,22 @@ var _PushMsgService_serviceDesc = grpc.ServiceDesc{ Metadata: "push/push.proto", } -func init() { proto.RegisterFile("push/push.proto", fileDescriptor_push_e44270f7d93180b9) } +func init() { proto.RegisterFile("push/push.proto", fileDescriptor_push_e9dec9fedbbc6360) } -var fileDescriptor_push_e44270f7d93180b9 = []byte{ - // 378 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x92, 0x5d, 0xeb, 0xda, 0x30, - 0x14, 0xc6, 0xe9, 0xb4, 0xbe, 0x1c, 0xe7, 0xcb, 0xc2, 0x18, 0xc1, 0x8b, 0x51, 0x64, 0x0c, 0x6f, - 0xd6, 0xc1, 0x76, 0xb9, 0x9b, 0x31, 0x8b, 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d3, 0x3c, 0xe3, - 0x18, 0xf2, 0x54, 0xd0, 0x41, 0xdd, 0xf7, 0x40, 0x3a, 0xf7, 0x46, 0xea, 0x19, 0x8a, 0xbe, 0xb6, - 0xf7, 0x50, 0x4b, 0xf2, 0x1e, 0x60, 0x9b, 0xc7, 0x55, 0x2a, 0xca, 0x22, 0x0c, 0xe8, 0xd0, 0x84, - 0x6a, 0x10, 0xf2, 0x11, 0x46, 0xfa, 0xf4, 0x58, 0xae, 0xb3, 0xe4, 0xcf, 0x3a, 0x2e, 0x90, 0x8e, - 0xcc, 0x80, 0x27, 0x4a, 0x3e, 0xc0, 0xd0, 0x92, 0x65, 0x9c, 0xe0, 0x2f, 0xf6, 0x93, 0x8e, 0x8d, - 0xed, 0x25, 0x34, 0xb7, 0x94, 0x67, 0xc8, 0x2b, 0x7b, 0x8a, 0x89, 0x4d, 0xda, 0x40, 0xb3, 0x4f, - 0x30, 0xb8, 0xbf, 0xb7, 0x92, 0x3a, 0x1e, 0x43, 0x75, 0xc9, 0xab, 0x85, 0x38, 0xa0, 0x79, 0x74, - 0x97, 0x35, 0xc8, 0x97, 0xef, 0x30, 0xaa, 0xed, 0x11, 0x96, 0xd7, 0x2c, 0x41, 0xe2, 0x43, 0xb7, - 0x26, 0x64, 0xe2, 0x9b, 0x7d, 0x7a, 0xec, 0xcf, 0xf4, 0xcd, 0x13, 0x51, 0xf2, 0xc7, 0xf8, 0xf7, - 0xd0, 0x37, 0x7b, 0xf7, 0x4d, 0xee, 0x35, 0xdf, 0x77, 0xcc, 0xfe, 0x7d, 0xfd, 0x1f, 0x00, 0x00, - 0xff, 0xff, 0x6b, 0x53, 0xf4, 0xd4, 0x92, 0x02, 0x00, 0x00, +var fileDescriptor_push_e9dec9fedbbc6360 = []byte{ + // 221 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2f, 0x28, 0x2d, 0xce, + 0xd0, 0x07, 0x11, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x2c, 0x20, 0xb6, 0x94, 0xa2, 0x7f, + 0x41, 0x6a, 0x5e, 0xbc, 0xa7, 0xaf, 0x7e, 0x41, 0x76, 0xba, 0x3e, 0x58, 0x42, 0xbf, 0x38, 0x25, + 0x3b, 0xbe, 0xbc, 0x58, 0xbf, 0xbc, 0x18, 0xa2, 0x50, 0x29, 0x8e, 0x8b, 0x2b, 0xa0, 0xb4, 0x38, + 0xc3, 0xb7, 0x38, 0x3d, 0x28, 0xb5, 0x50, 0x48, 0x81, 0x8b, 0x3b, 0xbf, 0x20, 0xb5, 0x28, 0xb1, + 0x24, 0x33, 0x3f, 0xcf, 0xd3, 0x45, 0x82, 0x51, 0x81, 0x51, 0x83, 0x33, 0x08, 0x59, 0x48, 0x48, + 0x8f, 0x8b, 0x3d, 0xb7, 0x38, 0xdd, 0x25, 0xb1, 0x24, 0x51, 0x82, 0x49, 0x81, 0x51, 0x83, 0xdb, + 0x48, 0x44, 0x2f, 0x1f, 0x64, 0x49, 0x66, 0x6e, 0x7c, 0x71, 0x4a, 0xb6, 0x9e, 0x2f, 0x44, 0x2e, + 0x08, 0xa6, 0x48, 0x49, 0x97, 0x8b, 0x1b, 0x6e, 0x7e, 0x71, 0x81, 0x90, 0x1c, 0x17, 0x57, 0x50, + 0x6a, 0x71, 0x69, 0x4e, 0x89, 0x73, 0x7e, 0x4a, 0x2a, 0xd8, 0x7c, 0xd6, 0x20, 0x24, 0x11, 0x23, + 0x07, 0x2e, 0x3e, 0xa8, 0xf2, 0xe0, 0xd4, 0xa2, 0xb2, 0xcc, 0xe4, 0x54, 0x90, 0x85, 0x50, 0x11, + 0x21, 0x01, 0x3d, 0xb0, 0x0f, 0x11, 0xee, 0x95, 0x12, 0x44, 0x13, 0x29, 0x2e, 0x70, 0xe2, 0x8f, + 0xe2, 0xd5, 0x03, 0x87, 0x84, 0x75, 0x41, 0x12, 0x48, 0x3c, 0x89, 0x0d, 0xec, 0x51, 0x63, 0x40, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x02, 0x62, 0xa4, 0x3d, 0x24, 0x01, 0x00, 0x00, } From a5518eb492fccd0c37a519e833b0a9f060d9e1fb Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 22 Dec 2021 11:14:57 +0800 Subject: [PATCH 011/337] OpUserID --- internal/rpc/group/group_application_response.go | 16 +++++++++++++--- pkg/proto/group/group.proto | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/internal/rpc/group/group_application_response.go b/internal/rpc/group/group_application_response.go index c8a077ae9..e51339575 100644 --- a/internal/rpc/group/group_application_response.go +++ b/internal/rpc/group/group_application_response.go @@ -3,7 +3,7 @@ package group import ( "Open_IM/internal/rpc/chat" "Open_IM/pkg/common/db" - "Open_IM/pkg/common/db/mysql_model/im_mysql_model" + immsql "Open_IM/pkg/common/db/mysql_model/im_mysql_model" "Open_IM/pkg/common/log" "Open_IM/pkg/proto/group" "context" @@ -11,7 +11,7 @@ import ( func (s *groupServer) GroupApplicationResponse(_ context.Context, pb *group.GroupApplicationResponseReq) (*group.GroupApplicationResponseResp, error) { log.NewInfo(pb.OperationID, "GroupApplicationResponse args: ", pb.String()) - reply, err := im_mysql_model.GroupApplicationResponse(pb) + reply, err := immsql.GroupApplicationResponse(pb) if err != nil { log.NewError(pb.OperationID, "GroupApplicationResponse failed ", err.Error(), pb) return &group.GroupApplicationResponseResp{ErrCode: 702, ErrMsg: err.Error()}, nil @@ -33,7 +33,17 @@ func (s *groupServer) GroupApplicationResponse(_ context.Context, pb *group.Grou } } if pb.ToUserID == "0" { - chat.ApplicationProcessedNotification(pb.OperationID, pb.FromUserID) + group, err := immsql.FindGroupInfoByGroupId(pb.GroupID) + if err != nil { + + } + member, err := immsql.FindGroupMemberInfoByGroupIdAndUserId(pb.GroupID, pb.OwnerID) + if err != nil { + + } + chat.ApplicationProcessedNotification(pb.OperationID, pb.FromUserID, *group, *member, pb.HandleResult, pb.HandledMsg) + } else { + } if pb.HandleResult == 1 { diff --git a/pkg/proto/group/group.proto b/pkg/proto/group/group.proto index f767c5220..4859fc359 100644 --- a/pkg/proto/group/group.proto +++ b/pkg/proto/group/group.proto @@ -108,7 +108,7 @@ message JoinGroupReq{ message GroupApplicationResponseReq{ string OperationID = 1; - string UserID = 2; + string OpUserID = 2; string GroupID = 3; string FromUserID = 4; //请求加群:请求者,邀请加群:邀请人 string FromUserNickName = 5; From cf94122406500c8ad4d7af47c86a50c44be3cd75 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 22 Dec 2021 11:20:10 +0800 Subject: [PATCH 012/337] proto file --- pkg/proto/sdk_ws/ws.pb.go | 1123 ++++++++++++++++++++----------------- 1 file changed, 615 insertions(+), 508 deletions(-) diff --git a/pkg/proto/sdk_ws/ws.pb.go b/pkg/proto/sdk_ws/ws.pb.go index 5a4ae90c5..1ce815b28 100644 --- a/pkg/proto/sdk_ws/ws.pb.go +++ b/pkg/proto/sdk_ws/ws.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// source: ws.proto +// source: sdk_ws/ws.proto -package open_im_sdk +package open_im_sdk // import "./sdk_ws" import proto "github.com/golang/protobuf/proto" import fmt "fmt" @@ -32,7 +32,7 @@ func (m *PullMessageBySeqListResp) Reset() { *m = PullMessageBySeqListRe func (m *PullMessageBySeqListResp) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListResp) ProtoMessage() {} func (*PullMessageBySeqListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e1a0eca386827677, []int{0} + return fileDescriptor_ws_a9634e8f434358ba, []int{0} } func (m *PullMessageBySeqListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListResp.Unmarshal(m, b) @@ -91,7 +91,7 @@ func (m *PullMessageBySeqListReq) Reset() { *m = PullMessageBySeqListReq func (m *PullMessageBySeqListReq) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListReq) ProtoMessage() {} func (*PullMessageBySeqListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e1a0eca386827677, []int{1} + return fileDescriptor_ws_a9634e8f434358ba, []int{1} } func (m *PullMessageBySeqListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListReq.Unmarshal(m, b) @@ -128,7 +128,7 @@ func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} } func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqReq) ProtoMessage() {} func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e1a0eca386827677, []int{2} + return fileDescriptor_ws_a9634e8f434358ba, []int{2} } func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) @@ -160,7 +160,7 @@ func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} } func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqResp) ProtoMessage() {} func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e1a0eca386827677, []int{3} + return fileDescriptor_ws_a9634e8f434358ba, []int{3} } func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) @@ -196,9 +196,9 @@ func (m *GetMaxAndMinSeqResp) GetMinSeq() int64 { type GatherFormat struct { // @inject_tag: json:"id" - ID string `protobuf:"bytes,1,opt,name=ID" json:"ID,omitempty"` + ID string `protobuf:"bytes,1,opt,name=ID" json:"id"` // @inject_tag: json:"list" - List []*MsgFormat `protobuf:"bytes,2,rep,name=List" json:"List,omitempty"` + List []*MsgFormat `protobuf:"bytes,2,rep,name=List" json:"list"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -208,7 +208,7 @@ func (m *GatherFormat) Reset() { *m = GatherFormat{} } func (m *GatherFormat) String() string { return proto.CompactTextString(m) } func (*GatherFormat) ProtoMessage() {} func (*GatherFormat) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e1a0eca386827677, []int{4} + return fileDescriptor_ws_a9634e8f434358ba, []int{4} } func (m *GatherFormat) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GatherFormat.Unmarshal(m, b) @@ -244,29 +244,29 @@ func (m *GatherFormat) GetList() []*MsgFormat { type MsgFormat struct { // @inject_tag: json:"sendID" - SendID string `protobuf:"bytes,1,opt,name=SendID" json:"SendID,omitempty"` + SendID string `protobuf:"bytes,1,opt,name=SendID" json:"sendID"` // @inject_tag: json:"recvID" - RecvID string `protobuf:"bytes,2,opt,name=RecvID" json:"RecvID,omitempty"` + RecvID string `protobuf:"bytes,2,opt,name=RecvID" json:"recvID"` // @inject_tag: json:"msgFrom" - MsgFrom int32 `protobuf:"varint,3,opt,name=MsgFrom" json:"MsgFrom,omitempty"` + MsgFrom int32 `protobuf:"varint,3,opt,name=MsgFrom" json:"msgFrom"` // @inject_tag: json:"contentType" - ContentType int32 `protobuf:"varint,4,opt,name=ContentType" json:"ContentType,omitempty"` + ContentType int32 `protobuf:"varint,4,opt,name=ContentType" json:"contentType"` // @inject_tag: json:"serverMsgID" - ServerMsgID string `protobuf:"bytes,5,opt,name=ServerMsgID" json:"ServerMsgID,omitempty"` + ServerMsgID string `protobuf:"bytes,5,opt,name=ServerMsgID" json:"serverMsgID"` // @inject_tag: json:"content" - Content string `protobuf:"bytes,6,opt,name=Content" json:"Content,omitempty"` + Content string `protobuf:"bytes,6,opt,name=Content" json:"content"` // @inject_tag: json:"seq" - Seq int64 `protobuf:"varint,7,opt,name=Seq" json:"Seq,omitempty"` + Seq int64 `protobuf:"varint,7,opt,name=Seq" json:"seq"` // @inject_tag: json:"sendTime" - SendTime int64 `protobuf:"varint,8,opt,name=SendTime" json:"SendTime,omitempty"` + SendTime int64 `protobuf:"varint,8,opt,name=SendTime" json:"sendTime"` // @inject_tag: json:"senderPlatformID" - SenderPlatformID int32 `protobuf:"varint,9,opt,name=SenderPlatformID" json:"SenderPlatformID,omitempty"` + SenderPlatformID int32 `protobuf:"varint,9,opt,name=SenderPlatformID" json:"senderPlatformID"` // @inject_tag: json:"senderNickName" - SenderNickName string `protobuf:"bytes,10,opt,name=SenderNickName" json:"SenderNickName,omitempty"` + SenderNickName string `protobuf:"bytes,10,opt,name=SenderNickName" json:"senderNickName"` // @inject_tag: json:"senderFaceUrl" - SenderFaceURL string `protobuf:"bytes,11,opt,name=SenderFaceURL" json:"SenderFaceURL,omitempty"` + SenderFaceURL string `protobuf:"bytes,11,opt,name=SenderFaceURL" json:"senderFaceUrl"` // @inject_tag: json:"clientMsgID" - ClientMsgID string `protobuf:"bytes,12,opt,name=ClientMsgID" json:"ClientMsgID,omitempty"` + ClientMsgID string `protobuf:"bytes,12,opt,name=ClientMsgID" json:"clientMsgID"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -276,7 +276,7 @@ func (m *MsgFormat) Reset() { *m = MsgFormat{} } func (m *MsgFormat) String() string { return proto.CompactTextString(m) } func (*MsgFormat) ProtoMessage() {} func (*MsgFormat) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e1a0eca386827677, []int{5} + return fileDescriptor_ws_a9634e8f434358ba, []int{5} } func (m *MsgFormat) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgFormat.Unmarshal(m, b) @@ -401,7 +401,7 @@ func (m *UserSendMsgReq) Reset() { *m = UserSendMsgReq{} } func (m *UserSendMsgReq) String() string { return proto.CompactTextString(m) } func (*UserSendMsgReq) ProtoMessage() {} func (*UserSendMsgReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e1a0eca386827677, []int{6} + return fileDescriptor_ws_a9634e8f434358ba, []int{6} } func (m *UserSendMsgReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserSendMsgReq.Unmarshal(m, b) @@ -511,7 +511,7 @@ func (m *UserSendMsgResp) Reset() { *m = UserSendMsgResp{} } func (m *UserSendMsgResp) String() string { return proto.CompactTextString(m) } func (*UserSendMsgResp) ProtoMessage() {} func (*UserSendMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e1a0eca386827677, []int{7} + return fileDescriptor_ws_a9634e8f434358ba, []int{7} } func (m *UserSendMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserSendMsgResp.Unmarshal(m, b) @@ -553,29 +553,34 @@ func (m *UserSendMsgResp) GetSendTime() int64 { } type MsgData struct { - SendID string `protobuf:"bytes,1,opt,name=sendID" json:"sendID,omitempty"` - RecvID string `protobuf:"bytes,2,opt,name=recvID" json:"recvID,omitempty"` - SessionType int32 `protobuf:"varint,3,opt,name=sessionType" json:"sessionType,omitempty"` - MsgFrom int32 `protobuf:"varint,4,opt,name=msgFrom" json:"msgFrom,omitempty"` - ContentType int32 `protobuf:"varint,5,opt,name=contentType" json:"contentType,omitempty"` - ServerMsgID string `protobuf:"bytes,6,opt,name=serverMsgID" json:"serverMsgID,omitempty"` - Content []byte `protobuf:"bytes,7,opt,name=content,proto3" json:"content,omitempty"` - SendTime int64 `protobuf:"varint,8,opt,name=sendTime" json:"sendTime,omitempty"` - Seq int64 `protobuf:"varint,9,opt,name=seq" json:"seq,omitempty"` - SenderPlatformID int32 `protobuf:"varint,10,opt,name=senderPlatformID" json:"senderPlatformID,omitempty"` - SenderNickName string `protobuf:"bytes,11,opt,name=senderNickName" json:"senderNickName,omitempty"` - SenderFaceURL string `protobuf:"bytes,12,opt,name=senderFaceURL" json:"senderFaceURL,omitempty"` - ClientMsgID string `protobuf:"bytes,13,opt,name=clientMsgID" json:"clientMsgID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + SendID string `protobuf:"bytes,1,opt,name=sendID" json:"sendID,omitempty"` + RecvID string `protobuf:"bytes,2,opt,name=recvID" json:"recvID,omitempty"` + GroupID string `protobuf:"bytes,3,opt,name=groupID" json:"groupID,omitempty"` + ClientMsgID string `protobuf:"bytes,4,opt,name=clientMsgID" json:"clientMsgID,omitempty"` + ServerMsgID string `protobuf:"bytes,5,opt,name=serverMsgID" json:"serverMsgID,omitempty"` + SenderPlatformID int32 `protobuf:"varint,6,opt,name=senderPlatformID" json:"senderPlatformID,omitempty"` + SenderNickName string `protobuf:"bytes,7,opt,name=senderNickName" json:"senderNickName,omitempty"` + SenderFaceURL string `protobuf:"bytes,8,opt,name=senderFaceURL" json:"senderFaceURL,omitempty"` + SessionType int32 `protobuf:"varint,9,opt,name=sessionType" json:"sessionType,omitempty"` + MsgFrom int32 `protobuf:"varint,10,opt,name=msgFrom" json:"msgFrom,omitempty"` + ContentType int32 `protobuf:"varint,11,opt,name=contentType" json:"contentType,omitempty"` + Content []byte `protobuf:"bytes,12,opt,name=content,proto3" json:"content,omitempty"` + ForceList []string `protobuf:"bytes,13,rep,name=forceList" json:"forceList,omitempty"` + Seq int64 `protobuf:"varint,14,opt,name=seq" json:"seq,omitempty"` + SendTime int64 `protobuf:"varint,15,opt,name=sendTime" json:"sendTime,omitempty"` + CreateTime int64 `protobuf:"varint,16,opt,name=createTime" json:"createTime,omitempty"` + Options map[string]bool `protobuf:"bytes,17,rep,name=Options" json:"Options,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + OfflinePushInfo *OfflinePushInfo `protobuf:"bytes,18,opt,name=offlinePushInfo" json:"offlinePushInfo,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *MsgData) Reset() { *m = MsgData{} } func (m *MsgData) String() string { return proto.CompactTextString(m) } func (*MsgData) ProtoMessage() {} func (*MsgData) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e1a0eca386827677, []int{8} + return fileDescriptor_ws_a9634e8f434358ba, []int{8} } func (m *MsgData) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgData.Unmarshal(m, b) @@ -609,25 +614,18 @@ func (m *MsgData) GetRecvID() string { return "" } -func (m *MsgData) GetSessionType() int32 { +func (m *MsgData) GetGroupID() string { if m != nil { - return m.SessionType + return m.GroupID } - return 0 + return "" } -func (m *MsgData) GetMsgFrom() int32 { +func (m *MsgData) GetClientMsgID() string { if m != nil { - return m.MsgFrom + return m.ClientMsgID } - return 0 -} - -func (m *MsgData) GetContentType() int32 { - if m != nil { - return m.ContentType - } - return 0 + return "" } func (m *MsgData) GetServerMsgID() string { @@ -637,27 +635,6 @@ func (m *MsgData) GetServerMsgID() string { return "" } -func (m *MsgData) GetContent() []byte { - if m != nil { - return m.Content - } - return nil -} - -func (m *MsgData) GetSendTime() int64 { - if m != nil { - return m.SendTime - } - return 0 -} - -func (m *MsgData) GetSeq() int64 { - if m != nil { - return m.Seq - } - return 0 -} - func (m *MsgData) GetSenderPlatformID() int32 { if m != nil { return m.SenderPlatformID @@ -679,11 +656,74 @@ func (m *MsgData) GetSenderFaceURL() string { return "" } -func (m *MsgData) GetClientMsgID() string { +func (m *MsgData) GetSessionType() int32 { if m != nil { - return m.ClientMsgID + return m.SessionType } - return "" + return 0 +} + +func (m *MsgData) GetMsgFrom() int32 { + if m != nil { + return m.MsgFrom + } + return 0 +} + +func (m *MsgData) GetContentType() int32 { + if m != nil { + return m.ContentType + } + return 0 +} + +func (m *MsgData) GetContent() []byte { + if m != nil { + return m.Content + } + return nil +} + +func (m *MsgData) GetForceList() []string { + if m != nil { + return m.ForceList + } + return nil +} + +func (m *MsgData) GetSeq() int64 { + if m != nil { + return m.Seq + } + return 0 +} + +func (m *MsgData) GetSendTime() int64 { + if m != nil { + return m.SendTime + } + return 0 +} + +func (m *MsgData) GetCreateTime() int64 { + if m != nil { + return m.CreateTime + } + return 0 +} + +func (m *MsgData) GetOptions() map[string]bool { + if m != nil { + return m.Options + } + return nil +} + +func (m *MsgData) GetOfflinePushInfo() *OfflinePushInfo { + if m != nil { + return m.OfflinePushInfo + } + return nil } type OfflinePushInfo struct { @@ -701,7 +741,7 @@ func (m *OfflinePushInfo) Reset() { *m = OfflinePushInfo{} } func (m *OfflinePushInfo) String() string { return proto.CompactTextString(m) } func (*OfflinePushInfo) ProtoMessage() {} func (*OfflinePushInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e1a0eca386827677, []int{9} + return fileDescriptor_ws_a9634e8f434358ba, []int{9} } func (m *OfflinePushInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OfflinePushInfo.Unmarshal(m, b) @@ -775,7 +815,7 @@ func (m *GroupInfo) Reset() { *m = GroupInfo{} } func (m *GroupInfo) String() string { return proto.CompactTextString(m) } func (*GroupInfo) ProtoMessage() {} func (*GroupInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e1a0eca386827677, []int{10} + return fileDescriptor_ws_a9634e8f434358ba, []int{10} } func (m *GroupInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfo.Unmarshal(m, b) @@ -869,7 +909,7 @@ func (m *GroupMemberFullInfo) Reset() { *m = GroupMemberFullInfo{} } func (m *GroupMemberFullInfo) String() string { return proto.CompactTextString(m) } func (*GroupMemberFullInfo) ProtoMessage() {} func (*GroupMemberFullInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e1a0eca386827677, []int{11} + return fileDescriptor_ws_a9634e8f434358ba, []int{11} } func (m *GroupMemberFullInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupMemberFullInfo.Unmarshal(m, b) @@ -941,8 +981,8 @@ func (m *GroupMemberFullInfo) GetFriendRemark() string { // private, Friends have permission to view type UserInfo struct { UserID string `protobuf:"bytes,1,opt,name=UserID" json:"UserID,omitempty"` - Name string `protobuf:"bytes,2,opt,name=Name" json:"Name,omitempty"` - Icon string `protobuf:"bytes,3,opt,name=Icon" json:"Icon,omitempty"` + Nickname string `protobuf:"bytes,2,opt,name=Nickname" json:"Nickname,omitempty"` + FaceUrl string `protobuf:"bytes,3,opt,name=FaceUrl" json:"FaceUrl,omitempty"` Gender int32 `protobuf:"varint,4,opt,name=Gender" json:"Gender,omitempty"` Mobile string `protobuf:"bytes,5,opt,name=Mobile" json:"Mobile,omitempty"` Birth string `protobuf:"bytes,6,opt,name=Birth" json:"Birth,omitempty"` @@ -956,7 +996,7 @@ func (m *UserInfo) Reset() { *m = UserInfo{} } func (m *UserInfo) String() string { return proto.CompactTextString(m) } func (*UserInfo) ProtoMessage() {} func (*UserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e1a0eca386827677, []int{12} + return fileDescriptor_ws_a9634e8f434358ba, []int{12} } func (m *UserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserInfo.Unmarshal(m, b) @@ -983,16 +1023,16 @@ func (m *UserInfo) GetUserID() string { return "" } -func (m *UserInfo) GetName() string { +func (m *UserInfo) GetNickname() string { if m != nil { - return m.Name + return m.Nickname } return "" } -func (m *UserInfo) GetIcon() string { +func (m *UserInfo) GetFaceUrl() string { if m != nil { - return m.Icon + return m.FaceUrl } return "" } @@ -1040,7 +1080,7 @@ func (m *PublicUserInfo) Reset() { *m = PublicUserInfo{} } func (m *PublicUserInfo) String() string { return proto.CompactTextString(m) } func (*PublicUserInfo) ProtoMessage() {} func (*PublicUserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e1a0eca386827677, []int{13} + return fileDescriptor_ws_a9634e8f434358ba, []int{13} } func (m *PublicUserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PublicUserInfo.Unmarshal(m, b) @@ -1100,7 +1140,7 @@ func (m *TipsComm) Reset() { *m = TipsComm{} } func (m *TipsComm) String() string { return proto.CompactTextString(m) } func (*TipsComm) ProtoMessage() {} func (*TipsComm) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e1a0eca386827677, []int{14} + return fileDescriptor_ws_a9634e8f434358ba, []int{14} } func (m *TipsComm) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TipsComm.Unmarshal(m, b) @@ -1138,7 +1178,7 @@ func (m *TipsComm) GetDefaultTips() string { // Actively join the group type MemberEnterTips struct { Group *GroupInfo `protobuf:"bytes,1,opt,name=Group" json:"Group,omitempty"` - Member *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=Member" json:"Member,omitempty"` + EntrantUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=EntrantUser" json:"EntrantUser,omitempty"` OperationTime uint64 `protobuf:"varint,3,opt,name=OperationTime" json:"OperationTime,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1149,7 +1189,7 @@ func (m *MemberEnterTips) Reset() { *m = MemberEnterTips{} } func (m *MemberEnterTips) String() string { return proto.CompactTextString(m) } func (*MemberEnterTips) ProtoMessage() {} func (*MemberEnterTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e1a0eca386827677, []int{15} + return fileDescriptor_ws_a9634e8f434358ba, []int{15} } func (m *MemberEnterTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberEnterTips.Unmarshal(m, b) @@ -1176,9 +1216,9 @@ func (m *MemberEnterTips) GetGroup() *GroupInfo { return nil } -func (m *MemberEnterTips) GetMember() *GroupMemberFullInfo { +func (m *MemberEnterTips) GetEntrantUser() *GroupMemberFullInfo { if m != nil { - return m.Member + return m.EntrantUser } return nil } @@ -1193,7 +1233,7 @@ func (m *MemberEnterTips) GetOperationTime() uint64 { // Actively leave the group type MemberLeaveTips struct { Group *GroupInfo `protobuf:"bytes,1,opt,name=Group" json:"Group,omitempty"` - Member *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=Member" json:"Member,omitempty"` + LeaverUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=LeaverUser" json:"LeaverUser,omitempty"` OperationTime uint64 `protobuf:"varint,3,opt,name=OperationTime" json:"OperationTime,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1204,7 +1244,7 @@ func (m *MemberLeaveTips) Reset() { *m = MemberLeaveTips{} } func (m *MemberLeaveTips) String() string { return proto.CompactTextString(m) } func (*MemberLeaveTips) ProtoMessage() {} func (*MemberLeaveTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e1a0eca386827677, []int{16} + return fileDescriptor_ws_a9634e8f434358ba, []int{16} } func (m *MemberLeaveTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberLeaveTips.Unmarshal(m, b) @@ -1231,9 +1271,9 @@ func (m *MemberLeaveTips) GetGroup() *GroupInfo { return nil } -func (m *MemberLeaveTips) GetMember() *GroupMemberFullInfo { +func (m *MemberLeaveTips) GetLeaverUser() *GroupMemberFullInfo { if m != nil { - return m.Member + return m.LeaverUser } return nil } @@ -1248,7 +1288,7 @@ func (m *MemberLeaveTips) GetOperationTime() uint64 { type MemberInvitedTips struct { Group *GroupInfo `protobuf:"bytes,1,opt,name=Group" json:"Group,omitempty"` OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=OpUser" json:"OpUser,omitempty"` - Member *GroupMemberFullInfo `protobuf:"bytes,3,opt,name=Member" json:"Member,omitempty"` + InvitedUser *GroupMemberFullInfo `protobuf:"bytes,3,opt,name=InvitedUser" json:"InvitedUser,omitempty"` OperationTime uint64 `protobuf:"varint,4,opt,name=OperationTime" json:"OperationTime,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1259,7 +1299,7 @@ func (m *MemberInvitedTips) Reset() { *m = MemberInvitedTips{} } func (m *MemberInvitedTips) String() string { return proto.CompactTextString(m) } func (*MemberInvitedTips) ProtoMessage() {} func (*MemberInvitedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e1a0eca386827677, []int{17} + return fileDescriptor_ws_a9634e8f434358ba, []int{17} } func (m *MemberInvitedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInvitedTips.Unmarshal(m, b) @@ -1293,9 +1333,9 @@ func (m *MemberInvitedTips) GetOpUser() *GroupMemberFullInfo { return nil } -func (m *MemberInvitedTips) GetMember() *GroupMemberFullInfo { +func (m *MemberInvitedTips) GetInvitedUser() *GroupMemberFullInfo { if m != nil { - return m.Member + return m.InvitedUser } return nil } @@ -1310,7 +1350,7 @@ func (m *MemberInvitedTips) GetOperationTime() uint64 { type MemberKickedTips struct { Group *GroupInfo `protobuf:"bytes,1,opt,name=Group" json:"Group,omitempty"` OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=OpUser" json:"OpUser,omitempty"` - Member *GroupMemberFullInfo `protobuf:"bytes,3,opt,name=Member" json:"Member,omitempty"` + KickedUser *GroupMemberFullInfo `protobuf:"bytes,3,opt,name=KickedUser" json:"KickedUser,omitempty"` OperationTime uint64 `protobuf:"varint,4,opt,name=OperationTime" json:"OperationTime,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1321,7 +1361,7 @@ func (m *MemberKickedTips) Reset() { *m = MemberKickedTips{} } func (m *MemberKickedTips) String() string { return proto.CompactTextString(m) } func (*MemberKickedTips) ProtoMessage() {} func (*MemberKickedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e1a0eca386827677, []int{18} + return fileDescriptor_ws_a9634e8f434358ba, []int{18} } func (m *MemberKickedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberKickedTips.Unmarshal(m, b) @@ -1355,9 +1395,9 @@ func (m *MemberKickedTips) GetOpUser() *GroupMemberFullInfo { return nil } -func (m *MemberKickedTips) GetMember() *GroupMemberFullInfo { +func (m *MemberKickedTips) GetKickedUser() *GroupMemberFullInfo { if m != nil { - return m.Member + return m.KickedUser } return nil } @@ -1369,81 +1409,22 @@ func (m *MemberKickedTips) GetOperationTime() uint64 { return 0 } -type GroupMemberChangeInfo struct { +type MemberInfoChangedTips struct { ChangeType int32 `protobuf:"varint,1,opt,name=ChangeType" json:"ChangeType,omitempty"` OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=OpUser" json:"OpUser,omitempty"` - Member *GroupMemberFullInfo `protobuf:"bytes,3,opt,name=Member" json:"Member,omitempty"` + FinalInfo *GroupMemberFullInfo `protobuf:"bytes,3,opt,name=FinalInfo" json:"FinalInfo,omitempty"` MuteTime uint64 `protobuf:"varint,4,opt,name=MuteTime" json:"MuteTime,omitempty"` + Group *GroupInfo `protobuf:"bytes,5,opt,name=Group" json:"Group,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *GroupMemberChangeInfo) Reset() { *m = GroupMemberChangeInfo{} } -func (m *GroupMemberChangeInfo) String() string { return proto.CompactTextString(m) } -func (*GroupMemberChangeInfo) ProtoMessage() {} -func (*GroupMemberChangeInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e1a0eca386827677, []int{19} -} -func (m *GroupMemberChangeInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GroupMemberChangeInfo.Unmarshal(m, b) -} -func (m *GroupMemberChangeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GroupMemberChangeInfo.Marshal(b, m, deterministic) -} -func (dst *GroupMemberChangeInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_GroupMemberChangeInfo.Merge(dst, src) -} -func (m *GroupMemberChangeInfo) XXX_Size() int { - return xxx_messageInfo_GroupMemberChangeInfo.Size(m) -} -func (m *GroupMemberChangeInfo) XXX_DiscardUnknown() { - xxx_messageInfo_GroupMemberChangeInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_GroupMemberChangeInfo proto.InternalMessageInfo - -func (m *GroupMemberChangeInfo) GetChangeType() int32 { - if m != nil { - return m.ChangeType - } - return 0 -} - -func (m *GroupMemberChangeInfo) GetOpUser() *GroupMemberFullInfo { - if m != nil { - return m.OpUser - } - return nil -} - -func (m *GroupMemberChangeInfo) GetMember() *GroupMemberFullInfo { - if m != nil { - return m.Member - } - return nil -} - -func (m *GroupMemberChangeInfo) GetMuteTime() uint64 { - if m != nil { - return m.MuteTime - } - return 0 -} - -type MemberInfoChangedTips struct { - Group *GroupInfo `protobuf:"bytes,1,opt,name=Group" json:"Group,omitempty"` - MemberChanged *GroupMemberChangeInfo `protobuf:"bytes,2,opt,name=MemberChanged" json:"MemberChanged,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - func (m *MemberInfoChangedTips) Reset() { *m = MemberInfoChangedTips{} } func (m *MemberInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*MemberInfoChangedTips) ProtoMessage() {} func (*MemberInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e1a0eca386827677, []int{20} + return fileDescriptor_ws_a9634e8f434358ba, []int{19} } func (m *MemberInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInfoChangedTips.Unmarshal(m, b) @@ -1463,16 +1444,37 @@ func (m *MemberInfoChangedTips) XXX_DiscardUnknown() { var xxx_messageInfo_MemberInfoChangedTips proto.InternalMessageInfo -func (m *MemberInfoChangedTips) GetGroup() *GroupInfo { +func (m *MemberInfoChangedTips) GetChangeType() int32 { if m != nil { - return m.Group + return m.ChangeType + } + return 0 +} + +func (m *MemberInfoChangedTips) GetOpUser() *GroupMemberFullInfo { + if m != nil { + return m.OpUser } return nil } -func (m *MemberInfoChangedTips) GetMemberChanged() *GroupMemberChangeInfo { +func (m *MemberInfoChangedTips) GetFinalInfo() *GroupMemberFullInfo { if m != nil { - return m.MemberChanged + return m.FinalInfo + } + return nil +} + +func (m *MemberInfoChangedTips) GetMuteTime() uint64 { + if m != nil { + return m.MuteTime + } + return 0 +} + +func (m *MemberInfoChangedTips) GetGroup() *GroupInfo { + if m != nil { + return m.Group } return nil } @@ -1491,7 +1493,7 @@ func (m *GroupCreatedTips) Reset() { *m = GroupCreatedTips{} } func (m *GroupCreatedTips) String() string { return proto.CompactTextString(m) } func (*GroupCreatedTips) ProtoMessage() {} func (*GroupCreatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e1a0eca386827677, []int{21} + return fileDescriptor_ws_a9634e8f434358ba, []int{20} } func (m *GroupCreatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupCreatedTips.Unmarshal(m, b) @@ -1552,7 +1554,7 @@ func (m *GroupInfoChangedTips) Reset() { *m = GroupInfoChangedTips{} } func (m *GroupInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*GroupInfoChangedTips) ProtoMessage() {} func (*GroupInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e1a0eca386827677, []int{22} + return fileDescriptor_ws_a9634e8f434358ba, []int{21} } func (m *GroupInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfoChangedTips.Unmarshal(m, b) @@ -1606,7 +1608,7 @@ func (m *ReceiveJoinApplicationTips) Reset() { *m = ReceiveJoinApplicati func (m *ReceiveJoinApplicationTips) String() string { return proto.CompactTextString(m) } func (*ReceiveJoinApplicationTips) ProtoMessage() {} func (*ReceiveJoinApplicationTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e1a0eca386827677, []int{23} + return fileDescriptor_ws_a9634e8f434358ba, []int{22} } func (m *ReceiveJoinApplicationTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ReceiveJoinApplicationTips.Unmarshal(m, b) @@ -1661,7 +1663,7 @@ func (m *ApplicationProcessedTips) Reset() { *m = ApplicationProcessedTi func (m *ApplicationProcessedTips) String() string { return proto.CompactTextString(m) } func (*ApplicationProcessedTips) ProtoMessage() {} func (*ApplicationProcessedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e1a0eca386827677, []int{24} + return fileDescriptor_ws_a9634e8f434358ba, []int{23} } func (m *ApplicationProcessedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ApplicationProcessedTips.Unmarshal(m, b) @@ -1711,10 +1713,10 @@ func (m *ApplicationProcessedTips) GetReason() string { // ////////////////////friend///////////////////// type FriendInfo struct { - OwnerUserID string `protobuf:"bytes,1,opt,name=OwnerUserID" json:"OwnerUserID,omitempty"` + OwnerUser *UserInfo `protobuf:"bytes,1,opt,name=OwnerUser" json:"OwnerUser,omitempty"` Remark string `protobuf:"bytes,2,opt,name=Remark" json:"Remark,omitempty"` CreateTime uint64 `protobuf:"varint,3,opt,name=CreateTime" json:"CreateTime,omitempty"` - FriendUserInfo *UserInfo `protobuf:"bytes,4,opt,name=FriendUserInfo" json:"FriendUserInfo,omitempty"` + FriendUser *UserInfo `protobuf:"bytes,4,opt,name=FriendUser" json:"FriendUser,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1724,7 +1726,7 @@ func (m *FriendInfo) Reset() { *m = FriendInfo{} } func (m *FriendInfo) String() string { return proto.CompactTextString(m) } func (*FriendInfo) ProtoMessage() {} func (*FriendInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e1a0eca386827677, []int{25} + return fileDescriptor_ws_a9634e8f434358ba, []int{24} } func (m *FriendInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfo.Unmarshal(m, b) @@ -1744,11 +1746,11 @@ func (m *FriendInfo) XXX_DiscardUnknown() { var xxx_messageInfo_FriendInfo proto.InternalMessageInfo -func (m *FriendInfo) GetOwnerUserID() string { +func (m *FriendInfo) GetOwnerUser() *UserInfo { if m != nil { - return m.OwnerUserID + return m.OwnerUser } - return "" + return nil } func (m *FriendInfo) GetRemark() string { @@ -1765,17 +1767,17 @@ func (m *FriendInfo) GetCreateTime() uint64 { return 0 } -func (m *FriendInfo) GetFriendUserInfo() *UserInfo { +func (m *FriendInfo) GetFriendUser() *UserInfo { if m != nil { - return m.FriendUserInfo + return m.FriendUser } return nil } type FriendApplication struct { - AddTime uint64 `protobuf:"varint,4,opt,name=AddTime" json:"AddTime,omitempty"` - AddSource string `protobuf:"bytes,5,opt,name=AddSource" json:"AddSource,omitempty"` - AddWording string `protobuf:"bytes,6,opt,name=AddWording" json:"AddWording,omitempty"` + AddTime uint64 `protobuf:"varint,1,opt,name=AddTime" json:"AddTime,omitempty"` + AddSource string `protobuf:"bytes,2,opt,name=AddSource" json:"AddSource,omitempty"` + AddWording string `protobuf:"bytes,3,opt,name=AddWording" json:"AddWording,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1785,7 +1787,7 @@ func (m *FriendApplication) Reset() { *m = FriendApplication{} } func (m *FriendApplication) String() string { return proto.CompactTextString(m) } func (*FriendApplication) ProtoMessage() {} func (*FriendApplication) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e1a0eca386827677, []int{26} + return fileDescriptor_ws_a9634e8f434358ba, []int{25} } func (m *FriendApplication) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplication.Unmarshal(m, b) @@ -1827,318 +1829,383 @@ func (m *FriendApplication) GetAddWording() string { } // user1 add user2 -type FriendApplicationListAddedTips struct { +type FriendApplicationAddedTips struct { OpUser *PublicUserInfo `protobuf:"bytes,1,opt,name=OpUser" json:"OpUser,omitempty"` Application *FriendApplication `protobuf:"bytes,2,opt,name=Application" json:"Application,omitempty"` OpedUser *PublicUserInfo `protobuf:"bytes,3,opt,name=OpedUser" json:"OpedUser,omitempty"` + OperationTime uint64 `protobuf:"varint,4,opt,name=OperationTime" json:"OperationTime,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *FriendApplicationListAddedTips) Reset() { *m = FriendApplicationListAddedTips{} } -func (m *FriendApplicationListAddedTips) String() string { return proto.CompactTextString(m) } -func (*FriendApplicationListAddedTips) ProtoMessage() {} -func (*FriendApplicationListAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e1a0eca386827677, []int{27} +func (m *FriendApplicationAddedTips) Reset() { *m = FriendApplicationAddedTips{} } +func (m *FriendApplicationAddedTips) String() string { return proto.CompactTextString(m) } +func (*FriendApplicationAddedTips) ProtoMessage() {} +func (*FriendApplicationAddedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_a9634e8f434358ba, []int{26} } -func (m *FriendApplicationListAddedTips) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FriendApplicationListAddedTips.Unmarshal(m, b) +func (m *FriendApplicationAddedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FriendApplicationAddedTips.Unmarshal(m, b) } -func (m *FriendApplicationListAddedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FriendApplicationListAddedTips.Marshal(b, m, deterministic) +func (m *FriendApplicationAddedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FriendApplicationAddedTips.Marshal(b, m, deterministic) } -func (dst *FriendApplicationListAddedTips) XXX_Merge(src proto.Message) { - xxx_messageInfo_FriendApplicationListAddedTips.Merge(dst, src) +func (dst *FriendApplicationAddedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_FriendApplicationAddedTips.Merge(dst, src) } -func (m *FriendApplicationListAddedTips) XXX_Size() int { - return xxx_messageInfo_FriendApplicationListAddedTips.Size(m) +func (m *FriendApplicationAddedTips) XXX_Size() int { + return xxx_messageInfo_FriendApplicationAddedTips.Size(m) } -func (m *FriendApplicationListAddedTips) XXX_DiscardUnknown() { - xxx_messageInfo_FriendApplicationListAddedTips.DiscardUnknown(m) +func (m *FriendApplicationAddedTips) XXX_DiscardUnknown() { + xxx_messageInfo_FriendApplicationAddedTips.DiscardUnknown(m) } -var xxx_messageInfo_FriendApplicationListAddedTips proto.InternalMessageInfo +var xxx_messageInfo_FriendApplicationAddedTips proto.InternalMessageInfo -func (m *FriendApplicationListAddedTips) GetOpUser() *PublicUserInfo { +func (m *FriendApplicationAddedTips) GetOpUser() *PublicUserInfo { if m != nil { return m.OpUser } return nil } -func (m *FriendApplicationListAddedTips) GetApplication() *FriendApplication { +func (m *FriendApplicationAddedTips) GetApplication() *FriendApplication { if m != nil { return m.Application } return nil } -func (m *FriendApplicationListAddedTips) GetOpedUser() *PublicUserInfo { +func (m *FriendApplicationAddedTips) GetOpedUser() *PublicUserInfo { if m != nil { return m.OpedUser } return nil } -// user2 accept -type FriendApplicationListAcceptTips struct { +func (m *FriendApplicationAddedTips) GetOperationTime() uint64 { + if m != nil { + return m.OperationTime + } + return 0 +} + +// user2 accept or reject +type FriendApplicationProcessedTips struct { OpUser *PublicUserInfo `protobuf:"bytes,1,opt,name=OpUser" json:"OpUser,omitempty"` OpedUser *PublicUserInfo `protobuf:"bytes,2,opt,name=OpedUser" json:"OpedUser,omitempty"` + Result int32 `protobuf:"varint,3,opt,name=result" json:"result,omitempty"` + OperationTime uint64 `protobuf:"varint,4,opt,name=OperationTime" json:"OperationTime,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *FriendApplicationListAcceptTips) Reset() { *m = FriendApplicationListAcceptTips{} } -func (m *FriendApplicationListAcceptTips) String() string { return proto.CompactTextString(m) } -func (*FriendApplicationListAcceptTips) ProtoMessage() {} -func (*FriendApplicationListAcceptTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e1a0eca386827677, []int{28} +func (m *FriendApplicationProcessedTips) Reset() { *m = FriendApplicationProcessedTips{} } +func (m *FriendApplicationProcessedTips) String() string { return proto.CompactTextString(m) } +func (*FriendApplicationProcessedTips) ProtoMessage() {} +func (*FriendApplicationProcessedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_a9634e8f434358ba, []int{27} } -func (m *FriendApplicationListAcceptTips) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FriendApplicationListAcceptTips.Unmarshal(m, b) +func (m *FriendApplicationProcessedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FriendApplicationProcessedTips.Unmarshal(m, b) } -func (m *FriendApplicationListAcceptTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FriendApplicationListAcceptTips.Marshal(b, m, deterministic) +func (m *FriendApplicationProcessedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FriendApplicationProcessedTips.Marshal(b, m, deterministic) } -func (dst *FriendApplicationListAcceptTips) XXX_Merge(src proto.Message) { - xxx_messageInfo_FriendApplicationListAcceptTips.Merge(dst, src) +func (dst *FriendApplicationProcessedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_FriendApplicationProcessedTips.Merge(dst, src) } -func (m *FriendApplicationListAcceptTips) XXX_Size() int { - return xxx_messageInfo_FriendApplicationListAcceptTips.Size(m) +func (m *FriendApplicationProcessedTips) XXX_Size() int { + return xxx_messageInfo_FriendApplicationProcessedTips.Size(m) } -func (m *FriendApplicationListAcceptTips) XXX_DiscardUnknown() { - xxx_messageInfo_FriendApplicationListAcceptTips.DiscardUnknown(m) +func (m *FriendApplicationProcessedTips) XXX_DiscardUnknown() { + xxx_messageInfo_FriendApplicationProcessedTips.DiscardUnknown(m) } -var xxx_messageInfo_FriendApplicationListAcceptTips proto.InternalMessageInfo +var xxx_messageInfo_FriendApplicationProcessedTips proto.InternalMessageInfo -func (m *FriendApplicationListAcceptTips) GetOpUser() *PublicUserInfo { +func (m *FriendApplicationProcessedTips) GetOpUser() *PublicUserInfo { if m != nil { return m.OpUser } return nil } -func (m *FriendApplicationListAcceptTips) GetOpedUser() *PublicUserInfo { +func (m *FriendApplicationProcessedTips) GetOpedUser() *PublicUserInfo { if m != nil { return m.OpedUser } return nil } -// user2 reject -type FriendApplicationListRejectTips struct { - OpUser *PublicUserInfo `protobuf:"bytes,1,opt,name=OpUser" json:"OpUser,omitempty"` - OpedUser *PublicUserInfo `protobuf:"bytes,2,opt,name=OpedUser" json:"OpedUser,omitempty"` +func (m *FriendApplicationProcessedTips) GetResult() int32 { + if m != nil { + return m.Result + } + return 0 +} + +func (m *FriendApplicationProcessedTips) GetOperationTime() uint64 { + if m != nil { + return m.OperationTime + } + return 0 +} + +type FriendAddedTips struct { + Friend *FriendInfo `protobuf:"bytes,1,opt,name=Friend" json:"Friend,omitempty"` + OperationTime uint64 `protobuf:"varint,2,opt,name=OperationTime" json:"OperationTime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FriendAddedTips) Reset() { *m = FriendAddedTips{} } +func (m *FriendAddedTips) String() string { return proto.CompactTextString(m) } +func (*FriendAddedTips) ProtoMessage() {} +func (*FriendAddedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_a9634e8f434358ba, []int{28} +} +func (m *FriendAddedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FriendAddedTips.Unmarshal(m, b) +} +func (m *FriendAddedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FriendAddedTips.Marshal(b, m, deterministic) +} +func (dst *FriendAddedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_FriendAddedTips.Merge(dst, src) +} +func (m *FriendAddedTips) XXX_Size() int { + return xxx_messageInfo_FriendAddedTips.Size(m) +} +func (m *FriendAddedTips) XXX_DiscardUnknown() { + xxx_messageInfo_FriendAddedTips.DiscardUnknown(m) +} + +var xxx_messageInfo_FriendAddedTips proto.InternalMessageInfo + +func (m *FriendAddedTips) GetFriend() *FriendInfo { + if m != nil { + return m.Friend + } + return nil +} + +func (m *FriendAddedTips) GetOperationTime() uint64 { + if m != nil { + return m.OperationTime + } + return 0 +} + +type FriendDeletedTips struct { + Friend *FriendInfo `protobuf:"bytes,1,opt,name=Friend" json:"Friend,omitempty"` + OperationTime uint64 `protobuf:"varint,2,opt,name=OperationTime" json:"OperationTime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FriendDeletedTips) Reset() { *m = FriendDeletedTips{} } +func (m *FriendDeletedTips) String() string { return proto.CompactTextString(m) } +func (*FriendDeletedTips) ProtoMessage() {} +func (*FriendDeletedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_a9634e8f434358ba, []int{29} +} +func (m *FriendDeletedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FriendDeletedTips.Unmarshal(m, b) +} +func (m *FriendDeletedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FriendDeletedTips.Marshal(b, m, deterministic) +} +func (dst *FriendDeletedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_FriendDeletedTips.Merge(dst, src) +} +func (m *FriendDeletedTips) XXX_Size() int { + return xxx_messageInfo_FriendDeletedTips.Size(m) +} +func (m *FriendDeletedTips) XXX_DiscardUnknown() { + xxx_messageInfo_FriendDeletedTips.DiscardUnknown(m) +} + +var xxx_messageInfo_FriendDeletedTips proto.InternalMessageInfo + +func (m *FriendDeletedTips) GetFriend() *FriendInfo { + if m != nil { + return m.Friend + } + return nil +} + +func (m *FriendDeletedTips) GetOperationTime() uint64 { + if m != nil { + return m.OperationTime + } + return 0 +} + +type BlackInfo struct { + OwnerUser *PublicUserInfo `protobuf:"bytes,1,opt,name=OwnerUser" json:"OwnerUser,omitempty"` + CreateTime uint64 `protobuf:"varint,3,opt,name=CreateTime" json:"CreateTime,omitempty"` + BlackUser *PublicUserInfo `protobuf:"bytes,4,opt,name=BlackUser" json:"BlackUser,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *FriendApplicationListRejectTips) Reset() { *m = FriendApplicationListRejectTips{} } -func (m *FriendApplicationListRejectTips) String() string { return proto.CompactTextString(m) } -func (*FriendApplicationListRejectTips) ProtoMessage() {} -func (*FriendApplicationListRejectTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e1a0eca386827677, []int{29} +func (m *BlackInfo) Reset() { *m = BlackInfo{} } +func (m *BlackInfo) String() string { return proto.CompactTextString(m) } +func (*BlackInfo) ProtoMessage() {} +func (*BlackInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_a9634e8f434358ba, []int{30} } -func (m *FriendApplicationListRejectTips) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FriendApplicationListRejectTips.Unmarshal(m, b) +func (m *BlackInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BlackInfo.Unmarshal(m, b) } -func (m *FriendApplicationListRejectTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FriendApplicationListRejectTips.Marshal(b, m, deterministic) +func (m *BlackInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BlackInfo.Marshal(b, m, deterministic) } -func (dst *FriendApplicationListRejectTips) XXX_Merge(src proto.Message) { - xxx_messageInfo_FriendApplicationListRejectTips.Merge(dst, src) +func (dst *BlackInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_BlackInfo.Merge(dst, src) } -func (m *FriendApplicationListRejectTips) XXX_Size() int { - return xxx_messageInfo_FriendApplicationListRejectTips.Size(m) +func (m *BlackInfo) XXX_Size() int { + return xxx_messageInfo_BlackInfo.Size(m) } -func (m *FriendApplicationListRejectTips) XXX_DiscardUnknown() { - xxx_messageInfo_FriendApplicationListRejectTips.DiscardUnknown(m) +func (m *BlackInfo) XXX_DiscardUnknown() { + xxx_messageInfo_BlackInfo.DiscardUnknown(m) } -var xxx_messageInfo_FriendApplicationListRejectTips proto.InternalMessageInfo +var xxx_messageInfo_BlackInfo proto.InternalMessageInfo -func (m *FriendApplicationListRejectTips) GetOpUser() *PublicUserInfo { +func (m *BlackInfo) GetOwnerUser() *PublicUserInfo { if m != nil { - return m.OpUser + return m.OwnerUser } return nil } -func (m *FriendApplicationListRejectTips) GetOpedUser() *PublicUserInfo { +func (m *BlackInfo) GetCreateTime() uint64 { if m != nil { - return m.OpedUser + return m.CreateTime + } + return 0 +} + +func (m *BlackInfo) GetBlackUser() *PublicUserInfo { + if m != nil { + return m.BlackUser } return nil } -type FriendListAddedTips struct { - Friend *FriendInfo `protobuf:"bytes,1,opt,name=Friend" json:"Friend,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +type BlackAddedTips struct { + Black *BlackInfo `protobuf:"bytes,1,opt,name=Black" json:"Black,omitempty"` + OperationTime uint64 `protobuf:"varint,2,opt,name=OperationTime" json:"OperationTime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *FriendListAddedTips) Reset() { *m = FriendListAddedTips{} } -func (m *FriendListAddedTips) String() string { return proto.CompactTextString(m) } -func (*FriendListAddedTips) ProtoMessage() {} -func (*FriendListAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e1a0eca386827677, []int{30} +func (m *BlackAddedTips) Reset() { *m = BlackAddedTips{} } +func (m *BlackAddedTips) String() string { return proto.CompactTextString(m) } +func (*BlackAddedTips) ProtoMessage() {} +func (*BlackAddedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_a9634e8f434358ba, []int{31} } -func (m *FriendListAddedTips) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FriendListAddedTips.Unmarshal(m, b) +func (m *BlackAddedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BlackAddedTips.Unmarshal(m, b) } -func (m *FriendListAddedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FriendListAddedTips.Marshal(b, m, deterministic) +func (m *BlackAddedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BlackAddedTips.Marshal(b, m, deterministic) } -func (dst *FriendListAddedTips) XXX_Merge(src proto.Message) { - xxx_messageInfo_FriendListAddedTips.Merge(dst, src) +func (dst *BlackAddedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_BlackAddedTips.Merge(dst, src) } -func (m *FriendListAddedTips) XXX_Size() int { - return xxx_messageInfo_FriendListAddedTips.Size(m) +func (m *BlackAddedTips) XXX_Size() int { + return xxx_messageInfo_BlackAddedTips.Size(m) } -func (m *FriendListAddedTips) XXX_DiscardUnknown() { - xxx_messageInfo_FriendListAddedTips.DiscardUnknown(m) +func (m *BlackAddedTips) XXX_DiscardUnknown() { + xxx_messageInfo_BlackAddedTips.DiscardUnknown(m) } -var xxx_messageInfo_FriendListAddedTips proto.InternalMessageInfo +var xxx_messageInfo_BlackAddedTips proto.InternalMessageInfo -func (m *FriendListAddedTips) GetFriend() *FriendInfo { +func (m *BlackAddedTips) GetBlack() *BlackInfo { if m != nil { - return m.Friend + return m.Black } return nil } -type FriendListDeletedTips struct { - Friend *FriendInfo `protobuf:"bytes,1,opt,name=Friend" json:"Friend,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *FriendListDeletedTips) Reset() { *m = FriendListDeletedTips{} } -func (m *FriendListDeletedTips) String() string { return proto.CompactTextString(m) } -func (*FriendListDeletedTips) ProtoMessage() {} -func (*FriendListDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e1a0eca386827677, []int{31} -} -func (m *FriendListDeletedTips) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FriendListDeletedTips.Unmarshal(m, b) -} -func (m *FriendListDeletedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FriendListDeletedTips.Marshal(b, m, deterministic) -} -func (dst *FriendListDeletedTips) XXX_Merge(src proto.Message) { - xxx_messageInfo_FriendListDeletedTips.Merge(dst, src) -} -func (m *FriendListDeletedTips) XXX_Size() int { - return xxx_messageInfo_FriendListDeletedTips.Size(m) -} -func (m *FriendListDeletedTips) XXX_DiscardUnknown() { - xxx_messageInfo_FriendListDeletedTips.DiscardUnknown(m) -} - -var xxx_messageInfo_FriendListDeletedTips proto.InternalMessageInfo - -func (m *FriendListDeletedTips) GetFriend() *FriendInfo { +func (m *BlackAddedTips) GetOperationTime() uint64 { if m != nil { - return m.Friend + return m.OperationTime + } + return 0 +} + +type BlackDeletedTips struct { + Black *BlackInfo `protobuf:"bytes,1,opt,name=Black" json:"Black,omitempty"` + OperationTime uint64 `protobuf:"varint,2,opt,name=OperationTime" json:"OperationTime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BlackDeletedTips) Reset() { *m = BlackDeletedTips{} } +func (m *BlackDeletedTips) String() string { return proto.CompactTextString(m) } +func (*BlackDeletedTips) ProtoMessage() {} +func (*BlackDeletedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_a9634e8f434358ba, []int{32} +} +func (m *BlackDeletedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BlackDeletedTips.Unmarshal(m, b) +} +func (m *BlackDeletedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BlackDeletedTips.Marshal(b, m, deterministic) +} +func (dst *BlackDeletedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_BlackDeletedTips.Merge(dst, src) +} +func (m *BlackDeletedTips) XXX_Size() int { + return xxx_messageInfo_BlackDeletedTips.Size(m) +} +func (m *BlackDeletedTips) XXX_DiscardUnknown() { + xxx_messageInfo_BlackDeletedTips.DiscardUnknown(m) +} + +var xxx_messageInfo_BlackDeletedTips proto.InternalMessageInfo + +func (m *BlackDeletedTips) GetBlack() *BlackInfo { + if m != nil { + return m.Black } return nil } -type BlackListAddTips struct { - Friend *FriendInfo `protobuf:"bytes,1,opt,name=Friend" json:"Friend,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *BlackListAddTips) Reset() { *m = BlackListAddTips{} } -func (m *BlackListAddTips) String() string { return proto.CompactTextString(m) } -func (*BlackListAddTips) ProtoMessage() {} -func (*BlackListAddTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e1a0eca386827677, []int{32} -} -func (m *BlackListAddTips) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BlackListAddTips.Unmarshal(m, b) -} -func (m *BlackListAddTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BlackListAddTips.Marshal(b, m, deterministic) -} -func (dst *BlackListAddTips) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlackListAddTips.Merge(dst, src) -} -func (m *BlackListAddTips) XXX_Size() int { - return xxx_messageInfo_BlackListAddTips.Size(m) -} -func (m *BlackListAddTips) XXX_DiscardUnknown() { - xxx_messageInfo_BlackListAddTips.DiscardUnknown(m) -} - -var xxx_messageInfo_BlackListAddTips proto.InternalMessageInfo - -func (m *BlackListAddTips) GetFriend() *FriendInfo { +func (m *BlackDeletedTips) GetOperationTime() uint64 { if m != nil { - return m.Friend + return m.OperationTime } - return nil -} - -type BlackListDeletedTips struct { - Friend *FriendInfo `protobuf:"bytes,1,opt,name=Friend" json:"Friend,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *BlackListDeletedTips) Reset() { *m = BlackListDeletedTips{} } -func (m *BlackListDeletedTips) String() string { return proto.CompactTextString(m) } -func (*BlackListDeletedTips) ProtoMessage() {} -func (*BlackListDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e1a0eca386827677, []int{33} -} -func (m *BlackListDeletedTips) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BlackListDeletedTips.Unmarshal(m, b) -} -func (m *BlackListDeletedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BlackListDeletedTips.Marshal(b, m, deterministic) -} -func (dst *BlackListDeletedTips) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlackListDeletedTips.Merge(dst, src) -} -func (m *BlackListDeletedTips) XXX_Size() int { - return xxx_messageInfo_BlackListDeletedTips.Size(m) -} -func (m *BlackListDeletedTips) XXX_DiscardUnknown() { - xxx_messageInfo_BlackListDeletedTips.DiscardUnknown(m) -} - -var xxx_messageInfo_BlackListDeletedTips proto.InternalMessageInfo - -func (m *BlackListDeletedTips) GetFriend() *FriendInfo { - if m != nil { - return m.Friend - } - return nil + return 0 } type FriendInfoChangedTips struct { - Friend *FriendInfo `protobuf:"bytes,1,opt,name=Friend" json:"Friend,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Friend *FriendInfo `protobuf:"bytes,1,opt,name=Friend" json:"Friend,omitempty"` + OpUser *PublicUserInfo `protobuf:"bytes,2,opt,name=OpUser" json:"OpUser,omitempty"` + OperationTime uint64 `protobuf:"varint,3,opt,name=OperationTime" json:"OperationTime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *FriendInfoChangedTips) Reset() { *m = FriendInfoChangedTips{} } func (m *FriendInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*FriendInfoChangedTips) ProtoMessage() {} func (*FriendInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e1a0eca386827677, []int{34} + return fileDescriptor_ws_a9634e8f434358ba, []int{33} } func (m *FriendInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfoChangedTips.Unmarshal(m, b) @@ -2165,19 +2232,35 @@ func (m *FriendInfoChangedTips) GetFriend() *FriendInfo { return nil } +func (m *FriendInfoChangedTips) GetOpUser() *PublicUserInfo { + if m != nil { + return m.OpUser + } + return nil +} + +func (m *FriendInfoChangedTips) GetOperationTime() uint64 { + if m != nil { + return m.OperationTime + } + return 0 +} + // ////////////////////user///////////////////// type SelfInfoUpdatedTips struct { - SelfUserInfo *UserInfo `protobuf:"bytes,1,opt,name=SelfUserInfo" json:"SelfUserInfo,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + SelfUserInfo *UserInfo `protobuf:"bytes,1,opt,name=SelfUserInfo" json:"SelfUserInfo,omitempty"` + OpUser *PublicUserInfo `protobuf:"bytes,2,opt,name=OpUser" json:"OpUser,omitempty"` + OperationTime uint64 `protobuf:"varint,3,opt,name=OperationTime" json:"OperationTime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *SelfInfoUpdatedTips) Reset() { *m = SelfInfoUpdatedTips{} } func (m *SelfInfoUpdatedTips) String() string { return proto.CompactTextString(m) } func (*SelfInfoUpdatedTips) ProtoMessage() {} func (*SelfInfoUpdatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_e1a0eca386827677, []int{35} + return fileDescriptor_ws_a9634e8f434358ba, []int{34} } func (m *SelfInfoUpdatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SelfInfoUpdatedTips.Unmarshal(m, b) @@ -2204,6 +2287,20 @@ func (m *SelfInfoUpdatedTips) GetSelfUserInfo() *UserInfo { return nil } +func (m *SelfInfoUpdatedTips) GetOpUser() *PublicUserInfo { + if m != nil { + return m.OpUser + } + return nil +} + +func (m *SelfInfoUpdatedTips) GetOperationTime() uint64 { + if m != nil { + return m.OperationTime + } + return 0 +} + func init() { proto.RegisterType((*PullMessageBySeqListResp)(nil), "open_im_sdk.PullMessageBySeqListResp") proto.RegisterType((*PullMessageBySeqListReq)(nil), "open_im_sdk.PullMessageBySeqListReq") @@ -2215,6 +2312,7 @@ func init() { proto.RegisterMapType((map[string]int32)(nil), "open_im_sdk.UserSendMsgReq.OptionsEntry") proto.RegisterType((*UserSendMsgResp)(nil), "open_im_sdk.UserSendMsgResp") proto.RegisterType((*MsgData)(nil), "open_im_sdk.MsgData") + proto.RegisterMapType((map[string]bool)(nil), "open_im_sdk.MsgData.OptionsEntry") proto.RegisterType((*OfflinePushInfo)(nil), "open_im_sdk.OfflinePushInfo") proto.RegisterType((*GroupInfo)(nil), "open_im_sdk.GroupInfo") proto.RegisterType((*GroupMemberFullInfo)(nil), "open_im_sdk.GroupMemberFullInfo") @@ -2225,7 +2323,6 @@ func init() { proto.RegisterType((*MemberLeaveTips)(nil), "open_im_sdk.MemberLeaveTips") proto.RegisterType((*MemberInvitedTips)(nil), "open_im_sdk.MemberInvitedTips") proto.RegisterType((*MemberKickedTips)(nil), "open_im_sdk.MemberKickedTips") - proto.RegisterType((*GroupMemberChangeInfo)(nil), "open_im_sdk.GroupMemberChangeInfo") proto.RegisterType((*MemberInfoChangedTips)(nil), "open_im_sdk.MemberInfoChangedTips") proto.RegisterType((*GroupCreatedTips)(nil), "open_im_sdk.GroupCreatedTips") proto.RegisterType((*GroupInfoChangedTips)(nil), "open_im_sdk.GroupInfoChangedTips") @@ -2233,125 +2330,135 @@ func init() { proto.RegisterType((*ApplicationProcessedTips)(nil), "open_im_sdk.ApplicationProcessedTips") proto.RegisterType((*FriendInfo)(nil), "open_im_sdk.FriendInfo") proto.RegisterType((*FriendApplication)(nil), "open_im_sdk.FriendApplication") - proto.RegisterType((*FriendApplicationListAddedTips)(nil), "open_im_sdk.FriendApplicationListAddedTips") - proto.RegisterType((*FriendApplicationListAcceptTips)(nil), "open_im_sdk.FriendApplicationListAcceptTips") - proto.RegisterType((*FriendApplicationListRejectTips)(nil), "open_im_sdk.FriendApplicationListRejectTips") - proto.RegisterType((*FriendListAddedTips)(nil), "open_im_sdk.FriendListAddedTips") - proto.RegisterType((*FriendListDeletedTips)(nil), "open_im_sdk.FriendListDeletedTips") - proto.RegisterType((*BlackListAddTips)(nil), "open_im_sdk.BlackListAddTips") - proto.RegisterType((*BlackListDeletedTips)(nil), "open_im_sdk.BlackListDeletedTips") + proto.RegisterType((*FriendApplicationAddedTips)(nil), "open_im_sdk.FriendApplicationAddedTips") + proto.RegisterType((*FriendApplicationProcessedTips)(nil), "open_im_sdk.FriendApplicationProcessedTips") + proto.RegisterType((*FriendAddedTips)(nil), "open_im_sdk.FriendAddedTips") + proto.RegisterType((*FriendDeletedTips)(nil), "open_im_sdk.FriendDeletedTips") + proto.RegisterType((*BlackInfo)(nil), "open_im_sdk.BlackInfo") + proto.RegisterType((*BlackAddedTips)(nil), "open_im_sdk.BlackAddedTips") + proto.RegisterType((*BlackDeletedTips)(nil), "open_im_sdk.BlackDeletedTips") proto.RegisterType((*FriendInfoChangedTips)(nil), "open_im_sdk.FriendInfoChangedTips") proto.RegisterType((*SelfInfoUpdatedTips)(nil), "open_im_sdk.SelfInfoUpdatedTips") } -func init() { proto.RegisterFile("ws.proto", fileDescriptor_ws_e1a0eca386827677) } +func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_a9634e8f434358ba) } -var fileDescriptor_ws_e1a0eca386827677 = []byte{ - // 1689 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xd7, 0x7a, 0x1d, 0xc7, 0x7e, 0x76, 0xd2, 0x74, 0x93, 0xb4, 0x4b, 0x40, 0xc5, 0x5a, 0x21, - 0x14, 0x55, 0x28, 0x88, 0xf4, 0x40, 0x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 0x6d, 0x58, 0xc2, 0x35, 0x49, 0x0e, 0x03, 0x27, 0xed, 0xc6, 0x49, 0xd8, - 0x6c, 0x98, 0x15, 0x46, 0x68, 0x02, 0x37, 0x3e, 0x84, 0x45, 0x8e, 0x3d, 0xf1, 0xdd, 0xd3, 0x27, - 0x4e, 0x48, 0x4c, 0x60, 0x9f, 0x1e, 0x43, 0x8d, 0x0f, 0x60, 0x81, 0x23, 0x7b, 0x8e, 0x4b, 0x9e, - 0xda, 0x07, 0x66, 0x95, 0xb9, 0xa9, 0x20, 0xcb, 0x42, 0xe0, 0x93, 0x28, 0xe5, 0x31, 0xd6, 0x78, - 0x8c, 0x12, 0x64, 0xfd, 0xa2, 0xc3, 0x22, 0x2a, 0x0d, 0xf7, 0xb5, 0x68, 0x0f, 0x55, 0xb5, 0x0d, - 0xf3, 0xed, 0x7e, 0xea, 0xc7, 0x11, 0x65, 0xaa, 0xaa, 0x6e, 0xae, 0x2b, 0x15, 0x54, 0xbd, 0x37, - 0x84, 0xeb, 0x6e, 0x94, 0x26, 0xe7, 0x76, 0xb6, 0x71, 0x4a, 0x18, 0x85, 0xab, 0x85, 0xa1, 0x4f, - 0x0b, 0xe3, 0x16, 0x80, 0x94, 0x3a, 0x5e, 0x4b, 0x09, 0xe1, 0xa5, 0xa4, 0xd4, 0x8f, 0x23, 0x56, - 0xec, 0x39, 0x5e, 0x6c, 0x09, 0x92, 0x85, 0x52, 0xba, 0x50, 0x28, 0xf3, 0x93, 0x42, 0x19, 0x89, - 0xaf, 0xac, 0x88, 0xef, 0x3d, 0xa8, 0xec, 0xc5, 0x89, 0x4b, 0x98, 0xd6, 0x2b, 0x75, 0x7d, 0xbd, - 0x62, 0x8f, 0x00, 0x59, 0x3c, 0xa0, 0x8a, 0x67, 0xac, 0x28, 0xd5, 0x89, 0xa2, 0xac, 0xdd, 0x87, - 0x9a, 0x9c, 0x56, 0x94, 0xdb, 0x29, 0x39, 0x17, 0x3d, 0x81, 0x4b, 0x63, 0x05,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, 0xc4, 0xd6, 0x18, 0xeb, 0xee, 0x8b, 0x54, 0x34, 0x26, 0x2e, 0x0d, 0x0b, 0x6a, - 0x7e, 0xbb, 0x83, 0x47, 0x75, 0xe2, 0x41, 0xe4, 0xb1, 0xb2, 0x54, 0x6c, 0x05, 0x43, 0xee, 0x7e, - 0xbb, 0xb3, 0xed, 0x78, 0x3d, 0xb2, 0x13, 0x0f, 0xa2, 0x94, 0x55, 0xa7, 0x6c, 0xab, 0xa0, 0xf5, - 0x4d, 0x01, 0x2a, 0xec, 0xb1, 0x63, 0x9c, 0x4c, 0x98, 0xe7, 0x46, 0x26, 0x9e, 0xcc, 0xc4, 0x56, - 0x63, 0x4b, 0xe9, 0x26, 0x19, 0x01, 0xc8, 0xe7, 0x49, 0x9c, 0xfa, 0x5d, 0xdf, 0x75, 0xb0, 0x69, - 0x04, 0x55, 0x05, 0x43, 0x9f, 0x66, 0x94, 0x26, 0xb1, 0x37, 0x70, 0x99, 0x8f, 0xe0, 0x2c, 0x63, - 0xf8, 0x7d, 0x96, 0xd4, 0x24, 0x10, 0xaf, 0x41, 0x66, 0x1a, 0x9f, 0xc0, 0x5c, 0xfb, 0x79, 0x44, - 0x12, 0xa6, 0xa0, 0xea, 0xe6, 0xbb, 0xca, 0x85, 0x78, 0x38, 0x38, 0x0e, 0x7c, 0x17, 0x9b, 0x0e, - 0xa3, 0xb0, 0xb9, 0x27, 0xde, 0x59, 0x3b, 0x09, 0x71, 0x52, 0xc2, 0x04, 0x84, 0xda, 0x2a, 0xda, - 0x12, 0x82, 0x65, 0x6b, 0x91, 0xf0, 0x98, 0x24, 0x3c, 0x3d, 0xa8, 0xb0, 0x05, 0x5b, 0x86, 0xac, - 0x3f, 0x35, 0x58, 0x66, 0x41, 0x72, 0x70, 0x6f, 0x10, 0x04, 0x97, 0xa4, 0xe9, 0x06, 0x94, 0x18, - 0x8d, 0xbc, 0xc9, 0xb8, 0x65, 0x6c, 0x80, 0xb1, 0xe5, 0x85, 0x7e, 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3e, 0x17, 0x00, 0x00, +var fileDescriptor_ws_a9634e8f434358ba = []byte{ + // 1855 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x59, 0x5f, 0x6f, 0xdc, 0x5a, + 0x11, 0x97, 0xf7, 0x5f, 0xb2, 0xb3, 0x69, 0x92, 0xba, 0x6d, 0xae, 0x29, 0x57, 0x55, 0xb0, 0x10, + 0x8a, 0xae, 0xae, 0x52, 0x91, 0x08, 0x71, 0xdb, 0x2b, 0xe0, 0x26, 0xd9, 0x24, 0xda, 0xd2, 0x34, + 0x91, 0xb7, 0x15, 0x12, 0x2f, 0x95, 0x6b, 0x9f, 0xdd, 0x98, 0xf5, 0x9f, 0x8d, 0x8f, 0x77, 0xdb, + 0x7e, 0x12, 0x24, 0x24, 0x24, 0x10, 0x0f, 0x08, 0xf1, 0x82, 0x10, 0xe2, 0x43, 0x20, 0xc4, 0x87, + 0x40, 0xf0, 0xc8, 0x0b, 0xaf, 0x08, 0x09, 0xcd, 0x9c, 0x63, 0xfb, 0x9c, 0xf5, 0x92, 0xec, 0xe6, + 0xaa, 0x7d, 0xf3, 0xfc, 0x3c, 0x73, 0xe6, 0xdf, 0x6f, 0xc6, 0x27, 0x1b, 0xd8, 0xe0, 0xfe, 0xe8, + 0xf5, 0x5b, 0xfe, 0xf8, 0x2d, 0xdf, 0x1d, 0xa7, 0x49, 0x96, 0x98, 0x9d, 0x64, 0xcc, 0xe2, 0xd7, + 0x41, 0xf4, 0x9a, 0xfb, 0x23, 0xfb, 0x2f, 0x06, 0x58, 0x17, 0x93, 0x30, 0x3c, 0x63, 0x9c, 0xbb, + 0x43, 0x76, 0xf8, 0xbe, 0xcf, 0xae, 0x9e, 0x07, 0x3c, 0x73, 0x18, 0x1f, 0x9b, 0x5b, 0xd0, 0x3a, + 0x73, 0xdf, 0xf5, 0xd9, 0x95, 0x65, 0x6c, 0x1b, 0x3b, 0x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 0x74, + 0x72, 0xd1, 0xdc, 0x86, 0xce, 0x51, 0x12, 0x67, 0x2c, 0xce, 0x5e, 0xbe, 0x1f, 0x33, 0xab, 0x41, + 0x6f, 0x55, 0x08, 0x35, 0xfa, 0x2c, 0x9d, 0x52, 0x91, 0x7b, 0x5d, 0xab, 0x49, 0x07, 0xab, 0x10, + 0x9e, 0x2e, 0x0d, 0xac, 0x16, 0xbd, 0xcd, 0x45, 0x73, 0x13, 0xea, 0x58, 0x96, 0x15, 0x2a, 0x0b, + 0x3e, 0x9a, 0x0f, 0x61, 0x15, 0x63, 0x7d, 0x19, 0x44, 0xcc, 0x5a, 0x25, 0xb8, 0x90, 0xcd, 0xcf, + 0x60, 0x13, 0x9f, 0x59, 0x7a, 0x11, 0xba, 0xd9, 0x20, 0x49, 0xa3, 0x5e, 0xd7, 0x6a, 0x53, 0x40, + 0x15, 0xdc, 0xfc, 0x0e, 0xac, 0x0b, 0xec, 0x45, 0xe0, 0x8d, 0x5e, 0xb8, 0x11, 0xb3, 0x80, 0x5c, + 0xcf, 0xa0, 0xe6, 0xb7, 0xe1, 0x8e, 0x40, 0x4e, 0x5c, 0x8f, 0xbd, 0x72, 0x9e, 0x5b, 0x1d, 0x52, + 0xd3, 0x41, 0xaa, 0x42, 0x18, 0xb0, 0x38, 0x13, 0x39, 0xae, 0x89, 0x1c, 0x15, 0xc8, 0xfe, 0x5b, + 0x1d, 0xd6, 0x91, 0x69, 0x68, 0x77, 0xc6, 0x87, 0xc8, 0xaa, 0x43, 0x58, 0x39, 0x1f, 0x67, 0x41, + 0x12, 0x73, 0x62, 0x55, 0x67, 0x6f, 0x47, 0xeb, 0xa0, 0xae, 0xbd, 0x2b, 0x55, 0x8f, 0xe3, 0x2c, + 0x7d, 0xef, 0xe4, 0x86, 0x73, 0xd2, 0xa8, 0x2d, 0x96, 0x46, 0x7d, 0x5e, 0x1a, 0x8f, 0x00, 0x94, + 0xd2, 0x89, 0x5e, 0x2a, 0x88, 0x68, 0x25, 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0x79, 0x02, 0x6b, 0x08, 0xe7, 0xa7, 0x5e, 0xbf, 0xdd, 0x35, 0xd5, 0x0f, 0x18, 0xed, 0xe1, 0xd6, + 0x4f, 0xef, 0xef, 0x3e, 0x16, 0xff, 0xe5, 0xf9, 0x52, 0x39, 0xf4, 0x4d, 0x8b, 0xfe, 0xdf, 0xb3, + 0xff, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x45, 0x72, 0x9b, 0x6e, 0x02, 0x1a, 0x00, 0x00, } From a8e80a44e6bfe5560ae966ff791c2d8f7c17e25d Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 22 Dec 2021 15:24:49 +0800 Subject: [PATCH 013/337] notification --- internal/rpc/chat/send_msg.go | 14 +- internal/rpc/group/create_group.go | 150 ----- .../rpc/group/get_group_applicationList.go | 21 - internal/rpc/group/get_groups_info.go | 42 -- internal/rpc/group/group.go | 579 +++++++++++++----- .../rpc/group/group_application_response.go | 56 -- internal/rpc/group/join_group.go | 51 -- internal/rpc/group/quit_group.go | 55 -- internal/rpc/group/set_group_info.go | 60 -- internal/rpc/group/transfer_group_owner.go | 21 - pkg/proto/group/group.pb.go | 521 +++++++++------- pkg/proto/group/group.proto | 60 +- 12 files changed, 795 insertions(+), 835 deletions(-) delete mode 100644 internal/rpc/group/create_group.go delete mode 100644 internal/rpc/group/get_group_applicationList.go delete mode 100644 internal/rpc/group/get_groups_info.go delete mode 100644 internal/rpc/group/group_application_response.go delete mode 100644 internal/rpc/group/join_group.go delete mode 100644 internal/rpc/group/quit_group.go delete mode 100644 internal/rpc/group/set_group_info.go delete mode 100644 internal/rpc/group/transfer_group_owner.go diff --git a/internal/rpc/chat/send_msg.go b/internal/rpc/chat/send_msg.go index 1f2737bf1..3403e84bc 100644 --- a/internal/rpc/chat/send_msg.go +++ b/internal/rpc/chat/send_msg.go @@ -328,7 +328,7 @@ func ApplicationProcessedNotification(operationID, RecvID string, group immysql. // GroupMemberFullInfo InvitedUser = 3; // uint64 OperationTime = 4; //} -func MemberInvitedNotification(operationID string, group immysql.Group, opUser immysql.GroupMember, invitedUser immysql.GroupMember) { +func MemberInvitedNotification(operationID string, group immysql.Group, opUser immysql.User, invitedUser immysql.GroupMember) { } @@ -338,6 +338,10 @@ func MemberInvitedNotification(operationID string, group immysql.Group, opUser i // GroupMemberFullInfo KickedUser = 3; // uint64 OperationTime = 4; //} + +func MemberKickedNotificationID(operationID, GroupID, opUserID, kickedUserID, reason string) { + +} func MemberKickedNotification(operationID string, group immysql.Group, opUser immysql.GroupMember, KickedUser immysql.GroupMember) { } @@ -347,6 +351,11 @@ func MemberKickedNotification(operationID string, group immysql.Group, opUser im // GroupInfo Group = 2; // GroupMemberFullInfo OpUser = 3; //} +func GroupInfoChangedNotification(operationID string, changedType int32, groupID string, opUserID string) { + +} + +/* func GroupInfoChangedNotification(operationID string, changedType int32, group *immysql.Group, opUser *immysql.GroupMember) { var n NotificationMsg n.SendID = opUser.UserID @@ -369,13 +378,14 @@ func GroupInfoChangedNotification(operationID string, changedType int32, group * n.Content, _ = json.Marshal(tips) Notification(&n, false) } +*/ //message MemberLeaveTips{ // GroupInfo Group = 1; // GroupMemberFullInfo LeaverUser = 2; // uint64 OperationTime = 3; //} -func MemberLeaveNotification(operationID string, group *immysql.Group, leaverUser *immysql.GroupMember) { +func MemberLeaveNotification(operationID, groupID, leaverUserID string) { } diff --git a/internal/rpc/group/create_group.go b/internal/rpc/group/create_group.go deleted file mode 100644 index 8edc72885..000000000 --- a/internal/rpc/group/create_group.go +++ /dev/null @@ -1,150 +0,0 @@ -package group - -import ( - "Open_IM/internal/rpc/chat" - "Open_IM/pkg/common/config" - "Open_IM/pkg/common/constant" - "Open_IM/pkg/common/db" - "Open_IM/pkg/common/db/mysql_model/im_mysql_model" - "Open_IM/pkg/common/log" - "Open_IM/pkg/common/token_verify" - "Open_IM/pkg/grpc-etcdv3/getcdv3" - pbGroup "Open_IM/pkg/proto/group" - "Open_IM/pkg/utils" - "context" - "google.golang.org/grpc" - "net" - "strconv" - "strings" - "time" -) - -type groupServer struct { - rpcPort int - rpcRegisterName string - etcdSchema string - etcdAddr []string -} - -func NewGroupServer(port int) *groupServer { - log.NewPrivateLog("group") - return &groupServer{ - rpcPort: port, - rpcRegisterName: config.Config.RpcRegisterName.OpenImGroupName, - etcdSchema: config.Config.Etcd.EtcdSchema, - etcdAddr: config.Config.Etcd.EtcdAddr, - } -} -func (s *groupServer) Run() { - log.Info("", "", "rpc group init....") - - ip := utils.ServerIP - registerAddress := ip + ":" + strconv.Itoa(s.rpcPort) - //listener network - listener, err := net.Listen("tcp", registerAddress) - if err != nil { - log.InfoByArgs("listen network failed,err=%s", err.Error()) - return - } - log.Info("", "", "listen network success, address = %s", registerAddress) - defer listener.Close() - //grpc server - srv := grpc.NewServer() - defer srv.GracefulStop() - //Service registers with etcd - pbGroup.RegisterGroupServer(srv, s) - err = getcdv3.RegisterEtcd(s.etcdSchema, strings.Join(s.etcdAddr, ","), ip, s.rpcPort, s.rpcRegisterName, 10) - if err != nil { - log.ErrorByArgs("get etcd failed,err=%s", err.Error()) - return - } - err = srv.Serve(listener) - if err != nil { - log.ErrorByArgs("listen rpc_group error,err=%s", err.Error()) - return - } - log.Info("", "", "rpc create group init success") -} - -func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupReq) (*pbGroup.CreateGroupResp, error) { - log.NewInfo(req.OperationID, "CreateGroup, args=%s", req.String()) - var ( - groupId string - ) - //Parse token, to find current user information - claims, err := token_verify.ParseToken(req.Token) - if err != nil { - log.NewError(req.OperationID, "ParseToken failed, ", err.Error(), req.String()) - return &pbGroup.CreateGroupResp{ErrorCode: constant.ErrParseToken.ErrCode, ErrorMsg: constant.ErrParseToken.ErrMsg}, nil - } - //Time stamp + MD5 to generate group chat id - groupId = utils.Md5(strconv.FormatInt(time.Now().UnixNano(), 10)) - err = im_mysql_model.InsertIntoGroup(groupId, req.GroupName, req.Introduction, req.Notification, req.FaceUrl, req.Ex) - if err != nil { - log.NewError(req.OperationID, "InsertIntoGroup failed, ", err.Error(), req.String()) - return &pbGroup.CreateGroupResp{ErrorCode: constant.ErrCreateGroup.ErrCode, ErrorMsg: constant.ErrCreateGroup.ErrMsg}, nil - } - - isManagerFlag := 0 - tokenUid := claims.UID - - if utils.IsContain(tokenUid, config.Config.Manager.AppManagerUid) { - isManagerFlag = 1 - } - - us, err := im_mysql_model.FindUserByUID(claims.UID) - if err != nil { - log.Error("", req.OperationID, "find userInfo failed", err.Error()) - return &pbGroup.CreateGroupResp{ErrorCode: constant.ErrCreateGroup.ErrCode, ErrorMsg: constant.ErrCreateGroup.ErrMsg}, nil - } - - if isManagerFlag == 0 { - //Add the group owner to the group first, otherwise the group creation will fail - err = im_mysql_model.InsertIntoGroupMember(groupId, claims.UID, us.Nickname, us.FaceUrl, constant.GroupOwner) - if err != nil { - log.Error("", req.OperationID, "create group chat failed,err=%s", err.Error()) - return &pbGroup.CreateGroupResp{ErrorCode: constant.ErrCreateGroup.ErrCode, ErrorMsg: constant.ErrCreateGroup.ErrMsg}, nil - } - - err = db.DB.AddGroupMember(groupId, claims.UID) - if err != nil { - log.NewError(req.OperationID, "AddGroupMember failed ", err.Error(), groupId, claims.UID) - return &pbGroup.CreateGroupResp{ErrorCode: constant.ErrCreateGroup.ErrCode, ErrorMsg: constant.ErrCreateGroup.ErrMsg}, nil - } - } - - //Binding group id and member id - for _, user := range req.MemberList { - us, err := im_mysql_model.FindUserByUID(user.Uid) - if err != nil { - log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), user.Uid) - continue - } - err = im_mysql_model.InsertIntoGroupMember(groupId, user.Uid, us.Nickname, us.FaceUrl, user.SetRole) - if err != nil { - log.ErrorByArgs("InsertIntoGroupMember failed", user.Uid, groupId, err.Error()) - } - err = db.DB.AddGroupMember(groupId, user.Uid) - if err != nil { - log.Error("", "", "add mongo group member failed, db.DB.AddGroupMember fail [err: %s]", err.Error()) - } - } - - if isManagerFlag == 1 { - - } - group, err := im_mysql_model.FindGroupInfoByGroupId(groupId) - if err != nil { - log.NewError(req.OperationID, "FindGroupInfoByGroupId failed ", err.Error(), groupId) - return &pbGroup.CreateGroupResp{GroupID: groupId}, nil - } - memberList, err := im_mysql_model.FindGroupMemberListByGroupId(groupId) - if err != nil { - log.NewError(req.OperationID, "FindGroupMemberListByGroupId failed ", err.Error(), groupId) - return &pbGroup.CreateGroupResp{GroupID: groupId}, nil - } - chat.GroupCreatedNotification(req.OperationID, us, group, memberList) - log.NewInfo(req.OperationID, "GroupCreatedNotification, rpc CreateGroup success return ", groupId) - - return &pbGroup.CreateGroupResp{GroupID: groupId}, nil -} diff --git a/internal/rpc/group/get_group_applicationList.go b/internal/rpc/group/get_group_applicationList.go deleted file mode 100644 index a08b32f8e..000000000 --- a/internal/rpc/group/get_group_applicationList.go +++ /dev/null @@ -1,21 +0,0 @@ -package group - -import ( - "Open_IM/pkg/common/db/mysql_model/im_mysql_model" - "Open_IM/pkg/common/log" - "Open_IM/pkg/proto/group" - "context" -) - -func (s *groupServer) GetGroupApplicationList(_ context.Context, pb *group.GetGroupApplicationListReq) (*group.GetGroupApplicationListResp, error) { - log.Info("", "", "rpc GetGroupApplicationList call start..., [pb: %s]", pb.String()) - - reply, err := im_mysql_model.GetGroupApplicationList(pb.UID) - if err != nil { - log.Error("", "", "rpc GetGroupApplicationList call..., im_mysql_model.GetGroupApplicationList fail [uid: %s] [err: %s]", pb.UID, err.Error()) - return &group.GetGroupApplicationListResp{ErrCode: 701, ErrMsg: "GetGroupApplicationList failed"}, nil - } - log.Info("", "", "rpc GetGroupApplicationList call..., im_mysql_model.GetGroupApplicationList") - - return reply, nil -} diff --git a/internal/rpc/group/get_groups_info.go b/internal/rpc/group/get_groups_info.go deleted file mode 100644 index f0d952e94..000000000 --- a/internal/rpc/group/get_groups_info.go +++ /dev/null @@ -1,42 +0,0 @@ -package group - -import ( - "Open_IM/pkg/common/constant" - "Open_IM/pkg/common/db/mysql_model/im_mysql_model" - "Open_IM/pkg/common/log" - "Open_IM/pkg/common/token_verify" - pbGroup "Open_IM/pkg/proto/group" - "context" -) - -func (s *groupServer) GetGroupsInfo(ctx context.Context, req *pbGroup.GetGroupsInfoReq) (*pbGroup.GetGroupsInfoResp, error) { - log.Info(req.Token, req.OperationID, "rpc get group info is server,args=%s", req.String()) - //Parse token, to find current user information - claims, err := token_verify.ParseToken(req.Token) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) - return &pbGroup.GetGroupsInfoResp{ErrorCode: constant.ErrParseToken.ErrCode, ErrorMsg: constant.ErrParseToken.ErrMsg}, nil - } - log.Info("", req.OperationID, "args:", req.GroupIDList, claims.UID) - groupsInfoList := make([]*pbGroup.GroupInfo, 0) - for _, groupID := range req.GroupIDList { - groupInfoFromMysql, err := im_mysql_model.FindGroupInfoByGroupId(groupID) - if err != nil { - log.Error(req.Token, req.OperationID, "find group info failed,err=%s", err.Error()) - continue - } - var groupInfo pbGroup.GroupInfo - groupInfo.GroupId = groupID - groupInfo.GroupName = groupInfoFromMysql.Name - groupInfo.Introduction = groupInfoFromMysql.Introduction - groupInfo.Notification = groupInfoFromMysql.Notification - groupInfo.FaceUrl = groupInfoFromMysql.FaceUrl - groupInfo.OwnerId = im_mysql_model.GetGroupOwnerByGroupId(groupID) - groupInfo.MemberCount = uint32(im_mysql_model.GetGroupMemberNumByGroupId(groupID)) - groupInfo.CreateTime = uint64(groupInfoFromMysql.CreateTime.Unix()) - - groupsInfoList = append(groupsInfoList, &groupInfo) - } - log.Info(req.Token, req.OperationID, "rpc get groupsInfo success return") - return &pbGroup.GetGroupsInfoResp{Data: groupsInfoList}, nil -} diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index e5b7cfc7d..bd8d3dd86 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -1,50 +1,183 @@ package group import ( - "Open_IM/internal/push/content_struct" - "Open_IM/internal/push/logic" + "Open_IM/internal/rpc/chat" "Open_IM/pkg/common/config" "Open_IM/pkg/common/constant" "Open_IM/pkg/common/db" - "Open_IM/pkg/common/token_verify" - pbChat "Open_IM/pkg/proto/chat" - "encoding/json" - + "Open_IM/pkg/common/db/mysql_model/im_mysql_model" imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" "Open_IM/pkg/common/log" + "Open_IM/pkg/common/token_verify" + "Open_IM/pkg/grpc-etcdv3/getcdv3" pbGroup "Open_IM/pkg/proto/group" "Open_IM/pkg/utils" "context" - + "encoding/json" "fmt" + "google.golang.org/grpc" + "net" + "strconv" + "strings" + "time" ) +type groupServer struct { + rpcPort int + rpcRegisterName string + etcdSchema string + etcdAddr []string +} + +func NewGroupServer(port int) *groupServer { + log.NewPrivateLog("group") + return &groupServer{ + rpcPort: port, + rpcRegisterName: config.Config.RpcRegisterName.OpenImGroupName, + etcdSchema: config.Config.Etcd.EtcdSchema, + etcdAddr: config.Config.Etcd.EtcdAddr, + } +} +func (s *groupServer) Run() { + log.Info("", "", "rpc group init....") + + ip := utils.ServerIP + registerAddress := ip + ":" + strconv.Itoa(s.rpcPort) + //listener network + listener, err := net.Listen("tcp", registerAddress) + if err != nil { + log.InfoByArgs("listen network failed,err=%s", err.Error()) + return + } + log.Info("", "", "listen network success, address = %s", registerAddress) + defer listener.Close() + //grpc server + srv := grpc.NewServer() + defer srv.GracefulStop() + //Service registers with etcd + pbGroup.RegisterGroupServer(srv, s) + err = getcdv3.RegisterEtcd(s.etcdSchema, strings.Join(s.etcdAddr, ","), ip, s.rpcPort, s.rpcRegisterName, 10) + if err != nil { + log.ErrorByArgs("get etcd failed,err=%s", err.Error()) + return + } + err = srv.Serve(listener) + if err != nil { + log.ErrorByArgs("listen rpc_group error,err=%s", err.Error()) + return + } + log.Info("", "", "rpc create group init success") +} + +func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupReq) (*pbGroup.CreateGroupResp, error) { + log.NewInfo(req.OperationID, "CreateGroup, args=%s", req.String()) + var ( + groupId string + ) + //Parse token, to find current user information + claims, err := token_verify.ParseToken(req.Token) + if err != nil { + log.NewError(req.OperationID, "ParseToken failed, ", err.Error(), req.String()) + return &pbGroup.CreateGroupResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil + } + //Time stamp + MD5 to generate group chat id + groupId = utils.Md5(strconv.FormatInt(time.Now().UnixNano(), 10)) + err = im_mysql_model.InsertIntoGroup(groupId, req.GroupName, req.Introduction, req.Notification, req.FaceUrl, req.Ext) + if err != nil { + log.NewError(req.OperationID, "InsertIntoGroup failed, ", err.Error(), req.String()) + return &pbGroup.CreateGroupResp{ErrCode: constant.ErrCreateGroup.ErrCode, ErrMsg: constant.ErrCreateGroup.ErrMsg}, nil + } + + isManagerFlag := 0 + tokenUid := claims.UID + + if utils.IsContain(tokenUid, config.Config.Manager.AppManagerUid) { + isManagerFlag = 1 + } + + us, err := im_mysql_model.FindUserByUID(claims.UID) + if err != nil { + log.Error("", req.OperationID, "find userInfo failed", err.Error()) + return &pbGroup.CreateGroupResp{ErrCode: constant.ErrCreateGroup.ErrCode, ErrMsg: constant.ErrCreateGroup.ErrMsg}, nil + } + + if isManagerFlag == 0 { + //Add the group owner to the group first, otherwise the group creation will fail + err = im_mysql_model.InsertIntoGroupMember(groupId, claims.UID, us.Nickname, us.FaceUrl, constant.GroupOwner) + if err != nil { + log.Error("", req.OperationID, "create group chat failed,err=%s", err.Error()) + return &pbGroup.CreateGroupResp{ErrCode: constant.ErrCreateGroup.ErrCode, ErrMsg: constant.ErrCreateGroup.ErrMsg}, nil + } + + err = db.DB.AddGroupMember(groupId, claims.UID) + if err != nil { + log.NewError(req.OperationID, "AddGroupMember failed ", err.Error(), groupId, claims.UID) + return &pbGroup.CreateGroupResp{ErrCode: constant.ErrCreateGroup.ErrCode, ErrMsg: constant.ErrCreateGroup.ErrMsg}, nil + } + } + + //Binding group id and member id + for _, user := range req.MemberList { + us, err := im_mysql_model.FindUserByUID(user.Uid) + if err != nil { + log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), user.Uid) + continue + } + err = im_mysql_model.InsertIntoGroupMember(groupId, user.Uid, us.Nickname, us.FaceUrl, user.SetRole) + if err != nil { + log.ErrorByArgs("InsertIntoGroupMember failed", user.Uid, groupId, err.Error()) + } + err = db.DB.AddGroupMember(groupId, user.Uid) + if err != nil { + log.Error("", "", "add mongo group member failed, db.DB.AddGroupMember fail [err: %s]", err.Error()) + } + } + + if isManagerFlag == 1 { + + } + group, err := im_mysql_model.FindGroupInfoByGroupId(groupId) + if err != nil { + log.NewError(req.OperationID, "FindGroupInfoByGroupId failed ", err.Error(), groupId) + return &pbGroup.CreateGroupResp{GroupID: groupId}, nil + } + memberList, err := im_mysql_model.FindGroupMemberListByGroupId(groupId) + if err != nil { + log.NewError(req.OperationID, "FindGroupMemberListByGroupId failed ", err.Error(), groupId) + return &pbGroup.CreateGroupResp{GroupID: groupId}, nil + } + chat.GroupCreatedNotification(req.OperationID, us, group, memberList) + log.NewInfo(req.OperationID, "GroupCreatedNotification, rpc CreateGroup success return ", groupId) + + return &pbGroup.CreateGroupResp{GroupID: groupId}, nil +} + func (s *groupServer) GetJoinedGroupList(ctx context.Context, req *pbGroup.GetJoinedGroupListReq) (*pbGroup.GetJoinedGroupListResp, error) { claims, err := token_verify.ParseToken(req.Token) if err != nil { log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) - return &pbGroup.GetJoinedGroupListResp{ErrorCode: constant.ErrParseToken.ErrCode, ErrorMsg: constant.ErrParseToken.ErrMsg}, nil + return &pbGroup.GetJoinedGroupListResp{ErrCode: constant.ErrParseToken.ErrCode, ErrorMsg: constant.ErrParseToken.ErrMsg}, nil } log.Info(claims.UID, req.OperationID, "recv req: ", req.String()) joinedGroupList, err := imdb.GetJoinedGroupIdListByMemberId(claims.UID) if err != nil { log.Error(claims.UID, req.OperationID, "GetJoinedGroupIdListByMemberId failed, err: ", err.Error()) - return &pbGroup.GetJoinedGroupListResp{ErrorCode: constant.ErrParam.ErrCode, ErrorMsg: constant.ErrParam.ErrMsg}, nil + return &pbGroup.GetJoinedGroupListResp{ErrCode: constant.ErrParam.ErrCode, ErrorMsg: constant.ErrParam.ErrMsg}, nil } var resp pbGroup.GetJoinedGroupListResp for _, v := range joinedGroupList { var groupNode pbGroup.GroupInfo - num := imdb.GetGroupMemberNumByGroupId(v.GroupId) - owner := imdb.GetGroupOwnerByGroupId(v.GroupId) - group, err := imdb.FindGroupInfoByGroupId(v.GroupId) + num := imdb.GetGroupMemberNumByGroupId(v.GroupID) + owner := imdb.GetGroupOwnerByGroupId(v.GroupID) + group, err := imdb.FindGroupInfoByGroupId(v.GroupID) if num > 0 && owner != "" && err == nil { - groupNode.GroupId = v.GroupId + groupNode.GroupId = v.GroupID groupNode.FaceUrl = group.FaceUrl groupNode.CreateTime = uint64(group.CreateTime.Unix()) - groupNode.GroupName = group.Name + groupNode.GroupName = group.GroupName groupNode.Introduction = group.Introduction groupNode.Notification = group.Notification groupNode.OwnerId = owner @@ -53,28 +186,21 @@ func (s *groupServer) GetJoinedGroupList(ctx context.Context, req *pbGroup.GetJo } log.Info(claims.UID, req.OperationID, "member num: ", num, "owner: ", owner) } - resp.ErrorCode = 0 + resp.ErrCode = 0 return &resp, nil } func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.InviteUserToGroupReq) (*pbGroup.InviteUserToGroupResp, error) { - claims, err := token_verify.ParseToken(req.Token) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) - return &pbGroup.InviteUserToGroupResp{ErrorCode: constant.ErrParseToken.ErrCode, ErrorMsg: constant.ErrParseToken.ErrMsg}, nil - } - log.Info(claims.UID, req.OperationID, "recv req: ", req.String()) - // if !imdb.IsExistGroupMember(req.GroupID, claims.UID) && claims.UID != config.Config.AppManagerUid - - if !imdb.IsExistGroupMember(req.GroupID, claims.UID) && !utils.IsContain(claims.UID, config.Config.Manager.AppManagerUid) { - log.Error(req.Token, req.OperationID, "err= invite user not in group") - return &pbGroup.InviteUserToGroupResp{ErrorCode: constant.ErrAccess.ErrCode, ErrorMsg: constant.ErrAccess.ErrMsg}, nil + log.NewInfo(req.OperationID, "InviteUserToGroup args: ", req.String()) + if !imdb.IsExistGroupMember(req.GroupID, req.OpUserID) && !utils.IsContain(req.OpUserID, config.Config.Manager.AppManagerUid) { + log.NewError(req.OperationID, "no permission InviteUserToGroup ", req.GroupID) + return &pbGroup.InviteUserToGroupResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } groupInfoFromMysql, err := imdb.FindGroupInfoByGroupId(req.GroupID) if err != nil || groupInfoFromMysql == nil { - log.NewError(req.OperationID, "get group info error", req.GroupID, req.UidList) - return &pbGroup.InviteUserToGroupResp{ErrorCode: constant.ErrAccess.ErrCode, ErrorMsg: constant.ErrAccess.ErrMsg}, nil + log.NewError(req.OperationID, "FindGroupInfoByGroupId failed", req.GroupID) + return &pbGroup.InviteUserToGroupResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } // @@ -82,12 +208,10 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite //to user: invite: invited //to application var resp pbGroup.InviteUserToGroupResp - /* - fromUserInfo, err := imdb.FindUserByUID(claims.UID) - if err != nil { - log.Error(claims.UID, req.OperationID, "FindUserByUID failed, err: ", err.Error()) - return &pbGroup.InviteUserToGroupResp{ErrorCode: config.ErrParam.ErrCode, ErrorMsg: config.ErrParam.ErrMsg}, nil - }*/ + opUser, err := imdb.FindUserByUID(req.OpUserID) + if err != nil { + log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), req.OpUserID) + } var nicknameList string for _, v := range req.UidList { var resultNode pbGroup.Id2Result @@ -95,58 +219,42 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite resultNode.Result = 0 toUserInfo, err := imdb.FindUserByUID(v) if err != nil { - log.Error(v, req.OperationID, "FindUserByUID failed, err: ", err.Error()) + log.NewError(req.OperationID, "FindUserByUID failed ", err.Error()) resultNode.Result = -1 resp.Id2Result = append(resp.Id2Result, &resultNode) continue } if imdb.IsExistGroupMember(req.GroupID, v) { - log.Error(v, req.OperationID, "user has already in group") + log.NewError(req.OperationID, "ExistGroupMember failed ", req.GroupID, v) resultNode.Result = -1 resp.Id2Result = append(resp.Id2Result, &resultNode) continue } - err = imdb.InsertGroupMember(req.GroupID, toUserInfo.UID, toUserInfo.Name, toUserInfo.Icon, 0) + err = imdb.InsertGroupMember(req.GroupID, toUserInfo.UserID, toUserInfo.Nickname, toUserInfo.FaceUrl, 0) if err != nil { - log.Error(v, req.OperationID, "InsertGroupMember failed, ", err.Error(), "params: ", - req.GroupID, toUserInfo.UID, toUserInfo.Name, toUserInfo.Icon) + log.NewError(req.OperationID, "InsertGroupMember failed ", req.GroupID, toUserInfo.UserID, toUserInfo.Nickname, toUserInfo.FaceUrl) resultNode.Result = -1 resp.Id2Result = append(resp.Id2Result, &resultNode) continue } - err = db.DB.AddGroupMember(req.GroupID, toUserInfo.UID) + member, err := imdb.GetMemberInfoById(req.GroupID, v) + if groupInfoFromMysql != nil && opUser != nil && member != nil { + chat.MemberInvitedNotification(req.OperationID, *groupInfoFromMysql, *opUser, *member) + } else { + log.NewError(req.OperationID, "args failed, nil ", groupInfoFromMysql, opUser, member) + } + + err = db.DB.AddGroupMember(req.GroupID, toUserInfo.UserID) if err != nil { log.Error("", "", "add mongo group member failed, db.DB.AddGroupMember fail [err: %s]", err.Error()) } - nicknameList = nicknameList + toUserInfo.Name + " " + nicknameList = nicknameList + toUserInfo.Nickname + " " resp.Id2Result = append(resp.Id2Result, &resultNode) } - resp.ErrorCode = 0 - resp.ErrorMsg = "ok" - - //if claims.UID == config.Config.AppManagerUid - if utils.IsContain(claims.UID, config.Config.Manager.AppManagerUid) { - m, _ := imdb.FindUserByUID(claims.UID) - var iu inviteUserToGroupReq - iu.GroupID = req.GroupID - iu.OperationID = req.OperationID - iu.Reason = req.Reason - iu.UidList = req.UidList - n := content_struct.NotificationContent{1, nicknameList + " invited into the group chat by " + m.Name, iu.ContentToString()} - logic.SendMsgByWS(&pbChat.WSToMsgSvrChatMsg{ - SendID: claims.UID, - RecvID: req.GroupID, - Content: n.ContentToString(), - SendTime: utils.GetCurrentTimestampByNano(), - MsgFrom: constant.UserMsgType, - ContentType: constant.InviteUserToGroupTip, - SessionType: constant.GroupChatType, - OperationID: req.OperationID, - }) - } + resp.ErrCode = 0 return &resp, nil } @@ -164,20 +272,12 @@ func (c *inviteUserToGroupReq) ContentToString() string { } func (s *groupServer) GetGroupAllMember(ctx context.Context, req *pbGroup.GetGroupAllMemberReq) (*pbGroup.GetGroupAllMemberResp, error) { - //claims, err := utils.ParseToken(req.Token) - //if err != nil { - // log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) - // if req.Token != config.Config.Secret { - // return &pbGroup.GetGroupAllMemberResp{ErrorCode: config.ErrParseToken.ErrCode, ErrorMsg: config.ErrParseToken.ErrMsg}, nil - // } - //} - var resp pbGroup.GetGroupAllMemberResp - resp.ErrorCode = 0 + resp.ErrCode = 0 memberList, err := imdb.FindGroupMemberListByGroupId(req.GroupID) if err != nil { - resp.ErrorCode = constant.ErrDb.ErrCode - resp.ErrorMsg = err.Error() + resp.ErrCode = constant.ErrDb.ErrCode + resp.ErrMsg = err.Error() log.NewError(req.OperationID, "FindGroupMemberListByGroupId failed,", err.Error(), req.GroupID) return &resp, nil } @@ -186,13 +286,13 @@ func (s *groupServer) GetGroupAllMember(ctx context.Context, req *pbGroup.GetGro var node pbGroup.GroupMemberFullInfo node.Role = v.AdministratorLevel node.NickName = v.NickName - node.UserId = v.Uid - node.FaceUrl = v.UserGroupFaceUrl + node.UserId = v.UserID + node.FaceUrl = v.FaceUrl node.JoinTime = uint64(v.JoinTime.Unix()) resp.MemberList = append(resp.MemberList, &node) } - resp.ErrorCode = 0 + resp.ErrCode = 0 return &resp, nil } @@ -200,16 +300,16 @@ func (s *groupServer) GetGroupMemberList(ctx context.Context, req *pbGroup.GetGr claims, err := token_verify.ParseToken(req.Token) if err != nil { log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) - return &pbGroup.GetGroupMemberListResp{ErrorCode: constant.ErrParseToken.ErrCode, ErrorMsg: constant.ErrParseToken.ErrMsg}, nil + return &pbGroup.GetGroupMemberListResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil } // log.Info(claims.UID, req.OperationID, "recv req: ", req.String()) fmt.Println("req: ", req.GroupID) var resp pbGroup.GetGroupMemberListResp - resp.ErrorCode = 0 + resp.ErrCode = 0 memberList, err := imdb.GetGroupMemberByGroupId(req.GroupID, req.Filter, req.NextSeq, 30) if err != nil { - resp.ErrorCode = constant.ErrDb.ErrCode - resp.ErrorMsg = err.Error() + resp.ErrCode = constant.ErrDb.ErrCode + resp.ErrMsg = err.Error() log.Error(claims.UID, req.OperationID, "GetGroupMemberByGroupId failed, ", err.Error(), "params: ", req.GroupID, req.Filter, req.NextSeq) return &resp, nil } @@ -218,7 +318,7 @@ func (s *groupServer) GetGroupMemberList(ctx context.Context, req *pbGroup.GetGr var node pbGroup.GroupMemberFullInfo node.Role = v.AdministratorLevel node.NickName = v.NickName - node.UserId = v.Uid + node.UserId = v.UserID // node.FaceUrl = node.JoinTime = uint64(v.JoinTime.Unix()) resp.MemberList = append(resp.MemberList, &node) @@ -230,7 +330,7 @@ func (s *groupServer) GetGroupMemberList(ctx context.Context, req *pbGroup.GetGr resp.NextSeq = req.NextSeq + int32(len(memberList)) } - resp.ErrorCode = 0 + resp.ErrCode = 0 return &resp, nil } @@ -257,54 +357,51 @@ func (c *kickGroupMemberApiReq) ContentToString() string { } func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGroupMemberReq) (*pbGroup.KickGroupMemberResp, error) { - claims, err := token_verify.ParseToken(req.Token) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) - return &pbGroup.KickGroupMemberResp{ErrorCode: constant.ErrParseToken.ErrCode, ErrorMsg: constant.ErrParseToken.ErrMsg}, nil - } - log.Info(claims.UID, req.OperationID, "recv req: ", req.String()) - + log.NewInfo(req.OperationID, "KickGroupMember failed ", req.String()) ownerList, err := imdb.GetOwnerManagerByGroupId(req.GroupID) if err != nil { - log.Error(claims.UID, req.OperationID, req.GroupID, "GetOwnerManagerByGroupId, ", err.Error()) - return &pbGroup.KickGroupMemberResp{ErrorCode: constant.ErrParam.ErrCode, ErrorMsg: constant.ErrParam.ErrMsg}, nil + log.NewError(req.OperationID, "GetOwnerManagerByGroupId failed ", err.Error(), req.GroupID) + return &pbGroup.KickGroupMemberResp{ErrCode: constant.ErrParam.ErrCode, ErrMsg: constant.ErrParam.ErrMsg}, nil } //op is group owner? var flag = 0 for _, v := range ownerList { - if v.Uid == claims.UID { + if v.UserID == req.OpUserID { flag = 1 + log.NewInfo(req.OperationID, "is group owner ", req.OpUserID, req.GroupID) break } } + if flag != 1 { - // if claims.UID == config.Config.AppManagerUid { - if utils.IsContain(claims.UID, config.Config.Manager.AppManagerUid) { + if utils.IsContain(req.OpUserID, config.Config.Manager.AppManagerUid) { flag = 1 + log.NewInfo(req.OperationID, "is app manager ", req.OpUserID, req.GroupID) } } if flag != 1 { - log.Error(claims.UID, req.OperationID, "no access kick") - return &pbGroup.KickGroupMemberResp{ErrorCode: constant.ErrAccess.ErrCode, ErrorMsg: constant.ErrAccess.ErrMsg}, nil + log.NewError(req.OperationID, "failed, no access kick") + return &pbGroup.KickGroupMemberResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } if len(req.UidListInfo) == 0 { - log.Error(claims.UID, req.OperationID, "kick list 0") - return &pbGroup.KickGroupMemberResp{ErrorCode: constant.ErrParam.ErrCode, ErrorMsg: constant.ErrParam.ErrMsg}, nil + log.NewError(req.OperationID, "failed, kick list 0") + return &pbGroup.KickGroupMemberResp{ErrCode: constant.ErrParam.ErrCode, ErrMsg: constant.ErrParam.ErrMsg}, nil } + //remove var resp pbGroup.KickGroupMemberResp for _, v := range req.UidListInfo { //owner cant kicked - if v.UserId == claims.UID { - log.Error(claims.UID, req.OperationID, v.UserId, "cant kick owner") + if v.UserId == req.OpUserID { + log.NewError(req.OperationID, v.UserId, "failed, can't kick owner ", req.OpUserID) resp.Id2Result = append(resp.Id2Result, &pbGroup.Id2Result{UId: v.UserId, Result: -1}) continue } err := imdb.RemoveGroupMember(req.GroupID, v.UserId) if err != nil { - log.Error(claims.UID, req.OperationID, v.UserId, req.GroupID, "RemoveGroupMember failed ", err.Error()) + log.NewError(req.OperationID, "RemoveGroupMember failed ", err.Error(), req.GroupID, v.UserId) resp.Id2Result = append(resp.Id2Result, &pbGroup.Id2Result{UId: v.UserId, Result: -1}) } else { resp.Id2Result = append(resp.Id2Result, &pbGroup.Id2Result{UId: v.UserId, Result: 0}) @@ -312,53 +409,15 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou err = db.DB.DelGroupMember(req.GroupID, v.UserId) if err != nil { - log.Error("", "", "delete mongo group member failed, db.DB.DelGroupMember fail [err: %s]", err.Error()) + log.NewError(req.OperationID, "DelGroupMember failed ", err.Error(), req.GroupID, v.UserId) } - } - var kq kickGroupMemberApiReq - kq.GroupID = req.GroupID - kq.OperationID = req.OperationID - kq.Reason = req.Reason - - var gf groupMemberFullInfo for _, v := range req.UidListInfo { - gf.UserId = v.UserId - gf.GroupId = req.GroupID - kq.UidListInfo = append(kq.UidListInfo, gf) + chat.MemberKickedNotificationID(req.OperationID, req.GroupID, req.OpUserID, v.UserId, req.Reason) } - n := content_struct.NotificationContent{1, req.GroupID, kq.ContentToString()} - - if utils.IsContain(claims.UID, config.Config.Manager.AppManagerUid) { - log.Info("", req.OperationID, claims.UID, req.GroupID) - logic.SendMsgByWS(&pbChat.WSToMsgSvrChatMsg{ - SendID: claims.UID, - RecvID: req.GroupID, - Content: n.ContentToString(), - SendTime: utils.GetCurrentTimestampByNano(), - MsgFrom: constant.UserMsgType, - ContentType: constant.KickGroupMemberTip, - SessionType: constant.GroupChatType, - OperationID: req.OperationID, - }) - - for _, v := range req.UidListInfo { - log.Info("", req.OperationID, claims.UID, v.UserId) - logic.SendMsgByWS(&pbChat.WSToMsgSvrChatMsg{ - SendID: claims.UID, - RecvID: v.UserId, - Content: n.ContentToString(), - SendTime: utils.GetCurrentTimestampBySecond(), - MsgFrom: constant.UserMsgType, - ContentType: constant.KickGroupMemberTip, - SessionType: constant.SingleChatType, - OperationID: req.OperationID, - }) - } - } - resp.ErrorCode = 0 + resp.ErrCode = 0 return &resp, nil } @@ -366,7 +425,7 @@ func (s *groupServer) GetGroupMembersInfo(ctx context.Context, req *pbGroup.GetG claims, err := token_verify.ParseToken(req.Token) if err != nil { log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) - return &pbGroup.GetGroupMembersInfoResp{ErrorCode: constant.ErrParseToken.ErrCode, ErrorMsg: constant.ErrParseToken.ErrMsg}, nil + return &pbGroup.GetGroupMembersInfoResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil } log.InfoByKv(claims.UID, req.OperationID, "param: ", req.MemberList) var resp pbGroup.GetGroupMembersInfoResp @@ -392,6 +451,234 @@ func (s *groupServer) GetGroupMembersInfo(ctx context.Context, req *pbGroup.GetG } resp.MemberList = append(resp.MemberList, &memberNode) } - resp.ErrorCode = 0 + resp.ErrCode = 0 return &resp, nil } + +func (s *groupServer) GetGroupApplicationList(_ context.Context, pb *pbGroup.GetGroupApplicationListReq) (*pbGroup.GetGroupApplicationListResp, error) { + log.Info("", "", "rpc GetGroupApplicationList call start..., [pb: %s]", pb.String()) + + reply, err := im_mysql_model.GetGroupApplicationList(pb.OpUserID) + if err != nil { + return &pbGroup.GetGroupApplicationListResp{ErrCode: 701, ErrMsg: "GetGroupApplicationList failed"}, nil + } + log.Info("", "", "rpc GetGroupApplicationList call..., im_mysql_model.GetGroupApplicationList") + + return reply, nil +} + +func (s *groupServer) GetGroupsInfo(ctx context.Context, req *pbGroup.GetGroupsInfoReq) (*pbGroup.GetGroupsInfoResp, error) { + log.Info(req.Token, req.OperationID, "rpc get group info is server,args=%s", req.String()) + //Parse token, to find current user information + claims, err := token_verify.ParseToken(req.Token) + if err != nil { + log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) + return &pbGroup.GetGroupsInfoResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil + } + log.Info("", req.OperationID, "args:", req.GroupIDList, claims.UID) + groupsInfoList := make([]*pbGroup.GroupInfo, 0) + for _, groupID := range req.GroupIDList { + groupInfoFromMysql, err := im_mysql_model.FindGroupInfoByGroupId(groupID) + if err != nil { + log.Error(req.Token, req.OperationID, "find group info failed,err=%s", err.Error()) + continue + } + var groupInfo pbGroup.GroupInfo + groupInfo.GroupId = groupID + groupInfo.GroupName = groupInfoFromMysql.GroupName + groupInfo.Introduction = groupInfoFromMysql.Introduction + groupInfo.Notification = groupInfoFromMysql.Notification + groupInfo.FaceUrl = groupInfoFromMysql.FaceUrl + groupInfo.OwnerId = im_mysql_model.GetGroupOwnerByGroupId(groupID) + groupInfo.MemberCount = uint32(im_mysql_model.GetGroupMemberNumByGroupId(groupID)) + groupInfo.CreateTime = uint64(groupInfoFromMysql.CreateTime.Unix()) + + groupsInfoList = append(groupsInfoList, &groupInfo) + } + log.Info(req.Token, req.OperationID, "rpc get groupsInfo success return") + return &pbGroup.GetGroupsInfoResp{Data: groupsInfoList}, nil +} + +func (s *groupServer) GroupApplicationResponse(_ context.Context, pb *pbGroup.GroupApplicationResponseReq) (*pbGroup.GroupApplicationResponseResp, error) { + log.NewInfo(pb.OperationID, "GroupApplicationResponse args: ", pb.String()) + reply, err := imdb.GroupApplicationResponse(pb) + if err != nil { + log.NewError(pb.OperationID, "GroupApplicationResponse failed ", err.Error(), pb.String()) + return &pbGroup.GroupApplicationResponseResp{ErrCode: 702, ErrMsg: err.Error()}, nil + } + + if pb.HandleResult == 1 { + if pb.ToUserID == "0" { + err = db.DB.AddGroupMember(pb.GroupID, pb.FromUserID) + if err != nil { + log.Error("", "", "rpc GroupApplicationResponse call..., db.DB.AddGroupMember fail [pb: %s] [err: %s]", pb.String(), err.Error()) + return nil, err + } + } else { + err = db.DB.AddGroupMember(pb.GroupID, pb.ToUserID) + if err != nil { + log.Error("", "", "rpc GroupApplicationResponse call..., db.DB.AddGroupMember fail [pb: %s] [err: %s]", pb.String(), err.Error()) + return nil, err + } + } + } + if pb.ToUserID == "0" { + group, err := imdb.FindGroupInfoByGroupId(pb.GroupID) + if err != nil { + log.NewError(pb.OperationID, "FindGroupInfoByGroupId failed ", pb.GroupID) + return reply, nil + } + member, err := imdb.FindGroupMemberInfoByGroupIdAndUserId(pb.GroupID, pb.OpUserID) + if err != nil { + log.NewError(pb.OperationID, "FindGroupMemberInfoByGroupIdAndUserId failed ", pb.GroupID, pb.OpUserID) + return reply, nil + } + chat.ApplicationProcessedNotification(pb.OperationID, pb.FromUserID, *group, *member, pb.HandleResult, pb.HandledMsg) + if pb.HandleResult == 1 { + entrantUser, err := imdb.FindGroupMemberInfoByGroupIdAndUserId(pb.GroupID, pb.FromUserID) + if err != nil { + log.NewError(pb.OperationID, "FindGroupMemberInfoByGroupIdAndUserId failed ", err.Error(), pb.GroupID, pb.FromUserID) + return reply, nil + } + chat.MemberEnterNotification(pb.OperationID, group, entrantUser) + } + } else { + log.NewError(pb.OperationID, "args failed ", pb.String()) + } + + log.NewInfo(pb.OperationID, "rpc GroupApplicationResponse ok ", reply) + return reply, nil +} + +func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq) (*pbGroup.CommonResp, error) { + log.NewInfo(req.Token, req.OperationID, "JoinGroup args ", req.String()) + //Parse token, to find current user information + claims, err := token_verify.ParseToken(req.Token) + if err != nil { + log.NewError(req.OperationID, "ParseToken failed", err.Error(), req.String()) + return &pbGroup.CommonResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil + } + applicationUserInfo, err := im_mysql_model.FindUserByUID(claims.UID) + if err != nil { + log.NewError(req.OperationID, "FindUserByUID failed", err.Error(), claims.UID) + return &pbGroup.CommonResp{ErrCode: constant.ErrSearchUserInfo.ErrCode, ErrMsg: constant.ErrSearchUserInfo.ErrMsg}, nil + } + + _, err = im_mysql_model.FindGroupRequestUserInfoByGroupIDAndUid(req.GroupID, claims.UID) + if err == nil { + err = im_mysql_model.DelGroupRequest(req.GroupID, claims.UID, "0") + } + + if err = im_mysql_model.InsertIntoGroupRequest(req.GroupID, claims.UID, "0", req.Message, applicationUserInfo.Nickname, applicationUserInfo.FaceUrl); err != nil { + log.Error(req.Token, req.OperationID, "Insert into group request failed,er=%s", err.Error()) + return &pbGroup.CommonResp{ErrCode: constant.ErrJoinGroupApplication.ErrCode, ErrMsg: constant.ErrJoinGroupApplication.ErrMsg}, nil + } + + memberList, err := im_mysql_model.FindGroupMemberListByGroupIdAndFilterInfo(req.GroupID, constant.GroupOwner) + if len(memberList) == 0 { + log.NewError(req.OperationID, "FindGroupMemberListByGroupIdAndFilterInfo failed ", req.GroupID, constant.GroupOwner, err) + return &pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""}, nil + } + group, err := im_mysql_model.FindGroupInfoByGroupId(req.GroupID) + if err != nil { + log.NewError(req.OperationID, "FindGroupInfoByGroupId failed ", req.GroupID) + return &pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""}, nil + } + chat.ReceiveJoinApplicationNotification(req.OperationID, memberList[0].UserID, applicationUserInfo, group) + + log.NewInfo(req.OperationID, "ReceiveJoinApplicationNotification rpc JoinGroup success return") + return &pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""}, nil +} + +func (s *groupServer) QuitGroup(ctx context.Context, req *pbGroup.QuitGroupReq) (*pbGroup.CommonResp, error) { + log.NewError("QuitGroup args ", req.String()) + + _, err := im_mysql_model.FindGroupMemberInfoByGroupIdAndUserId(req.GroupID, req.OpUserID) + if err != nil { + log.NewError(req.OperationID, "FindGroupMemberInfoByGroupIdAndUserId failed", err.Error(), req.GroupID, req.OpUserID) + return &pbGroup.CommonResp{ErrCode: constant.ErrQuitGroup.ErrCode, ErrMsg: constant.ErrQuitGroup.ErrMsg}, nil + } + + err = im_mysql_model.DeleteGroupMemberByGroupIdAndUserId(req.GroupID, req.OpUserID) + if err != nil { + log.NewError(req.OperationID, "DeleteGroupMemberByGroupIdAndUserId failed ", err.Error(), req.GroupID, req.OpUserID) + return &pbGroup.CommonResp{ErrCode: constant.ErrQuitGroup.ErrCode, ErrMsg: constant.ErrQuitGroup.ErrMsg}, nil + } + + err = db.DB.DelGroupMember(req.GroupID, req.OpUserID) + if err != nil { + log.NewError(req.OperationID, "DelGroupMember failed ", req.GroupID, req.OpUserID) + // return &pbGroup.CommonResp{ErrorCode: constant.ErrQuitGroup.ErrCode, ErrorMsg: constant.ErrQuitGroup.ErrMsg}, nil + } + + chat.MemberLeaveNotification(req.OperationID, req.GroupID, req.OpUserID) + log.NewInfo(req.OperationID, "rpc quit group is success return") + return &pbGroup.CommonResp{}, nil +} + +func hasAccess(req *pbGroup.SetGroupInfoReq) bool { + if utils.IsContain(req.OpUserID, config.Config.Manager.AppManagerUid) { + return true + } + groupUserInfo, err := im_mysql_model.FindGroupMemberInfoByGroupIdAndUserId(req.GroupID, req.OpUserID) + if err != nil { + log.NewError(req.OperationID, "FindGroupMemberInfoByGroupIdAndUserId failed, ", err.Error(), req.GroupID, req.OpUserID) + return false + + } + if groupUserInfo.AdministratorLevel == constant.OrdinaryMember { + return true + } +} + +func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInfoReq) (*pbGroup.CommonResp, error) { + log.NewInfo(req.OperationID, "SetGroupInfo args ", req.String()) + if !hasAccess(req) { + log.NewError(req.OperationID, "no access ") + return &pbGroup.CommonResp{ErrCode: constant.ErrSetGroupInfo.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil + } + + group, err := im_mysql_model.FindGroupInfoByGroupId(req.GroupID) + if err != nil { + log.NewError(req.OperationID, "FindGroupInfoByGroupId failed, ", err.Error(), req.GroupID) + return &pbGroup.CommonResp{ErrCode: constant.ErrSetGroupInfo.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil + } + + ////bitwise operators: 1:groupName; 10:Notification 100:Introduction; 1000:FaceUrl + var changedType int32 + if group.GroupName != req.GroupName && req.GroupName != "" { + changedType = 1 + } + if group.Notification != req.Notification && req.Notification != "" { + changedType = changedType | (1 << 1) + } + if group.Introduction != req.Introduction && req.Introduction != "" { + changedType = changedType | (1 << 2) + } + if group.FaceUrl != req.FaceUrl && req.FaceUrl != "" { + changedType = changedType | (1 << 3) + } + //only administrators can set group information + if err = im_mysql_model.SetGroupInfo(req.GroupID, req.GroupName, req.Introduction, req.Notification, req.FaceUrl, ""); err != nil { + return &pbGroup.CommonResp{ErrCode: constant.ErrSetGroupInfo.ErrCode, ErrMsg: constant.ErrSetGroupInfo.ErrMsg}, nil + } + + if changedType != 0 { + chat.GroupInfoChangedNotification(req.OperationID, changedType, req.GroupID, req.OpUserID) + } + + return &pbGroup.CommonResp{}, nil +} + +func (s *groupServer) TransferGroupOwner(_ context.Context, pb *pbGroup.TransferGroupOwnerReq) (*pbGroup.TransferGroupOwnerResp, error) { + log.Info("", "", "rpc TransferGroupOwner call start..., [pb: %s]", pb.String()) + + reply, err := im_mysql_model.TransferGroupOwner(pb) + if err != nil { + log.Error("", "", "rpc TransferGroupOwner call..., im_mysql_model.TransferGroupOwner fail [pb: %s] [err: %s]", pb.String(), err.Error()) + return nil, err + } + log.Info("", "", "rpc TransferGroupOwner call..., im_mysql_model.TransferGroupOwner") + + return reply, nil +} diff --git a/internal/rpc/group/group_application_response.go b/internal/rpc/group/group_application_response.go deleted file mode 100644 index e51339575..000000000 --- a/internal/rpc/group/group_application_response.go +++ /dev/null @@ -1,56 +0,0 @@ -package group - -import ( - "Open_IM/internal/rpc/chat" - "Open_IM/pkg/common/db" - immsql "Open_IM/pkg/common/db/mysql_model/im_mysql_model" - "Open_IM/pkg/common/log" - "Open_IM/pkg/proto/group" - "context" -) - -func (s *groupServer) GroupApplicationResponse(_ context.Context, pb *group.GroupApplicationResponseReq) (*group.GroupApplicationResponseResp, error) { - log.NewInfo(pb.OperationID, "GroupApplicationResponse args: ", pb.String()) - reply, err := immsql.GroupApplicationResponse(pb) - if err != nil { - log.NewError(pb.OperationID, "GroupApplicationResponse failed ", err.Error(), pb) - return &group.GroupApplicationResponseResp{ErrCode: 702, ErrMsg: err.Error()}, nil - } - - if pb.HandleResult == 1 { - if pb.ToUserID == "0" { - err = db.DB.AddGroupMember(pb.GroupID, pb.FromUserID) - if err != nil { - log.Error("", "", "rpc GroupApplicationResponse call..., db.DB.AddGroupMember fail [pb: %s] [err: %s]", pb.String(), err.Error()) - return nil, err - } - } else { - err = db.DB.AddGroupMember(pb.GroupID, pb.ToUserID) - if err != nil { - log.Error("", "", "rpc GroupApplicationResponse call..., db.DB.AddGroupMember fail [pb: %s] [err: %s]", pb.String(), err.Error()) - return nil, err - } - } - } - if pb.ToUserID == "0" { - group, err := immsql.FindGroupInfoByGroupId(pb.GroupID) - if err != nil { - - } - member, err := immsql.FindGroupMemberInfoByGroupIdAndUserId(pb.GroupID, pb.OwnerID) - if err != nil { - - } - chat.ApplicationProcessedNotification(pb.OperationID, pb.FromUserID, *group, *member, pb.HandleResult, pb.HandledMsg) - } else { - - } - - if pb.HandleResult == 1 { - - } - - log.NewInfo(pb.OperationID, "rpc GroupApplicationResponse ok ", reply) - - return reply, nil -} diff --git a/internal/rpc/group/join_group.go b/internal/rpc/group/join_group.go deleted file mode 100644 index 5a26181dd..000000000 --- a/internal/rpc/group/join_group.go +++ /dev/null @@ -1,51 +0,0 @@ -package group - -import ( - "Open_IM/internal/rpc/chat" - "Open_IM/pkg/common/constant" - "Open_IM/pkg/common/db/mysql_model/im_mysql_model" - "Open_IM/pkg/common/log" - "Open_IM/pkg/common/token_verify" - pbGroup "Open_IM/pkg/proto/group" - "context" -) - -func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq) (*pbGroup.CommonResp, error) { - log.NewInfo(req.Token, req.OperationID, "JoinGroup args ", req.String()) - //Parse token, to find current user information - claims, err := token_verify.ParseToken(req.Token) - if err != nil { - log.NewError(req.OperationID, "ParseToken failed", err.Error(), req.String()) - return &pbGroup.CommonResp{ErrorCode: constant.ErrParseToken.ErrCode, ErrorMsg: constant.ErrParseToken.ErrMsg}, nil - } - applicationUserInfo, err := im_mysql_model.FindUserByUID(claims.UID) - if err != nil { - log.NewError(req.OperationID, "FindUserByUID failed", err.Error(), claims.UID) - return &pbGroup.CommonResp{ErrorCode: constant.ErrSearchUserInfo.ErrCode, ErrorMsg: constant.ErrSearchUserInfo.ErrMsg}, nil - } - - _, err = im_mysql_model.FindGroupRequestUserInfoByGroupIDAndUid(req.GroupID, claims.UID) - if err == nil { - err = im_mysql_model.DelGroupRequest(req.GroupID, claims.UID, "0") - } - - if err = im_mysql_model.InsertIntoGroupRequest(req.GroupID, claims.UID, "0", req.Message, applicationUserInfo.Nickname, applicationUserInfo.FaceUrl); err != nil { - log.Error(req.Token, req.OperationID, "Insert into group request failed,er=%s", err.Error()) - return &pbGroup.CommonResp{ErrorCode: constant.ErrJoinGroupApplication.ErrCode, ErrorMsg: constant.ErrJoinGroupApplication.ErrMsg}, nil - } - - memberList, err := im_mysql_model.FindGroupMemberListByGroupIdAndFilterInfo(req.GroupID, constant.GroupOwner) - if len(memberList) == 0 { - log.NewError(req.OperationID, "FindGroupMemberListByGroupIdAndFilterInfo failed ", req.GroupID, constant.GroupOwner, err) - return &pbGroup.CommonResp{ErrorCode: 0, ErrorMsg: ""}, nil - } - group, err := im_mysql_model.FindGroupInfoByGroupId(req.GroupID) - if err != nil { - log.NewError(req.OperationID, "FindGroupInfoByGroupId failed ", req.GroupID) - return &pbGroup.CommonResp{ErrorCode: 0, ErrorMsg: ""}, nil - } - chat.ReceiveJoinApplicationNotification(req.OperationID, memberList[0].UserID, applicationUserInfo, group) - - log.NewInfo(req.OperationID, "ReceiveJoinApplicationNotification rpc JoinGroup success return") - return &pbGroup.CommonResp{ErrorCode: 0, ErrorMsg: ""}, nil -} diff --git a/internal/rpc/group/quit_group.go b/internal/rpc/group/quit_group.go deleted file mode 100644 index e77a34009..000000000 --- a/internal/rpc/group/quit_group.go +++ /dev/null @@ -1,55 +0,0 @@ -package group - -import ( - "Open_IM/pkg/common/constant" - "Open_IM/pkg/common/db" - "Open_IM/pkg/common/db/mysql_model/im_mysql_model" - "Open_IM/pkg/common/log" - "Open_IM/pkg/common/token_verify" - pbGroup "Open_IM/pkg/proto/group" - "context" -) - -func (s *groupServer) QuitGroup(ctx context.Context, req *pbGroup.QuitGroupReq) (*pbGroup.CommonResp, error) { - log.InfoByArgs("rpc quit group is server,args:", req.String()) - //Parse token, to find current user information - claims, err := token_verify.ParseToken(req.Token) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) - return &pbGroup.CommonResp{ErrorCode: constant.ErrParseToken.ErrCode, ErrorMsg: constant.ErrParseToken.ErrMsg}, nil - } - log.InfoByKv("args:", req.OperationID, req.GetGroupID(), claims.UID) - //Check to see whether there is a user in the group. - _, err = im_mysql_model.FindGroupMemberInfoByGroupIdAndUserId(req.GroupID, claims.UID) - if err != nil { - log.Error(req.Token, req.OperationID, "no such group or you are not in the group,err=%s", err.Error(), req.OperationID, req.GroupID, claims.UID) - return &pbGroup.CommonResp{ErrorCode: constant.ErrQuitGroup.ErrCode, ErrorMsg: constant.ErrQuitGroup.ErrMsg}, nil - } - //After the user's verification is successful, user will quit the group chat. - err = im_mysql_model.DeleteGroupMemberByGroupIdAndUserId(req.GroupID, claims.UID) - if err != nil { - log.ErrorByArgs("this user exit the group failed,err=%s", err.Error(), req.OperationID, req.GroupID, claims.UID) - return &pbGroup.CommonResp{ErrorCode: constant.ErrQuitGroup.ErrCode, ErrorMsg: constant.ErrQuitGroup.ErrMsg}, nil - } - - err = db.DB.DelGroupMember(req.GroupID, claims.UID) - if err != nil { - log.Error("", "", "delete mongo group member failed, db.DB.DelGroupMember fail [err: %s]", err.Error()) - return &pbGroup.CommonResp{ErrorCode: constant.ErrQuitGroup.ErrCode, ErrorMsg: constant.ErrQuitGroup.ErrMsg}, nil - } - ////Push message when quit group chat - //jsonInfo, _ := json.Marshal(req) - //logic.SendMsgByWS(&pbChat.WSToMsgSvrChatMsg{ - // SendID: claims.UID, - // RecvID: req.GroupID, - // Content: string(jsonInfo), - // SendTime: utils.GetCurrentTimestampBySecond(), - // MsgFrom: constant.SysMsgType, - // ContentType: constant.QuitGroupTip, - // SessionType: constant.GroupChatType, - // OperationID: req.OperationID, - //}) - log.Info(req.Token, req.OperationID, "rpc quit group is success return") - - return &pbGroup.CommonResp{}, nil -} diff --git a/internal/rpc/group/set_group_info.go b/internal/rpc/group/set_group_info.go deleted file mode 100644 index 55532a04e..000000000 --- a/internal/rpc/group/set_group_info.go +++ /dev/null @@ -1,60 +0,0 @@ -package group - -import ( - "Open_IM/internal/rpc/chat" - "Open_IM/pkg/common/constant" - "Open_IM/pkg/common/db/mysql_model/im_mysql_model" - "Open_IM/pkg/common/log" - "Open_IM/pkg/common/token_verify" - pbGroup "Open_IM/pkg/proto/group" - "context" -) - -func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInfoReq) (*pbGroup.CommonResp, error) { - log.Info(req.Token, req.OperationID, "rpc set group info is server,args=%s", req.String()) - - //Parse token, to find current user information - claims, err := token_verify.ParseToken(req.Token) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) - return &pbGroup.CommonResp{ErrorCode: constant.ErrParseToken.ErrCode, ErrorMsg: constant.ErrParseToken.ErrMsg}, nil - } - - groupUserInfo, err := im_mysql_model.FindGroupMemberInfoByGroupIdAndUserId(req.GroupID, claims.UID) - if err != nil { - log.Error("", req.OperationID, "your are not in the group,can not change this group info,err=%s", err.Error()) - return &pbGroup.CommonResp{ErrorCode: constant.ErrSetGroupInfo.ErrCode, ErrorMsg: constant.ErrSetGroupInfo.ErrMsg}, nil - } - if groupUserInfo.AdministratorLevel == constant.OrdinaryMember { - return &pbGroup.CommonResp{ErrorCode: constant.ErrSetGroupInfo.ErrCode, ErrorMsg: constant.ErrAccess.ErrMsg}, nil - } - group, err := im_mysql_model.FindGroupInfoByGroupId(req.GroupID) - if err != nil { - log.NewError(req.OperationID, "FindGroupInfoByGroupId failed, ", err.Error(), req.GroupID) - return &pbGroup.CommonResp{ErrorCode: constant.ErrSetGroupInfo.ErrCode, ErrorMsg: constant.ErrAccess.ErrMsg}, nil - } - ////bitwise operators: 1:groupName; 10:Notification 100:Introduction; 1000:FaceUrl - var changedType int32 - if group.GroupName != req.GroupName && req.GroupName != "" { - changedType = 1 - } - if group.Notification != req.Notification && req.Notification != "" { - changedType = changedType | (1 << 1) - } - if group.Introduction != req.Introduction && req.Introduction != "" { - changedType = changedType | (1 << 2) - } - if group.FaceUrl != req.FaceUrl && req.FaceUrl != "" { - changedType = changedType | (1 << 3) - } - //only administrators can set group information - if err = im_mysql_model.SetGroupInfo(req.GroupID, req.GroupName, req.Introduction, req.Notification, req.FaceUrl, ""); err != nil { - return &pbGroup.CommonResp{ErrorCode: constant.ErrSetGroupInfo.ErrCode, ErrorMsg: constant.ErrSetGroupInfo.ErrMsg}, nil - } - - if changedType != 0 { - chat.GroupInfoChangedNotification(req.OperationID, claims.UID, changedType, group, groupUserInfo) - } - - return &pbGroup.CommonResp{}, nil -} diff --git a/internal/rpc/group/transfer_group_owner.go b/internal/rpc/group/transfer_group_owner.go deleted file mode 100644 index 4595fa1f1..000000000 --- a/internal/rpc/group/transfer_group_owner.go +++ /dev/null @@ -1,21 +0,0 @@ -package group - -import ( - "Open_IM/pkg/common/db/mysql_model/im_mysql_model" - "Open_IM/pkg/common/log" - "Open_IM/pkg/proto/group" - "context" -) - -func (s *groupServer) TransferGroupOwner(_ context.Context, pb *group.TransferGroupOwnerReq) (*group.TransferGroupOwnerResp, error) { - log.Info("", "", "rpc TransferGroupOwner call start..., [pb: %s]", pb.String()) - - reply, err := im_mysql_model.TransferGroupOwner(pb) - if err != nil { - log.Error("", "", "rpc TransferGroupOwner call..., im_mysql_model.TransferGroupOwner fail [pb: %s] [err: %s]", pb.String(), err.Error()) - return nil, err - } - log.Info("", "", "rpc TransferGroupOwner call..., im_mysql_model.TransferGroupOwner") - - return reply, nil -} diff --git a/pkg/proto/group/group.pb.go b/pkg/proto/group/group.pb.go index fae312019..bc8371177 100644 --- a/pkg/proto/group/group.pb.go +++ b/pkg/proto/group/group.pb.go @@ -24,8 +24,8 @@ var _ = math.Inf const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type CommonResp struct { - ErrorCode int32 `protobuf:"varint,1,opt,name=ErrorCode" json:"ErrorCode,omitempty"` - ErrorMsg string `protobuf:"bytes,2,opt,name=ErrorMsg" json:"ErrorMsg,omitempty"` + ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -35,7 +35,7 @@ func (m *CommonResp) Reset() { *m = CommonResp{} } func (m *CommonResp) String() string { return proto.CompactTextString(m) } func (*CommonResp) ProtoMessage() {} func (*CommonResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ed07d0078ff66bfe, []int{0} + return fileDescriptor_group_ac6850665f72c22b, []int{0} } func (m *CommonResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CommonResp.Unmarshal(m, b) @@ -55,16 +55,16 @@ func (m *CommonResp) XXX_DiscardUnknown() { var xxx_messageInfo_CommonResp proto.InternalMessageInfo -func (m *CommonResp) GetErrorCode() int32 { +func (m *CommonResp) GetErrCode() int32 { if m != nil { - return m.ErrorCode + return m.ErrCode } return 0 } -func (m *CommonResp) GetErrorMsg() string { +func (m *CommonResp) GetErrMsg() string { if m != nil { - return m.ErrorMsg + return m.ErrMsg } return "" } @@ -77,7 +77,8 @@ type CreateGroupReq struct { FaceUrl string `protobuf:"bytes,5,opt,name=faceUrl" json:"faceUrl,omitempty"` Token string `protobuf:"bytes,6,opt,name=token" json:"token,omitempty"` OperationID string `protobuf:"bytes,7,opt,name=operationID" json:"operationID,omitempty"` - Ex string `protobuf:"bytes,8,opt,name=ex" json:"ex,omitempty"` + OpUserID string `protobuf:"bytes,8,opt,name=OpUserID" json:"OpUserID,omitempty"` + Ext string `protobuf:"bytes,9,opt,name=Ext" json:"Ext,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -87,7 +88,7 @@ func (m *CreateGroupReq) Reset() { *m = CreateGroupReq{} } func (m *CreateGroupReq) String() string { return proto.CompactTextString(m) } func (*CreateGroupReq) ProtoMessage() {} func (*CreateGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ed07d0078ff66bfe, []int{1} + return fileDescriptor_group_ac6850665f72c22b, []int{1} } func (m *CreateGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreateGroupReq.Unmarshal(m, b) @@ -156,9 +157,16 @@ func (m *CreateGroupReq) GetOperationID() string { return "" } -func (m *CreateGroupReq) GetEx() string { +func (m *CreateGroupReq) GetOpUserID() string { if m != nil { - return m.Ex + return m.OpUserID + } + return "" +} + +func (m *CreateGroupReq) GetExt() string { + if m != nil { + return m.Ext } return "" } @@ -175,7 +183,7 @@ func (m *GroupAddMemberInfo) Reset() { *m = GroupAddMemberInfo{} } func (m *GroupAddMemberInfo) String() string { return proto.CompactTextString(m) } func (*GroupAddMemberInfo) ProtoMessage() {} func (*GroupAddMemberInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ed07d0078ff66bfe, []int{2} + return fileDescriptor_group_ac6850665f72c22b, []int{2} } func (m *GroupAddMemberInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupAddMemberInfo.Unmarshal(m, b) @@ -210,8 +218,8 @@ func (m *GroupAddMemberInfo) GetSetRole() int32 { } type CreateGroupResp struct { - ErrorCode int32 `protobuf:"varint,1,opt,name=ErrorCode" json:"ErrorCode,omitempty"` - ErrorMsg string `protobuf:"bytes,2,opt,name=ErrorMsg" json:"ErrorMsg,omitempty"` + ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` GroupID string `protobuf:"bytes,3,opt,name=groupID" json:"groupID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -222,7 +230,7 @@ func (m *CreateGroupResp) Reset() { *m = CreateGroupResp{} } func (m *CreateGroupResp) String() string { return proto.CompactTextString(m) } func (*CreateGroupResp) ProtoMessage() {} func (*CreateGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ed07d0078ff66bfe, []int{3} + return fileDescriptor_group_ac6850665f72c22b, []int{3} } func (m *CreateGroupResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreateGroupResp.Unmarshal(m, b) @@ -242,16 +250,16 @@ func (m *CreateGroupResp) XXX_DiscardUnknown() { var xxx_messageInfo_CreateGroupResp proto.InternalMessageInfo -func (m *CreateGroupResp) GetErrorCode() int32 { +func (m *CreateGroupResp) GetErrCode() int32 { if m != nil { - return m.ErrorCode + return m.ErrCode } return 0 } -func (m *CreateGroupResp) GetErrorMsg() string { +func (m *CreateGroupResp) GetErrMsg() string { if m != nil { - return m.ErrorMsg + return m.ErrMsg } return "" } @@ -267,6 +275,7 @@ type GetGroupsInfoReq struct { GroupIDList []string `protobuf:"bytes,1,rep,name=groupIDList" json:"groupIDList,omitempty"` Token string `protobuf:"bytes,2,opt,name=token" json:"token,omitempty"` OperationID string `protobuf:"bytes,3,opt,name=operationID" json:"operationID,omitempty"` + OpUserID string `protobuf:"bytes,4,opt,name=OpUserID" json:"OpUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -276,7 +285,7 @@ func (m *GetGroupsInfoReq) Reset() { *m = GetGroupsInfoReq{} } func (m *GetGroupsInfoReq) String() string { return proto.CompactTextString(m) } func (*GetGroupsInfoReq) ProtoMessage() {} func (*GetGroupsInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ed07d0078ff66bfe, []int{4} + return fileDescriptor_group_ac6850665f72c22b, []int{4} } func (m *GetGroupsInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupsInfoReq.Unmarshal(m, b) @@ -317,9 +326,16 @@ func (m *GetGroupsInfoReq) GetOperationID() string { return "" } +func (m *GetGroupsInfoReq) GetOpUserID() string { + if m != nil { + return m.OpUserID + } + return "" +} + type GetGroupsInfoResp struct { - ErrorCode int32 `protobuf:"varint,1,opt,name=ErrorCode" json:"ErrorCode,omitempty"` - ErrorMsg string `protobuf:"bytes,2,opt,name=ErrorMsg" json:"ErrorMsg,omitempty"` + ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` Data []*GroupInfo `protobuf:"bytes,3,rep,name=data" json:"data,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -330,7 +346,7 @@ func (m *GetGroupsInfoResp) Reset() { *m = GetGroupsInfoResp{} } func (m *GetGroupsInfoResp) String() string { return proto.CompactTextString(m) } func (*GetGroupsInfoResp) ProtoMessage() {} func (*GetGroupsInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ed07d0078ff66bfe, []int{5} + return fileDescriptor_group_ac6850665f72c22b, []int{5} } func (m *GetGroupsInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupsInfoResp.Unmarshal(m, b) @@ -350,16 +366,16 @@ func (m *GetGroupsInfoResp) XXX_DiscardUnknown() { var xxx_messageInfo_GetGroupsInfoResp proto.InternalMessageInfo -func (m *GetGroupsInfoResp) GetErrorCode() int32 { +func (m *GetGroupsInfoResp) GetErrCode() int32 { if m != nil { - return m.ErrorCode + return m.ErrCode } return 0 } -func (m *GetGroupsInfoResp) GetErrorMsg() string { +func (m *GetGroupsInfoResp) GetErrMsg() string { if m != nil { - return m.ErrorMsg + return m.ErrMsg } return "" } @@ -379,6 +395,7 @@ type SetGroupInfoReq struct { FaceUrl string `protobuf:"bytes,5,opt,name=faceUrl" json:"faceUrl,omitempty"` Token string `protobuf:"bytes,6,opt,name=token" json:"token,omitempty"` OperationID string `protobuf:"bytes,7,opt,name=operationID" json:"operationID,omitempty"` + OpUserID string `protobuf:"bytes,8,opt,name=OpUserID" json:"OpUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -388,7 +405,7 @@ func (m *SetGroupInfoReq) Reset() { *m = SetGroupInfoReq{} } func (m *SetGroupInfoReq) String() string { return proto.CompactTextString(m) } func (*SetGroupInfoReq) ProtoMessage() {} func (*SetGroupInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ed07d0078ff66bfe, []int{6} + return fileDescriptor_group_ac6850665f72c22b, []int{6} } func (m *SetGroupInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetGroupInfoReq.Unmarshal(m, b) @@ -457,8 +474,15 @@ func (m *SetGroupInfoReq) GetOperationID() string { return "" } +func (m *SetGroupInfoReq) GetOpUserID() string { + if m != nil { + return m.OpUserID + } + return "" +} + type GetGroupApplicationListReq struct { - UID string `protobuf:"bytes,1,opt,name=UID" json:"UID,omitempty"` + OpUserID string `protobuf:"bytes,1,opt,name=OpUserID" json:"OpUserID,omitempty"` OperationID string `protobuf:"bytes,2,opt,name=OperationID" json:"OperationID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -469,7 +493,7 @@ func (m *GetGroupApplicationListReq) Reset() { *m = GetGroupApplicationL func (m *GetGroupApplicationListReq) String() string { return proto.CompactTextString(m) } func (*GetGroupApplicationListReq) ProtoMessage() {} func (*GetGroupApplicationListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ed07d0078ff66bfe, []int{7} + return fileDescriptor_group_ac6850665f72c22b, []int{7} } func (m *GetGroupApplicationListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupApplicationListReq.Unmarshal(m, b) @@ -489,9 +513,9 @@ func (m *GetGroupApplicationListReq) XXX_DiscardUnknown() { var xxx_messageInfo_GetGroupApplicationListReq proto.InternalMessageInfo -func (m *GetGroupApplicationListReq) GetUID() string { +func (m *GetGroupApplicationListReq) GetOpUserID() string { if m != nil { - return m.UID + return m.OpUserID } return "" } @@ -529,7 +553,7 @@ func (m *GetGroupApplicationList_Data_User) Reset() { *m = GetGroupAppli func (m *GetGroupApplicationList_Data_User) String() string { return proto.CompactTextString(m) } func (*GetGroupApplicationList_Data_User) ProtoMessage() {} func (*GetGroupApplicationList_Data_User) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ed07d0078ff66bfe, []int{8} + return fileDescriptor_group_ac6850665f72c22b, []int{8} } func (m *GetGroupApplicationList_Data_User) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupApplicationList_Data_User.Unmarshal(m, b) @@ -673,7 +697,7 @@ func (m *GetGroupApplicationListData) Reset() { *m = GetGroupApplication func (m *GetGroupApplicationListData) String() string { return proto.CompactTextString(m) } func (*GetGroupApplicationListData) ProtoMessage() {} func (*GetGroupApplicationListData) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ed07d0078ff66bfe, []int{9} + return fileDescriptor_group_ac6850665f72c22b, []int{9} } func (m *GetGroupApplicationListData) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupApplicationListData.Unmarshal(m, b) @@ -720,7 +744,7 @@ func (m *GetGroupApplicationListResp) Reset() { *m = GetGroupApplication func (m *GetGroupApplicationListResp) String() string { return proto.CompactTextString(m) } func (*GetGroupApplicationListResp) ProtoMessage() {} func (*GetGroupApplicationListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ed07d0078ff66bfe, []int{10} + return fileDescriptor_group_ac6850665f72c22b, []int{10} } func (m *GetGroupApplicationListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupApplicationListResp.Unmarshal(m, b) @@ -766,6 +790,7 @@ type TransferGroupOwnerReq struct { OldOwner string `protobuf:"bytes,2,opt,name=OldOwner" json:"OldOwner,omitempty"` NewOwner string `protobuf:"bytes,3,opt,name=NewOwner" json:"NewOwner,omitempty"` OperationID string `protobuf:"bytes,4,opt,name=OperationID" json:"OperationID,omitempty"` + OpUserID string `protobuf:"bytes,5,opt,name=OpUserID" json:"OpUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -775,7 +800,7 @@ func (m *TransferGroupOwnerReq) Reset() { *m = TransferGroupOwnerReq{} } func (m *TransferGroupOwnerReq) String() string { return proto.CompactTextString(m) } func (*TransferGroupOwnerReq) ProtoMessage() {} func (*TransferGroupOwnerReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ed07d0078ff66bfe, []int{11} + return fileDescriptor_group_ac6850665f72c22b, []int{11} } func (m *TransferGroupOwnerReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TransferGroupOwnerReq.Unmarshal(m, b) @@ -823,6 +848,13 @@ func (m *TransferGroupOwnerReq) GetOperationID() string { return "" } +func (m *TransferGroupOwnerReq) GetOpUserID() string { + if m != nil { + return m.OpUserID + } + return "" +} + type TransferGroupOwnerResp struct { ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` @@ -835,7 +867,7 @@ func (m *TransferGroupOwnerResp) Reset() { *m = TransferGroupOwnerResp{} func (m *TransferGroupOwnerResp) String() string { return proto.CompactTextString(m) } func (*TransferGroupOwnerResp) ProtoMessage() {} func (*TransferGroupOwnerResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ed07d0078ff66bfe, []int{12} + return fileDescriptor_group_ac6850665f72c22b, []int{12} } func (m *TransferGroupOwnerResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TransferGroupOwnerResp.Unmarshal(m, b) @@ -874,6 +906,7 @@ type JoinGroupReq struct { Message string `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"` Token string `protobuf:"bytes,3,opt,name=token" json:"token,omitempty"` OperationID string `protobuf:"bytes,4,opt,name=OperationID" json:"OperationID,omitempty"` + OpUserID string `protobuf:"bytes,5,opt,name=OpUserID" json:"OpUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -883,7 +916,7 @@ func (m *JoinGroupReq) Reset() { *m = JoinGroupReq{} } func (m *JoinGroupReq) String() string { return proto.CompactTextString(m) } func (*JoinGroupReq) ProtoMessage() {} func (*JoinGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ed07d0078ff66bfe, []int{13} + return fileDescriptor_group_ac6850665f72c22b, []int{13} } func (m *JoinGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JoinGroupReq.Unmarshal(m, b) @@ -931,9 +964,16 @@ func (m *JoinGroupReq) GetOperationID() string { return "" } +func (m *JoinGroupReq) GetOpUserID() string { + if m != nil { + return m.OpUserID + } + return "" +} + type GroupApplicationResponseReq struct { OperationID string `protobuf:"bytes,1,opt,name=OperationID" json:"OperationID,omitempty"` - OwnerID string `protobuf:"bytes,2,opt,name=OwnerID" json:"OwnerID,omitempty"` + OpUserID string `protobuf:"bytes,2,opt,name=OpUserID" json:"OpUserID,omitempty"` GroupID string `protobuf:"bytes,3,opt,name=GroupID" json:"GroupID,omitempty"` FromUserID string `protobuf:"bytes,4,opt,name=FromUserID" json:"FromUserID,omitempty"` FromUserNickName string `protobuf:"bytes,5,opt,name=FromUserNickName" json:"FromUserNickName,omitempty"` @@ -956,7 +996,7 @@ func (m *GroupApplicationResponseReq) Reset() { *m = GroupApplicationRes func (m *GroupApplicationResponseReq) String() string { return proto.CompactTextString(m) } func (*GroupApplicationResponseReq) ProtoMessage() {} func (*GroupApplicationResponseReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ed07d0078ff66bfe, []int{14} + return fileDescriptor_group_ac6850665f72c22b, []int{14} } func (m *GroupApplicationResponseReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupApplicationResponseReq.Unmarshal(m, b) @@ -983,9 +1023,9 @@ func (m *GroupApplicationResponseReq) GetOperationID() string { return "" } -func (m *GroupApplicationResponseReq) GetOwnerID() string { +func (m *GroupApplicationResponseReq) GetOpUserID() string { if m != nil { - return m.OwnerID + return m.OpUserID } return "" } @@ -1093,7 +1133,7 @@ func (m *GroupApplicationResponseResp) Reset() { *m = GroupApplicationRe func (m *GroupApplicationResponseResp) String() string { return proto.CompactTextString(m) } func (*GroupApplicationResponseResp) ProtoMessage() {} func (*GroupApplicationResponseResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ed07d0078ff66bfe, []int{15} + return fileDescriptor_group_ac6850665f72c22b, []int{15} } func (m *GroupApplicationResponseResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupApplicationResponseResp.Unmarshal(m, b) @@ -1132,6 +1172,7 @@ type SetOwnerGroupNickNameReq struct { NickName string `protobuf:"bytes,2,opt,name=nickName" json:"nickName,omitempty"` OperationID string `protobuf:"bytes,3,opt,name=OperationID" json:"OperationID,omitempty"` Token string `protobuf:"bytes,4,opt,name=token" json:"token,omitempty"` + OpUserID string `protobuf:"bytes,5,opt,name=OpUserID" json:"OpUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1141,7 +1182,7 @@ func (m *SetOwnerGroupNickNameReq) Reset() { *m = SetOwnerGroupNickNameR func (m *SetOwnerGroupNickNameReq) String() string { return proto.CompactTextString(m) } func (*SetOwnerGroupNickNameReq) ProtoMessage() {} func (*SetOwnerGroupNickNameReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ed07d0078ff66bfe, []int{16} + return fileDescriptor_group_ac6850665f72c22b, []int{16} } func (m *SetOwnerGroupNickNameReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetOwnerGroupNickNameReq.Unmarshal(m, b) @@ -1189,10 +1230,18 @@ func (m *SetOwnerGroupNickNameReq) GetToken() string { return "" } +func (m *SetOwnerGroupNickNameReq) GetOpUserID() string { + if m != nil { + return m.OpUserID + } + return "" +} + type QuitGroupReq struct { GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` Token string `protobuf:"bytes,3,opt,name=token" json:"token,omitempty"` + OpUserID string `protobuf:"bytes,4,opt,name=OpUserID" json:"OpUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1202,7 +1251,7 @@ func (m *QuitGroupReq) Reset() { *m = QuitGroupReq{} } func (m *QuitGroupReq) String() string { return proto.CompactTextString(m) } func (*QuitGroupReq) ProtoMessage() {} func (*QuitGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ed07d0078ff66bfe, []int{17} + return fileDescriptor_group_ac6850665f72c22b, []int{17} } func (m *QuitGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_QuitGroupReq.Unmarshal(m, b) @@ -1243,6 +1292,13 @@ func (m *QuitGroupReq) GetToken() string { return "" } +func (m *QuitGroupReq) GetOpUserID() string { + if m != nil { + return m.OpUserID + } + return "" +} + type GroupApplicationUserInfo struct { GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` Uid string `protobuf:"bytes,2,opt,name=uid" json:"uid,omitempty"` @@ -1262,7 +1318,7 @@ func (m *GroupApplicationUserInfo) Reset() { *m = GroupApplicationUserIn func (m *GroupApplicationUserInfo) String() string { return proto.CompactTextString(m) } func (*GroupApplicationUserInfo) ProtoMessage() {} func (*GroupApplicationUserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ed07d0078ff66bfe, []int{18} + return fileDescriptor_group_ac6850665f72c22b, []int{18} } func (m *GroupApplicationUserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupApplicationUserInfo.Unmarshal(m, b) @@ -1360,7 +1416,7 @@ func (m *GroupMemberFullInfo) Reset() { *m = GroupMemberFullInfo{} } func (m *GroupMemberFullInfo) String() string { return proto.CompactTextString(m) } func (*GroupMemberFullInfo) ProtoMessage() {} func (*GroupMemberFullInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ed07d0078ff66bfe, []int{19} + return fileDescriptor_group_ac6850665f72c22b, []int{19} } func (m *GroupMemberFullInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupMemberFullInfo.Unmarshal(m, b) @@ -1421,6 +1477,7 @@ type GetGroupMemberListReq struct { OperationID string `protobuf:"bytes,3,opt,name=operationID" json:"operationID,omitempty"` Filter int32 `protobuf:"varint,4,opt,name=filter" json:"filter,omitempty"` NextSeq int32 `protobuf:"varint,5,opt,name=nextSeq" json:"nextSeq,omitempty"` + OpUserID string `protobuf:"bytes,6,opt,name=OpUserID" json:"OpUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1430,7 +1487,7 @@ func (m *GetGroupMemberListReq) Reset() { *m = GetGroupMemberListReq{} } func (m *GetGroupMemberListReq) String() string { return proto.CompactTextString(m) } func (*GetGroupMemberListReq) ProtoMessage() {} func (*GetGroupMemberListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ed07d0078ff66bfe, []int{20} + return fileDescriptor_group_ac6850665f72c22b, []int{20} } func (m *GetGroupMemberListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMemberListReq.Unmarshal(m, b) @@ -1485,9 +1542,16 @@ func (m *GetGroupMemberListReq) GetNextSeq() int32 { return 0 } +func (m *GetGroupMemberListReq) GetOpUserID() string { + if m != nil { + return m.OpUserID + } + return "" +} + type GetGroupMemberListResp struct { - ErrorCode int32 `protobuf:"varint,1,opt,name=errorCode" json:"errorCode,omitempty"` - ErrorMsg string `protobuf:"bytes,2,opt,name=errorMsg" json:"errorMsg,omitempty"` + ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` MemberList []*GroupMemberFullInfo `protobuf:"bytes,3,rep,name=memberList" json:"memberList,omitempty"` NextSeq int32 `protobuf:"varint,4,opt,name=nextSeq" json:"nextSeq,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -1499,7 +1563,7 @@ func (m *GetGroupMemberListResp) Reset() { *m = GetGroupMemberListResp{} func (m *GetGroupMemberListResp) String() string { return proto.CompactTextString(m) } func (*GetGroupMemberListResp) ProtoMessage() {} func (*GetGroupMemberListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ed07d0078ff66bfe, []int{21} + return fileDescriptor_group_ac6850665f72c22b, []int{21} } func (m *GetGroupMemberListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMemberListResp.Unmarshal(m, b) @@ -1519,16 +1583,16 @@ func (m *GetGroupMemberListResp) XXX_DiscardUnknown() { var xxx_messageInfo_GetGroupMemberListResp proto.InternalMessageInfo -func (m *GetGroupMemberListResp) GetErrorCode() int32 { +func (m *GetGroupMemberListResp) GetErrCode() int32 { if m != nil { - return m.ErrorCode + return m.ErrCode } return 0 } -func (m *GetGroupMemberListResp) GetErrorMsg() string { +func (m *GetGroupMemberListResp) GetErrMsg() string { if m != nil { - return m.ErrorMsg + return m.ErrMsg } return "" } @@ -1552,6 +1616,7 @@ type GetGroupMembersInfoReq struct { MemberList []string `protobuf:"bytes,2,rep,name=memberList" json:"memberList,omitempty"` Token string `protobuf:"bytes,3,opt,name=token" json:"token,omitempty"` OperationID string `protobuf:"bytes,4,opt,name=operationID" json:"operationID,omitempty"` + OpUserID string `protobuf:"bytes,5,opt,name=OpUserID" json:"OpUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1561,7 +1626,7 @@ func (m *GetGroupMembersInfoReq) Reset() { *m = GetGroupMembersInfoReq{} func (m *GetGroupMembersInfoReq) String() string { return proto.CompactTextString(m) } func (*GetGroupMembersInfoReq) ProtoMessage() {} func (*GetGroupMembersInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ed07d0078ff66bfe, []int{22} + return fileDescriptor_group_ac6850665f72c22b, []int{22} } func (m *GetGroupMembersInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMembersInfoReq.Unmarshal(m, b) @@ -1609,9 +1674,16 @@ func (m *GetGroupMembersInfoReq) GetOperationID() string { return "" } +func (m *GetGroupMembersInfoReq) GetOpUserID() string { + if m != nil { + return m.OpUserID + } + return "" +} + type GetGroupMembersInfoResp struct { - ErrorCode int32 `protobuf:"varint,1,opt,name=errorCode" json:"errorCode,omitempty"` - ErrorMsg string `protobuf:"bytes,2,opt,name=errorMsg" json:"errorMsg,omitempty"` + ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` MemberList []*GroupMemberFullInfo `protobuf:"bytes,3,rep,name=memberList" json:"memberList,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1622,7 +1694,7 @@ func (m *GetGroupMembersInfoResp) Reset() { *m = GetGroupMembersInfoResp func (m *GetGroupMembersInfoResp) String() string { return proto.CompactTextString(m) } func (*GetGroupMembersInfoResp) ProtoMessage() {} func (*GetGroupMembersInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ed07d0078ff66bfe, []int{23} + return fileDescriptor_group_ac6850665f72c22b, []int{23} } func (m *GetGroupMembersInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMembersInfoResp.Unmarshal(m, b) @@ -1642,16 +1714,16 @@ func (m *GetGroupMembersInfoResp) XXX_DiscardUnknown() { var xxx_messageInfo_GetGroupMembersInfoResp proto.InternalMessageInfo -func (m *GetGroupMembersInfoResp) GetErrorCode() int32 { +func (m *GetGroupMembersInfoResp) GetErrCode() int32 { if m != nil { - return m.ErrorCode + return m.ErrCode } return 0 } -func (m *GetGroupMembersInfoResp) GetErrorMsg() string { +func (m *GetGroupMembersInfoResp) GetErrMsg() string { if m != nil { - return m.ErrorMsg + return m.ErrMsg } return "" } @@ -1669,6 +1741,7 @@ type KickGroupMemberReq struct { Reason string `protobuf:"bytes,3,opt,name=reason" json:"reason,omitempty"` Token string `protobuf:"bytes,4,opt,name=token" json:"token,omitempty"` OperationID string `protobuf:"bytes,5,opt,name=operationID" json:"operationID,omitempty"` + OpUserID string `protobuf:"bytes,6,opt,name=OpUserID" json:"OpUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1678,7 +1751,7 @@ func (m *KickGroupMemberReq) Reset() { *m = KickGroupMemberReq{} } func (m *KickGroupMemberReq) String() string { return proto.CompactTextString(m) } func (*KickGroupMemberReq) ProtoMessage() {} func (*KickGroupMemberReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ed07d0078ff66bfe, []int{24} + return fileDescriptor_group_ac6850665f72c22b, []int{24} } func (m *KickGroupMemberReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_KickGroupMemberReq.Unmarshal(m, b) @@ -1733,6 +1806,13 @@ func (m *KickGroupMemberReq) GetOperationID() string { return "" } +func (m *KickGroupMemberReq) GetOpUserID() string { + if m != nil { + return m.OpUserID + } + return "" +} + type Id2Result struct { UId string `protobuf:"bytes,1,opt,name=uId" json:"uId,omitempty"` Result int32 `protobuf:"varint,2,opt,name=result" json:"result,omitempty"` @@ -1745,7 +1825,7 @@ func (m *Id2Result) Reset() { *m = Id2Result{} } func (m *Id2Result) String() string { return proto.CompactTextString(m) } func (*Id2Result) ProtoMessage() {} func (*Id2Result) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ed07d0078ff66bfe, []int{25} + return fileDescriptor_group_ac6850665f72c22b, []int{25} } func (m *Id2Result) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Id2Result.Unmarshal(m, b) @@ -1780,8 +1860,8 @@ func (m *Id2Result) GetResult() int32 { } type KickGroupMemberResp struct { - ErrorCode int32 `protobuf:"varint,1,opt,name=errorCode" json:"errorCode,omitempty"` - ErrorMsg string `protobuf:"bytes,2,opt,name=errorMsg" json:"errorMsg,omitempty"` + ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` Id2Result []*Id2Result `protobuf:"bytes,3,rep,name=id2result" json:"id2result,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1792,7 +1872,7 @@ func (m *KickGroupMemberResp) Reset() { *m = KickGroupMemberResp{} } func (m *KickGroupMemberResp) String() string { return proto.CompactTextString(m) } func (*KickGroupMemberResp) ProtoMessage() {} func (*KickGroupMemberResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ed07d0078ff66bfe, []int{26} + return fileDescriptor_group_ac6850665f72c22b, []int{26} } func (m *KickGroupMemberResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_KickGroupMemberResp.Unmarshal(m, b) @@ -1812,16 +1892,16 @@ func (m *KickGroupMemberResp) XXX_DiscardUnknown() { var xxx_messageInfo_KickGroupMemberResp proto.InternalMessageInfo -func (m *KickGroupMemberResp) GetErrorCode() int32 { +func (m *KickGroupMemberResp) GetErrCode() int32 { if m != nil { - return m.ErrorCode + return m.ErrCode } return 0 } -func (m *KickGroupMemberResp) GetErrorMsg() string { +func (m *KickGroupMemberResp) GetErrMsg() string { if m != nil { - return m.ErrorMsg + return m.ErrMsg } return "" } @@ -1836,6 +1916,7 @@ func (m *KickGroupMemberResp) GetId2Result() []*Id2Result { type GetJoinedGroupListReq struct { Token string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"` OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` + OpUserID string `protobuf:"bytes,3,opt,name=OpUserID" json:"OpUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1845,7 +1926,7 @@ func (m *GetJoinedGroupListReq) Reset() { *m = GetJoinedGroupListReq{} } func (m *GetJoinedGroupListReq) String() string { return proto.CompactTextString(m) } func (*GetJoinedGroupListReq) ProtoMessage() {} func (*GetJoinedGroupListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ed07d0078ff66bfe, []int{27} + return fileDescriptor_group_ac6850665f72c22b, []int{27} } func (m *GetJoinedGroupListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetJoinedGroupListReq.Unmarshal(m, b) @@ -1879,6 +1960,13 @@ func (m *GetJoinedGroupListReq) GetOperationID() string { return "" } +func (m *GetJoinedGroupListReq) GetOpUserID() string { + if m != nil { + return m.OpUserID + } + return "" +} + type GroupInfo struct { GroupId string `protobuf:"bytes,1,opt,name=groupId" json:"groupId,omitempty"` GroupName string `protobuf:"bytes,2,opt,name=groupName" json:"groupName,omitempty"` @@ -1897,7 +1985,7 @@ func (m *GroupInfo) Reset() { *m = GroupInfo{} } func (m *GroupInfo) String() string { return proto.CompactTextString(m) } func (*GroupInfo) ProtoMessage() {} func (*GroupInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ed07d0078ff66bfe, []int{28} + return fileDescriptor_group_ac6850665f72c22b, []int{28} } func (m *GroupInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfo.Unmarshal(m, b) @@ -1974,9 +2062,9 @@ func (m *GroupInfo) GetMemberCount() uint32 { } type GetJoinedGroupListResp struct { - ErrorCode int32 `protobuf:"varint,1,opt,name=errorCode" json:"errorCode,omitempty"` - ErrorMsg string `protobuf:"bytes,2,opt,name=errorMsg" json:"errorMsg,omitempty"` - GroupList []*GroupInfo `protobuf:"bytes,3,rep,name=groupList" json:"groupList,omitempty"` + ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` + ErrorMsg string `protobuf:"bytes,2,opt,name=ErrorMsg" json:"ErrorMsg,omitempty"` + GroupList []*GroupInfo `protobuf:"bytes,3,rep,name=GroupList" json:"GroupList,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1986,7 +2074,7 @@ func (m *GetJoinedGroupListResp) Reset() { *m = GetJoinedGroupListResp{} func (m *GetJoinedGroupListResp) String() string { return proto.CompactTextString(m) } func (*GetJoinedGroupListResp) ProtoMessage() {} func (*GetJoinedGroupListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ed07d0078ff66bfe, []int{29} + return fileDescriptor_group_ac6850665f72c22b, []int{29} } func (m *GetJoinedGroupListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetJoinedGroupListResp.Unmarshal(m, b) @@ -2006,9 +2094,9 @@ func (m *GetJoinedGroupListResp) XXX_DiscardUnknown() { var xxx_messageInfo_GetJoinedGroupListResp proto.InternalMessageInfo -func (m *GetJoinedGroupListResp) GetErrorCode() int32 { +func (m *GetJoinedGroupListResp) GetErrCode() int32 { if m != nil { - return m.ErrorCode + return m.ErrCode } return 0 } @@ -2033,6 +2121,7 @@ type InviteUserToGroupReq struct { GroupID string `protobuf:"bytes,3,opt,name=groupID" json:"groupID,omitempty"` Reason string `protobuf:"bytes,4,opt,name=reason" json:"reason,omitempty"` UidList []string `protobuf:"bytes,5,rep,name=uidList" json:"uidList,omitempty"` + OpUserID string `protobuf:"bytes,6,opt,name=OpUserID" json:"OpUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2042,7 +2131,7 @@ func (m *InviteUserToGroupReq) Reset() { *m = InviteUserToGroupReq{} } func (m *InviteUserToGroupReq) String() string { return proto.CompactTextString(m) } func (*InviteUserToGroupReq) ProtoMessage() {} func (*InviteUserToGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ed07d0078ff66bfe, []int{30} + return fileDescriptor_group_ac6850665f72c22b, []int{30} } func (m *InviteUserToGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_InviteUserToGroupReq.Unmarshal(m, b) @@ -2097,10 +2186,17 @@ func (m *InviteUserToGroupReq) GetUidList() []string { return nil } +func (m *InviteUserToGroupReq) GetOpUserID() string { + if m != nil { + return m.OpUserID + } + return "" +} + type InviteUserToGroupResp struct { - ErrorCode int32 `protobuf:"varint,1,opt,name=errorCode" json:"errorCode,omitempty"` - ErrorMsg string `protobuf:"bytes,2,opt,name=errorMsg" json:"errorMsg,omitempty"` - Id2Result []*Id2Result `protobuf:"bytes,3,rep,name=id2result" json:"id2result,omitempty"` + ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` + Id2Result []*Id2Result `protobuf:"bytes,3,rep,name=Id2Result" json:"Id2Result,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2110,7 +2206,7 @@ func (m *InviteUserToGroupResp) Reset() { *m = InviteUserToGroupResp{} } func (m *InviteUserToGroupResp) String() string { return proto.CompactTextString(m) } func (*InviteUserToGroupResp) ProtoMessage() {} func (*InviteUserToGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ed07d0078ff66bfe, []int{31} + return fileDescriptor_group_ac6850665f72c22b, []int{31} } func (m *InviteUserToGroupResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_InviteUserToGroupResp.Unmarshal(m, b) @@ -2130,16 +2226,16 @@ func (m *InviteUserToGroupResp) XXX_DiscardUnknown() { var xxx_messageInfo_InviteUserToGroupResp proto.InternalMessageInfo -func (m *InviteUserToGroupResp) GetErrorCode() int32 { +func (m *InviteUserToGroupResp) GetErrCode() int32 { if m != nil { - return m.ErrorCode + return m.ErrCode } return 0 } -func (m *InviteUserToGroupResp) GetErrorMsg() string { +func (m *InviteUserToGroupResp) GetErrMsg() string { if m != nil { - return m.ErrorMsg + return m.ErrMsg } return "" } @@ -2155,6 +2251,7 @@ type GetGroupAllMemberReq struct { GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` Token string `protobuf:"bytes,2,opt,name=token" json:"token,omitempty"` OperationID string `protobuf:"bytes,3,opt,name=operationID" json:"operationID,omitempty"` + OpUserID string `protobuf:"bytes,4,opt,name=OpUserID" json:"OpUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2164,7 +2261,7 @@ func (m *GetGroupAllMemberReq) Reset() { *m = GetGroupAllMemberReq{} } func (m *GetGroupAllMemberReq) String() string { return proto.CompactTextString(m) } func (*GetGroupAllMemberReq) ProtoMessage() {} func (*GetGroupAllMemberReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ed07d0078ff66bfe, []int{32} + return fileDescriptor_group_ac6850665f72c22b, []int{32} } func (m *GetGroupAllMemberReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupAllMemberReq.Unmarshal(m, b) @@ -2205,9 +2302,16 @@ func (m *GetGroupAllMemberReq) GetOperationID() string { return "" } +func (m *GetGroupAllMemberReq) GetOpUserID() string { + if m != nil { + return m.OpUserID + } + return "" +} + type GetGroupAllMemberResp struct { - ErrorCode int32 `protobuf:"varint,1,opt,name=errorCode" json:"errorCode,omitempty"` - ErrorMsg string `protobuf:"bytes,2,opt,name=errorMsg" json:"errorMsg,omitempty"` + ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` MemberList []*GroupMemberFullInfo `protobuf:"bytes,3,rep,name=memberList" json:"memberList,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -2218,7 +2322,7 @@ func (m *GetGroupAllMemberResp) Reset() { *m = GetGroupAllMemberResp{} } func (m *GetGroupAllMemberResp) String() string { return proto.CompactTextString(m) } func (*GetGroupAllMemberResp) ProtoMessage() {} func (*GetGroupAllMemberResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ed07d0078ff66bfe, []int{33} + return fileDescriptor_group_ac6850665f72c22b, []int{33} } func (m *GetGroupAllMemberResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupAllMemberResp.Unmarshal(m, b) @@ -2238,16 +2342,16 @@ func (m *GetGroupAllMemberResp) XXX_DiscardUnknown() { var xxx_messageInfo_GetGroupAllMemberResp proto.InternalMessageInfo -func (m *GetGroupAllMemberResp) GetErrorCode() int32 { +func (m *GetGroupAllMemberResp) GetErrCode() int32 { if m != nil { - return m.ErrorCode + return m.ErrCode } return 0 } -func (m *GetGroupAllMemberResp) GetErrorMsg() string { +func (m *GetGroupAllMemberResp) GetErrMsg() string { if m != nil { - return m.ErrorMsg + return m.ErrMsg } return "" } @@ -2799,116 +2903,117 @@ var _Group_serviceDesc = grpc.ServiceDesc{ Metadata: "group/group.proto", } -func init() { proto.RegisterFile("group/group.proto", fileDescriptor_group_ed07d0078ff66bfe) } +func init() { proto.RegisterFile("group/group.proto", fileDescriptor_group_ac6850665f72c22b) } -var fileDescriptor_group_ed07d0078ff66bfe = []byte{ - // 1718 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0xcd, 0x6e, 0xdc, 0xb6, - 0x13, 0x87, 0x76, 0xb5, 0xb6, 0x77, 0xfc, 0x4d, 0xc7, 0x8e, 0xfe, 0x8a, 0xff, 0x86, 0xc3, 0x06, - 0x85, 0xd1, 0x83, 0x0b, 0x38, 0x68, 0x81, 0xb4, 0x39, 0x34, 0xb1, 0x63, 0xc7, 0x69, 0x63, 0x27, - 0xb2, 0x73, 0xe9, 0x25, 0x51, 0x56, 0xf4, 0x46, 0xf1, 0xae, 0xb4, 0x96, 0xb4, 0x4d, 0xda, 0x4b, - 0x91, 0xa2, 0x40, 0xbf, 0x50, 0xf4, 0x90, 0x53, 0xdb, 0x17, 0xe8, 0xa9, 0x4f, 0xd0, 0xb7, 0xe9, - 0x8b, 0x14, 0x1c, 0x92, 0x12, 0xf5, 0xb5, 0x1b, 0xd8, 0x45, 0x73, 0x59, 0x68, 0x86, 0x43, 0x72, - 0x66, 0x38, 0xf3, 0xe3, 0x0c, 0x17, 0x16, 0xbb, 0x51, 0x38, 0x1c, 0xbc, 0x8f, 0xbf, 0x9b, 0x83, - 0x28, 0x4c, 0x42, 0xd2, 0x42, 0x82, 0xee, 0x02, 0x6c, 0x87, 0xfd, 0x7e, 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, 0x16, 0x04, - 0xb9, 0x09, 0x26, 0xea, 0xda, 0xc0, 0x74, 0xdd, 0x50, 0xe9, 0x3a, 0x2e, 0xc4, 0x1c, 0x9c, 0x45, - 0xbf, 0x33, 0x6a, 0xf7, 0x44, 0x18, 0xb1, 0x60, 0xf2, 0x4e, 0xa4, 0x83, 0x88, 0x22, 0xc9, 0x0a, - 0x4c, 0xdc, 0x89, 0x34, 0x00, 0x91, 0x14, 0xf9, 0x10, 0xcc, 0x1d, 0x01, 0x1f, 0xc6, 0xc6, 0xf4, - 0x16, 0x1d, 0xad, 0x0f, 0x97, 0x74, 0x50, 0x9e, 0xfe, 0x64, 0xc0, 0xf2, 0x71, 0xe4, 0x06, 0xf1, - 0x09, 0x8b, 0x50, 0xf4, 0xf0, 0x45, 0xc0, 0x22, 0x09, 0x2b, 0x7b, 0x79, 0x58, 0x51, 0xc1, 0x6f, - 0xc3, 0xd4, 0x61, 0xcf, 0x43, 0x41, 0x05, 0x63, 0x8a, 0xe6, 0x63, 0x07, 0xec, 0x85, 0x18, 0x13, - 0x69, 0x91, 0xd2, 0xc5, 0x34, 0x35, 0xcb, 0x69, 0x7a, 0x0f, 0x56, 0xaa, 0x94, 0x39, 0x8f, 0x47, - 0xe8, 0x57, 0x30, 0x73, 0x2f, 0xf4, 0x83, 0xf4, 0x26, 0xaf, 0x87, 0x49, 0x0b, 0x26, 0xfb, 0x2c, - 0x8e, 0xdd, 0xae, 0x02, 0x49, 0x45, 0x66, 0x00, 0xd6, 0x2c, 0x00, 0xd8, 0x18, 0x3b, 0x7e, 0x30, - 0xe1, 0x4a, 0xd1, 0xf1, 0xdc, 0x8c, 0x30, 0x88, 0x99, 0xbc, 0x95, 0xf4, 0x15, 0x8c, 0xd2, 0x0a, - 0x5c, 0x27, 0x34, 0x3e, 0x83, 0x1e, 0x49, 0xea, 0xe7, 0xd2, 0x1c, 0x05, 0x4a, 0x66, 0x09, 0x94, - 0x0a, 0x50, 0x80, 0xb7, 0x42, 0xab, 0x0c, 0x05, 0x07, 0x35, 0x29, 0x3e, 0x51, 0x9d, 0xe2, 0x3a, - 0xd4, 0x4d, 0x16, 0xa0, 0x2e, 0x07, 0x28, 0xb8, 0xdf, 0x54, 0x11, 0x50, 0x70, 0xb7, 0x12, 0x4c, - 0xb4, 0xab, 0x60, 0x42, 0x03, 0x39, 0xc8, 0x83, 0x5c, 0x1e, 0x3e, 0xa7, 0xc7, 0xc0, 0xe7, 0x4c, - 0x09, 0x3e, 0x15, 0xbc, 0xcc, 0x8e, 0x80, 0x97, 0xb9, 0x37, 0x80, 0x97, 0xf9, 0x0a, 0x78, 0x79, - 0x00, 0xab, 0xf5, 0xa1, 0x70, 0xae, 0xc8, 0xfe, 0xde, 0x00, 0xeb, 0x88, 0x25, 0x18, 0x10, 0xb8, - 0xb4, 0xf2, 0xe3, 0xe8, 0x30, 0xb7, 0x61, 0x2a, 0x50, 0xc7, 0x20, 0xd3, 0x56, 0xd1, 0xc5, 0x80, - 0x6c, 0x96, 0x03, 0x32, 0x4d, 0x05, 0x53, 0x4b, 0x05, 0xfa, 0x04, 0x66, 0x1e, 0x0e, 0xfd, 0xe4, - 0x0d, 0x92, 0xac, 0x70, 0xeb, 0x37, 0xca, 0x75, 0x67, 0x65, 0xb2, 0xd1, 0x6f, 0x1b, 0x60, 0x15, - 0xfd, 0x87, 0xd1, 0xc5, 0x8b, 0xd0, 0xfa, 0xed, 0x64, 0x79, 0xda, 0xc8, 0xca, 0x53, 0x02, 0x26, - 0x5e, 0x69, 0x62, 0x75, 0xfc, 0xe6, 0x3c, 0xbf, 0x93, 0x96, 0x35, 0xf8, 0xcd, 0xbd, 0x1e, 0xb1, - 0x33, 0xee, 0x75, 0x91, 0x1b, 0x92, 0xe2, 0x19, 0xe1, 0x66, 0x2a, 0x60, 0x14, 0x4e, 0x60, 0x14, - 0x16, 0xd9, 0x7c, 0xd5, 0x13, 0x7e, 0xc1, 0x4f, 0x8a, 0x68, 0x3a, 0x91, 0x17, 0xbc, 0x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, 0xba, 0x35, - 0x5d, 0x09, 0xa1, 0xb9, 0xf7, 0xed, 0xca, 0x0e, 0xd6, 0x7e, 0x67, 0xac, 0x8c, 0xd0, 0xbb, 0x5b, - 0xaa, 0xbf, 0x52, 0xbd, 0x2b, 0x0b, 0xc7, 0x54, 0xef, 0x9a, 0xc2, 0xed, 0x18, 0x96, 0xba, 0xe5, - 0xd2, 0x84, 0x54, 0xcf, 0x4a, 0xcf, 0x7d, 0x6d, 0xd4, 0x70, 0x3c, 0x20, 0x77, 0x61, 0xfe, 0x34, - 0x7f, 0xd3, 0x12, 0xf5, 0xc8, 0x5f, 0x2e, 0x3b, 0x6c, 0xbb, 0x6e, 0x28, 0x35, 0xb9, 0x00, 0xee, - 0xa9, 0xc9, 0x95, 0xb7, 0x69, 0x6a, 0x72, 0xcd, 0xad, 0x70, 0x00, 0x8b, 0x25, 0x34, 0x24, 0x57, - 0xe4, 0x9c, 0x2a, 0x10, 0xb7, 0x57, 0xeb, 0x07, 0xc5, 0x7a, 0xdd, 0x22, 0xde, 0xa4, 0xeb, 0x55, - 0x81, 0x9e, 0xbd, 0x5a, 0x3f, 0x18, 0x0f, 0x6e, 0xcf, 0x7f, 0x3e, 0xbb, 0x29, 0xfe, 0x95, 0xf9, - 0x18, 0x7f, 0x9f, 0x4e, 0xe0, 0x9f, 0x33, 0xd7, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0xc0, 0xd8, - 0xe8, 0x44, 0xb1, 0x19, 0x00, 0x00, +var fileDescriptor_group_ac6850665f72c22b = []byte{ + // 1744 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0xdb, 0x6f, 0xdc, 0x44, + 0x17, 0x97, 0x77, 0xbd, 0x9b, 0xec, 0xc9, 0x7d, 0xd2, 0xa4, 0xfe, 0xdc, 0x7c, 0x51, 0xea, 0xaf, + 0xfa, 0x14, 0xf1, 0x10, 0x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x30, 0x3e, 0x28, 0xe8, 0xd1, 0xff, 0x61, 0x91, + 0x79, 0x29, 0x2d, 0x81, 0x5a, 0xe6, 0xb4, 0x68, 0x1b, 0x96, 0x44, 0xdf, 0x43, 0x1e, 0x1f, 0x73, + 0xd4, 0x30, 0xaf, 0x46, 0xd7, 0x60, 0x81, 0xf5, 0x15, 0x76, 0xf3, 0xd4, 0x2e, 0xab, 0x24, 0xfb, + 0xc7, 0xd7, 0x42, 0xb4, 0xc6, 0x02, 0xdb, 0x3f, 0x45, 0x45, 0x30, 0x3b, 0x7d, 0x11, 0x62, 0x63, + 0x91, 0x61, 0x46, 0xbe, 0x49, 0x04, 0x33, 0x93, 0x93, 0xc4, 0x49, 0x26, 0xb1, 0xb1, 0x44, 0xdb, + 0x32, 0xba, 0xd4, 0xc6, 0xc6, 0xf1, 0x64, 0x98, 0x18, 0xcb, 0xaa, 0x0d, 0xd3, 0x59, 0x63, 0xb8, + 0x52, 0x11, 0x1a, 0x24, 0x32, 0x48, 0xa8, 0xef, 0x05, 0x13, 0x3f, 0xe1, 0xe9, 0xce, 0x04, 0x74, + 0x13, 0x74, 0xea, 0x6b, 0x83, 0x26, 0xf5, 0xb6, 0x48, 0xea, 0xf3, 0x42, 0xcc, 0xa6, 0xbd, 0xac, + 0x57, 0x5a, 0xe5, 0x9c, 0x53, 0x92, 0xcc, 0xdb, 0xa0, 0xef, 0x33, 0x92, 0xd1, 0xb6, 0xe7, 0x76, + 0xad, 0x7a, 0x7f, 0x88, 0xa5, 0x4d, 0xed, 0xad, 0x9f, 0x35, 0x58, 0x3b, 0x8d, 0x1c, 0x3f, 0xee, + 0xe3, 0x88, 0x9a, 0xde, 0x7f, 0xe6, 0xe3, 0x88, 0x93, 0xcf, 0x51, 0x96, 0x7c, 0x44, 0xf0, 0x93, + 0x54, 0x1c, 0xba, 0xd4, 0x90, 0x7b, 0x21, 0x65, 0xd2, 0x76, 0x8c, 0x9f, 0xb1, 0x36, 0x96, 0x16, + 0x52, 0x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 0xc9, 0x71, 0x0c, 0x2b, 0x05, 0x6a, 0x44, 0x57, 0x78, 0x9f, 0x32, 0xb2, 0x37, 0x37, + 0xaa, 0x1b, 0xd9, 0x78, 0x83, 0x3c, 0xcf, 0xc8, 0xf1, 0xca, 0x88, 0xd0, 0xdc, 0xa8, 0x6e, 0x8c, + 0xc3, 0xdb, 0x4b, 0x8f, 0x16, 0x76, 0xd8, 0x9f, 0x59, 0xef, 0xd2, 0xdf, 0x27, 0x6d, 0xfa, 0x9f, + 0xd6, 0xf5, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0xdb, 0x12, 0xfa, 0x38, 0xe8, 0x1a, 0x00, 0x00, } diff --git a/pkg/proto/group/group.proto b/pkg/proto/group/group.proto index 4859fc359..5b3deb002 100644 --- a/pkg/proto/group/group.proto +++ b/pkg/proto/group/group.proto @@ -3,8 +3,8 @@ option go_package = "./group;group"; package group; message CommonResp{ - int32 ErrorCode = 1; - string ErrorMsg = 2; + int32 ErrCode = 1; + string ErrMsg = 2; } message CreateGroupReq{ @@ -15,7 +15,8 @@ message CreateGroupReq{ string faceUrl = 5; string token = 6; string operationID = 7; - string CreatorUserID = 8; + string OpUserID = 8; + string Ext = 9; } @@ -23,9 +24,10 @@ message GroupAddMemberInfo{ string uid = 1; int32 setRole = 2; } + message CreateGroupResp{ - int32 ErrorCode = 1; - string ErrorMsg = 2; + int32 ErrCode = 1; + string ErrMsg = 2; string groupID = 3; } @@ -33,11 +35,12 @@ message GetGroupsInfoReq{ repeated string groupIDList = 1; string token = 2; string operationID = 3; - string UserID = 4; + string OpUserID = 4; } + message GetGroupsInfoResp{ - int32 ErrorCode = 1; - string ErrorMsg = 2; + int32 ErrCode = 1; + string ErrMsg = 2; repeated GroupInfo data = 3; } @@ -49,11 +52,12 @@ message SetGroupInfoReq{ string faceUrl = 5; string token = 6; string operationID = 7; + string OpUserID = 8; } message GetGroupApplicationListReq { - string UID = 1; + string OpUserID = 1; string OperationID = 2; } @@ -92,6 +96,7 @@ message TransferGroupOwnerReq { string OldOwner = 2; string NewOwner = 3; string OperationID = 4; + string OpUserID = 5; } message TransferGroupOwnerResp{ @@ -104,6 +109,7 @@ message JoinGroupReq{ string message = 2; string token = 3; string OperationID = 4; + string OpUserID = 5; } message GroupApplicationResponseReq{ @@ -135,6 +141,7 @@ message SetOwnerGroupNickNameReq{ string nickName = 2; string OperationID = 3; string token = 4; + string OpUserID = 5; } @@ -142,6 +149,7 @@ message QuitGroupReq{ string groupID = 1; string operationID = 2; string token = 3; + string OpUserID = 4; } @@ -171,11 +179,12 @@ message GetGroupMemberListReq { string operationID = 3; int32 filter = 4; int32 nextSeq = 5; + string OpUserID = 6; } message GetGroupMemberListResp { - int32 errorCode = 1; - string errorMsg = 2; + int32 ErrCode = 1; + string ErrMsg = 2; repeated GroupMemberFullInfo memberList = 3; int32 nextSeq = 4; } @@ -187,11 +196,12 @@ message GetGroupMembersInfoReq { repeated string memberList = 2; string token = 3; string operationID = 4; + string OpUserID = 5; } message GetGroupMembersInfoResp { - int32 errorCode = 1; - string errorMsg = 2; + int32 ErrCode = 1; + string ErrMsg = 2; repeated GroupMemberFullInfo memberList = 3; } @@ -202,6 +212,7 @@ message KickGroupMemberReq { string reason = 3; string token = 4; string operationID = 5; + string OpUserID = 6; } message Id2Result { @@ -210,8 +221,8 @@ message Id2Result { } message KickGroupMemberResp { - int32 errorCode = 1; - string errorMsg = 2; + int32 ErrCode = 1; + string ErrMsg = 2; repeated Id2Result id2result = 3; } @@ -219,6 +230,7 @@ message KickGroupMemberResp { message getJoinedGroupListReq { string token = 1; string operationID = 2; + string OpUserID = 3; } message GroupInfo { @@ -233,9 +245,9 @@ message GroupInfo { } message getJoinedGroupListResp{ - int32 errorCode = 1; - string errorMsg = 2; - repeated GroupInfo groupList = 3; + int32 ErrCode = 1; + string ErrorMsg = 2; + repeated GroupInfo GroupList = 3; } @@ -245,23 +257,25 @@ message inviteUserToGroupReq { string groupID = 3; string reason = 4; repeated string uidList = 5; + string OpUserID = 6; } message inviteUserToGroupResp { - int32 errorCode = 1; - string errorMsg = 2; - repeated Id2Result id2result = 3; // 0 ok, -1 error + int32 ErrCode = 1; + string ErrMsg = 2; + repeated Id2Result Id2Result = 3; // 0 ok, -1 error } message GetGroupAllMemberReq { string groupID = 1; string token = 2; string operationID = 3; + string OpUserID = 4; } message GetGroupAllMemberResp { - int32 errorCode = 1; - string errorMsg = 2; + int32 ErrCode = 1; + string ErrMsg = 2; repeated GroupMemberFullInfo memberList = 3; } From 3a01ee9973644feb5c2dbb68386b0bcfe99c810e Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 23 Dec 2021 10:04:21 +0800 Subject: [PATCH 014/337] config file modify --- pkg/common/config/config.go | 62 ++++++++++++++----------------------- 1 file changed, 23 insertions(+), 39 deletions(-) diff --git a/pkg/common/config/config.go b/pkg/common/config/config.go index 8e4f198e8..5182de6d6 100644 --- a/pkg/common/config/config.go +++ b/pkg/common/config/config.go @@ -165,51 +165,21 @@ type config struct { } Notification struct { GroupCreated struct { - Conversation struct { - ConversationChanged bool `yaml:"conversationChanged"` - UnreadCount bool `yaml:"unreadCount"` - } - OfflinePush struct { - PushSwitch bool `yaml:"switch"` - Title string `yaml:"title"` - Desc string `yaml:"desc"` - Ext string `yaml:"ext"` - } - DefaultTips struct { - Tips string `yaml:"tips"` - } + conversation Conversation `yaml:"conversation"` + offlinePush OfflinePush `yaml:"offlinePush"` + defaultTips DefaultTips `yaml:"defaultTips"` } GroupInfoChanged struct { - Conversation struct { - ConversationChanged bool `yaml:"conversationChanged"` - UnreadCount bool `yaml:"unreadCount"` - } - OfflinePush struct { - PushSwitch bool `yaml:"switch"` - Title string `yaml:"title"` - Desc string `yaml:"desc"` - Ext string `yaml:"ext"` - } - DefaultTips struct { - Tips string `yaml:"tips"` - } + conversation Conversation `yaml:"conversation"` + offlinePush OfflinePush `yaml:"offlinePush"` + defaultTips DefaultTips `yaml:"defaultTips"` } ApplyJoinGroup struct { - Conversation struct { - ConversationChanged bool `yaml:"conversationChanged"` - UnreadCount bool `yaml:"unreadCount"` - } - OfflinePush struct { - PushSwitch bool `yaml:"switch"` - Title string `yaml:"title"` - Desc string `yaml:"desc"` - Ext string `yaml:"ext"` - } - DefaultTips struct { - Tips string `yaml:"tips"` - } + conversation Conversation `yaml:"conversation"` + offlinePush OfflinePush `yaml:"offlinePush"` + defaultTips DefaultTips `yaml:"defaultTips"` } } Demo struct { @@ -230,6 +200,20 @@ type config struct { } } } +type Conversation struct { + ConversationChanged bool `yaml:"conversationChanged"` + UnreadCount bool `yaml:"unreadCount"` +} + +type OfflinePush struct { + PushSwitch bool `yaml:"switch"` + Title string `yaml:"title"` + Desc string `yaml:"desc"` + Ext string `yaml:"ext"` +} +type DefaultTips struct { + Tips string `yaml:"tips"` +} func init() { //path, _ := os.Getwd() From cfddc75ccbdbd5f42dae6359f1b71b57bd3e0e46 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 23 Dec 2021 14:28:44 +0800 Subject: [PATCH 015/337] config file modify --- pkg/common/config/config.go | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/pkg/common/config/config.go b/pkg/common/config/config.go index 5182de6d6..b2679bf9b 100644 --- a/pkg/common/config/config.go +++ b/pkg/common/config/config.go @@ -165,21 +165,21 @@ type config struct { } Notification struct { GroupCreated struct { - conversation Conversation `yaml:"conversation"` - offlinePush OfflinePush `yaml:"offlinePush"` - defaultTips DefaultTips `yaml:"defaultTips"` + Conversation PConversation `yaml:"conversation"` + OfflinePush POfflinePush `yaml:"offlinePush"` + DefaultTips PDefaultTips `yaml:"defaultTips"` } GroupInfoChanged struct { - conversation Conversation `yaml:"conversation"` - offlinePush OfflinePush `yaml:"offlinePush"` - defaultTips DefaultTips `yaml:"defaultTips"` + Conversation PConversation `yaml:"conversation"` + OfflinePush POfflinePush `yaml:"offlinePush"` + DefaultTips PDefaultTips `yaml:"defaultTips"` } ApplyJoinGroup struct { - conversation Conversation `yaml:"conversation"` - offlinePush OfflinePush `yaml:"offlinePush"` - defaultTips DefaultTips `yaml:"defaultTips"` + Conversation PConversation `yaml:"conversation"` + OfflinePush POfflinePush `yaml:"offlinePush"` + DefaultTips PDefaultTips `yaml:"defaultTips"` } } Demo struct { @@ -200,18 +200,18 @@ type config struct { } } } -type Conversation struct { +type PConversation struct { ConversationChanged bool `yaml:"conversationChanged"` UnreadCount bool `yaml:"unreadCount"` } -type OfflinePush struct { +type POfflinePush struct { PushSwitch bool `yaml:"switch"` Title string `yaml:"title"` Desc string `yaml:"desc"` Ext string `yaml:"ext"` } -type DefaultTips struct { +type PDefaultTips struct { Tips string `yaml:"tips"` } From 333453df79c57d4b0da2baa4e057823dcd8b93ce Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 23 Dec 2021 17:19:57 +0800 Subject: [PATCH 016/337] send msg file modify --- internal/rpc/{chat => msg}/send_msg.go | 264 +++++++++++++++---------- 1 file changed, 156 insertions(+), 108 deletions(-) rename internal/rpc/{chat => msg}/send_msg.go (61%) diff --git a/internal/rpc/chat/send_msg.go b/internal/rpc/msg/send_msg.go similarity index 61% rename from internal/rpc/chat/send_msg.go rename to internal/rpc/msg/send_msg.go index 3403e84bc..de52d7022 100644 --- a/internal/rpc/chat/send_msg.go +++ b/internal/rpc/msg/send_msg.go @@ -1,8 +1,6 @@ -package chat +package msg import ( - "Open_IM/internal/api/group" - "Open_IM/internal/push/content_struct" "Open_IM/pkg/common/config" "Open_IM/pkg/common/constant" "Open_IM/pkg/common/db" @@ -13,9 +11,11 @@ import ( pbChat "Open_IM/pkg/proto/chat" pbGroup "Open_IM/pkg/proto/group" open_im_sdk "Open_IM/pkg/proto/sdk_ws" + sdk_ws "Open_IM/pkg/proto/sdk_ws" "Open_IM/pkg/utils" "context" "encoding/json" + "github.com/garyburd/redigo/redis" "math/rand" "net/http" "strconv" @@ -45,46 +45,72 @@ type MsgCallBackResp struct { } } -func (rpc *rpcChat) UserSendMsg(_ context.Context, pb *pbChat.UserSendMsgReq) (*pbChat.UserSendMsgResp, error) { - replay := pbChat.UserSendMsgResp{} +func (rpc *rpcChat) encapsulateMsgData(msg *sdk_ws.MsgData) { + msg.ServerMsgID = GetMsgID(msg.SendID) + if msg.SendTime == 0 { + msg.SendTime = utils.GetCurrentTimestampByNano() + } + switch msg.ContentType { + case constant.Text: + fallthrough + case constant.Picture: + fallthrough + case constant.Voice: + fallthrough + case constant.Video: + fallthrough + case constant.File: + fallthrough + case constant.AtText: + fallthrough + case constant.Merger: + fallthrough + case constant.Card: + fallthrough + case constant.Location: + fallthrough + case constant.Custom: + fallthrough + case constant.Quote: + utils.SetSwitchFromOptions(msg.Options, constant.IsConversationUpdate, true) + utils.SetSwitchFromOptions(msg.Options, constant.IsUnreadCount, true) + utils.SetSwitchFromOptions(msg.Options, constant.IsSenderSync, true) + case constant.Revoke: + utils.SetSwitchFromOptions(msg.Options, constant.IsUnreadCount, false) + utils.SetSwitchFromOptions(msg.Options, constant.IsOfflinePush, false) + case constant.HasReadReceipt: + utils.SetSwitchFromOptions(msg.Options, constant.IsConversationUpdate, false) + utils.SetSwitchFromOptions(msg.Options, constant.IsUnreadCount, false) + utils.SetSwitchFromOptions(msg.Options, constant.IsOfflinePush, false) + case constant.Typing: + utils.SetSwitchFromOptions(msg.Options, constant.IsHistory, false) + utils.SetSwitchFromOptions(msg.Options, constant.IsPersistent, false) + utils.SetSwitchFromOptions(msg.Options, constant.IsSenderSync, false) + utils.SetSwitchFromOptions(msg.Options, constant.IsConversationUpdate, false) + utils.SetSwitchFromOptions(msg.Options, constant.IsUnreadCount, false) + utils.SetSwitchFromOptions(msg.Options, constant.IsOfflinePush, false) + + } +} +func (rpc *rpcChat) SendMsg(_ context.Context, pb *pbChat.SendMsgReq) (*pbChat.SendMsgResp, error) { + replay := pbChat.SendMsgResp{} log.NewDebug(pb.OperationID, "rpc sendMsg come here", pb.String()) //if !utils.VerifyToken(pb.Token, pb.SendID) { // return returnMsg(&replay, pb, http.StatusUnauthorized, "token validate err,not authorized", "", 0) - serverMsgID := GetMsgID(pb.SendID) - pbData := pbChat.WSToMsgSvrChatMsg{} - pbData.MsgFrom = pb.MsgFrom - pbData.SessionType = pb.SessionType - pbData.ContentType = pb.ContentType - pbData.Content = pb.Content - pbData.RecvID = pb.RecvID - pbData.ForceList = pb.ForceList - pbData.OfflineInfo = pb.OffLineInfo - pbData.Options = pb.Options - pbData.PlatformID = pb.PlatformID - pbData.ClientMsgID = pb.ClientMsgID - pbData.SendID = pb.SendID - pbData.SenderNickName = pb.SenderNickName - pbData.SenderFaceURL = pb.SenderFaceURL - pbData.MsgID = serverMsgID - pbData.OperationID = pb.OperationID - pbData.Token = pb.Token - if pb.SendTime == 0 { - pbData.SendTime = utils.GetCurrentTimestampByNano() - } else { - pbData.SendTime = pb.SendTime - } - options := utils.JsonStringToMap(pbData.Options) - isHistory := utils.GetSwitchFromOptions(options, "history") + rpc.encapsulateMsgData(pb.MsgData) + msgToMQ := pbChat.MsgDataToMQ{Token: pb.Token, OperationID: pb.OperationID} + //options := utils.JsonStringToMap(pbData.Options) + isHistory := utils.GetSwitchFromOptions(pb.MsgData.Options, constant.IsHistory) mReq := MsgCallBackReq{ - SendID: pb.SendID, - RecvID: pb.RecvID, - Content: pb.Content, - SendTime: pbData.SendTime, - MsgFrom: pbData.MsgFrom, - ContentType: pb.ContentType, - SessionType: pb.SessionType, - PlatformID: pb.PlatformID, - MsgID: pb.ClientMsgID, + SendID: pb.MsgData.SendID, + RecvID: pb.MsgData.RecvID, + Content: string(pb.MsgData.Content), + SendTime: pb.MsgData.SendTime, + MsgFrom: pb.MsgData.MsgFrom, + ContentType: pb.MsgData.ContentType, + SessionType: pb.MsgData.SessionType, + PlatformID: pb.MsgData.SenderPlatformID, + MsgID: pb.MsgData.ClientMsgID, } if !isHistory { mReq.IsOnlineOnly = true @@ -102,97 +128,65 @@ func (rpc *rpcChat) UserSendMsg(_ context.Context, pb *pbChat.UserSendMsgReq) (* if mResp.ErrCode != 0 { return returnMsg(&replay, pb, mResp.ResponseErrCode, mResp.ErrMsg, "", 0) } else { - pbData.Content = mResp.ResponseResult.ModifiedMsg + pb.MsgData.Content = []byte(mResp.ResponseResult.ModifiedMsg) } } } - switch pbData.SessionType { + switch pb.MsgData.SessionType { case constant.SingleChatType: - isSend := modifyMessageByUserMessageReceiveOpt(pbData.RecvID, pbData.SendID, constant.SingleChatType, &pbData) + isSend := modifyMessageByUserMessageReceiveOpt(pb.MsgData.RecvID, pb.MsgData.SendID, constant.SingleChatType, pb) if isSend { - err1 := rpc.sendMsgToKafka(&pbData, pbData.RecvID) + msgToMQ.MsgData = pb.MsgData + err1 := rpc.sendMsgToKafka(&msgToMQ, msgToMQ.MsgData.RecvID) if err1 != nil { - log.NewError(pbData.OperationID, "kafka send msg err:RecvID", pbData.RecvID, pbData.String()) + log.NewError(msgToMQ.OperationID, "kafka send msg err:RecvID", msgToMQ.MsgData.RecvID, msgToMQ.String()) return returnMsg(&replay, pb, 201, "kafka send msg err", "", 0) } } - err2 := rpc.sendMsgToKafka(&pbData, pbData.SendID) + err2 := rpc.sendMsgToKafka(&msgToMQ, msgToMQ.MsgData.SendID) if err2 != nil { - log.NewError(pbData.OperationID, "kafka send msg err:SendID", pbData.SendID, pbData.String()) + log.NewError(msgToMQ.OperationID, "kafka send msg err:SendID", msgToMQ.MsgData.SendID, msgToMQ.String()) return returnMsg(&replay, pb, 201, "kafka send msg err", "", 0) } - return returnMsg(&replay, pb, 0, "", serverMsgID, pbData.SendTime) + return returnMsg(&replay, pb, 0, "", msgToMQ.MsgData.ServerMsgID, msgToMQ.MsgData.SendTime) case constant.GroupChatType: etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) client := pbGroup.NewGroupClient(etcdConn) req := &pbGroup.GetGroupAllMemberReq{ - GroupID: pbData.RecvID, - Token: pbData.Token, - OperationID: pbData.OperationID, + GroupID: pb.MsgData.GroupID, + Token: pb.Token, + OperationID: pb.OperationID, } reply, err := client.GetGroupAllMember(context.Background(), req) if err != nil { - log.Error(pbData.Token, pbData.OperationID, "rpc send_msg getGroupInfo failed, err = %s", err.Error()) + log.Error(pb.Token, pb.OperationID, "rpc send_msg getGroupInfo failed, err = %s", err.Error()) return returnMsg(&replay, pb, 201, err.Error(), "", 0) } - if reply.ErrorCode != 0 { - log.Error(pbData.Token, pbData.OperationID, "rpc send_msg getGroupInfo failed, err = %s", reply.ErrorMsg) - return returnMsg(&replay, pb, reply.ErrorCode, reply.ErrorMsg, "", 0) + if reply.ErrCode != 0 { + log.Error(pb.Token, pb.OperationID, "rpc send_msg getGroupInfo failed, err = %s", reply.ErrMsg) + return returnMsg(&replay, pb, reply.ErrCode, reply.ErrMsg, "", 0) } - var addUidList []string - switch pbData.ContentType { - case constant.KickGroupMemberTip: - var notification content_struct.NotificationContent - var kickContent group.KickGroupMemberReq - err := utils.JsonStringToStruct(pbData.Content, ¬ification) - if err != nil { - log.ErrorByKv("json unmarshall err", pbData.OperationID, "err", err.Error()) - return returnMsg(&replay, pb, 200, err.Error(), "", 0) - } else { - err := utils.JsonStringToStruct(notification.Detail, &kickContent) - if err != nil { - log.ErrorByKv("json unmarshall err", pbData.OperationID, "err", err.Error()) - return returnMsg(&replay, pb, 200, err.Error(), "", 0) - } - for _, v := range kickContent.UidListInfo { - addUidList = append(addUidList, v.UserId) - } - } - case constant.QuitGroupTip: - addUidList = append(addUidList, pbData.SendID) - default: - } - groupID := pbData.RecvID - for i, v := range reply.MemberList { - pbData.RecvID = v.UserId + " " + groupID - isSend := modifyMessageByUserMessageReceiveOpt(v.UserId, groupID, constant.GroupChatType, &pbData) + groupID := pb.MsgData.GroupID + for _, v := range reply.MemberList { + pb.MsgData.RecvID = v.UserId + isSend := modifyMessageByUserMessageReceiveOpt(v.UserId, groupID, constant.GroupChatType, pb) if isSend { - err := rpc.sendMsgToKafka(&pbData, utils.IntToString(i)) + msgToMQ.MsgData = pb.MsgData + err := rpc.sendMsgToKafka(&msgToMQ, v.UserId) if err != nil { - log.NewError(pbData.OperationID, "kafka send msg err:UserId", v.UserId, pbData.String()) + log.NewError(msgToMQ.OperationID, "kafka send msg err:UserId", v.UserId, msgToMQ.String()) return returnMsg(&replay, pb, 201, "kafka send msg err", "", 0) } } } - for i, v := range addUidList { - pbData.RecvID = v + " " + groupID - isSend := modifyMessageByUserMessageReceiveOpt(v, groupID, constant.GroupChatType, &pbData) - if isSend { - err := rpc.sendMsgToKafka(&pbData, utils.IntToString(i+1)) - if err != nil { - log.NewError(pbData.OperationID, "kafka send msg err:UserId", v, pbData.String()) - return returnMsg(&replay, pb, 201, "kafka send msg err", "", 0) - } - } - } - return returnMsg(&replay, pb, 0, "", serverMsgID, pbData.SendTime) + return returnMsg(&replay, pb, 0, "", msgToMQ.MsgData.ServerMsgID, msgToMQ.MsgData.SendTime) default: return returnMsg(&replay, pb, 203, "unkonwn sessionType", "", 0) } } -func (rpc *rpcChat) sendMsgToKafka(m *pbChat.WSToMsgSvrChatMsg, key string) error { +func (rpc *rpcChat) sendMsgToKafka(m *pbChat.MsgDataToMQ, key string) error { pid, offset, err := rpc.producer.SendMessage(m, key) if err != nil { log.ErrorByKv("kafka send failed", m.OperationID, "send data", m.String(), "pid", pid, "offset", offset, "err", err.Error(), "key", key) @@ -204,21 +198,20 @@ func GetMsgID(sendID string) string { return t + "-" + sendID + "-" + strconv.Itoa(rand.Int()) } -func returnMsg(replay *pbChat.UserSendMsgResp, pb *pbChat.UserSendMsgReq, errCode int32, errMsg, serverMsgID string, sendTime int64) (*pbChat.UserSendMsgResp, error) { +func returnMsg(replay *pbChat.SendMsgResp, pb *pbChat.SendMsgReq, errCode int32, errMsg, serverMsgID string, sendTime int64) (*pbChat.SendMsgResp, error) { replay.ErrCode = errCode replay.ErrMsg = errMsg - replay.ReqIdentifier = pb.ReqIdentifier - replay.ClientMsgID = pb.ClientMsgID replay.ServerMsgID = serverMsgID + replay.ClientMsgID = pb.MsgData.ClientMsgID replay.SendTime = sendTime return replay, nil } -func modifyMessageByUserMessageReceiveOpt(userID, sourceID string, sessionType int, msg *pbChat.WSToMsgSvrChatMsg) bool { +func modifyMessageByUserMessageReceiveOpt(userID, sourceID string, sessionType int, pb *pbChat.SendMsgReq) bool { conversationID := utils.GetConversationIDBySessionType(sourceID, sessionType) opt, err := db.DB.GetSingleConversationMsgOpt(userID, conversationID) - if err != nil { - log.NewError(msg.OperationID, "GetSingleConversationMsgOpt from redis err", msg.String()) + if err != nil || err != redis.ErrNil { + log.NewError(pb.OperationID, "GetSingleConversationMsgOpt from redis err", pb.String()) return true } switch opt { @@ -227,12 +220,10 @@ func modifyMessageByUserMessageReceiveOpt(userID, sourceID string, sessionType i case constant.NotReceiveMessage: return false case constant.ReceiveNotNotifyMessage: - options := utils.JsonStringToMap(msg.Options) - if options == nil { - options = make(map[string]int32, 2) + if pb.MsgData.Options == nil { + pb.MsgData.Options = make(map[string]bool, 10) } - utils.SetSwitchFromOptions(options, "offlinePush", 0) - msg.Options = utils.MapIntToJsonString(options) + utils.SetSwitchFromOptions(pb.MsgData.Options, constant.IsOfflinePush, false) return true } @@ -250,7 +241,64 @@ type NotificationMsg struct { } func Notification(n *NotificationMsg, onlineUserOnly bool) { - + var req pbChat.SendMsgReq + var msg sdk_ws.MsgData + var offlineInfo sdk_ws.OfflinePushInfo + var title, desc, ext string + var pushSwitch bool + req.OperationID = n.OperationID + msg.SendID = n.SendID + msg.RecvID = n.RecvID + msg.Content = n.Content + msg.MsgFrom = n.MsgFrom + msg.ContentType = n.ContentType + msg.SessionType = n.SessionType + msg.CreateTime = utils.GetCurrentTimestampByNano() + msg.ClientMsgID = utils.GetMsgID(n.SendID) + switch n.SessionType { + case constant.GroupChatType: + msg.RecvID = "" + msg.GroupID = n.RecvID + } + if onlineUserOnly { + msg.Options = make(map[string]bool, 10) + utils.SetSwitchFromOptions(msg.Options, constant.IsOfflinePush, false) + utils.SetSwitchFromOptions(msg.Options, constant.IsHistory, false) + utils.SetSwitchFromOptions(msg.Options, constant.IsPersistent, false) + } + offlineInfo.IOSBadgeCount = config.Config.IOSPush.BadgeCount + offlineInfo.IOSPushSound = config.Config.IOSPush.PushSound + switch msg.ContentType { + case constant.CreateGroupTip: + pushSwitch = config.Config.Notification.GroupCreated.OfflinePush.PushSwitch + title = config.Config.Notification.GroupCreated.OfflinePush.Title + desc = config.Config.Notification.GroupCreated.OfflinePush.Desc + ext = config.Config.Notification.GroupCreated.OfflinePush.Ext + case constant.ChangeGroupInfoTip: + pushSwitch = config.Config.Notification.GroupInfoChanged.OfflinePush.PushSwitch + title = config.Config.Notification.GroupInfoChanged.OfflinePush.Title + desc = config.Config.Notification.GroupInfoChanged.OfflinePush.Desc + ext = config.Config.Notification.GroupInfoChanged.OfflinePush.Ext + case constant.ApplyJoinGroupTip: + pushSwitch = config.Config.Notification.ApplyJoinGroup.OfflinePush.PushSwitch + title = config.Config.Notification.ApplyJoinGroup.OfflinePush.Title + desc = config.Config.Notification.ApplyJoinGroup.OfflinePush.Desc + ext = config.Config.Notification.ApplyJoinGroup.OfflinePush.Ext + } + utils.SetSwitchFromOptions(msg.Options, constant.IsOfflinePush, pushSwitch) + offlineInfo.Title = title + offlineInfo.Desc = desc + offlineInfo.Ext = ext + msg.OfflinePushInfo = &offlineInfo + req.MsgData = &msg + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfflineMessageName) + client := pbChat.NewChatClient(etcdConn) + reply, err := client.SendMsg(context.Background(), &req) + if err != nil { + log.NewError(req.OperationID, "SendMsg rpc failed, ", req.String(), err.Error()) + } else if reply.ErrCode != 0 { + log.NewError(req.OperationID, "SendMsg rpc failed, ", req.String()) + } } //message GroupCreatedTips{ From 2d56dacd0e42e91153c6685b883c2566b00627ad Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 23 Dec 2021 17:22:26 +0800 Subject: [PATCH 017/337] send msg file modify --- pkg/common/constant/constant.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pkg/common/constant/constant.go b/pkg/common/constant/constant.go index 9cabc19b3..710200cd2 100644 --- a/pkg/common/constant/constant.go +++ b/pkg/common/constant/constant.go @@ -37,6 +37,7 @@ const ( Card = 108 Location = 109 Custom = 110 + Revoke = 111 HasReadReceipt = 112 Typing = 113 Quote = 114 @@ -48,8 +49,6 @@ const ( AddFriendTip = 202 RefuseFriendApplicationTip = 203 SetSelfInfoTip = 204 - Revoke = 205 - C2CMessageAsRead = 206 TransferGroupOwnerTip = 501 CreateGroupTip = 502 @@ -95,6 +94,14 @@ const ( ReceiveMessage = 0 NotReceiveMessage = 1 ReceiveNotNotifyMessage = 2 + + //OptionsKey + IsHistory = "history" + IsPersistent = "persistent" + IsOfflinePush = "offlinePush" + IsUnreadCount = "unreadCount" + IsConversationUpdate = "conversationUpdate" + IsSenderSync = "senderSync" ) var ContentType2PushContent = map[int64]string{ From 27fd4f444b5931a2c2c92cbec3a1bd6613a52333 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 23 Dec 2021 17:22:49 +0800 Subject: [PATCH 018/337] notification --- internal/api/friend/add_blacklist.go | 49 - internal/api/friend/add_friend.go | 88 -- internal/api/friend/add_friend_response.go | 49 - internal/api/friend/delete_friend.go | 48 - internal/api/friend/friend.go | 604 +++++++++ internal/api/friend/get_blcaklist.go | 79 -- internal/api/friend/get_friend_apply_list.go | 129 -- internal/api/friend/get_friend_list.go | 83 -- internal/api/friend/get_friends_info.go | 70 - internal/api/friend/is_friend.go | 47 - internal/api/friend/remove_blacklist.go | 47 - internal/api/friend/set_friend_comment.go | 48 - internal/api/group/create_group.go | 61 - .../api/group/get_group_applicationList.go | 113 -- internal/api/group/get_groups_info.go | 67 - internal/api/group/group.go | 450 +++++- .../api/group/group_application_response.go | 89 -- internal/api/group/join_group.go | 47 - internal/api/group/quit_group.go | 46 - internal/api/group/set_group_info.go | 53 - internal/api/group/transfer_group_owner.go | 65 - internal/rpc/friend/add_blacklist.go | 47 - internal/rpc/friend/add_friend.go | 133 -- internal/rpc/friend/add_friend_response.go | 84 -- internal/rpc/friend/delete_friend.go | 27 - internal/rpc/friend/firend.go | 487 +++++++ internal/rpc/friend/get_blacklist.go | 55 - internal/rpc/friend/get_firends_info.go | 113 -- internal/rpc/friend/get_friend_apply_list.go | 95 -- internal/rpc/friend/get_friend_list.go | 57 - internal/rpc/friend/is_friend.go | 29 - internal/rpc/friend/is_in_blacklist.go | 20 - internal/rpc/friend/remove_blacklist.go | 27 - internal/rpc/friend/set_friend_comment.go | 27 - internal/rpc/group/group.go | 462 +++---- pkg/common/constant/constant.go | 2 +- .../im_mysql_model/friend_request_model.go | 3 + .../im_mysql_model/group_member_model.go | 13 + .../mysql_model/im_mysql_model/group_model.go | 16 +- .../im_mysql_model/model_struct.go | 2 +- pkg/common/token_verify/jwt_token.go | 38 + pkg/proto/friend/friend.pb.go | 971 +++++-------- pkg/proto/friend/friend.proto | 165 +-- pkg/proto/group/group.pb.go | 1208 +++++------------ pkg/proto/group/group.proto | 207 ++- pkg/proto/sdk_ws/ws.pb.go | 310 ++--- pkg/proto/sdk_ws/ws.proto | 4 +- 47 files changed, 2769 insertions(+), 4165 deletions(-) delete mode 100644 internal/api/friend/add_blacklist.go delete mode 100644 internal/api/friend/add_friend.go delete mode 100644 internal/api/friend/add_friend_response.go delete mode 100644 internal/api/friend/delete_friend.go create mode 100644 internal/api/friend/friend.go delete mode 100644 internal/api/friend/get_blcaklist.go delete mode 100644 internal/api/friend/get_friend_apply_list.go delete mode 100644 internal/api/friend/get_friend_list.go delete mode 100644 internal/api/friend/get_friends_info.go delete mode 100644 internal/api/friend/is_friend.go delete mode 100644 internal/api/friend/remove_blacklist.go delete mode 100644 internal/api/friend/set_friend_comment.go delete mode 100644 internal/api/group/create_group.go delete mode 100644 internal/api/group/get_group_applicationList.go delete mode 100644 internal/api/group/get_groups_info.go delete mode 100644 internal/api/group/group_application_response.go delete mode 100644 internal/api/group/join_group.go delete mode 100644 internal/api/group/quit_group.go delete mode 100644 internal/api/group/set_group_info.go delete mode 100644 internal/api/group/transfer_group_owner.go delete mode 100644 internal/rpc/friend/add_blacklist.go delete mode 100644 internal/rpc/friend/add_friend.go delete mode 100644 internal/rpc/friend/add_friend_response.go delete mode 100644 internal/rpc/friend/delete_friend.go create mode 100644 internal/rpc/friend/firend.go delete mode 100644 internal/rpc/friend/get_blacklist.go delete mode 100644 internal/rpc/friend/get_firends_info.go delete mode 100644 internal/rpc/friend/get_friend_apply_list.go delete mode 100644 internal/rpc/friend/get_friend_list.go delete mode 100644 internal/rpc/friend/is_friend.go delete mode 100644 internal/rpc/friend/is_in_blacklist.go delete mode 100644 internal/rpc/friend/remove_blacklist.go delete mode 100644 internal/rpc/friend/set_friend_comment.go diff --git a/internal/api/friend/add_blacklist.go b/internal/api/friend/add_blacklist.go deleted file mode 100644 index e5708c659..000000000 --- a/internal/api/friend/add_blacklist.go +++ /dev/null @@ -1,49 +0,0 @@ -package friend - -import ( - "Open_IM/pkg/common/config" - "Open_IM/pkg/common/log" - "Open_IM/pkg/grpc-etcdv3/getcdv3" - pbFriend "Open_IM/pkg/proto/friend" - "context" - "github.com/gin-gonic/gin" - "net/http" - "strings" -) - -/* -type paramsAddBlackList struct { - OperationID string `json:"operationID" binding:"required"` - UID string `json:"uid" binding:"required"` -}*/ - -func AddBlacklist(c *gin.Context) { - log.Info("", "", "api add blacklist init ....") - - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) - client := pbFriend.NewFriendClient(etcdConn) - //defer etcdConn.Close() - - params := paramsSearchFriend{} - if err := c.BindJSON(¶ms); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) - return - } - req := &pbFriend.AddBlacklistReq{ - Uid: params.UID, - OperationID: params.OperationID, - Token: c.Request.Header.Get("token"), - OwnerUid: params.OwnerUid, - } - log.Info(req.Token, req.OperationID, "api add blacklist is server:userID=%s", req.Uid) - RpcResp, err := client.AddBlacklist(context.Background(), req) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,call add blacklist rpc server failed", err) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call add blacklist rpc server failed"}) - return - } - log.InfoByArgs("call add blacklist rpc server success,args=%s", RpcResp.String()) - resp := gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg} - c.JSON(http.StatusOK, resp) - log.InfoByArgs("api add blacklist success return,get args=%s,return args=%s", req.String(), RpcResp.String()) -} diff --git a/internal/api/friend/add_friend.go b/internal/api/friend/add_friend.go deleted file mode 100644 index 8753a2350..000000000 --- a/internal/api/friend/add_friend.go +++ /dev/null @@ -1,88 +0,0 @@ -package friend - -import ( - "Open_IM/pkg/common/config" - "Open_IM/pkg/common/log" - "Open_IM/pkg/grpc-etcdv3/getcdv3" - pbFriend "Open_IM/pkg/proto/friend" - "context" - "github.com/gin-gonic/gin" - "net/http" - "strings" -) - -type paramsImportFriendReq struct { - OperationID string `json:"operationID" binding:"required"` - UIDList []string `json:"uidList" binding:"required"` - OwnerUid string `json:"ownerUid" binding:"required"` -} - -type paramsAddFriend struct { - OperationID string `json:"operationID" binding:"required"` - UID string `json:"uid" binding:"required"` - ReqMessage string `json:"reqMessage"` -} - -// -func ImportFriend(c *gin.Context) { - log.Info("", "", "ImportFriend init ....") - log.NewDebug("", "api importFriend start") - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) - client := pbFriend.NewFriendClient(etcdConn) - - params := paramsImportFriendReq{} - if err := c.BindJSON(¶ms); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) - return - } - req := &pbFriend.ImportFriendReq{ - UidList: params.UIDList, - OperationID: params.OperationID, - OwnerUid: params.OwnerUid, - Token: c.Request.Header.Get("token"), - } - log.NewDebug(req.OperationID, "args is ", req.String()) - RpcResp, err := client.ImportFriend(context.Background(), req) - if err != nil { - log.NewError(req.OperationID, "rpc importFriend failed", err.Error()) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "cImportFriend failed " + err.Error()}) - return - } - failedUidList := make([]string, 0) - for _, v := range RpcResp.FailedUidList { - failedUidList = append(failedUidList, v) - } - log.NewDebug(req.OperationID, "rpc importFriend success", RpcResp.CommonResp.ErrorMsg, RpcResp.CommonResp.ErrorCode, RpcResp.FailedUidList) - c.JSON(http.StatusOK, gin.H{"errCode": RpcResp.CommonResp.ErrorCode, "errMsg": RpcResp.CommonResp.ErrorMsg, "failedUidList": failedUidList}) -} - -func AddFriend(c *gin.Context) { - log.Info("", "", "api add friend init ....") - - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) - client := pbFriend.NewFriendClient(etcdConn) - - params := paramsAddFriend{} - if err := c.BindJSON(¶ms); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) - return - } - req := &pbFriend.AddFriendReq{ - Uid: params.UID, - OperationID: params.OperationID, - ReqMessage: params.ReqMessage, - Token: c.Request.Header.Get("token"), - } - log.Info(req.Token, req.OperationID, "api add friend is server") - RpcResp, err := client.AddFriend(context.Background(), req) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,call add friend rpc server failed", err) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call add friend rpc server failed"}) - return - } - log.InfoByArgs("call add friend rpc server success,args=%s", RpcResp.String()) - c.JSON(http.StatusOK, gin.H{ - "errCode": RpcResp.ErrorCode, - "errMsg": RpcResp.ErrorMsg, - }) -} diff --git a/internal/api/friend/add_friend_response.go b/internal/api/friend/add_friend_response.go deleted file mode 100644 index c29f2181e..000000000 --- a/internal/api/friend/add_friend_response.go +++ /dev/null @@ -1,49 +0,0 @@ -package friend - -import ( - "Open_IM/pkg/common/config" - "Open_IM/pkg/common/log" - "Open_IM/pkg/grpc-etcdv3/getcdv3" - pbFriend "Open_IM/pkg/proto/friend" - "context" - "fmt" - "github.com/gin-gonic/gin" - "net/http" - "strings" -) - -type paramsAddFriendResponse struct { - OperationID string `json:"operationID" binding:"required"` - UID string `json:"uid" binding:"required"` - Flag int32 `json:"flag" binding:"required"` -} - -func AddFriendResponse(c *gin.Context) { - log.Info("", "", fmt.Sprintf("api add friend response init ....")) - - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) - client := pbFriend.NewFriendClient(etcdConn) - //defer etcdConn.Close() - - params := paramsAddFriendResponse{} - if err := c.BindJSON(¶ms); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) - return - } - req := &pbFriend.AddFriendResponseReq{ - Uid: params.UID, - Flag: params.Flag, - OperationID: params.OperationID, - Token: c.Request.Header.Get("token"), - } - log.Info(req.Token, req.OperationID, "api add friend response is server:userID=%s", req.Uid) - RpcResp, err := client.AddFriendResponse(context.Background(), req) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,call add_friend_response rpc server failed", err) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call add_friend_response rpc server failed"}) - return - } - log.InfoByArgs("call add friend response rpc server success,args=%s", RpcResp.String()) - c.JSON(http.StatusOK, gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg}) - log.InfoByArgs("api add friend response success return,get args=%s,return args=%s", req.String(), RpcResp.String()) -} diff --git a/internal/api/friend/delete_friend.go b/internal/api/friend/delete_friend.go deleted file mode 100644 index daf81f340..000000000 --- a/internal/api/friend/delete_friend.go +++ /dev/null @@ -1,48 +0,0 @@ -package friend - -import ( - "Open_IM/pkg/common/config" - "Open_IM/pkg/common/log" - "Open_IM/pkg/grpc-etcdv3/getcdv3" - pbFriend "Open_IM/pkg/proto/friend" - "context" - "fmt" - "github.com/gin-gonic/gin" - "net/http" - "strings" -) - -type paramsDeleteFriend struct { - OperationID string `json:"operationID" binding:"required"` - UID string `json:"uid" binding:"required"` -} - -func DeleteFriend(c *gin.Context) { - log.Info("", "", fmt.Sprintf("api delete_friend init ....")) - - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) - client := pbFriend.NewFriendClient(etcdConn) - //defer etcdConn.Close() - - params := paramsDeleteFriend{} - if err := c.BindJSON(¶ms); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) - return - } - req := &pbFriend.DeleteFriendReq{ - Uid: params.UID, - OperationID: params.OperationID, - Token: c.Request.Header.Get("token"), - } - log.Info(req.Token, req.OperationID, "api delete_friend is server:%s", req.Uid) - RpcResp, err := client.DeleteFriend(context.Background(), req) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,call delete_friend rpc server failed", err) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call delete_friend rpc server failed"}) - return - } - log.InfoByArgs("call delete_friend rpc server,args=%s", RpcResp.String()) - resp := gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg} - c.JSON(http.StatusOK, resp) - log.InfoByArgs("api delete_friend success return,get args=%s,return args=%s", req.String(), RpcResp.String()) -} diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go new file mode 100644 index 000000000..1bd0fa6fa --- /dev/null +++ b/internal/api/friend/friend.go @@ -0,0 +1,604 @@ +package friend + +import ( + "Open_IM/pkg/common/config" + "Open_IM/pkg/common/log" + "Open_IM/pkg/common/token_verify" + "Open_IM/pkg/grpc-etcdv3/getcdv3" + pbFriend "Open_IM/pkg/proto/friend" + "Open_IM/pkg/utils" + "context" + "github.com/gin-gonic/gin" + "net/http" + "strings" +) + +type paramsCommFriend struct { + OperationID string `json:"operationID" binding:"required"` + ToUserID string `json:"toUserID" binding:"required"` + FromUserID string `json:"fromUserID" binding:"required"` +} + +func AddBlacklist(c *gin.Context) { + params := paramsCommFriend{} + if err := c.BindJSON(¶ms); err != nil { + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) + log.NewError("0", "BindJSON failed ", err.Error()) + return + } + req := &pbFriend.AddBlacklistReq{} + utils.CopyStructFields(req.CommID, params) + var ok bool + ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + if !ok { + log.NewError(req.CommID.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) + return + } + log.NewInfo(params.OperationID, "AddBlacklist args ", req.String()) + + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) + client := pbFriend.NewFriendClient(etcdConn) + RpcResp, err := client.AddBlacklist(context.Background(), req) + if err != nil { + log.NewError(req.CommID.OperationID, "AddBlacklist failed ", err.Error()) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call add blacklist rpc server failed"}) + return + } + + resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg} + c.JSON(http.StatusOK, resp) + log.NewInfo(req.CommID.OperationID, "AddBlacklist api return ", resp) +} + +type paramsImportFriendReq struct { + FriendUserIDList []string `json:"friendUserIDList" binding:"required"` + OperationID string `json:"operationID" binding:"required"` + Token string `json:"token"` + FromUserID string `json:"fromUserID" binding:"required"` + OpUserID string `json:"opUserID" binding:"required"` +} + +func ImportFriend(c *gin.Context) { + params := paramsImportFriendReq{} + if err := c.BindJSON(¶ms); err != nil { + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) + log.NewError("0", "BindJSON failed ", err.Error()) + return + } + + req := &pbFriend.ImportFriendReq{} + utils.CopyStructFields(req, params) + var ok bool + ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + if !ok { + log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) + return + } + + log.NewInfo(req.OperationID, "ImportFriend args ", req.String()) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) + client := pbFriend.NewFriendClient(etcdConn) + RpcResp, err := client.ImportFriend(context.Background(), req) + if err != nil { + log.NewError(req.OperationID, "ImportFriend failed", err.Error(), req.String()) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "cImportFriend failed " + err.Error()}) + return + } + + failedUidList := make([]string, 0) + for _, v := range RpcResp.FailedUidList { + failedUidList = append(failedUidList, v) + } + resp := gin.H{"errCode": RpcResp.CommonResp.ErrCode, "errMsg": RpcResp.CommonResp.ErrMsg, "failedUidList": failedUidList} + c.JSON(http.StatusOK, resp) + log.NewInfo(req.OperationID, "AddBlacklist api return ", resp) +} + +type paramsAddFriend struct { + paramsCommFriend + ReqMessage string `json:"reqMessage"` +} + +func AddFriend(c *gin.Context) { + params := paramsAddFriend{} + if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) + return + } + req := &pbFriend.AddFriendReq{} + utils.CopyStructFields(req.CommID, params) + var ok bool + ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + if !ok { + log.NewError(req.CommID.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) + return + } + req.ReqMessage = params.ReqMessage + log.NewInfo("AddFriend args ", req.String()) + + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) + client := pbFriend.NewFriendClient(etcdConn) + RpcResp, err := client.AddFriend(context.Background(), req) + if err != nil { + log.NewError(req.CommID.OperationID, "AddFriend failed ", err.Error(), req.String()) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call AddFriend rpc server failed"}) + return + } + + resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg} + c.JSON(http.StatusOK, resp) + log.NewInfo(req.CommID.OperationID, "AddFriend api return ", resp) +} + +type paramsAddFriendResponse struct { + paramsCommFriend + Flag int32 `json:"flag" binding:"required"` +} + +func AddFriendResponse(c *gin.Context) { + params := paramsAddFriendResponse{} + if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) + return + } + req := &pbFriend.AddFriendResponseReq{} + utils.CopyStructFields(req.CommID, params) + var ok bool + ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + if !ok { + log.NewError(req.CommID.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) + return + } + req.Flag = params.Flag + + log.NewInfo(req.CommID.OperationID, "AddFriendResponse args ", req.String()) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) + client := pbFriend.NewFriendClient(etcdConn) + RpcResp, err := client.AddFriendResponse(context.Background(), req) + if err != nil { + log.NewError(req.CommID.OperationID, "AddFriendResponse failed ", err.Error(), req.String()) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call add_friend_response rpc server failed"}) + return + } + + resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg} + c.JSON(http.StatusOK, resp) + log.NewInfo(req.CommID.OperationID, "AddFriendResponse api return ", resp) +} + +type paramsDeleteFriend struct { + paramsCommFriend +} + +func DeleteFriend(c *gin.Context) { + params := paramsDeleteFriend{} + if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) + return + } + req := &pbFriend.DeleteFriendReq{} + utils.CopyStructFields(req.CommID, params) + var ok bool + ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + if !ok { + log.NewError(req.CommID.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) + return + } + log.NewInfo(req.CommID.OperationID, "DeleteFriend args ", req.String()) + + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) + client := pbFriend.NewFriendClient(etcdConn) + RpcResp, err := client.DeleteFriend(context.Background(), req) + if err != nil { + log.NewError(req.CommID.OperationID, "DeleteFriend failed ", err, req.String()) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call delete_friend rpc server failed"}) + return + } + + resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg} + c.JSON(http.StatusOK, resp) + log.NewInfo(req.CommID.OperationID, "AddFriendResponse api return ", resp) +} + +type paramsGetBlackList struct { + paramsCommFriend +} + +type PublicUserInfo struct { + UserID string `json:"userID"` + Nickname string `json:"nickname"` + FaceUrl string `json:"faceUrl"` + Gender int32 `json:"gender"` +} + +type blackUserInfo struct { + PublicUserInfo +} + +func GetBlacklist(c *gin.Context) { + params := paramsGetBlackList{} + if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) + return + } + req := &pbFriend.GetBlacklistReq{} + utils.CopyStructFields(req.CommID, params) + var ok bool + ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + if !ok { + log.NewError(req.CommID.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) + return + } + + log.NewInfo(req.CommID.OperationID, "GetBlacklist args ", req.String()) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) + client := pbFriend.NewFriendClient(etcdConn) + RpcResp, err := client.GetBlacklist(context.Background(), req) + if err != nil { + log.NewError(req.CommID.OperationID, "GetBlacklist failed ", err.Error(), req.String()) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call get blacklist rpc server failed"}) + return + } + + if RpcResp.ErrCode == 0 { + userBlackList := make([]blackUserInfo, 0) + for _, friend := range RpcResp.Data { + var b blackUserInfo + utils.CopyStructFields(&b, friend) + + userBlackList = append(userBlackList, b) + } + resp := gin.H{ + "errCode": RpcResp.ErrCode, + "errMsg": RpcResp.ErrMsg, + "data": userBlackList, + } + c.JSON(http.StatusOK, resp) + log.NewInfo(req.CommID.OperationID, "GetBlacklist api return ", resp) + } else { + resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg} + c.JSON(http.StatusOK, resp) + log.NewError(req.CommID.OperationID, "GetBlacklist api return ", resp) + } +} + +type paramsSetFriendComment struct { + paramsCommFriend + remark string `json:"remark" binding:"required"` +} + +func SetFriendComment(c *gin.Context) { + params := paramsSetFriendComment{} + if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) + return + } + req := &pbFriend.SetFriendCommentReq{} + utils.CopyStructFields(req.CommID, params) + var ok bool + ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + if !ok { + log.NewError(req.CommID.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) + return + } + req.Remark = params.remark + + log.NewInfo(req.CommID.OperationID, "SetFriendComment args ", req.String()) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) + client := pbFriend.NewFriendClient(etcdConn) + RpcResp, err := client.SetFriendComment(context.Background(), req) + if err != nil { + log.NewError(req.CommID.OperationID, "SetFriendComment failed ", err.Error(), req.String()) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call set friend comment rpc server failed"}) + return + } + resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg} + c.JSON(http.StatusOK, resp) + log.NewInfo(req.CommID.OperationID, "SetFriendComment api return ", resp) +} + +type paramsRemoveBlackList struct { + paramsCommFriend +} + +func RemoveBlacklist(c *gin.Context) { + params := paramsRemoveBlackList{} + if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) + return + } + req := &pbFriend.RemoveBlacklistReq{} + utils.CopyStructFields(req.CommID, params) + var ok bool + ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + if !ok { + log.NewError(req.CommID.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) + return + } + + log.NewInfo(req.CommID.OperationID, "RemoveBlacklist args ", req.String()) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) + client := pbFriend.NewFriendClient(etcdConn) + RpcResp, err := client.RemoveBlacklist(context.Background(), req) + if err != nil { + log.NewError(req.CommID.OperationID, "RemoveBlacklist failed ", err.Error(), req.String()) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call remove blacklist rpc server failed"}) + return + } + + resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg} + c.JSON(http.StatusOK, resp) + log.NewInfo(req.CommID.OperationID, "SetFriendComment api return ", resp) +} + +type paramsIsFriend struct { + paramsCommFriend +} + +func IsFriend(c *gin.Context) { + params := paramsIsFriend{} + if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) + return + } + req := &pbFriend.IsFriendReq{} + utils.CopyStructFields(req.CommID, params) + var ok bool + ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + if !ok { + log.NewError(req.CommID.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) + return + } + log.NewInfo(req.CommID.OperationID, "IsFriend args ", req.String()) + + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) + client := pbFriend.NewFriendClient(etcdConn) + RpcResp, err := client.IsFriend(context.Background(), req) + if err != nil { + log.NewError(req.CommID.OperationID, "IsFriend failed ", err.Error(), req.String()) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call add friend rpc server failed"}) + return + } + resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg, "isFriend": RpcResp.ShipType} + c.JSON(http.StatusOK, resp) + log.NewInfo(req.CommID.OperationID, "IsFriend api return ", resp) +} + +type paramsSearchFriend struct { + paramsCommFriend +} + +func GetFriendsInfo(c *gin.Context) { + params := paramsSearchFriend{} + if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) + return + } + req := &pbFriend.GetFriendsInfoReq{} + utils.CopyStructFields(req.CommID, params) + var ok bool + ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + if !ok { + log.NewError(req.CommID.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) + return + } + log.NewInfo(req.CommID.OperationID, "GetFriendsInfo args ", req.String()) + + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) + client := pbFriend.NewFriendClient(etcdConn) + RpcResp, err := client.GetFriendsInfo(context.Background(), req) + if err != nil { + log.NewError(req.CommID.OperationID, "GetFriendsInfo failed ", err.Error(), req.String()) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call search friend rpc server failed"}) + return + } + + if RpcResp.ErrCode == 0 { + var fi friendInfo + utils.CopyStructFields(&fi, RpcResp.Data.FriendUser) + utils.CopyStructFields(&fi, RpcResp.Data) + + resp := gin.H{ + "errCode": RpcResp.ErrCode, + "errMsg": RpcResp.ErrMsg, + "data": fi, + } + log.NewInfo(req.CommID.OperationID, "IsFriend api return ", resp) + c.JSON(http.StatusOK, resp) + } else { + resp := gin.H{ + "errCode": RpcResp.ErrCode, + "errMsg": RpcResp.ErrMsg, + } + log.NewInfo(req.CommID.OperationID, "IsFriend api return ", resp) + c.JSON(http.StatusOK, resp) + } +} + +type paramsGetFriendList struct { + paramsCommFriend +} + +type friendInfo struct { + UserID string `json:"userID"` + Nickname string `json:"nickname"` + FaceUrl string `json:"faceUrl"` + Gender int32 `json:"gender"` + Mobile string `json:"mobile"` + Birth string `json:"birth"` + Email string `json:"email"` + Ext string `json:"ext"` + Remark string `json:"remark"` + IsBlack int32 `json:"isBlack"` +} + +func GetFriendList(c *gin.Context) { + params := paramsGetFriendList{} + if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) + return + } + req := &pbFriend.GetFriendListReq{} + utils.CopyStructFields(req.CommID, params) + var ok bool + ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + if !ok { + log.NewError(req.CommID.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) + return + } + log.NewInfo(req.CommID.OperationID, "GetFriendList args ", req.String()) + + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) + client := pbFriend.NewFriendClient(etcdConn) + RpcResp, err := client.GetFriendList(context.Background(), req) + if err != nil { + log.NewError(req.CommID.OperationID, "GetFriendList failed ", err.Error(), req.String()) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call get friend list rpc server failed"}) + return + } + + if RpcResp.ErrCode == 0 { + friendsInfo := make([]friendInfo, 0) + for _, friend := range RpcResp.Data { + + var fi friendInfo + utils.CopyStructFields(&fi, friend.FriendUser) + utils.CopyStructFields(&fi, RpcResp.Data) + friendsInfo = append(friendsInfo, fi) + } + resp := gin.H{ + "errCode": RpcResp.ErrCode, + "errMsg": RpcResp.ErrMsg, + "data": friendsInfo, + } + c.JSON(http.StatusOK, resp) + log.NewInfo(req.CommID.OperationID, "IsFriend api return ", resp) + } else { + resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg} + c.JSON(http.StatusOK, resp) + log.NewInfo(req.CommID.OperationID, "IsFriend api return ", resp) + } + +} + +type paramsGetApplyList struct { + paramsCommFriend +} + +type FriendApplicationUserInfo struct { + PublicUserInfo + ApplyTime int64 `json:"applyTime"` + ReqMessage string `json:"reqMessage` + Flag int32 `json:"flag"` +} + +func GetFriendApplyList(c *gin.Context) { + params := paramsGetApplyList{} + if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) + return + } + req := &pbFriend.GetFriendApplyReq{} + utils.CopyStructFields(req.CommID, params) + var ok bool + ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + if !ok { + log.NewError(req.CommID.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) + return + } + log.NewInfo(req.CommID.OperationID, "GetFriendApplyList args ", req.String()) + + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) + client := pbFriend.NewFriendClient(etcdConn) + + RpcResp, err := client.GetFriendApplyList(context.Background(), req) + if err != nil { + log.NewError(req.CommID.OperationID, "GetFriendApplyList failed ", err.Error(), req.String()) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call get friend apply list rpc server failed"}) + return + } + + if RpcResp.ErrCode == 0 { + userInfoList := make([]FriendApplicationUserInfo, 0) + for _, applyUserinfo := range RpcResp.Data { + var un FriendApplicationUserInfo + utils.CopyStructFields(&un, applyUserinfo.UserInfo) + utils.CopyStructFields(&un, applyUserinfo) + userInfoList = append(userInfoList, un) + } + resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg, "data": userInfoList} + c.JSON(http.StatusOK, resp) + log.NewInfo(req.CommID.OperationID, "IsFriend api return ", resp) + } else { + resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg} + c.JSON(http.StatusOK, resp) + log.NewInfo(req.CommID.OperationID, "IsFriend api return ", resp) + } +} + +func GetSelfApplyList(c *gin.Context) { + params := paramsGetApplyList{} + if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) + return + } + req := &pbFriend.GetFriendApplyReq{} + utils.CopyStructFields(req.CommID, params) + var ok bool + ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + if !ok { + log.NewError(req.CommID.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) + return + } + log.NewInfo(req.CommID.OperationID, "GetSelfApplyList args ", req.String()) + + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) + client := pbFriend.NewFriendClient(etcdConn) + RpcResp, err := client.GetSelfApplyList(context.Background(), req) + if err != nil { + log.NewError(req.CommID.OperationID, "GetSelfApplyList failed ", err.Error(), req.String()) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call get self apply list rpc server failed"}) + return + } + + if RpcResp.ErrCode == 0 { + userInfoList := make([]FriendApplicationUserInfo, 0) + for _, applyUserinfo := range RpcResp.Data { + var un FriendApplicationUserInfo + utils.CopyStructFields(&un, applyUserinfo.UserInfo) + utils.CopyStructFields(&un, applyUserinfo) + userInfoList = append(userInfoList, un) + } + resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg, "data": userInfoList} + c.JSON(http.StatusOK, resp) + log.NewInfo(req.CommID.OperationID, "IsFriend api return ", resp) + } else { + resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg} + c.JSON(http.StatusOK, resp) + log.NewInfo(req.CommID.OperationID, "IsFriend api return ", resp) + } +} diff --git a/internal/api/friend/get_blcaklist.go b/internal/api/friend/get_blcaklist.go deleted file mode 100644 index 3b36dc107..000000000 --- a/internal/api/friend/get_blcaklist.go +++ /dev/null @@ -1,79 +0,0 @@ -package friend - -import ( - "Open_IM/pkg/common/config" - "Open_IM/pkg/common/log" - "Open_IM/pkg/grpc-etcdv3/getcdv3" - pbFriend "Open_IM/pkg/proto/friend" - "context" - "fmt" - "github.com/gin-gonic/gin" - "net/http" - "strings" -) - -type paramsGetBlackList struct { - OperationID string `json:"operationID" binding:"required"` -} - -type blackListUserInfo struct { - UID string `json:"uid"` - Name string `json:"name"` - Icon string `json:"icon"` - Gender int32 `json:"gender"` - Mobile string `json:"mobile"` - Birth string `json:"birth"` - Email string `json:"email"` - Ex string `json:"ex"` -} - -func GetBlacklist(c *gin.Context) { - log.Info("", "", "api get blacklist init ....") - - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) - client := pbFriend.NewFriendClient(etcdConn) - //defer etcdConn.Close() - - params := paramsGetBlackList{} - if err := c.BindJSON(¶ms); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) - return - } - req := &pbFriend.GetBlacklistReq{ - OperationID: params.OperationID, - Token: c.Request.Header.Get("token"), - } - log.Info(req.Token, req.OperationID, fmt.Sprintf("api get blacklist is server")) - RpcResp, err := client.GetBlacklist(context.Background(), req) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,call get_friend_list rpc server failed", err) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call get blacklist rpc server failed"}) - return - } - log.InfoByArgs("call get blacklist rpc server success,args=%s", RpcResp.String()) - if RpcResp.ErrorCode == 0 { - userBlackList := make([]blackListUserInfo, 0) - for _, friend := range RpcResp.Data { - var fi blackListUserInfo - fi.UID = friend.Uid - fi.Name = friend.Name - fi.Icon = friend.Icon - fi.Gender = friend.Gender - fi.Mobile = friend.Mobile - fi.Birth = friend.Birth - fi.Email = friend.Email - fi.Ex = friend.Ex - userBlackList = append(userBlackList, fi) - } - resp := gin.H{ - "errCode": RpcResp.ErrorCode, - "errMsg": RpcResp.ErrorMsg, - "data": userBlackList, - } - c.JSON(http.StatusOK, resp) - } else { - resp := gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg} - c.JSON(http.StatusOK, resp) - } - log.InfoByArgs("api get black list success return,get args=%s,return=%s", req.String(), RpcResp.String()) -} diff --git a/internal/api/friend/get_friend_apply_list.go b/internal/api/friend/get_friend_apply_list.go deleted file mode 100644 index 1ace2bcac..000000000 --- a/internal/api/friend/get_friend_apply_list.go +++ /dev/null @@ -1,129 +0,0 @@ -package friend - -import ( - "Open_IM/pkg/common/config" - "Open_IM/pkg/common/log" - "Open_IM/pkg/grpc-etcdv3/getcdv3" - pbFriend "Open_IM/pkg/proto/friend" - "context" - "github.com/gin-gonic/gin" - "net/http" - "strings" -) - -type paramsGetApplyList struct { - OperationID string `json:"operationID" binding:"required"` -} -type UserInfo struct { - UID string `json:"uid"` - Name string `json:"name"` - Icon string `json:"icon"` - Gender int32 `json:"gender"` - Mobile string `json:"mobile"` - Birth string `json:"birth"` - Email string `json:"email"` - Ex string `json:"ex"` - ReqMessage string `json:"reqMessage"` - ApplyTime string `json:"applyTime"` - Flag int32 `json:"flag"` -} - -func GetFriendApplyList(c *gin.Context) { - log.Info("", "", "api get_friend_apply_list init ....") - - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) - client := pbFriend.NewFriendClient(etcdConn) - //defer etcdConn.Close() - - params := paramsGetApplyList{} - if err := c.BindJSON(¶ms); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) - return - } - req := &pbFriend.GetFriendApplyReq{ - OperationID: params.OperationID, - Token: c.Request.Header.Get("token"), - } - log.Info(req.Token, req.OperationID, "api get friend apply list is server") - RpcResp, err := client.GetFriendApplyList(context.Background(), req) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,call get friend apply list rpc server failed", err) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call get friend apply list rpc server failed"}) - return - } - log.InfoByArgs("call get friend apply list rpc server success,args=%s", RpcResp.String()) - if RpcResp.ErrorCode == 0 { - userInfoList := make([]UserInfo, 0) - for _, applyUserinfo := range RpcResp.Data { - var un UserInfo - un.UID = applyUserinfo.Uid - un.Name = applyUserinfo.Name - un.Icon = applyUserinfo.Icon - un.Gender = applyUserinfo.Gender - un.Mobile = applyUserinfo.Mobile - un.Birth = applyUserinfo.Birth - un.Email = applyUserinfo.Email - un.Ex = applyUserinfo.Ex - un.Flag = applyUserinfo.Flag - un.ApplyTime = applyUserinfo.ApplyTime - un.ReqMessage = applyUserinfo.ReqMessage - userInfoList = append(userInfoList, un) - } - resp := gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg, "data": userInfoList} - c.JSON(http.StatusOK, resp) - } else { - resp := gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg} - c.JSON(http.StatusOK, resp) - } - log.InfoByArgs("api get friend apply list success return,get args=%s,return args=%s", req.String(), RpcResp.String()) -} - -func GetSelfApplyList(c *gin.Context) { - log.Info("", "", "api get self friend apply list init ....") - - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) - client := pbFriend.NewFriendClient(etcdConn) - //defer etcdConn.Close() - - params := paramsGetApplyList{} - if err := c.BindJSON(¶ms); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) - return - } - req := &pbFriend.GetFriendApplyReq{ - OperationID: params.OperationID, - Token: c.Request.Header.Get("token"), - } - log.Info(req.Token, req.OperationID, "api get self apply list is server") - RpcResp, err := client.GetSelfApplyList(context.Background(), req) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,call get self apply list rpc server failed", err) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call get self apply list rpc server failed"}) - return - } - log.InfoByArgs("call get self apply list rpc server success,args=%s", RpcResp.String()) - if RpcResp.ErrorCode == 0 { - userInfoList := make([]UserInfo, 0) - for _, selfApplyOtherUserinfo := range RpcResp.Data { - var un UserInfo - un.UID = selfApplyOtherUserinfo.Uid - un.Name = selfApplyOtherUserinfo.Name - un.Icon = selfApplyOtherUserinfo.Icon - un.Gender = selfApplyOtherUserinfo.Gender - un.Mobile = selfApplyOtherUserinfo.Mobile - un.Birth = selfApplyOtherUserinfo.Birth - un.Email = selfApplyOtherUserinfo.Email - un.Ex = selfApplyOtherUserinfo.Ex - un.Flag = selfApplyOtherUserinfo.Flag - un.ApplyTime = selfApplyOtherUserinfo.ApplyTime - un.ReqMessage = selfApplyOtherUserinfo.ReqMessage - userInfoList = append(userInfoList, un) - } - resp := gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg, "data": userInfoList} - c.JSON(http.StatusOK, resp) - } else { - resp := gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg} - c.JSON(http.StatusOK, resp) - } - log.InfoByArgs("api get self apply list success return,get args=%s,return args=%s", req.String(), RpcResp.String()) -} diff --git a/internal/api/friend/get_friend_list.go b/internal/api/friend/get_friend_list.go deleted file mode 100644 index 3c87e1ced..000000000 --- a/internal/api/friend/get_friend_list.go +++ /dev/null @@ -1,83 +0,0 @@ -package friend - -import ( - "Open_IM/pkg/common/config" - "Open_IM/pkg/common/log" - "Open_IM/pkg/grpc-etcdv3/getcdv3" - pbFriend "Open_IM/pkg/proto/friend" - "context" - "fmt" - "github.com/gin-gonic/gin" - "net/http" - "strings" -) - -type paramsGetFriendLIst struct { - OperationID string `json:"operationID" binding:"required"` -} - -type friendInfo struct { - UID string `json:"uid"` - Name string `json:"name"` - Icon string `json:"icon"` - Gender int32 `json:"gender"` - Mobile string `json:"mobile"` - Birth string `json:"birth"` - Email string `json:"email"` - Ex string `json:"ex"` - Comment string `json:"comment"` - IsInBlackList int32 `json:"isInBlackList"` -} - -func GetFriendList(c *gin.Context) { - log.Info("", "", fmt.Sprintf("api get_friendlist init ....")) - - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) - client := pbFriend.NewFriendClient(etcdConn) - //defer etcdConn.Close() - - params := paramsGetFriendLIst{} - if err := c.BindJSON(¶ms); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) - return - } - req := &pbFriend.GetFriendListReq{ - OperationID: params.OperationID, - Token: c.Request.Header.Get("token"), - } - log.Info(req.Token, req.OperationID, "api get friend list is server") - RpcResp, err := client.GetFriendList(context.Background(), req) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,call get friend list rpc server failed", err) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call get friend list rpc server failed"}) - return - } - log.InfoByArgs("call get friend list rpc server success,args=%s", RpcResp.String()) - if RpcResp.ErrorCode == 0 { - friendsInfo := make([]friendInfo, 0) - for _, friend := range RpcResp.Data { - var fi friendInfo - fi.UID = friend.Uid - fi.Name = friend.Name - fi.Icon = friend.Icon - fi.Gender = friend.Gender - fi.Mobile = friend.Mobile - fi.Birth = friend.Birth - fi.Email = friend.Email - fi.Ex = friend.Ex - fi.Comment = friend.Comment - fi.IsInBlackList = friend.IsInBlackList - friendsInfo = append(friendsInfo, fi) - } - resp := gin.H{ - "errCode": RpcResp.ErrorCode, - "errMsg": RpcResp.ErrorMsg, - "data": friendsInfo, - } - c.JSON(http.StatusOK, resp) - } else { - resp := gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg} - c.JSON(http.StatusOK, resp) - } - log.InfoByArgs("api get friend list success return,get args=%s,return=%s", req.String(), RpcResp.String()) -} diff --git a/internal/api/friend/get_friends_info.go b/internal/api/friend/get_friends_info.go deleted file mode 100644 index 636d4db7c..000000000 --- a/internal/api/friend/get_friends_info.go +++ /dev/null @@ -1,70 +0,0 @@ -package friend - -import ( - "Open_IM/pkg/common/config" - "Open_IM/pkg/common/log" - "Open_IM/pkg/grpc-etcdv3/getcdv3" - pbFriend "Open_IM/pkg/proto/friend" - "context" - "fmt" - "github.com/gin-gonic/gin" - "net/http" - "strings" -) - -type paramsSearchFriend struct { - OperationID string `json:"operationID" binding:"required"` - UID string `json:"uid" binding:"required"` - OwnerUid string `json:"ownerUid"` -} - -func GetFriendsInfo(c *gin.Context) { - log.Info("", "", fmt.Sprintf("api search friend init ....")) - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) - client := pbFriend.NewFriendClient(etcdConn) - //defer etcdConn.Close() - - params := paramsSearchFriend{} - if err := c.BindJSON(¶ms); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) - return - } - req := &pbFriend.GetFriendsInfoReq{ - Uid: params.UID, - OperationID: params.OperationID, - Token: c.Request.Header.Get("token"), - } - log.Info(req.Token, req.OperationID, "api search_friend is server") - RpcResp, err := client.GetFriendsInfo(context.Background(), req) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,call search friend rpc server failed", err) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call search friend rpc server failed"}) - return - } - log.InfoByArgs("call search friend rpc server success,args=%s", RpcResp.String()) - if RpcResp.ErrorCode == 0 { - resp := gin.H{ - "errCode": RpcResp.ErrorCode, - "errMsg": RpcResp.ErrorMsg, - "data": gin.H{ - "uid": RpcResp.Data.Uid, - "icon": RpcResp.Data.Icon, - "name": RpcResp.Data.Name, - "gender": RpcResp.Data.Gender, - "mobile": RpcResp.Data.Mobile, - "birth": RpcResp.Data.Birth, - "email": RpcResp.Data.Email, - "ex": RpcResp.Data.Ex, - "comment": RpcResp.Data.Comment, - }, - } - c.JSON(http.StatusOK, resp) - } else { - resp := gin.H{ - "errCode": RpcResp.ErrorCode, - "errMsg": RpcResp.ErrorMsg, - } - c.JSON(http.StatusOK, resp) - } - log.InfoByArgs("api search_friend success return,get args=%s,return=%s", req.String(), RpcResp.String()) -} diff --git a/internal/api/friend/is_friend.go b/internal/api/friend/is_friend.go deleted file mode 100644 index e5e51ed8d..000000000 --- a/internal/api/friend/is_friend.go +++ /dev/null @@ -1,47 +0,0 @@ -package friend - -import ( - "Open_IM/pkg/common/config" - "Open_IM/pkg/common/log" - "Open_IM/pkg/grpc-etcdv3/getcdv3" - pbFriend "Open_IM/pkg/proto/friend" - "context" - "github.com/gin-gonic/gin" - "net/http" - "strings" -) - -type paramsIsFriend struct { - OperationID string `json:"operationID" binding:"required"` - ReceiveUid string `json:"receive_uid"` -} - -func IsFriend(c *gin.Context) { - log.Info("", "", "api is friend init....") - - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) - client := pbFriend.NewFriendClient(etcdConn) - //defer etcdConn.Close() - - params := paramsIsFriend{} - if err := c.BindJSON(¶ms); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) - return - } - req := &pbFriend.IsFriendReq{ - OperationID: params.OperationID, - ReceiveUid: params.OperationID, - Token: c.Request.Header.Get("token"), - } - log.Info(req.Token, req.OperationID, "api is friend is server") - RpcResp, err := client.IsFriend(context.Background(), req) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,call add friend rpc server failed", err) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call add friend rpc server failed"}) - return - } - log.InfoByArgs("call is friend rpc server success,args=%s", RpcResp.String()) - resp := gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg, "isFriend": RpcResp.ShipType} - c.JSON(http.StatusOK, resp) - log.InfoByArgs("api is friend success return,get args=%s,return args=%s", req.String(), RpcResp.String()) -} diff --git a/internal/api/friend/remove_blacklist.go b/internal/api/friend/remove_blacklist.go deleted file mode 100644 index 6952da091..000000000 --- a/internal/api/friend/remove_blacklist.go +++ /dev/null @@ -1,47 +0,0 @@ -package friend - -import ( - "Open_IM/pkg/common/config" - "Open_IM/pkg/common/log" - "Open_IM/pkg/grpc-etcdv3/getcdv3" - pbFriend "Open_IM/pkg/proto/friend" - "context" - "github.com/gin-gonic/gin" - "net/http" - "strings" -) - -type paramsRemoveBlackList struct { - OperationID string `json:"operationID" binding:"required"` - UID string `json:"uid" binding:"required"` -} - -func RemoveBlacklist(c *gin.Context) { - log.Info("", "", "api remove_blacklist init ....") - - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) - client := pbFriend.NewFriendClient(etcdConn) - //defer etcdConn.Close() - - params := paramsRemoveBlackList{} - if err := c.BindJSON(¶ms); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) - return - } - req := &pbFriend.RemoveBlacklistReq{ - Uid: params.UID, - OperationID: params.OperationID, - Token: c.Request.Header.Get("token"), - } - log.Info(req.Token, req.OperationID, "api remove blacklist is server:userID=%s", req.Uid) - RpcResp, err := client.RemoveBlacklist(context.Background(), req) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,call remove blacklist rpc server failed", err) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call remove blacklist rpc server failed"}) - return - } - log.InfoByArgs("call remove blacklist rpc server success,args=%s", RpcResp.String()) - resp := gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg} - c.JSON(http.StatusOK, resp) - log.InfoByArgs("api remove blacklist success return,get args=%s,return args=%s", req.String(), RpcResp.String()) -} diff --git a/internal/api/friend/set_friend_comment.go b/internal/api/friend/set_friend_comment.go deleted file mode 100644 index 77fe3411f..000000000 --- a/internal/api/friend/set_friend_comment.go +++ /dev/null @@ -1,48 +0,0 @@ -package friend - -import ( - "Open_IM/pkg/common/config" - "Open_IM/pkg/common/log" - "Open_IM/pkg/grpc-etcdv3/getcdv3" - pbFriend "Open_IM/pkg/proto/friend" - "context" - "github.com/gin-gonic/gin" - "net/http" - "strings" -) - -type paramsSetFriendComment struct { - OperationID string `json:"operationID" binding:"required"` - UID string `json:"uid" binding:"required"` - Comment string `json:"comment"` -} - -func SetFriendComment(c *gin.Context) { - log.Info("", "", "api set friend comment init ....") - - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) - client := pbFriend.NewFriendClient(etcdConn) - //defer etcdConn.Close() - - params := paramsSetFriendComment{} - if err := c.BindJSON(¶ms); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) - return - } - req := &pbFriend.SetFriendCommentReq{ - Uid: params.UID, - OperationID: params.OperationID, - Comment: params.Comment, - Token: c.Request.Header.Get("token"), - } - log.Info(req.Token, req.OperationID, "api set friend comment is server") - RpcResp, err := client.SetFriendComment(context.Background(), req) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,call set friend comment rpc server failed", err) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call set friend comment rpc server failed"}) - return - } - log.Info("", "", "call set friend comment rpc server success,args=%s", RpcResp.String()) - c.JSON(http.StatusOK, gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg}) - log.Info("", "", "api set friend comment success return,get args=%s,return args=%s", req.String(), RpcResp.String()) -} diff --git a/internal/api/group/create_group.go b/internal/api/group/create_group.go deleted file mode 100644 index 564aee400..000000000 --- a/internal/api/group/create_group.go +++ /dev/null @@ -1,61 +0,0 @@ -package group - -import ( - "Open_IM/pkg/common/config" - "Open_IM/pkg/common/log" - "Open_IM/pkg/grpc-etcdv3/getcdv3" - pb "Open_IM/pkg/proto/group" - "context" - "github.com/gin-gonic/gin" - "net/http" - "strings" -) - -type paramsCreateGroupStruct struct { - MemberList []*pb.GroupAddMemberInfo `json:"memberList"` - GroupName string `json:"groupName"` - Introduction string `json:"introduction"` - Notification string `json:"notification"` - FaceUrl string `json:"faceUrl"` - OperationID string `json:"operationID" binding:"required"` - Ex string `json:"ex"` -} - -func CreateGroup(c *gin.Context) { - log.Info("", "", "api create group init ....") - - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) - client := pb.NewGroupClient(etcdConn) - //defer etcdConn.Close() - - params := paramsCreateGroupStruct{} - if err := c.BindJSON(¶ms); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) - return - } - req := &pb.CreateGroupReq{ - MemberList: params.MemberList, - GroupName: params.GroupName, - Introduction: params.Introduction, - Notification: params.Notification, - FaceUrl: params.FaceUrl, - OperationID: params.OperationID, - Ex: params.Ex, - Token: c.Request.Header.Get("token"), - } - log.Info(req.Token, req.OperationID, "api create group is server,params=%s", req.String()) - RpcResp, err := client.CreateGroup(context.Background(), req) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,call create group rpc server failed", err.Error()) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) - return - } - log.InfoByArgs("call create group rpc server success,args=%s", RpcResp.String()) - if RpcResp.ErrorCode == 0 { - resp := gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg, "data": gin.H{"groupID": RpcResp.GroupID}} - c.JSON(http.StatusOK, resp) - } else { - c.JSON(http.StatusOK, gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg}) - } - log.InfoByArgs("api create group success return,get args=%s,return args=%s", req.String(), RpcResp.String()) -} diff --git a/internal/api/group/get_group_applicationList.go b/internal/api/group/get_group_applicationList.go deleted file mode 100644 index a9fa1c73c..000000000 --- a/internal/api/group/get_group_applicationList.go +++ /dev/null @@ -1,113 +0,0 @@ -package group - -import ( - "Open_IM/pkg/common/config" - "Open_IM/pkg/common/log" - "Open_IM/pkg/common/token_verify" - "Open_IM/pkg/grpc-etcdv3/getcdv3" - "Open_IM/pkg/proto/group" - "context" - "github.com/gin-gonic/gin" - "net/http" - "strings" -) - -type paramsGroupApplicationList struct { - OperationID string `json:"operationID" binding:"required"` -} - -func newUserRegisterReq(params *paramsGroupApplicationList) *group.GetGroupApplicationListReq { - pbData := group.GetGroupApplicationListReq{ - OperationID: params.OperationID, - } - return &pbData -} - -type paramsGroupApplicationListRet struct { - ID string `json:"id"` - GroupID string `json:"groupID"` - FromUserID string `json:"fromUserID"` - ToUserID string `json:"toUserID"` - Flag int32 `json:"flag"` - RequestMsg string `json:"reqMsg"` - HandledMsg string `json:"handledMsg"` - AddTime int64 `json:"createTime"` - FromUserNickname string `json:"fromUserNickName"` - ToUserNickname string `json:"toUserNickName"` - FromUserFaceUrl string `json:"fromUserFaceURL"` - ToUserFaceUrl string `json:"toUserFaceURL"` - HandledUser string `json:"handledUser"` - Type int32 `json:"type"` - HandleStatus int32 `json:"handleStatus"` - HandleResult int32 `json:"handleResult"` -} - -func GetGroupApplicationList(c *gin.Context) { - log.Info("", "", "api GetGroupApplicationList init ....") - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) - client := group.NewGroupClient(etcdConn) - //defer etcdConn.Close() - - params := paramsGroupApplicationList{} - if err := c.BindJSON(¶ms); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) - return - } - pbData := newUserRegisterReq(¶ms) - - token := c.Request.Header.Get("token") - if claims, err := token_verify.ParseToken(token); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "token validate err"}) - return - } else { - pbData.UID = claims.UID - } - - log.Info("", "", "api GetGroupApplicationList is server, [data: %s]", pbData.String()) - reply, err := client.GetGroupApplicationList(context.Background(), pbData) - if err != nil { - log.Error("", "", "api GetGroupApplicationList call rpc fail, [data: %s] [err: %s]", pbData.String(), err.Error()) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) - return - } - log.Info("", "", "api GetGroupApplicationList call rpc success, [data: %s] [reply: %s]", pbData.String(), reply.String()) - - unProcessCount := 0 - userReq := make([]paramsGroupApplicationListRet, 0) - if reply != nil && reply.Data != nil && reply.Data.User != nil { - for i := 0; i < len(reply.Data.User); i++ { - req := paramsGroupApplicationListRet{} - req.ID = reply.Data.User[i].ID - req.GroupID = reply.Data.User[i].GroupID - req.FromUserID = reply.Data.User[i].FromUserID - req.ToUserID = reply.Data.User[i].ToUserID - req.Flag = reply.Data.User[i].Flag - req.RequestMsg = reply.Data.User[i].RequestMsg - req.HandledMsg = reply.Data.User[i].HandledMsg - req.AddTime = reply.Data.User[i].AddTime - req.FromUserNickname = reply.Data.User[i].FromUserNickname - req.ToUserNickname = reply.Data.User[i].ToUserNickname - req.FromUserFaceUrl = reply.Data.User[i].FromUserFaceUrl - req.ToUserFaceUrl = reply.Data.User[i].ToUserFaceUrl - req.HandledUser = reply.Data.User[i].HandledUser - req.Type = reply.Data.User[i].Type - req.HandleStatus = reply.Data.User[i].HandleStatus - req.HandleResult = reply.Data.User[i].HandleResult - userReq = append(userReq, req) - - if req.Flag == 0 { - unProcessCount++ - } - } - } - - c.JSON(http.StatusOK, gin.H{ - "errCode": reply.ErrCode, - "errMsg": reply.ErrMsg, - "data": gin.H{ - "count": unProcessCount, - "user": userReq, - }, - }) - -} diff --git a/internal/api/group/get_groups_info.go b/internal/api/group/get_groups_info.go deleted file mode 100644 index 251cd8b09..000000000 --- a/internal/api/group/get_groups_info.go +++ /dev/null @@ -1,67 +0,0 @@ -package group - -import ( - "Open_IM/pkg/common/config" - "Open_IM/pkg/common/log" - "Open_IM/pkg/grpc-etcdv3/getcdv3" - pb "Open_IM/pkg/proto/group" - "context" - "github.com/gin-gonic/gin" - "net/http" - "strings" -) - -type paramsGetGroupInfo struct { - GroupIDList []string `json:"groupIDList" binding:"required"` - OperationID string `json:"operationID" binding:"required"` -} - -func GetGroupsInfo(c *gin.Context) { - log.Info("", "", "api get groups info init ....") - - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) - client := pb.NewGroupClient(etcdConn) - //defer etcdConn.Close() - - params := paramsGetGroupInfo{} - if err := c.BindJSON(¶ms); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) - return - } - req := &pb.GetGroupsInfoReq{ - GroupIDList: params.GroupIDList, - Token: c.Request.Header.Get("token"), - OperationID: params.OperationID, - } - log.Info(req.Token, req.OperationID, "get groups info is server,params=%s", req.String()) - RpcResp, err := client.GetGroupsInfo(context.Background(), req) - if err != nil { - log.Error(req.Token, req.OperationID, "call get groups info rpc server failed,err=%s", err.Error()) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) - return - } - log.InfoByArgs("call get groups info rpc server success", RpcResp.String()) - if RpcResp.ErrorCode == 0 { - groupsInfo := make([]pb.GroupInfo, 0) - for _, v := range RpcResp.Data { - var groupInfo pb.GroupInfo - groupInfo.GroupId = v.GroupId - groupInfo.GroupName = v.GroupName - groupInfo.Notification = v.Notification - groupInfo.Introduction = v.Introduction - groupInfo.FaceUrl = v.FaceUrl - groupInfo.CreateTime = v.CreateTime - groupInfo.OwnerId = v.OwnerId - groupInfo.MemberCount = v.MemberCount - - groupsInfo = append(groupsInfo, groupInfo) - } - c.JSON(http.StatusOK, gin.H{ - "errCode": RpcResp.ErrorCode, - "errMsg": RpcResp.ErrorMsg, - "data": groupsInfo, - }) - } else { - c.JSON(http.StatusOK, gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg}) - } -} diff --git a/internal/api/group/group.go b/internal/api/group/group.go index 0fd05b3bd..10ddf9ddd 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -3,6 +3,7 @@ package group import ( "Open_IM/pkg/common/config" "Open_IM/pkg/common/log" + "Open_IM/pkg/common/token_verify" "Open_IM/pkg/grpc-etcdv3/getcdv3" pb "Open_IM/pkg/proto/group" "context" @@ -31,10 +32,6 @@ type KickGroupMemberReq struct { } func KickGroupMember(c *gin.Context) { - log.Info("", "", "KickGroupMember start....") - - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) - client := pb.NewGroupClient(etcdConn) params := KickGroupMemberReq{} if err := c.BindJSON(¶ms); err != nil { @@ -50,7 +47,8 @@ func KickGroupMember(c *gin.Context) { UidListInfo: params.UidListInfo, } log.Info(req.Token, req.OperationID, "recv req: ", req.String()) - + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) + client := pb.NewGroupClient(etcdConn) RpcResp, err := client.KickGroupMember(context.Background(), req) if err != nil { log.Error(req.Token, req.OperationID, "GetGroupMemberList failed, err: ", err.Error()) @@ -349,3 +347,445 @@ func InviteUserToGroup(c *gin.Context) { //resp := gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg, "data": RpcResp.Id2Result} c.JSON(http.StatusOK, iResp) } + +type paramsCreateGroupStruct struct { + MemberList []*pb.GroupAddMemberInfo `json:"memberList"` + GroupName string `json:"groupName"` + Introduction string `json:"introduction"` + Notification string `json:"notification"` + FaceUrl string `json:"faceUrl"` + OperationID string `json:"operationID" binding:"required"` + Ex string `json:"ex"` +} + +func CreateGroup(c *gin.Context) { + log.Info("", "", "api create group init ....") + + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) + client := pb.NewGroupClient(etcdConn) + //defer etcdConn.Close() + + params := paramsCreateGroupStruct{} + if err := c.BindJSON(¶ms); err != nil { + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) + return + } + req := &pb.CreateGroupReq{ + MemberList: params.MemberList, + GroupName: params.GroupName, + Introduction: params.Introduction, + Notification: params.Notification, + FaceUrl: params.FaceUrl, + OperationID: params.OperationID, + Ex: params.Ex, + Token: c.Request.Header.Get("token"), + } + log.Info(req.Token, req.OperationID, "api create group is server,params=%s", req.String()) + RpcResp, err := client.CreateGroup(context.Background(), req) + if err != nil { + log.Error(req.Token, req.OperationID, "err=%s,call create group rpc server failed", err.Error()) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) + return + } + log.InfoByArgs("call create group rpc server success,args=%s", RpcResp.String()) + if RpcResp.ErrorCode == 0 { + resp := gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg, "data": gin.H{"groupID": RpcResp.GroupID}} + c.JSON(http.StatusOK, resp) + } else { + c.JSON(http.StatusOK, gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg}) + } + log.InfoByArgs("api create group success return,get args=%s,return args=%s", req.String(), RpcResp.String()) +} + +type paramsGroupApplicationList struct { + OperationID string `json:"operationID" binding:"required"` +} + +func newUserRegisterReq(params *paramsGroupApplicationList) *group.GetGroupApplicationListReq { + pbData := group.GetGroupApplicationListReq{ + OperationID: params.OperationID, + } + return &pbData +} + +type paramsGroupApplicationListRet struct { + ID string `json:"id"` + GroupID string `json:"groupID"` + FromUserID string `json:"fromUserID"` + ToUserID string `json:"toUserID"` + Flag int32 `json:"flag"` + RequestMsg string `json:"reqMsg"` + HandledMsg string `json:"handledMsg"` + AddTime int64 `json:"createTime"` + FromUserNickname string `json:"fromUserNickName"` + ToUserNickname string `json:"toUserNickName"` + FromUserFaceUrl string `json:"fromUserFaceURL"` + ToUserFaceUrl string `json:"toUserFaceURL"` + HandledUser string `json:"handledUser"` + Type int32 `json:"type"` + HandleStatus int32 `json:"handleStatus"` + HandleResult int32 `json:"handleResult"` +} + +func GetGroupApplicationList(c *gin.Context) { + log.Info("", "", "api GetGroupApplicationList init ....") + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) + client := group.NewGroupClient(etcdConn) + //defer etcdConn.Close() + + params := paramsGroupApplicationList{} + if err := c.BindJSON(¶ms); err != nil { + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) + return + } + pbData := newUserRegisterReq(¶ms) + + token := c.Request.Header.Get("token") + if claims, err := token_verify.ParseToken(token); err != nil { + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "token validate err"}) + return + } else { + pbData.UID = claims.UID + } + + log.Info("", "", "api GetGroupApplicationList is server, [data: %s]", pbData.String()) + reply, err := client.GetGroupApplicationList(context.Background(), pbData) + if err != nil { + log.Error("", "", "api GetGroupApplicationList call rpc fail, [data: %s] [err: %s]", pbData.String(), err.Error()) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) + return + } + log.Info("", "", "api GetGroupApplicationList call rpc success, [data: %s] [reply: %s]", pbData.String(), reply.String()) + + unProcessCount := 0 + userReq := make([]paramsGroupApplicationListRet, 0) + if reply != nil && reply.Data != nil && reply.Data.User != nil { + for i := 0; i < len(reply.Data.User); i++ { + req := paramsGroupApplicationListRet{} + req.ID = reply.Data.User[i].ID + req.GroupID = reply.Data.User[i].GroupID + req.FromUserID = reply.Data.User[i].FromUserID + req.ToUserID = reply.Data.User[i].ToUserID + req.Flag = reply.Data.User[i].Flag + req.RequestMsg = reply.Data.User[i].RequestMsg + req.HandledMsg = reply.Data.User[i].HandledMsg + req.AddTime = reply.Data.User[i].AddTime + req.FromUserNickname = reply.Data.User[i].FromUserNickname + req.ToUserNickname = reply.Data.User[i].ToUserNickname + req.FromUserFaceUrl = reply.Data.User[i].FromUserFaceUrl + req.ToUserFaceUrl = reply.Data.User[i].ToUserFaceUrl + req.HandledUser = reply.Data.User[i].HandledUser + req.Type = reply.Data.User[i].Type + req.HandleStatus = reply.Data.User[i].HandleStatus + req.HandleResult = reply.Data.User[i].HandleResult + userReq = append(userReq, req) + + if req.Flag == 0 { + unProcessCount++ + } + } + } + + c.JSON(http.StatusOK, gin.H{ + "errCode": reply.ErrCode, + "errMsg": reply.ErrMsg, + "data": gin.H{ + "count": unProcessCount, + "user": userReq, + }, + }) + +} + +type paramsGetGroupInfo struct { + GroupIDList []string `json:"groupIDList" binding:"required"` + OperationID string `json:"operationID" binding:"required"` +} + +func GetGroupsInfo(c *gin.Context) { + log.Info("", "", "api get groups info init ....") + + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) + client := pb.NewGroupClient(etcdConn) + //defer etcdConn.Close() + + params := paramsGetGroupInfo{} + if err := c.BindJSON(¶ms); err != nil { + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) + return + } + req := &pb.GetGroupsInfoReq{ + GroupIDList: params.GroupIDList, + Token: c.Request.Header.Get("token"), + OperationID: params.OperationID, + } + log.Info(req.Token, req.OperationID, "get groups info is server,params=%s", req.String()) + RpcResp, err := client.GetGroupsInfo(context.Background(), req) + if err != nil { + log.Error(req.Token, req.OperationID, "call get groups info rpc server failed,err=%s", err.Error()) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) + return + } + log.InfoByArgs("call get groups info rpc server success", RpcResp.String()) + if RpcResp.ErrorCode == 0 { + groupsInfo := make([]pb.GroupInfo, 0) + for _, v := range RpcResp.Data { + var groupInfo pb.GroupInfo + groupInfo.GroupId = v.GroupId + groupInfo.GroupName = v.GroupName + groupInfo.Notification = v.Notification + groupInfo.Introduction = v.Introduction + groupInfo.FaceUrl = v.FaceUrl + groupInfo.CreateTime = v.CreateTime + groupInfo.OwnerId = v.OwnerId + groupInfo.MemberCount = v.MemberCount + + groupsInfo = append(groupsInfo, groupInfo) + } + c.JSON(http.StatusOK, gin.H{ + "errCode": RpcResp.ErrorCode, + "errMsg": RpcResp.ErrorMsg, + "data": groupsInfo, + }) + } else { + c.JSON(http.StatusOK, gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg}) + } +} + +type paramsGroupApplicationResponse struct { + OperationID string `json:"operationID" binding:"required"` + GroupID string `json:"groupID" binding:"required"` + FromUserID string `json:"fromUserID" binding:"required"` + FromUserNickName string `json:"fromUserNickName"` + FromUserFaceUrl string `json:"fromUserFaceUrl"` + ToUserID string `json:"toUserID" binding:"required"` + ToUserNickName string `json:"toUserNickName"` + ToUserFaceUrl string `json:"toUserFaceUrl"` + AddTime int64 `json:"addTime"` + RequestMsg string `json:"requestMsg"` + HandledMsg string `json:"handledMsg"` + Type int32 `json:"type"` + HandleStatus int32 `json:"handleStatus"` + HandleResult int32 `json:"handleResult"` + + UserID string `json:"userID"` +} + +func newGroupApplicationResponse(params *paramsGroupApplicationResponse) *group.GroupApplicationResponseReq { + pbData := group.GroupApplicationResponseReq{ + OperationID: params.OperationID, + GroupID: params.GroupID, + FromUserID: params.FromUserID, + FromUserNickName: params.FromUserNickName, + FromUserFaceUrl: params.FromUserFaceUrl, + ToUserID: params.ToUserID, + ToUserNickName: params.ToUserNickName, + ToUserFaceUrl: params.ToUserFaceUrl, + AddTime: params.AddTime, + RequestMsg: params.RequestMsg, + HandledMsg: params.HandledMsg, + Type: params.Type, + HandleStatus: params.HandleStatus, + HandleResult: params.HandleResult, + } + return &pbData +} + +func ApplicationGroupResponse(c *gin.Context) { + log.Info("", "", "api GroupApplicationResponse init ....") + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) + client := group.NewGroupClient(etcdConn) + //defer etcdConn.Close() + + params := paramsGroupApplicationResponse{} + if err := c.BindJSON(¶ms); err != nil { + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) + return + } + pbData := newGroupApplicationResponse(¶ms) + + token := c.Request.Header.Get("token") + if claims, err := token_verify.ParseToken(token); err != nil { + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "token validate err"}) + return + } else { + pbData.OwnerID = claims.UID + } + + log.Info("", "", "api GroupApplicationResponse is server, [data: %s]", pbData.String()) + reply, err := client.GroupApplicationResponse(context.Background(), pbData) + if err != nil { + log.Error("", "", "api GroupApplicationResponse call rpc fail, [data: %s] [err: %s]", pbData.String(), err.Error()) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) + return + } + log.Info("", "", "api GroupApplicationResponse call rpc success, [data: %s] [reply: %s]", pbData.String(), reply.String()) + + c.JSON(http.StatusOK, gin.H{ + "errCode": reply.ErrCode, + "errMsg": reply.ErrMsg, + }) + +} + +type paramsJoinGroup struct { + GroupID string `json:"groupID" binding:"required"` + Message string `json:"message"` + OperationID string `json:"operationID" binding:"required"` +} + +func JoinGroup(c *gin.Context) { + log.Info("", "", "api join group init....") + + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) + client := pb.NewGroupClient(etcdConn) + //defer etcdConn.Close() + + params := paramsJoinGroup{} + if err := c.BindJSON(¶ms); err != nil { + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) + return + } + req := &pb.JoinGroupReq{ + GroupID: params.GroupID, + Message: params.Message, + Token: c.Request.Header.Get("token"), + OperationID: params.OperationID, + } + log.Info(req.Token, req.OperationID, "api join group is server,params=%s", req.String()) + RpcResp, err := client.JoinGroup(context.Background(), req) + if err != nil { + log.Error(req.Token, req.OperationID, "call join group rpc server failed,err=%s", err.Error()) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) + return + } + log.InfoByArgs("call join group rpc server success,args=%s", RpcResp.String()) + c.JSON(http.StatusOK, gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg}) +} + +type paramsQuitGroup struct { + GroupID string `json:"groupID" binding:"required"` + OperationID string `json:"operationID" binding:"required"` +} + +func QuitGroup(c *gin.Context) { + log.Info("", "", "api quit group init ....") + + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) + client := pb.NewGroupClient(etcdConn) + //defer etcdConn.Close() + + params := paramsQuitGroup{} + if err := c.BindJSON(¶ms); err != nil { + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) + return + } + req := &pb.QuitGroupReq{ + GroupID: params.GroupID, + OperationID: params.OperationID, + Token: c.Request.Header.Get("token"), + } + log.Info(req.Token, req.OperationID, "api quit group is server,params=%s", req.String()) + RpcResp, err := client.QuitGroup(context.Background(), req) + if err != nil { + log.Error(req.Token, req.OperationID, "call quit group rpc server failed,err=%s", err.Error()) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) + return + } + log.InfoByArgs("call quit group rpc server success,args=%s", RpcResp.String()) + c.JSON(http.StatusOK, gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg}) + log.InfoByArgs("api quit group success return,get args=%s,return args=%s", req.String(), RpcResp.String()) +} + +type paramsSetGroupInfo struct { + GroupID string `json:"groupId" binding:"required"` + GroupName string `json:"groupName"` + Notification string `json:"notification"` + Introduction string `json:"introduction"` + FaceUrl string `json:"faceUrl"` + OperationID string `json:"operationID" binding:"required"` +} + +func SetGroupInfo(c *gin.Context) { + log.Info("", "", "api set group info init...") + + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) + client := pb.NewGroupClient(etcdConn) + //defer etcdConn.Close() + + params := paramsSetGroupInfo{} + if err := c.BindJSON(¶ms); err != nil { + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) + return + } + req := &pb.SetGroupInfoReq{ + GroupID: params.GroupID, + GroupName: params.GroupName, + Notification: params.Notification, + Introduction: params.Introduction, + FaceUrl: params.FaceUrl, + Token: c.Request.Header.Get("token"), + OperationID: params.OperationID, + } + log.Info(req.Token, req.OperationID, "api set group info is server,params=%s", req.String()) + RpcResp, err := client.SetGroupInfo(context.Background(), req) + if err != nil { + log.Error(req.Token, req.OperationID, "call set group info rpc server failed,err=%s", err.Error()) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) + return + } + log.InfoByArgs("call set group info rpc server success,args=%s", RpcResp.String()) + c.JSON(http.StatusOK, gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg}) +} + +type paramsTransferGroupOwner struct { + OperationID string `json:"operationID" binding:"required"` + GroupID string `json:"groupID" binding:"required"` + UID string `json:"uid" binding:"required"` +} + +func newTransferGroupOwnerReq(params *paramsTransferGroupOwner) *group.TransferGroupOwnerReq { + pbData := group.TransferGroupOwnerReq{ + OperationID: params.OperationID, + GroupID: params.GroupID, + NewOwner: params.UID, + } + return &pbData +} + +func TransferGroupOwner(c *gin.Context) { + log.Info("", "", "api TransferGroupOwner init ....") + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) + client := group.NewGroupClient(etcdConn) + //defer etcdConn.Close() + + params := paramsTransferGroupOwner{} + if err := c.BindJSON(¶ms); err != nil { + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) + return + } + pbData := newTransferGroupOwnerReq(¶ms) + + token := c.Request.Header.Get("token") + if claims, err := token_verify.ParseToken(token); err != nil { + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "token validate err"}) + return + } else { + pbData.OldOwner = claims.UID + } + + log.Info("", "", "api TransferGroupOwner is server, [data: %s]", pbData.String()) + reply, err := client.TransferGroupOwner(context.Background(), pbData) + if err != nil { + log.Error("", "", "api TransferGroupOwner call rpc fail, [data: %s] [err: %s]", pbData.String(), err.Error()) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) + return + } + log.Info("", "", "api TransferGroupOwner call rpc success, [data: %s] [reply: %s]", pbData.String(), reply.String()) + + c.JSON(http.StatusOK, gin.H{ + "errCode": reply.ErrCode, + "errMsg": reply.ErrMsg, + }) + +} diff --git a/internal/api/group/group_application_response.go b/internal/api/group/group_application_response.go deleted file mode 100644 index 3a7e9343c..000000000 --- a/internal/api/group/group_application_response.go +++ /dev/null @@ -1,89 +0,0 @@ -package group - -import ( - "Open_IM/pkg/common/config" - "Open_IM/pkg/common/log" - "Open_IM/pkg/common/token_verify" - "Open_IM/pkg/grpc-etcdv3/getcdv3" - "Open_IM/pkg/proto/group" - "context" - "github.com/gin-gonic/gin" - "net/http" - "strings" -) - -type paramsGroupApplicationResponse struct { - OperationID string `json:"operationID" binding:"required"` - GroupID string `json:"groupID" binding:"required"` - FromUserID string `json:"fromUserID" binding:"required"` - FromUserNickName string `json:"fromUserNickName"` - FromUserFaceUrl string `json:"fromUserFaceUrl"` - ToUserID string `json:"toUserID" binding:"required"` - ToUserNickName string `json:"toUserNickName"` - ToUserFaceUrl string `json:"toUserFaceUrl"` - AddTime int64 `json:"addTime"` - RequestMsg string `json:"requestMsg"` - HandledMsg string `json:"handledMsg"` - Type int32 `json:"type"` - HandleStatus int32 `json:"handleStatus"` - HandleResult int32 `json:"handleResult"` - - UserID string `json:"userID"` -} - -func newGroupApplicationResponse(params *paramsGroupApplicationResponse) *group.GroupApplicationResponseReq { - pbData := group.GroupApplicationResponseReq{ - OperationID: params.OperationID, - GroupID: params.GroupID, - FromUserID: params.FromUserID, - FromUserNickName: params.FromUserNickName, - FromUserFaceUrl: params.FromUserFaceUrl, - ToUserID: params.ToUserID, - ToUserNickName: params.ToUserNickName, - ToUserFaceUrl: params.ToUserFaceUrl, - AddTime: params.AddTime, - RequestMsg: params.RequestMsg, - HandledMsg: params.HandledMsg, - Type: params.Type, - HandleStatus: params.HandleStatus, - HandleResult: params.HandleResult, - } - return &pbData -} - -func ApplicationGroupResponse(c *gin.Context) { - log.Info("", "", "api GroupApplicationResponse init ....") - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) - client := group.NewGroupClient(etcdConn) - //defer etcdConn.Close() - - params := paramsGroupApplicationResponse{} - if err := c.BindJSON(¶ms); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) - return - } - pbData := newGroupApplicationResponse(¶ms) - - token := c.Request.Header.Get("token") - if claims, err := token_verify.ParseToken(token); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "token validate err"}) - return - } else { - pbData.OwnerID = claims.UID - } - - log.Info("", "", "api GroupApplicationResponse is server, [data: %s]", pbData.String()) - reply, err := client.GroupApplicationResponse(context.Background(), pbData) - if err != nil { - log.Error("", "", "api GroupApplicationResponse call rpc fail, [data: %s] [err: %s]", pbData.String(), err.Error()) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) - return - } - log.Info("", "", "api GroupApplicationResponse call rpc success, [data: %s] [reply: %s]", pbData.String(), reply.String()) - - c.JSON(http.StatusOK, gin.H{ - "errCode": reply.ErrCode, - "errMsg": reply.ErrMsg, - }) - -} diff --git a/internal/api/group/join_group.go b/internal/api/group/join_group.go deleted file mode 100644 index cc4600333..000000000 --- a/internal/api/group/join_group.go +++ /dev/null @@ -1,47 +0,0 @@ -package group - -import ( - "Open_IM/pkg/common/config" - "Open_IM/pkg/common/log" - "Open_IM/pkg/grpc-etcdv3/getcdv3" - pb "Open_IM/pkg/proto/group" - "context" - "github.com/gin-gonic/gin" - "net/http" - "strings" -) - -type paramsJoinGroup struct { - GroupID string `json:"groupID" binding:"required"` - Message string `json:"message"` - OperationID string `json:"operationID" binding:"required"` -} - -func JoinGroup(c *gin.Context) { - log.Info("", "", "api join group init....") - - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) - client := pb.NewGroupClient(etcdConn) - //defer etcdConn.Close() - - params := paramsJoinGroup{} - if err := c.BindJSON(¶ms); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) - return - } - req := &pb.JoinGroupReq{ - GroupID: params.GroupID, - Message: params.Message, - Token: c.Request.Header.Get("token"), - OperationID: params.OperationID, - } - log.Info(req.Token, req.OperationID, "api join group is server,params=%s", req.String()) - RpcResp, err := client.JoinGroup(context.Background(), req) - if err != nil { - log.Error(req.Token, req.OperationID, "call join group rpc server failed,err=%s", err.Error()) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) - return - } - log.InfoByArgs("call join group rpc server success,args=%s", RpcResp.String()) - c.JSON(http.StatusOK, gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg}) -} diff --git a/internal/api/group/quit_group.go b/internal/api/group/quit_group.go deleted file mode 100644 index 5ee485459..000000000 --- a/internal/api/group/quit_group.go +++ /dev/null @@ -1,46 +0,0 @@ -package group - -import ( - "Open_IM/pkg/common/config" - "Open_IM/pkg/common/log" - "Open_IM/pkg/grpc-etcdv3/getcdv3" - pb "Open_IM/pkg/proto/group" - "context" - "github.com/gin-gonic/gin" - "net/http" - "strings" -) - -type paramsQuitGroup struct { - GroupID string `json:"groupID" binding:"required"` - OperationID string `json:"operationID" binding:"required"` -} - -func QuitGroup(c *gin.Context) { - log.Info("", "", "api quit group init ....") - - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) - client := pb.NewGroupClient(etcdConn) - //defer etcdConn.Close() - - params := paramsQuitGroup{} - if err := c.BindJSON(¶ms); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) - return - } - req := &pb.QuitGroupReq{ - GroupID: params.GroupID, - OperationID: params.OperationID, - Token: c.Request.Header.Get("token"), - } - log.Info(req.Token, req.OperationID, "api quit group is server,params=%s", req.String()) - RpcResp, err := client.QuitGroup(context.Background(), req) - if err != nil { - log.Error(req.Token, req.OperationID, "call quit group rpc server failed,err=%s", err.Error()) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) - return - } - log.InfoByArgs("call quit group rpc server success,args=%s", RpcResp.String()) - c.JSON(http.StatusOK, gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg}) - log.InfoByArgs("api quit group success return,get args=%s,return args=%s", req.String(), RpcResp.String()) -} diff --git a/internal/api/group/set_group_info.go b/internal/api/group/set_group_info.go deleted file mode 100644 index 0075acc86..000000000 --- a/internal/api/group/set_group_info.go +++ /dev/null @@ -1,53 +0,0 @@ -package group - -import ( - "Open_IM/pkg/common/config" - "Open_IM/pkg/common/log" - "Open_IM/pkg/grpc-etcdv3/getcdv3" - pb "Open_IM/pkg/proto/group" - "context" - "github.com/gin-gonic/gin" - "net/http" - "strings" -) - -type paramsSetGroupInfo struct { - GroupID string `json:"groupId" binding:"required"` - GroupName string `json:"groupName"` - Notification string `json:"notification"` - Introduction string `json:"introduction"` - FaceUrl string `json:"faceUrl"` - OperationID string `json:"operationID" binding:"required"` -} - -func SetGroupInfo(c *gin.Context) { - log.Info("", "", "api set group info init...") - - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) - client := pb.NewGroupClient(etcdConn) - //defer etcdConn.Close() - - params := paramsSetGroupInfo{} - if err := c.BindJSON(¶ms); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) - return - } - req := &pb.SetGroupInfoReq{ - GroupID: params.GroupID, - GroupName: params.GroupName, - Notification: params.Notification, - Introduction: params.Introduction, - FaceUrl: params.FaceUrl, - Token: c.Request.Header.Get("token"), - OperationID: params.OperationID, - } - log.Info(req.Token, req.OperationID, "api set group info is server,params=%s", req.String()) - RpcResp, err := client.SetGroupInfo(context.Background(), req) - if err != nil { - log.Error(req.Token, req.OperationID, "call set group info rpc server failed,err=%s", err.Error()) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) - return - } - log.InfoByArgs("call set group info rpc server success,args=%s", RpcResp.String()) - c.JSON(http.StatusOK, gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg}) -} diff --git a/internal/api/group/transfer_group_owner.go b/internal/api/group/transfer_group_owner.go deleted file mode 100644 index d8cc9d662..000000000 --- a/internal/api/group/transfer_group_owner.go +++ /dev/null @@ -1,65 +0,0 @@ -package group - -import ( - "Open_IM/pkg/common/config" - "Open_IM/pkg/common/log" - "Open_IM/pkg/common/token_verify" - "Open_IM/pkg/grpc-etcdv3/getcdv3" - "Open_IM/pkg/proto/group" - "context" - "github.com/gin-gonic/gin" - "net/http" - "strings" -) - -type paramsTransferGroupOwner struct { - OperationID string `json:"operationID" binding:"required"` - GroupID string `json:"groupID" binding:"required"` - UID string `json:"uid" binding:"required"` -} - -func newTransferGroupOwnerReq(params *paramsTransferGroupOwner) *group.TransferGroupOwnerReq { - pbData := group.TransferGroupOwnerReq{ - OperationID: params.OperationID, - GroupID: params.GroupID, - NewOwner: params.UID, - } - return &pbData -} - -func TransferGroupOwner(c *gin.Context) { - log.Info("", "", "api TransferGroupOwner init ....") - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) - client := group.NewGroupClient(etcdConn) - //defer etcdConn.Close() - - params := paramsTransferGroupOwner{} - if err := c.BindJSON(¶ms); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) - return - } - pbData := newTransferGroupOwnerReq(¶ms) - - token := c.Request.Header.Get("token") - if claims, err := token_verify.ParseToken(token); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "token validate err"}) - return - } else { - pbData.OldOwner = claims.UID - } - - log.Info("", "", "api TransferGroupOwner is server, [data: %s]", pbData.String()) - reply, err := client.TransferGroupOwner(context.Background(), pbData) - if err != nil { - log.Error("", "", "api TransferGroupOwner call rpc fail, [data: %s] [err: %s]", pbData.String(), err.Error()) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) - return - } - log.Info("", "", "api TransferGroupOwner call rpc success, [data: %s] [reply: %s]", pbData.String(), reply.String()) - - c.JSON(http.StatusOK, gin.H{ - "errCode": reply.ErrCode, - "errMsg": reply.ErrMsg, - }) - -} diff --git a/internal/rpc/friend/add_blacklist.go b/internal/rpc/friend/add_blacklist.go deleted file mode 100644 index 07fa2d032..000000000 --- a/internal/rpc/friend/add_blacklist.go +++ /dev/null @@ -1,47 +0,0 @@ -package friend - -import ( - "Open_IM/pkg/common/config" - "Open_IM/pkg/common/constant" - "Open_IM/pkg/common/db/mysql_model/im_mysql_model" - "Open_IM/pkg/common/log" - "Open_IM/pkg/common/token_verify" - pbFriend "Open_IM/pkg/proto/friend" - "Open_IM/pkg/utils" - "context" -) - -func (s *friendServer) AddBlacklist(ctx context.Context, req *pbFriend.AddBlacklistReq) (*pbFriend.CommonResp, error) { - log.Info(req.Token, req.OperationID, "rpc add blacklist is server,args=%s", req.String()) - //Parse token, to find current user information - claims, err := token_verify.ParseToken(req.Token) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) - return &pbFriend.CommonResp{ErrorCode: constant.ErrParseToken.ErrCode, ErrorMsg: constant.ErrParseToken.ErrMsg}, nil - } - - isMagagerFlag := 0 - tokenUid := claims.UID - - if utils.IsContain(tokenUid, config.Config.Manager.AppManagerUid) { - isMagagerFlag = 1 - } - - if isMagagerFlag == 0 { - err = im_mysql_model.InsertInToUserBlackList(claims.UID, req.Uid) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,Failed to add blacklist", err.Error()) - return &pbFriend.CommonResp{ErrorCode: constant.ErrMysql.ErrCode, ErrorMsg: constant.ErrMysql.ErrMsg}, nil - } - log.Info(req.Token, req.OperationID, "rpc add blacklist success return,uid=%s", req.Uid) - return &pbFriend.CommonResp{}, nil - } - - err = im_mysql_model.InsertInToUserBlackList(req.OwnerUid, req.Uid) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,Failed to add blacklist", err.Error()) - return &pbFriend.CommonResp{ErrorCode: constant.ErrMysql.ErrCode, ErrorMsg: constant.ErrMysql.ErrMsg}, nil - } - log.Info(req.Token, req.OperationID, "rpc add blacklist success return,uid=%s", req.Uid) - return &pbFriend.CommonResp{}, nil -} diff --git a/internal/rpc/friend/add_friend.go b/internal/rpc/friend/add_friend.go deleted file mode 100644 index cc10572b5..000000000 --- a/internal/rpc/friend/add_friend.go +++ /dev/null @@ -1,133 +0,0 @@ -package friend - -import ( - "Open_IM/internal/push/content_struct" - "Open_IM/internal/push/logic" - "Open_IM/pkg/common/config" - "Open_IM/pkg/common/constant" - "Open_IM/pkg/common/db/mysql_model/im_mysql_model" - "Open_IM/pkg/common/log" - "Open_IM/pkg/common/token_verify" - pbChat "Open_IM/pkg/proto/chat" - pbFriend "Open_IM/pkg/proto/friend" - "Open_IM/pkg/utils" - "context" -) - -func (s *friendServer) AddFriend(ctx context.Context, req *pbFriend.AddFriendReq) (*pbFriend.CommonResp, error) { - log.Info(req.Token, req.OperationID, "rpc add friend is server,userid=%s", req.Uid) - //Parse token, to find current user information - claims, err := token_verify.ParseToken(req.Token) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) - return &pbFriend.CommonResp{ErrorCode: constant.ErrParseToken.ErrCode, ErrorMsg: constant.ErrParseToken.ErrMsg}, nil - } - //Cannot add non-existent users - if _, err = im_mysql_model.FindUserByUID(req.Uid); err != nil { - log.Error(req.Token, req.OperationID, "this user not exists,cant not add friend") - return &pbFriend.CommonResp{ErrorCode: constant.ErrAddFriend.ErrCode, ErrorMsg: constant.ErrSearchUserInfo.ErrMsg}, nil - } - - //Establish a latest relationship in the friend request table - err = im_mysql_model.ReplaceIntoFriendReq(claims.UID, req.Uid, constant.ApplicationFriendFlag, req.ReqMessage) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,create friend request record failed", err.Error()) - return &pbFriend.CommonResp{ErrorCode: constant.ErrAddFriend.ErrCode, ErrorMsg: constant.ErrAddFriend.ErrMsg}, nil - } - log.Info(req.Token, req.OperationID, "rpc add friend is success return,uid=%s", req.Uid) - //Push message when add friend successfully - senderInfo, errSend := im_mysql_model.FindUserByUID(claims.UID) - receiverInfo, errReceive := im_mysql_model.FindUserByUID(req.Uid) - if errSend == nil && errReceive == nil { - logic.SendMsgByWS(&pbChat.WSToMsgSvrChatMsg{ - SendID: senderInfo.UID, - RecvID: receiverInfo.UID, - Content: content_struct.NewContentStructString(0, "", senderInfo.Name+" asked to add you as a friend"), - SendTime: utils.GetCurrentTimestampBySecond(), - MsgFrom: constant.SysMsgType, - ContentType: constant.AddFriendTip, - SessionType: constant.SingleChatType, - OperationID: req.OperationID, - }) - } - return &pbFriend.CommonResp{}, nil -} - -func (s *friendServer) ImportFriend(ctx context.Context, req *pbFriend.ImportFriendReq) (*pbFriend.ImportFriendResp, error) { - log.Info(req.Token, req.OperationID, "ImportFriend come here,args=%s", req.String()) - var resp pbFriend.ImportFriendResp - var c pbFriend.CommonResp - //Parse token, to find current user information - claims, err := token_verify.ParseToken(req.Token) - if err != nil { - log.NewError(req.OperationID, "parse token failed", err.Error()) - c.ErrorCode = constant.ErrAddFriend.ErrCode - c.ErrorMsg = constant.ErrParseToken.ErrMsg - return &pbFriend.ImportFriendResp{CommonResp: &c, FailedUidList: req.UidList}, nil - } - - if !utils.IsContain(claims.UID, config.Config.Manager.AppManagerUid) { - log.NewError(req.OperationID, "not manager uid", claims.UID) - c.ErrorCode = constant.ErrAddFriend.ErrCode - c.ErrorMsg = "not authorized" - return &pbFriend.ImportFriendResp{CommonResp: &c, FailedUidList: req.UidList}, nil - } - if _, err = im_mysql_model.FindUserByUID(req.OwnerUid); err != nil { - log.NewError(req.OperationID, "this user not exists,cant not add friend", req.OwnerUid) - c.ErrorCode = constant.ErrAddFriend.ErrCode - c.ErrorMsg = "this user not exists,cant not add friend" - return &pbFriend.ImportFriendResp{CommonResp: &c, FailedUidList: req.UidList}, nil - } - for _, v := range req.UidList { - if _, fErr := im_mysql_model.FindUserByUID(v); fErr != nil { - c.ErrorMsg = "some uid establish failed" - c.ErrorCode = 408 - resp.FailedUidList = append(resp.FailedUidList, v) - } else { - if _, err = im_mysql_model.FindFriendRelationshipFromFriend(req.OwnerUid, v); err != nil { - //Establish two single friendship - err1 := im_mysql_model.InsertToFriend(req.OwnerUid, v, 1) - if err1 != nil { - resp.FailedUidList = append(resp.FailedUidList, v) - log.NewError(req.OperationID, "err1,create friendship failed", req.OwnerUid, v, err1.Error()) - } - err2 := im_mysql_model.InsertToFriend(v, req.OwnerUid, 1) - if err2 != nil { - log.NewError(req.OperationID, "err2,create friendship failed", v, req.OwnerUid, err2.Error()) - } - if err1 == nil && err2 == nil { - var name, faceUrl string - n := content_struct.NotificationContent{IsDisplay: 1, DefaultTips: constant.FriendAcceptTip} - r, err := im_mysql_model.FindUserByUID(v) - if err != nil { - log.NewError(req.OperationID, "get info failed", err.Error(), v) - } - if r != nil { - name, faceUrl = r.Name, r.Icon - } - - logic.SendMsgByWS(&pbChat.WSToMsgSvrChatMsg{ - SendID: v, - RecvID: req.OwnerUid, - SenderFaceURL: faceUrl, - SenderNickName: name, - Content: n.ContentToString(), - SendTime: utils.GetCurrentTimestampByNano(), - MsgFrom: constant.UserMsgType, //Notification message identification - ContentType: constant.AcceptFriendApplicationTip, //Add friend flag - SessionType: constant.SingleChatType, - OperationID: req.OperationID, - }) - } else { - c.ErrorMsg = "some uid establish failed" - c.ErrorCode = 408 - resp.FailedUidList = append(resp.FailedUidList, v) - } - } - } - } - resp.CommonResp = &c - log.NewDebug(req.OperationID, "rpc come end", resp.CommonResp.ErrorCode, resp.CommonResp.ErrorMsg, resp.FailedUidList) - return &resp, nil - -} diff --git a/internal/rpc/friend/add_friend_response.go b/internal/rpc/friend/add_friend_response.go deleted file mode 100644 index e1e914ffd..000000000 --- a/internal/rpc/friend/add_friend_response.go +++ /dev/null @@ -1,84 +0,0 @@ -package friend - -import ( - "Open_IM/internal/push/content_struct" - "Open_IM/internal/push/logic" - "Open_IM/pkg/common/constant" - "Open_IM/pkg/common/db/mysql_model/im_mysql_model" - "Open_IM/pkg/common/log" - "Open_IM/pkg/common/token_verify" - pbChat "Open_IM/pkg/proto/chat" - pbFriend "Open_IM/pkg/proto/friend" - "Open_IM/pkg/utils" - "context" -) - -func (s *friendServer) AddFriendResponse(ctx context.Context, req *pbFriend.AddFriendResponseReq) (*pbFriend.CommonResp, error) { - log.Info(req.Token, req.OperationID, "rpc add friend response is server,args=%s", req.String()) - //Parse token, to find current user information - claims, err := token_verify.ParseToken(req.Token) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) - return &pbFriend.CommonResp{ErrorCode: constant.ErrParseToken.ErrCode, ErrorMsg: constant.ErrParseToken.ErrMsg}, nil - } - //Check there application before agreeing or refuse to a friend's application - if _, err = im_mysql_model.FindFriendApplyFromFriendReqByUid(req.Uid, claims.UID); err != nil { - log.Error(req.Token, req.OperationID, "No such application record") - return &pbFriend.CommonResp{ErrorCode: constant.ErrAgreeToAddFriend.ErrCode, ErrorMsg: constant.ErrAgreeToAddFriend.ErrMsg}, nil - } - //Change friend request status flag - err = im_mysql_model.UpdateFriendRelationshipToFriendReq(req.Uid, claims.UID, req.Flag) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,update friend request table failed", err.Error()) - return &pbFriend.CommonResp{ErrorCode: constant.ErrMysql.ErrCode, ErrorMsg: constant.ErrAgreeToAddFriend.ErrMsg}, nil - } - log.Info(req.Token, req.OperationID, "rpc add friend response success return,userid=%s,flag=%d", req.Uid, req.Flag) - //Change the status of the friend request form - if req.Flag == constant.FriendFlag { - //Establish friendship after find friend relationship not exists - _, err := im_mysql_model.FindFriendRelationshipFromFriend(claims.UID, req.Uid) - //fixme If there is an error, it means that there is no friend record or database err, if no friend record should be inserted,Continue down execution - if err != nil { - log.Error("", req.OperationID, err.Error()) - } - //Establish two single friendship - err = im_mysql_model.InsertToFriend(claims.UID, req.Uid, req.Flag) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,create friendship failed", err.Error()) - } - err = im_mysql_model.InsertToFriend(req.Uid, claims.UID, req.Flag) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,create friendship failed", err.Error()) - } - //Push message when establish friends successfully - //senderInfo, errSend := im_mysql_model.FindUserByUID(claims.UID) - //if errSend == nil { - // logic.SendMsgByWS(&pbChat.WSToMsgSvrChatMsg{ - // SendID: claims.UID, - // RecvID: req.Uid, - // Content: content_struct.NewContentStructString(1, "", senderInfo.Name+" agreed to add you as a friend."), - // SendTime: utils.GetCurrentTimestampBySecond(), - // MsgFrom: constant.UserMsgType, //Notification message identification - // ContentType: constant.AcceptFriendApplicationTip, //Add friend flag - // SessionType: constant.SingleChatType, - // OperationID: req.OperationID, - // }) - //} - } - if req.Flag == constant.RefuseFriendFlag { - senderInfo, errSend := im_mysql_model.FindUserByUID(claims.UID) - if errSend == nil { - logic.SendMsgByWS(&pbChat.WSToMsgSvrChatMsg{ - SendID: claims.UID, - RecvID: req.Uid, - Content: content_struct.NewContentStructString(0, "", senderInfo.Name+" refuse to add you as a friend."), - SendTime: utils.GetCurrentTimestampBySecond(), - MsgFrom: constant.UserMsgType, //Notification message identification - ContentType: constant.RefuseFriendApplicationTip, //Add friend flag - SessionType: constant.SingleChatType, - OperationID: req.OperationID, - }) - } - } - return &pbFriend.CommonResp{}, nil -} diff --git a/internal/rpc/friend/delete_friend.go b/internal/rpc/friend/delete_friend.go deleted file mode 100644 index b1db00aa7..000000000 --- a/internal/rpc/friend/delete_friend.go +++ /dev/null @@ -1,27 +0,0 @@ -package friend - -import ( - "Open_IM/pkg/common/constant" - "Open_IM/pkg/common/db/mysql_model/im_mysql_model" - "Open_IM/pkg/common/log" - "Open_IM/pkg/common/token_verify" - pbFriend "Open_IM/pkg/proto/friend" - "context" -) - -func (s *friendServer) DeleteFriend(ctx context.Context, req *pbFriend.DeleteFriendReq) (*pbFriend.CommonResp, error) { - log.Info(req.Token, req.OperationID, "rpc delete friend is server,args=%s", req.String()) - //Parse token, to find current user information - claims, err := token_verify.ParseToken(req.Token) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) - return &pbFriend.CommonResp{ErrorCode: constant.ErrParseToken.ErrCode, ErrorMsg: constant.ErrParseToken.ErrMsg}, nil - } - err = im_mysql_model.DeleteSingleFriendInfo(claims.UID, req.Uid) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,delete friend failed", err.Error()) - return &pbFriend.CommonResp{ErrorCode: constant.ErrMysql.ErrCode, ErrorMsg: constant.ErrMysql.ErrMsg}, nil - } - log.Info(req.Token, req.OperationID, "rpc delete friend success return") - return &pbFriend.CommonResp{}, nil -} diff --git a/internal/rpc/friend/firend.go b/internal/rpc/friend/firend.go new file mode 100644 index 000000000..52f422083 --- /dev/null +++ b/internal/rpc/friend/firend.go @@ -0,0 +1,487 @@ +package friend + +import ( + "Open_IM/internal/rpc/chat" + "Open_IM/pkg/common/config" + "Open_IM/pkg/common/constant" + imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" + "Open_IM/pkg/common/log" + "Open_IM/pkg/common/token_verify" + "Open_IM/pkg/grpc-etcdv3/getcdv3" + pbFriend "Open_IM/pkg/proto/friend" + sdk_ws "Open_IM/pkg/proto/sdk_ws" + "Open_IM/pkg/utils" + "context" + "fmt" + "google.golang.org/grpc" + "net" + "strconv" + "strings" +) + +type friendServer struct { + rpcPort int + rpcRegisterName string + etcdSchema string + etcdAddr []string +} + +func NewFriendServer(port int) *friendServer { + log.NewPrivateLog("friend") + return &friendServer{ + rpcPort: port, + rpcRegisterName: config.Config.RpcRegisterName.OpenImFriendName, + etcdSchema: config.Config.Etcd.EtcdSchema, + etcdAddr: config.Config.Etcd.EtcdAddr, + } +} + +func (s *friendServer) Run() { + log.Info("", "", fmt.Sprintf("rpc friend init....")) + + ip := utils.ServerIP + registerAddress := ip + ":" + strconv.Itoa(s.rpcPort) + //listener network + listener, err := net.Listen("tcp", registerAddress) + if err != nil { + log.InfoByArgs(fmt.Sprintf("Failed to listen rpc friend network,err=%s", err.Error())) + return + } + log.Info("", "", "listen network success, address = %s", registerAddress) + defer listener.Close() + //grpc server + srv := grpc.NewServer() + defer srv.GracefulStop() + //User friend related services register to etcd + pbFriend.RegisterFriendServer(srv, s) + err = getcdv3.RegisterEtcd(s.etcdSchema, strings.Join(s.etcdAddr, ","), ip, s.rpcPort, s.rpcRegisterName, 10) + if err != nil { + log.ErrorByArgs("register rpc fiend service to etcd failed,err=%s", err.Error()) + return + } + err = srv.Serve(listener) + if err != nil { + log.ErrorByArgs("listen rpc friend error,err=%s", err.Error()) + return + } +} + +func (s *friendServer) GetFriendsInfo(ctx context.Context, req *pbFriend.GetFriendsInfoReq) (*pbFriend.GetFriendInfoResp, error) { + log.NewInfo(req.CommID.OperationID, "GetFriendsInfo args ", req.String()) + var ( + isInBlackList int32 + // isFriend int32 + comment string + ) + + friendShip, err := imdb.FindFriendRelationshipFromFriend(req.CommID.FromUserID, req.CommID.ToUserID) + if err != nil { + log.NewError(req.CommID.OperationID, "FindFriendRelationshipFromFriend failed ", err.Error()) + return &pbFriend.GetFriendInfoResp{ErrCode: constant.ErrSearchUserInfo.ErrCode, ErrMsg: constant.ErrSearchUserInfo.ErrMsg}, nil + // isFriend = constant.FriendFlag + } + comment = friendShip.Remark + + friendUserInfo, err := imdb.FindUserByUID(req.CommID.ToUserID) + if err != nil { + log.NewError(req.CommID.OperationID, "FindUserByUID failed ", err.Error()) + return &pbFriend.GetFriendInfoResp{ErrCode: constant.ErrSearchUserInfo.ErrCode, ErrMsg: constant.ErrSearchUserInfo.ErrMsg}, nil + } + + err = imdb.FindRelationshipFromBlackList(req.CommID.FromUserID, req.CommID.ToUserID) + if err == nil { + isInBlackList = constant.BlackListFlag + } + + resp := pbFriend.GetFriendInfoResp{ + ErrCode: 0, + ErrMsg: "", + Data: &pbFriend.FriendInfo{ + IsBlack: isInBlackList, + }, + } + utils.CopyStructFields(resp.Data.FriendUser, friendUserInfo) + resp.Data.IsBlack = isInBlackList + resp.Data.OwnerUserID = req.CommID.FromUserID + resp.Data.Remark = comment + resp.Data.CreateTime = friendUserInfo.CreateTime + + log.NewInfo(req.CommID.OperationID, "GetFriendsInfo ok ", resp) + return &resp, nil + +} + +func (s *friendServer) AddBlacklist(ctx context.Context, req *pbFriend.AddBlacklistReq) (*pbFriend.CommonResp, error) { + log.NewInfo(req.CommID.OperationID, "AddBlacklist args ", req.String()) + ok := token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) + if !ok { + log.NewError(req.CommID.OperationID, "CheckAccess failed ", req.CommID.OpUserID, req.CommID.FromUserID) + } + + err := imdb.InsertInToUserBlackList(req.CommID.FromUserID, req.CommID.ToUserID) + if err != nil { + log.NewError(req.CommID.OperationID, "InsertInToUserBlackList failed ", err.Error()) + return &pbFriend.CommonResp{ErrCode: constant.ErrMysql.ErrCode, ErrMsg: constant.ErrMysql.ErrMsg}, nil + } + log.NewInfo(req.CommID.OperationID, "InsertInToUserBlackList ok ", req.CommID.FromUserID, req.CommID.ToUserID) + chat.BlackAddedNotification(req.CommID.OperationID, req.CommID.OpUserID, req.CommID.FromUserID, req.CommID.ToUserID) + return &pbFriend.CommonResp{}, nil + +} + +func (s *friendServer) AddFriend(ctx context.Context, req *pbFriend.AddFriendReq) (*pbFriend.CommonResp, error) { + log.NewInfo(req.CommID.OperationID, "AddFriend args ", req.String()) + ok := token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) + if !ok { + log.NewError(req.CommID.OperationID, "CheckAccess failed ", req.CommID.OpUserID, req.CommID.FromUserID) + } + //Cannot add non-existent users + if _, err := imdb.FindUserByUID(req.CommID.ToUserID); err != nil { + log.NewError(req.CommID.OperationID, "FindUserByUID failed ", err.Error(), req.CommID.ToUserID) + return &pbFriend.CommonResp{ErrCode: constant.ErrAddFriend.ErrCode, ErrMsg: constant.ErrSearchUserInfo.ErrMsg}, nil + } + + //Establish a latest relationship in the friend request table + err := imdb.ReplaceIntoFriendReq(req.CommID.FromUserID, req.CommID.ToUserID, constant.ApplicationFriendFlag, req.ReqMessage) + if err != nil { + log.NewError(req.CommID.OperationID, "ReplaceIntoFriendReq failed ", err.Error()) + return &pbFriend.CommonResp{ErrCode: constant.ErrAddFriend.ErrCode, ErrMsg: constant.ErrAddFriend.ErrMsg}, nil + } + + chat.FriendApplicationAddedNotification(req.CommID.OperationID, req.CommID.OpUserID, req.CommID.FromUserID, req.CommID.ToUserID, req.ReqMessage) + return &pbFriend.CommonResp{}, nil +} + +func (s *friendServer) ImportFriend(ctx context.Context, req *pbFriend.ImportFriendReq) (*pbFriend.ImportFriendResp, error) { + log.NewInfo(req.OperationID, "ImportFriend failed ", req.String()) + var resp pbFriend.ImportFriendResp + var c pbFriend.CommonResp + + if !utils.IsContain(req.OpUserID, config.Config.Manager.AppManagerUid) { + log.NewError(req.OperationID, "not authorized", req.OpUserID) + c.ErrCode = constant.ErrAddFriend.ErrCode + c.ErrMsg = "not authorized" + return &pbFriend.ImportFriendResp{CommonResp: &c, FailedUidList: req.FriendUserIDList}, nil + } + + if _, err := imdb.FindUserByUID(req.FromUserID); err != nil { + log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), req.FromUserID) + c.ErrCode = constant.ErrAddFriend.ErrCode + c.ErrMsg = "this user not exists,cant not add friend" + return &pbFriend.ImportFriendResp{CommonResp: &c, FailedUidList: req.FriendUserIDList}, nil + } + + for _, v := range req.FriendUserIDList { + if _, fErr := imdb.FindUserByUID(v); fErr != nil { + c.ErrMsg = "some uid establish failed" + c.ErrCode = 408 + resp.FailedUidList = append(resp.FailedUidList, v) + } else { + if _, err := imdb.FindFriendRelationshipFromFriend(req.FromUserID, v); err != nil { + //Establish two single friendship + err1 := imdb.InsertToFriend(req.FromUserID, v, 1) + if err1 != nil { + resp.FailedUidList = append(resp.FailedUidList, v) + log.NewError(req.OperationID, "InsertToFriend failed", req.FromUserID, v, err1.Error()) + c.ErrMsg = "some uid establish failed" + c.ErrCode = 408 + continue + } + err2 := imdb.InsertToFriend(v, req.FromUserID, 1) + if err2 != nil { + resp.FailedUidList = append(resp.FailedUidList, v) + log.NewError(req.OperationID, "InsertToFriend failed", v, req.FromUserID, err2.Error()) + c.ErrMsg = "some uid establish failed" + c.ErrCode = 408 + continue + } + chat.FriendAddedNotification(req.OperationID, req.OpUserID, req.FromUserID, v) + } + } + } + resp.CommonResp = &c + log.NewInfo(req.OperationID, "ImportFriend rpc ok ", resp) + return &resp, nil +} + +func (s *friendServer) AddFriendResponse(ctx context.Context, req *pbFriend.AddFriendResponseReq) (*pbFriend.CommonResp, error) { + log.NewInfo(req.CommID.OperationID, "AddFriendResponse args ", req.String()) + + if !token_verify.CheckAccess(rreq.CommID.FromUserID, req.CommID.ToUserID) { + log.NewError(req.CommID.OperationID, "CheckAccess failed ", req.CommID.FromUserID, req.CommID.ToUserID) + return &pbFriend.CommonResp{ErrCode: constant.ErrAgreeToAddFriend.ErrCode, ErrMsg: constant.ErrAgreeToAddFriend.ErrMsg}, nil + } + + //Check there application before agreeing or refuse to a friend's application + //req.CommID.FromUserID process req.CommID.ToUserID + if _, err := imdb.FindFriendApplyFromFriendReqByUid(req.CommID.ToUserID, req.CommID.FromUserID); err != nil { + log.NewError(req.CommID.OperationID, "FindFriendApplyFromFriendReqByUid failed ", err.Error(), req.CommID.ToUserID, req.CommID.FromUserID) + return &pbFriend.CommonResp{ErrCode: constant.ErrAgreeToAddFriend.ErrCode, ErrMsg: constant.ErrAgreeToAddFriend.ErrMsg}, nil + } + + //Change friend request status flag + err := imdb.UpdateFriendRelationshipToFriendReq(req.CommID.ToUserID, req.CommID.FromUserID, req.Flag) + if err != nil { + log.NewError(req.CommID.OperationID, "UpdateFriendRelationshipToFriendReq failed ", err.Error(), req.CommID.ToUserID, req.CommID.FromUserID, req.Flag) + return &pbFriend.CommonResp{ErrCode: constant.ErrMysql.ErrCode, ErrMsg: constant.ErrAgreeToAddFriend.ErrMsg}, nil + } + log.NewInfo(req.CommID.OperationID, "rpc AddFriendResponse ok") + //Change the status of the friend request form + if req.Flag == constant.FriendFlag { + //Establish friendship after find friend relationship not exists + _, err := imdb.FindFriendRelationshipFromFriend(req.CommID.FromUserID, req.CommID.ToUserID) + if err == nil { + log.NewWarn(req.CommID.OperationID, "FindFriendRelationshipFromFriend exist", req.CommID.FromUserID, req.CommID.ToUserID) + } else { + //Establish two single friendship + err = imdb.InsertToFriend(req.CommID.FromUserID, req.CommID.ToUserID, req.Flag) + if err != nil { + log.NewError(req.CommID.OperationID, "InsertToFriend failed ", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID, req.Flag) + return &pbFriend.CommonResp{ErrCode: constant.ErrAgreeToAddFriend.ErrCode, ErrMsg: constant.ErrAgreeToAddFriend.ErrMsg}, nil + } + } + + _, err = imdb.FindFriendRelationshipFromFriend(req.CommID.ToUserID, req.CommID.FromUserID) + if err == nil { + log.NewWarn(req.CommID.OperationID, "FindFriendRelationshipFromFriend exist", req.CommID.ToUserID, req.CommID.FromUserID) + return &pbFriend.CommonResp{}, nil + } + err = imdb.InsertToFriend(req.CommID.ToUserID, req.CommID.FromUserID, req.Flag) + if err != nil { + log.NewError(req.CommID.OperationID, "InsertToFriend failed ", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID, req.Flag) + return &pbFriend.CommonResp{ErrCode: constant.ErrAgreeToAddFriend.ErrCode, ErrMsg: constant.ErrAgreeToAddFriend.ErrMsg}, nil + } + } + + chat.FriendApplicationProcessedNotification(req.CommID.OperationID, req.CommID.OpUserID, req.CommID.FromUserID, req.CommID.ToUserID, req.Flag) + return &pbFriend.CommonResp{}, nil +} + +func (s *friendServer) DeleteFriend(ctx context.Context, req *pbFriend.DeleteFriendReq) (*pbFriend.CommonResp, error) { + log.NewInfo(req.CommID.OperationID, "DeleteFriend args ", req.String()) + //Parse token, to find current user information + if !token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) { + log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID) + return &pbFriend.CommonResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil + } + + err := imdb.DeleteSingleFriendInfo(req.CommID.FromUserID, req.CommID.ToUserID) + if err != nil { + log.NewError(req.CommID.OperationID, "DeleteSingleFriendInfo failed", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID) + return &pbFriend.CommonResp{ErrCode: constant.ErrMysql.ErrCode, ErrMsg: constant.ErrMysql.ErrMsg}, nil + } + log.NewInfo(req.CommID.OperationID, "DeleteFriend rpc ok") + chat.FriendDeletedNotification(req.CommID.OperationID, req.CommID.OpUserID, req.CommID.FromUserID, req.CommID.ToUserID) + return &pbFriend.CommonResp{}, nil +} + +func (s *friendServer) GetBlacklist(ctx context.Context, req *pbFriend.GetBlacklistReq) (*pbFriend.GetBlacklistResp, error) { + log.NewInfo(req.CommID.OperationID, "GetBlacklist args ", req.String()) + + //Parse token, to find current user information + if !token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) { + log.NewError(req.CommID.OperationID, "CheckAccess failed", req.CommID.OpUserID, req.CommID.FromUserID) + return &pbFriend.GetBlacklistResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil + } + + blackListInfo, err := imdb.GetBlackListByUID(req.CommID.FromUserID) + if err != nil { + log.NewError(req.CommID.OperationID, "GetBlackListByUID failed ", err.Error(), req.CommID.FromUserID) + return &pbFriend.GetBlacklistResp{ErrCode: constant.ErrGetBlackList.ErrCode, ErrMsg: constant.ErrGetBlackList.ErrMsg}, nil + } + + var ( + userInfoList []*sdk_ws.PublicUserInfo + ) + for _, blackUser := range blackListInfo { + var blackUserInfo sdk_ws.PublicUserInfo + //Find black user information + us, err := imdb.FindUserByUID(blackUser.BlockUserID) + if err != nil { + log.NewError(req.CommID.OperationID, "FindUserByUID failed ", err.Error(), blackUser.BlockUserID) + continue + } + utils.CopyStructFields(&blackUserInfo, us) + userInfoList = append(userInfoList, &blackUserInfo) + } + log.NewInfo(req.CommID.OperationID, "rpc GetBlacklist ok") + return &pbFriend.GetBlacklistResp{Data: userInfoList}, nil +} + +func (s *friendServer) SetFriendComment(ctx context.Context, req *pbFriend.SetFriendCommentReq) (*pbFriend.CommonResp, error) { + log.NewInfo(req.CommID.OperationID, "SetFriendComment args ", req.String()) + //Parse token, to find current user information + if !token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) { + log.NewError(req.CommID.OperationID, "CheckAccess false", req.CommID.OpUserID, req.CommID.FromUserID) + return &pbFriend.CommonResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil + } + + err := imdb.UpdateFriendComment(req.CommID.FromUserID, req.CommID.OpUserID, req.Remark) + if err != nil { + log.NewError(req.CommID.OperationID, "UpdateFriendComment failed ", err.Error(), req.CommID.FromUserID, req.CommID.OpUserID, req.Remark) + return &pbFriend.CommonResp{ErrCode: constant.ErrSetFriendComment.ErrCode, ErrMsg: constant.ErrSetFriendComment.ErrMsg}, nil + } + log.NewInfo(req.CommID.OperationID, "rpc SetFriendComment ok") + chat.FriendInfoChangedNotification(req.CommID.OperationID, req.CommID.OpUserID, req.CommID.FromUserID, req.CommID.ToUserID) + return &pbFriend.CommonResp{}, nil +} + +func (s *friendServer) RemoveBlacklist(ctx context.Context, req *pbFriend.RemoveBlacklistReq) (*pbFriend.CommonResp, error) { + log.NewInfo(req.CommID.OperationID, "RemoveBlacklist args ", req.String()) + //Parse token, to find current user information + if !token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) { + log.NewError(req.CommID.OperationID, "CheckAccess false", req.CommID.OpUserID, req.CommID.FromUserID) + return &pbFriend.CommonResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil + } + err := imdb.RemoveBlackList(req.CommID.FromUserID, req.CommID.ToUserID) + if err != nil { + log.NewError(req.CommID.OperationID, "RemoveBlackList failed", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID) + return &pbFriend.CommonResp{ErrCode: constant.ErrMysql.ErrCode, ErrMsg: constant.ErrMysql.ErrMsg}, nil + } + log.NewInfo(req.CommID.OperationID, "rpc RemoveBlacklist ok") + chat.BlackDeletedNotification(req.CommID.OperationID, req.CommID.OpUserID, req.CommID.FromUserID, req.CommID.ToUserID) + return &pbFriend.CommonResp{}, nil +} + +func (s *friendServer) IsInBlackList(ctx context.Context, req *pbFriend.IsInBlackListReq) (*pbFriend.IsInBlackListResp, error) { + log.NewInfo("IsInBlackList args ", req.String()) + if !token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) { + log.NewError(req.CommID.OperationID, "CheckAccess false", req.CommID.OpUserID, req.CommID.FromUserID) + return &pbFriend.IsInBlackListResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil + } + + var isInBlacklist = false + err := imdb.FindRelationshipFromBlackList(req.CommID.FromUserID, req.CommID.ToUserID) + if err == nil { + isInBlacklist = true + } + log.NewInfo(req.CommID.OperationID, "IsInBlackList rpc ok") + return &pbFriend.IsInBlackListResp{Response: isInBlacklist}, nil +} + +func (s *friendServer) IsFriend(ctx context.Context, req *pbFriend.IsFriendReq) (*pbFriend.IsFriendResp, error) { + log.NewInfo("IsFriend args ", req.String()) + var isFriend int32 + if !token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) { + log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID) + return &pbFriend.IsFriendResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil + } + _, err := imdb.FindFriendRelationshipFromFriend(req.CommID.FromUserID, req.CommID.ToUserID) + if err == nil { + isFriend = constant.FriendFlag + } else { + isFriend = constant.ApplicationFriendFlag + } + log.NewInfo("IsFriend rpc ok") + return &pbFriend.IsFriendResp{ShipType: isFriend}, nil +} + +func (s *friendServer) GetFriendList(ctx context.Context, req *pbFriend.GetFriendListReq) (*pbFriend.GetFriendListResp, error) { + log.NewInfo("GetFriendList args ", req.String()) + var userInfoList []*pbFriend.FriendInfo + //Parse token, to find current user information + if !token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) { + log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID) + return &pbFriend.GetFriendListResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil + } + + friends, err := imdb.FindUserInfoFromFriend(req.CommID.FromUserID) + if err != nil { + log.NewError(req.CommID.OperationID, "FindUserInfoFromFriend failed", err.Error(), req.CommID.FromUserID) + return &pbFriend.GetFriendListResp{ErrCode: constant.ErrSearchUserInfo.ErrCode, ErrMsg: constant.ErrSearchUserInfo.ErrMsg}, nil + } + for _, friendUser := range friends { + var friendUserInfo pbFriend.FriendInfo + //find user is in blackList + err = imdb.FindRelationshipFromBlackList(req.CommID.FromUserID, friendUser.FriendUserID) + if err == nil { + friendUserInfo.IsBlack = constant.BlackListFlag + } else { + friendUserInfo.IsBlack = 0 + } + //Find user information + us, err := imdb.FindUserByUID(friendUser.FriendUserID) + if err != nil { + log.NewError(req.CommID.OperationID, "FindUserByUID failed", err.Error(), friendUser.FriendUserID) + continue + } + utils.CopyStructFields(friendUserInfo.FriendUser, us) + friendUserInfo.Remark = friendUser.Remark + friendUserInfo.OwnerUserID = req.CommID.FromUserID + friendUserInfo.CreateTime = friendUser.CreateTime + userInfoList = append(userInfoList, &friendUserInfo) + } + log.NewInfo(req.CommID.OperationID, "rpc GetFriendList ok", pbFriend.GetFriendListResp{Data: userInfoList}) + return &pbFriend.GetFriendListResp{Data: userInfoList}, nil +} + +func (s *friendServer) GetFriendApplyList(ctx context.Context, req *pbFriend.GetFriendApplyReq) (*pbFriend.GetFriendApplyResp, error) { + log.NewInfo(req.CommID.OperationID, "GetFriendApplyList args ", req.String()) + var appleUserList []*pbFriend.ApplyUserInfo + //Parse token, to find current user information + if !token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) { + log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID) + return &pbFriend.GetFriendApplyResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil + } + + // Find the current user friend applications received + ApplyUsersInfo, err := imdb.FindFriendsApplyFromFriendReq(req.CommID.FromUserID) + if err != nil { + log.NewError(req.CommID.OperationID, "FindFriendsApplyFromFriendReq ", err.Error(), req.CommID.FromUserID) + return &pbFriend.GetFriendApplyResp{ErrCode: constant.ErrMysql.ErrCode, ErrMsg: constant.ErrMysql.ErrMsg}, nil + } + + for _, applyUserInfo := range ApplyUsersInfo { + var userInfo pbFriend.ApplyUserInfo + //Find friend application status + userInfo.Flag = applyUserInfo.Flag + userInfo.ReqMessage = applyUserInfo.ReqMessage + userInfo.ApplyTime = applyUserInfo.CreateTime + + //Find user information + us, err := imdb.FindUserByUID(applyUserInfo.ReqID) + if err != nil { + log.NewError(req.CommID.OperationID, "FindUserByUID failed ", err.Error(), applyUserInfo.ReqID) + continue + } + utils.CopyStructFields(userInfo.UserInfo, us) + appleUserList = append(appleUserList, &userInfo) + + } + log.NewInfo(req.CommID.OperationID, "rpc GetFriendApplyList ok", pbFriend.GetFriendApplyResp{Data: appleUserList}) + return &pbFriend.GetFriendApplyResp{Data: appleUserList}, nil +} + +func (s *friendServer) GetSelfApplyList(ctx context.Context, req *pbFriend.GetFriendApplyReq) (*pbFriend.GetFriendApplyResp, error) { + log.NewInfo(req.CommID.OperationID, "GetSelfApplyList args ", req.String()) + var selfApplyOtherUserList []*pbFriend.ApplyUserInfo + //Parse token, to find current user information + if !token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) { + log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID) + return &pbFriend.GetFriendApplyResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil + } + + // Find the self add other userinfo + usersInfo, err := imdb.FindSelfApplyFromFriendReq(req.CommID.FromUserID) + if err != nil { + log.NewError(req.CommID.OperationID, "FindSelfApplyFromFriendReq failed ", err.Error(), req.CommID.FromUserID) + return &pbFriend.GetFriendApplyResp{ErrCode: constant.ErrMysql.ErrCode, ErrMsg: constant.ErrMysql.ErrMsg}, nil + } + for _, selfApplyOtherUserInfo := range usersInfo { + var userInfo pbFriend.ApplyUserInfo + //Find friend application status + userInfo.Flag = selfApplyOtherUserInfo.Flag + userInfo.ReqMessage = selfApplyOtherUserInfo.ReqMessage + userInfo.ApplyTime = selfApplyOtherUserInfo.CreateTime + //Find user information + us, err := imdb.FindUserByUID(selfApplyOtherUserInfo.UserID) + if err != nil { + log.NewError(req.CommID.OperationID, "FindUserByUID failed", err.Error(), selfApplyOtherUserInfo.UserID) + continue + } + utils.CopyStructFields(userInfo.UserInfo, us) + selfApplyOtherUserList = append(selfApplyOtherUserList, &userInfo) + } + log.NewInfo(req.CommID.OperationID, "rpc GetSelfApplyList ok", pbFriend.GetFriendApplyResp{Data: selfApplyOtherUserList}) + return &pbFriend.GetFriendApplyResp{Data: selfApplyOtherUserList}, nil +} diff --git a/internal/rpc/friend/get_blacklist.go b/internal/rpc/friend/get_blacklist.go deleted file mode 100644 index 503e80da6..000000000 --- a/internal/rpc/friend/get_blacklist.go +++ /dev/null @@ -1,55 +0,0 @@ -package friend - -import ( - "Open_IM/pkg/common/constant" - "Open_IM/pkg/common/db/mysql_model/im_mysql_model" - "Open_IM/pkg/common/log" - "Open_IM/pkg/common/token_verify" - pbFriend "Open_IM/pkg/proto/friend" - "context" -) - -func (s *friendServer) GetBlacklist(ctx context.Context, req *pbFriend.GetBlacklistReq) (*pbFriend.GetBlacklistResp, error) { - log.Info(req.Token, req.OperationID, "rpc get blacklist is server,args=%s", req.String()) - var ( - userInfoList []*pbFriend.UserInfo - comment string - ) - //Parse token, to find current user information - claims, err := token_verify.ParseToken(req.Token) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) - return &pbFriend.GetBlacklistResp{ErrorCode: constant.ErrParseToken.ErrCode, ErrorMsg: constant.ErrParseToken.ErrMsg}, nil - } - blackListInfo, err := im_mysql_model.GetBlackListByUID(claims.UID) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s get blacklist failed", err.Error()) - return &pbFriend.GetBlacklistResp{ErrorCode: constant.ErrGetBlackList.ErrCode, ErrorMsg: constant.ErrGetBlackList.ErrMsg}, nil - } - for _, blackUser := range blackListInfo { - var blackUserInfo pbFriend.UserInfo - //Find black user information - us, err := im_mysql_model.FindUserByUID(blackUser.BlockId) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s search black list userInfo failed", err.Error()) - continue - } - friendShip, err := im_mysql_model.FindFriendRelationshipFromFriend(claims.UID, blackUser.BlockId) - if err == nil { - comment = friendShip.Comment - } - blackUserInfo.Uid = us.UID - blackUserInfo.Icon = us.Icon - blackUserInfo.Name = us.Name - blackUserInfo.Gender = us.Gender - blackUserInfo.Mobile = us.Mobile - blackUserInfo.Birth = us.Birth - blackUserInfo.Email = us.Email - blackUserInfo.Ex = us.Ex - blackUserInfo.Comment = comment - - userInfoList = append(userInfoList, &blackUserInfo) - } - log.Info(req.Token, req.OperationID, "rpc get blacklist success return") - return &pbFriend.GetBlacklistResp{Data: userInfoList}, nil -} diff --git a/internal/rpc/friend/get_firends_info.go b/internal/rpc/friend/get_firends_info.go deleted file mode 100644 index d103889bc..000000000 --- a/internal/rpc/friend/get_firends_info.go +++ /dev/null @@ -1,113 +0,0 @@ -package friend - -import ( - "Open_IM/pkg/common/config" - "Open_IM/pkg/common/constant" - "Open_IM/pkg/common/db/mysql_model/im_mysql_model" - "Open_IM/pkg/common/log" - "Open_IM/pkg/common/token_verify" - "Open_IM/pkg/grpc-etcdv3/getcdv3" - pbFriend "Open_IM/pkg/proto/friend" - "Open_IM/pkg/utils" - "context" - "fmt" - "google.golang.org/grpc" - "net" - "strconv" - "strings" -) - -type friendServer struct { - rpcPort int - rpcRegisterName string - etcdSchema string - etcdAddr []string -} - -func NewFriendServer(port int) *friendServer { - log.NewPrivateLog("friend") - return &friendServer{ - rpcPort: port, - rpcRegisterName: config.Config.RpcRegisterName.OpenImFriendName, - etcdSchema: config.Config.Etcd.EtcdSchema, - etcdAddr: config.Config.Etcd.EtcdAddr, - } -} - -func (s *friendServer) Run() { - log.Info("", "", fmt.Sprintf("rpc friend init....")) - - ip := utils.ServerIP - registerAddress := ip + ":" + strconv.Itoa(s.rpcPort) - //listener network - listener, err := net.Listen("tcp", registerAddress) - if err != nil { - log.InfoByArgs(fmt.Sprintf("Failed to listen rpc friend network,err=%s", err.Error())) - return - } - log.Info("", "", "listen network success, address = %s", registerAddress) - defer listener.Close() - //grpc server - srv := grpc.NewServer() - defer srv.GracefulStop() - //User friend related services register to etcd - pbFriend.RegisterFriendServer(srv, s) - err = getcdv3.RegisterEtcd(s.etcdSchema, strings.Join(s.etcdAddr, ","), ip, s.rpcPort, s.rpcRegisterName, 10) - if err != nil { - log.ErrorByArgs("register rpc fiend service to etcd failed,err=%s", err.Error()) - return - } - err = srv.Serve(listener) - if err != nil { - log.ErrorByArgs("listen rpc friend error,err=%s", err.Error()) - return - } -} - -func (s *friendServer) GetFriendsInfo(ctx context.Context, req *pbFriend.GetFriendsInfoReq) (*pbFriend.GetFriendInfoResp, error) { - log.Info(req.Token, req.OperationID, "rpc search user is server,args=%s", req.String()) - var ( - isInBlackList int32 - isFriend int32 - comment string - ) - //Parse token, to find current user information - claims, err := token_verify.ParseToken(req.Token) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) - return &pbFriend.GetFriendInfoResp{ErrorCode: constant.ErrParseToken.ErrCode, ErrorMsg: constant.ErrParseToken.ErrMsg}, nil - } - friendShip, err := im_mysql_model.FindFriendRelationshipFromFriend(claims.UID, req.Uid) - if err == nil { - isFriend = constant.FriendFlag - comment = friendShip.Comment - } - friendUserInfo, err := im_mysql_model.FindUserByUID(req.Uid) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,no this user", err.Error()) - return &pbFriend.GetFriendInfoResp{ErrorCode: constant.ErrSearchUserInfo.ErrCode, ErrorMsg: constant.ErrSearchUserInfo.ErrMsg}, nil - } - err = im_mysql_model.FindRelationshipFromBlackList(claims.UID, req.Uid) - if err == nil { - isInBlackList = constant.BlackListFlag - } - log.Info(req.Token, req.OperationID, "rpc search friend success return") - return &pbFriend.GetFriendInfoResp{ - ErrorCode: 0, - ErrorMsg: "", - Data: &pbFriend.GetFriendData{ - Uid: friendUserInfo.UID, - Icon: friendUserInfo.Icon, - Name: friendUserInfo.Name, - Gender: friendUserInfo.Gender, - Mobile: friendUserInfo.Mobile, - Birth: friendUserInfo.Birth, - Email: friendUserInfo.Email, - Ex: friendUserInfo.Ex, - Comment: comment, - IsFriend: isFriend, - IsInBlackList: isInBlackList, - }, - }, nil - -} diff --git a/internal/rpc/friend/get_friend_apply_list.go b/internal/rpc/friend/get_friend_apply_list.go deleted file mode 100644 index 6542d9097..000000000 --- a/internal/rpc/friend/get_friend_apply_list.go +++ /dev/null @@ -1,95 +0,0 @@ -package friend - -import ( - "Open_IM/pkg/common/constant" - "Open_IM/pkg/common/db/mysql_model/im_mysql_model" - "Open_IM/pkg/common/log" - "Open_IM/pkg/common/token_verify" - pbFriend "Open_IM/pkg/proto/friend" - "context" - "fmt" - "strconv" -) - -func (s *friendServer) GetFriendApplyList(ctx context.Context, req *pbFriend.GetFriendApplyReq) (*pbFriend.GetFriendApplyResp, error) { - log.Info(req.Token, req.OperationID, "rpc get friend apply list is server,args=%s", req.String()) - var appleUserList []*pbFriend.ApplyUserInfo - //Parse token, to find current user information - claims, err := token_verify.ParseToken(req.Token) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) - return &pbFriend.GetFriendApplyResp{ErrorCode: constant.ErrParseToken.ErrCode, ErrorMsg: constant.ErrParseToken.ErrMsg}, nil - } - // Find the current user friend applications received - ApplyUsersInfo, err := im_mysql_model.FindFriendsApplyFromFriendReq(claims.UID) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,search applyInfo failed", err.Error()) - return &pbFriend.GetFriendApplyResp{ErrorCode: constant.ErrMysql.ErrCode, ErrorMsg: constant.ErrMysql.ErrMsg}, nil - } - for _, applyUserInfo := range ApplyUsersInfo { - var userInfo pbFriend.ApplyUserInfo - //Find friend application status - userInfo.Flag = applyUserInfo.Flag - userInfo.ReqMessage = applyUserInfo.ReqMessage - userInfo.ApplyTime = strconv.FormatInt(applyUserInfo.CreateTime.Unix(), 10) - //Find user information - us, err := im_mysql_model.FindUserByUID(applyUserInfo.ReqId) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,search userInfo failed", err.Error()) - continue - } - userInfo.Uid = us.UID - userInfo.Icon = us.Icon - userInfo.Name = us.Name - userInfo.Gender = us.Gender - userInfo.Mobile = us.Mobile - userInfo.Birth = us.Birth - userInfo.Email = us.Email - userInfo.Ex = us.Ex - appleUserList = append(appleUserList, &userInfo) - - } - log.Info(req.Token, req.OperationID, fmt.Sprintf("rpc get friendapplylist success return")) - return &pbFriend.GetFriendApplyResp{Data: appleUserList}, nil -} - -func (s *friendServer) GetSelfApplyList(ctx context.Context, req *pbFriend.GetFriendApplyReq) (*pbFriend.GetFriendApplyResp, error) { - log.Info(req.Token, req.OperationID, "rpc get self apply list is server,args=%s", req.String()) - var selfApplyOtherUserList []*pbFriend.ApplyUserInfo - //Parse token, to find current user information - claims, err := token_verify.ParseToken(req.Token) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) - return &pbFriend.GetFriendApplyResp{ErrorCode: constant.ErrParseToken.ErrCode, ErrorMsg: constant.ErrParseToken.ErrMsg}, nil - } - // Find the self add other userinfo - usersInfo, err := im_mysql_model.FindSelfApplyFromFriendReq(claims.UID) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,search self to other user Info failed", err.Error()) - return &pbFriend.GetFriendApplyResp{ErrorCode: constant.ErrMysql.ErrCode, ErrorMsg: constant.ErrMysql.ErrMsg}, nil - } - for _, selfApplyOtherUserInfo := range usersInfo { - var userInfo pbFriend.ApplyUserInfo - //Find friend application status - userInfo.Flag = selfApplyOtherUserInfo.Flag - userInfo.ReqMessage = selfApplyOtherUserInfo.ReqMessage - userInfo.ApplyTime = strconv.FormatInt(selfApplyOtherUserInfo.CreateTime.Unix(), 10) - //Find user information - us, err := im_mysql_model.FindUserByUID(selfApplyOtherUserInfo.Uid) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,search userInfo failed", err.Error()) - continue - } - userInfo.Uid = us.UID - userInfo.Icon = us.Icon - userInfo.Name = us.Name - userInfo.Gender = us.Gender - userInfo.Mobile = us.Mobile - userInfo.Birth = us.Birth - userInfo.Email = us.Email - userInfo.Ex = us.Ex - selfApplyOtherUserList = append(selfApplyOtherUserList, &userInfo) - } - log.Info(req.Token, req.OperationID, fmt.Sprintf("rpc get self apply list success return")) - return &pbFriend.GetFriendApplyResp{Data: selfApplyOtherUserList}, nil -} diff --git a/internal/rpc/friend/get_friend_list.go b/internal/rpc/friend/get_friend_list.go deleted file mode 100644 index ff3e521ee..000000000 --- a/internal/rpc/friend/get_friend_list.go +++ /dev/null @@ -1,57 +0,0 @@ -package friend - -import ( - "Open_IM/pkg/common/constant" - "Open_IM/pkg/common/db/mysql_model/im_mysql_model" - "Open_IM/pkg/common/log" - "Open_IM/pkg/common/token_verify" - pbFriend "Open_IM/pkg/proto/friend" - "context" -) - -func (s *friendServer) GetFriendList(ctx context.Context, req *pbFriend.GetFriendListReq) (*pbFriend.GetFriendListResp, error) { - log.Info(req.Token, req.OperationID, "rpc get friend list is server,args=%s", req.String()) - var userInfoList []*pbFriend.UserInfo - //Parse token, to find current user information - claims, err := token_verify.ParseToken(req.Token) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) - return &pbFriend.GetFriendListResp{ErrorCode: constant.ErrParseToken.ErrCode, ErrorMsg: constant.ErrParseToken.ErrMsg}, nil - } - friends, err := im_mysql_model.FindUserInfoFromFriend(claims.UID) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s search friendInfo failed", err.Error()) - return &pbFriend.GetFriendListResp{ErrorCode: constant.ErrSearchUserInfo.ErrCode, ErrorMsg: constant.ErrSearchUserInfo.ErrMsg}, nil - } - for _, friendUser := range friends { - var friendUserInfo pbFriend.UserInfo - - //find user is in blackList - err = im_mysql_model.FindRelationshipFromBlackList(claims.UID, friendUser.FriendId) - if err == nil { - friendUserInfo.IsInBlackList = constant.BlackListFlag - } else { - friendUserInfo.IsInBlackList = 0 - } - //Find user information - us, err := im_mysql_model.FindUserByUID(friendUser.FriendId) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s search userInfo failed", err.Error()) - continue - } - friendUserInfo.Uid = friendUser.FriendId - friendUserInfo.Comment = friendUser.Comment - friendUserInfo.Icon = us.Icon - friendUserInfo.Name = us.Name - friendUserInfo.Gender = us.Gender - friendUserInfo.Mobile = us.Mobile - friendUserInfo.Birth = us.Birth - friendUserInfo.Email = us.Email - friendUserInfo.Ex = us.Ex - - userInfoList = append(userInfoList, &friendUserInfo) - - } - log.Info(req.Token, req.OperationID, "rpc get friend list success return") - return &pbFriend.GetFriendListResp{Data: userInfoList}, nil -} diff --git a/internal/rpc/friend/is_friend.go b/internal/rpc/friend/is_friend.go deleted file mode 100644 index d8739b81f..000000000 --- a/internal/rpc/friend/is_friend.go +++ /dev/null @@ -1,29 +0,0 @@ -package friend - -import ( - "Open_IM/pkg/common/constant" - "Open_IM/pkg/common/db/mysql_model/im_mysql_model" - "Open_IM/pkg/common/log" - "Open_IM/pkg/common/token_verify" - pbFriend "Open_IM/pkg/proto/friend" - "context" - "fmt" -) - -func (s *friendServer) IsFriend(ctx context.Context, req *pbFriend.IsFriendReq) (*pbFriend.IsFriendResp, error) { - log.InfoByArgs("rpc is friend is server,args=%s", req.String()) - var isFriend int32 - claims, err := token_verify.ParseToken(req.Token) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) - return &pbFriend.IsFriendResp{ErrorCode: constant.ErrParseToken.ErrCode, ErrorMsg: constant.ErrParseToken.ErrMsg}, nil - } - _, err = im_mysql_model.FindFriendRelationshipFromFriend(claims.UID, req.ReceiveUid) - if err == nil { - isFriend = constant.FriendFlag - } else { - isFriend = constant.ApplicationFriendFlag - } - log.InfoByArgs(fmt.Sprintf("rpc is friend success return")) - return &pbFriend.IsFriendResp{ShipType: isFriend}, nil -} diff --git a/internal/rpc/friend/is_in_blacklist.go b/internal/rpc/friend/is_in_blacklist.go deleted file mode 100644 index 6275f5300..000000000 --- a/internal/rpc/friend/is_in_blacklist.go +++ /dev/null @@ -1,20 +0,0 @@ -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 -} diff --git a/internal/rpc/friend/remove_blacklist.go b/internal/rpc/friend/remove_blacklist.go deleted file mode 100644 index f96cbf9b4..000000000 --- a/internal/rpc/friend/remove_blacklist.go +++ /dev/null @@ -1,27 +0,0 @@ -package friend - -import ( - "Open_IM/pkg/common/constant" - "Open_IM/pkg/common/db/mysql_model/im_mysql_model" - "Open_IM/pkg/common/log" - "Open_IM/pkg/common/token_verify" - pbFriend "Open_IM/pkg/proto/friend" - "context" -) - -func (s *friendServer) RemoveBlacklist(ctx context.Context, req *pbFriend.RemoveBlacklistReq) (*pbFriend.CommonResp, error) { - log.Info(req.Token, req.OperationID, "rpc remove blacklist is server,userid=%s", req.Uid) - //Parse token, to find current user information - claims, err := token_verify.ParseToken(req.Token) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) - return &pbFriend.CommonResp{ErrorCode: constant.ErrParseToken.ErrCode, ErrorMsg: constant.ErrParseToken.ErrMsg}, nil - } - err = im_mysql_model.RemoveBlackList(claims.UID, req.Uid) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,remove blacklist failed", err.Error()) - return &pbFriend.CommonResp{ErrorCode: constant.ErrMysql.ErrCode, ErrorMsg: constant.ErrMysql.ErrMsg}, nil - } - log.Info(req.Token, req.OperationID, "rpc remove blacklist success return,userid=%s", req.Uid) - return &pbFriend.CommonResp{}, nil -} diff --git a/internal/rpc/friend/set_friend_comment.go b/internal/rpc/friend/set_friend_comment.go deleted file mode 100644 index 8ddfe1fb9..000000000 --- a/internal/rpc/friend/set_friend_comment.go +++ /dev/null @@ -1,27 +0,0 @@ -package friend - -import ( - "Open_IM/pkg/common/constant" - "Open_IM/pkg/common/db/mysql_model/im_mysql_model" - "Open_IM/pkg/common/log" - "Open_IM/pkg/common/token_verify" - pbFriend "Open_IM/pkg/proto/friend" - "context" -) - -func (s *friendServer) SetFriendComment(ctx context.Context, req *pbFriend.SetFriendCommentReq) (*pbFriend.CommonResp, error) { - log.Info(req.Token, req.OperationID, "rpc set friend comment is server,params=%s", req.String()) - //Parse token, to find current user information - claims, err := token_verify.ParseToken(req.Token) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) - return &pbFriend.CommonResp{ErrorCode: constant.ErrParseToken.ErrCode, ErrorMsg: constant.ErrParseToken.ErrMsg}, nil - } - err = im_mysql_model.UpdateFriendComment(claims.UID, req.Uid, req.Comment) - if err != nil { - log.Error(req.Token, req.OperationID, "set friend comment failed,err=%s", err.Error()) - return &pbFriend.CommonResp{ErrorCode: constant.ErrSetFriendComment.ErrCode, ErrorMsg: constant.ErrSetFriendComment.ErrMsg}, nil - } - log.Info(req.Token, req.OperationID, "rpc set friend comment is success return") - return &pbFriend.CommonResp{}, nil -} diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index bd8d3dd86..6d85ccf83 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -11,6 +11,7 @@ import ( "Open_IM/pkg/common/token_verify" "Open_IM/pkg/grpc-etcdv3/getcdv3" pbGroup "Open_IM/pkg/proto/group" + "Open_IM/pkg/proto/sdk_ws" "Open_IM/pkg/utils" "context" "encoding/json" @@ -70,165 +71,142 @@ func (s *groupServer) Run() { } func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupReq) (*pbGroup.CreateGroupResp, error) { - log.NewInfo(req.OperationID, "CreateGroup, args=%s", req.String()) - var ( - groupId string - ) - //Parse token, to find current user information - claims, err := token_verify.ParseToken(req.Token) - if err != nil { - log.NewError(req.OperationID, "ParseToken failed, ", err.Error(), req.String()) + log.NewInfo(req.OperationID, "CreateGroup, args ", req.String()) + if !token_verify.CheckAccess(req.OpUserID, req.FromUserID) { + log.NewError(req.OperationID, "CheckAccess false ", req.OpUserID, req.FromUserID) return &pbGroup.CreateGroupResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil } //Time stamp + MD5 to generate group chat id - groupId = utils.Md5(strconv.FormatInt(time.Now().UnixNano(), 10)) - err = im_mysql_model.InsertIntoGroup(groupId, req.GroupName, req.Introduction, req.Notification, req.FaceUrl, req.Ext) + groupId := utils.Md5(strconv.FormatInt(time.Now().UnixNano(), 10)) + err := im_mysql_model.InsertIntoGroup(groupId, req.GroupName, req.Introduction, req.Notification, req.FaceUrl, req.Ext) if err != nil { - log.NewError(req.OperationID, "InsertIntoGroup failed, ", err.Error(), req.String()) + log.NewError(req.OperationID, "InsertIntoGroup failed, ", err.Error(), groupId, req.GroupName, req.Introduction, req.Notification, req.FaceUrl, req.Ext) return &pbGroup.CreateGroupResp{ErrCode: constant.ErrCreateGroup.ErrCode, ErrMsg: constant.ErrCreateGroup.ErrMsg}, nil } - isManagerFlag := 0 - tokenUid := claims.UID - - if utils.IsContain(tokenUid, config.Config.Manager.AppManagerUid) { - isManagerFlag = 1 - } - - us, err := im_mysql_model.FindUserByUID(claims.UID) + us, err := im_mysql_model.FindUserByUID(req.FromUserID) if err != nil { - log.Error("", req.OperationID, "find userInfo failed", err.Error()) + log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), req.FromUserID) return &pbGroup.CreateGroupResp{ErrCode: constant.ErrCreateGroup.ErrCode, ErrMsg: constant.ErrCreateGroup.ErrMsg}, nil } - if isManagerFlag == 0 { - //Add the group owner to the group first, otherwise the group creation will fail - err = im_mysql_model.InsertIntoGroupMember(groupId, claims.UID, us.Nickname, us.FaceUrl, constant.GroupOwner) - if err != nil { - log.Error("", req.OperationID, "create group chat failed,err=%s", err.Error()) - return &pbGroup.CreateGroupResp{ErrCode: constant.ErrCreateGroup.ErrCode, ErrMsg: constant.ErrCreateGroup.ErrMsg}, nil - } + //Add the group owner to the group first, otherwise the group creation will fail + err = im_mysql_model.InsertIntoGroupMember(groupId, us.UserID, us.Nickname, us.FaceUrl, constant.GroupOwner) + if err != nil { + log.NewError(req.OperationID, "InsertIntoGroupMember failed ", err.Error()) + return &pbGroup.CreateGroupResp{ErrCode: constant.ErrCreateGroup.ErrCode, ErrMsg: constant.ErrCreateGroup.ErrMsg}, nil + } - err = db.DB.AddGroupMember(groupId, claims.UID) - if err != nil { - log.NewError(req.OperationID, "AddGroupMember failed ", err.Error(), groupId, claims.UID) - return &pbGroup.CreateGroupResp{ErrCode: constant.ErrCreateGroup.ErrCode, ErrMsg: constant.ErrCreateGroup.ErrMsg}, nil - } + err = db.DB.AddGroupMember(groupId, req.FromUserID) + if err != nil { + log.NewError(req.OperationID, "AddGroupMember failed ", err.Error(), groupId, req.FromUserID) + // return &pbGroup.CreateGroupResp{ErrCode: constant.ErrCreateGroup.ErrCode, ErrMsg: constant.ErrCreateGroup.ErrMsg}, nil } //Binding group id and member id - for _, user := range req.MemberList { - us, err := im_mysql_model.FindUserByUID(user.Uid) + for _, user := range req.InitMemberList { + us, err := im_mysql_model.FindUserByUID(user.UserID) if err != nil { - log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), user.Uid) + log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), user.UserID) continue } - err = im_mysql_model.InsertIntoGroupMember(groupId, user.Uid, us.Nickname, us.FaceUrl, user.SetRole) - if err != nil { - log.ErrorByArgs("InsertIntoGroupMember failed", user.Uid, groupId, err.Error()) + if user.Role == 1 { + log.NewError(req.OperationID, "only one owner, failed ", user) + continue } - err = db.DB.AddGroupMember(groupId, user.Uid) + err = im_mysql_model.InsertIntoGroupMember(groupId, user.UserID, us.Nickname, us.FaceUrl, user.Role) if err != nil { - log.Error("", "", "add mongo group member failed, db.DB.AddGroupMember fail [err: %s]", err.Error()) + log.NewError(req.OperationID, "InsertIntoGroupMember failed ", groupId, user.UserID, us.Nickname, us.FaceUrl, user.Role) + } + err = db.DB.AddGroupMember(groupId, user.UserID) + if err != nil { + log.NewError(req.OperationID, "add mongo group member failed, db.DB.AddGroupMember failed ", err.Error()) } } + resp := &pbGroup.CreateGroupResp{} - if isManagerFlag == 1 { - - } group, err := im_mysql_model.FindGroupInfoByGroupId(groupId) if err != nil { log.NewError(req.OperationID, "FindGroupInfoByGroupId failed ", err.Error(), groupId) - return &pbGroup.CreateGroupResp{GroupID: groupId}, nil + resp.ErrCode = constant.ErrCreateGroup.ErrCode + resp.ErrMsg = constant.ErrCreateGroup.ErrMsg + return resp, nil } - memberList, err := im_mysql_model.FindGroupMemberListByGroupId(groupId) - if err != nil { - log.NewError(req.OperationID, "FindGroupMemberListByGroupId failed ", err.Error(), groupId) - return &pbGroup.CreateGroupResp{GroupID: groupId}, nil - } - chat.GroupCreatedNotification(req.OperationID, us, group, memberList) - log.NewInfo(req.OperationID, "GroupCreatedNotification, rpc CreateGroup success return ", groupId) - - return &pbGroup.CreateGroupResp{GroupID: groupId}, nil + chat.GroupCreatedNotification(req) + utils.CopyStructFields(resp.GroupInfo, group) + log.NewInfo(req.OperationID, "rpc CreateGroup return ", resp.String()) + return resp, nil } func (s *groupServer) GetJoinedGroupList(ctx context.Context, req *pbGroup.GetJoinedGroupListReq) (*pbGroup.GetJoinedGroupListResp, error) { - claims, err := token_verify.ParseToken(req.Token) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) - return &pbGroup.GetJoinedGroupListResp{ErrCode: constant.ErrParseToken.ErrCode, ErrorMsg: constant.ErrParseToken.ErrMsg}, nil + log.NewInfo(req.OperationID, "GetJoinedGroupList, args ", req.String()) + if !token_verify.CheckAccess(req.OpUserID, req.FromUserID) { + log.NewError(req.OperationID, "CheckAccess false ", req.OpUserID, req.FromUserID) + return &pbGroup.GetJoinedGroupListResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil } - log.Info(claims.UID, req.OperationID, "recv req: ", req.String()) - joinedGroupList, err := imdb.GetJoinedGroupIdListByMemberId(claims.UID) + joinedGroupList, err := imdb.GetJoinedGroupIdListByMemberId(req.FromUserID) if err != nil { - log.Error(claims.UID, req.OperationID, "GetJoinedGroupIdListByMemberId failed, err: ", err.Error()) - return &pbGroup.GetJoinedGroupListResp{ErrCode: constant.ErrParam.ErrCode, ErrorMsg: constant.ErrParam.ErrMsg}, nil + log.NewError(req.OperationID, "GetJoinedGroupIdListByMemberId failed ", err.Error(), req.FromUserID) + return &pbGroup.GetJoinedGroupListResp{ErrCode: constant.ErrParam.ErrCode, ErrMsg: constant.ErrParam.ErrMsg}, nil } var resp pbGroup.GetJoinedGroupListResp for _, v := range joinedGroupList { - var groupNode pbGroup.GroupInfo + var groupNode open_im_sdk.GroupInfo num := imdb.GetGroupMemberNumByGroupId(v.GroupID) - owner := imdb.GetGroupOwnerByGroupId(v.GroupID) + owner, err2 := imdb.GetGroupOwnerInfoByGroupId(v.GroupID) group, err := imdb.FindGroupInfoByGroupId(v.GroupID) - if num > 0 && owner != "" && err == nil { - groupNode.GroupId = v.GroupID - groupNode.FaceUrl = group.FaceUrl - groupNode.CreateTime = uint64(group.CreateTime.Unix()) - groupNode.GroupName = group.GroupName - groupNode.Introduction = group.Introduction - groupNode.Notification = group.Notification - groupNode.OwnerId = owner - groupNode.MemberCount = uint32(int32(num)) + if num > 0 && owner != nil && err2 == nil && group != nil && err == nil { + utils.CopyStructFields(&groupNode, group) + utils.CopyStructFields(groupNode.Owner, owner) + groupNode.MemberCount = uint32(num) resp.GroupList = append(resp.GroupList, &groupNode) + } else { + log.NewError(req.OperationID, "check nil ", num, owner, err, group) + continue } - log.Info(claims.UID, req.OperationID, "member num: ", num, "owner: ", owner) + log.NewDebug(req.OperationID, "joinedGroup ", groupNode) } resp.ErrCode = 0 + log.NewInfo(req.OperationID, "GetJoinedGroupList return ", resp.String()) return &resp, nil } func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.InviteUserToGroupReq) (*pbGroup.InviteUserToGroupResp, error) { - log.NewInfo(req.OperationID, "InviteUserToGroup args: ", req.String()) + log.NewInfo(req.OperationID, "InviteUserToGroup args ", req.String()) + if !imdb.IsExistGroupMember(req.GroupID, req.OpUserID) && !utils.IsContain(req.OpUserID, config.Config.Manager.AppManagerUid) { - log.NewError(req.OperationID, "no permission InviteUserToGroup ", req.GroupID) + log.NewError(req.OperationID, "no permission InviteUserToGroup ", req.GroupID, req.OpUserID) return &pbGroup.InviteUserToGroupResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } groupInfoFromMysql, err := imdb.FindGroupInfoByGroupId(req.GroupID) if err != nil || groupInfoFromMysql == nil { - log.NewError(req.OperationID, "FindGroupInfoByGroupId failed", req.GroupID) + log.NewError(req.OperationID, "FindGroupInfoByGroupId failed ", req.GroupID, err) return &pbGroup.InviteUserToGroupResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } - // //from User: invite: applicant //to user: invite: invited - //to application var resp pbGroup.InviteUserToGroupResp - opUser, err := imdb.FindUserByUID(req.OpUserID) - if err != nil { - log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), req.OpUserID) - } - var nicknameList string - for _, v := range req.UidList { + for _, v := range req.InvitedUserIDList { var resultNode pbGroup.Id2Result - resultNode.UId = v + resultNode.UserID = v resultNode.Result = 0 toUserInfo, err := imdb.FindUserByUID(v) if err != nil { - log.NewError(req.OperationID, "FindUserByUID failed ", err.Error()) + log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), v) resultNode.Result = -1 - resp.Id2Result = append(resp.Id2Result, &resultNode) + resp.Id2ResultList = append(resp.Id2ResultList, &resultNode) continue } if imdb.IsExistGroupMember(req.GroupID, v) { - log.NewError(req.OperationID, "ExistGroupMember failed ", req.GroupID, v) + log.NewError(req.OperationID, "IsExistGroupMember ", req.GroupID, v) resultNode.Result = -1 - resp.Id2Result = append(resp.Id2Result, &resultNode) + resp.Id2ResultList = append(resp.Id2ResultList, &resultNode) continue } @@ -236,91 +214,69 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite if err != nil { log.NewError(req.OperationID, "InsertGroupMember failed ", req.GroupID, toUserInfo.UserID, toUserInfo.Nickname, toUserInfo.FaceUrl) resultNode.Result = -1 - resp.Id2Result = append(resp.Id2Result, &resultNode) + resp.Id2ResultList = append(resp.Id2ResultList, &resultNode) continue } - member, err := imdb.GetMemberInfoById(req.GroupID, v) - if groupInfoFromMysql != nil && opUser != nil && member != nil { - chat.MemberInvitedNotification(req.OperationID, *groupInfoFromMysql, *opUser, *member) - } else { - log.NewError(req.OperationID, "args failed, nil ", groupInfoFromMysql, opUser, member) - } - + chat.MemberInvitedNotification(req.OperationID, req.GroupID, req.OpUserID, v) err = db.DB.AddGroupMember(req.GroupID, toUserInfo.UserID) if err != nil { - log.Error("", "", "add mongo group member failed, db.DB.AddGroupMember fail [err: %s]", err.Error()) + log.NewError(req.OperationID, "AddGroupMember failed ", err.Error(), req.GroupID, toUserInfo.UserID) } - nicknameList = nicknameList + toUserInfo.Nickname + " " - resp.Id2Result = append(resp.Id2Result, &resultNode) + resp.Id2ResultList = append(resp.Id2ResultList, &resultNode) } resp.ErrCode = 0 + log.NewInfo(req.OperationID, "InviteUserToGroup rpc return ", resp) return &resp, nil } -type inviteUserToGroupReq struct { - GroupID string `json:"groupID"` - UidList []string `json:"uidList"` - Reason string `json:"reason"` - OperationID string `json:"operationID"` -} - -func (c *inviteUserToGroupReq) ContentToString() string { - data, _ := json.Marshal(c) - dataString := string(data) - return dataString -} - func (s *groupServer) GetGroupAllMember(ctx context.Context, req *pbGroup.GetGroupAllMemberReq) (*pbGroup.GetGroupAllMemberResp, error) { + log.NewInfo(req.OperationID, "GetGroupAllMember, args ", req.String()) var resp pbGroup.GetGroupAllMemberResp resp.ErrCode = 0 memberList, err := imdb.FindGroupMemberListByGroupId(req.GroupID) if err != nil { resp.ErrCode = constant.ErrDb.ErrCode - resp.ErrMsg = err.Error() + resp.ErrMsg = constant.ErrDb.ErrMsg log.NewError(req.OperationID, "FindGroupMemberListByGroupId failed,", err.Error(), req.GroupID) return &resp, nil } - - for _, v := range memberList { - var node pbGroup.GroupMemberFullInfo - node.Role = v.AdministratorLevel - node.NickName = v.NickName - node.UserId = v.UserID - node.FaceUrl = v.FaceUrl - node.JoinTime = uint64(v.JoinTime.Unix()) - resp.MemberList = append(resp.MemberList, &node) + m := token_verify.IsMangerUserID(req.OpUserID) + in := false + if m { + in = true } + for _, v := range memberList { + var node open_im_sdk.GroupMemberFullInfo + utils.CopyStructFields(node, v) + resp.MemberList = append(resp.MemberList, &node) + if !m && req.OpUserID == v.UserID { + in = true + } + } + if !in { + } resp.ErrCode = 0 return &resp, nil } func (s *groupServer) GetGroupMemberList(ctx context.Context, req *pbGroup.GetGroupMemberListReq) (*pbGroup.GetGroupMemberListResp, error) { - claims, err := token_verify.ParseToken(req.Token) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) - return &pbGroup.GetGroupMemberListResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil - } - // log.Info(claims.UID, req.OperationID, "recv req: ", req.String()) - fmt.Println("req: ", req.GroupID) + log.NewInfo(req.OperationID, "GetGroupMemberList, args ", req.String()) + var resp pbGroup.GetGroupMemberListResp resp.ErrCode = 0 memberList, err := imdb.GetGroupMemberByGroupId(req.GroupID, req.Filter, req.NextSeq, 30) if err != nil { resp.ErrCode = constant.ErrDb.ErrCode resp.ErrMsg = err.Error() - log.Error(claims.UID, req.OperationID, "GetGroupMemberByGroupId failed, ", err.Error(), "params: ", req.GroupID, req.Filter, req.NextSeq) + log.NewError(req.OperationID, "GetGroupMemberByGroupId failed,", req.GroupID, req.Filter, req.NextSeq, 30) return &resp, nil } for _, v := range memberList { - var node pbGroup.GroupMemberFullInfo - node.Role = v.AdministratorLevel - node.NickName = v.NickName - node.UserId = v.UserID - // node.FaceUrl = - node.JoinTime = uint64(v.JoinTime.Unix()) + var node open_im_sdk.GroupMemberFullInfo + utils.CopyStructFields(&node, v) resp.MemberList = append(resp.MemberList, &node) } //db operate get db sorted by join time @@ -331,33 +287,12 @@ func (s *groupServer) GetGroupMemberList(ctx context.Context, req *pbGroup.GetGr } resp.ErrCode = 0 + log.NewInfo(req.OperationID, "GetGroupMemberList rpc return ", resp) return &resp, nil } -type groupMemberFullInfo struct { - GroupId string `json:"groupID"` - UserId string `json:"userId"` - Role int `json:"role"` - JoinTime uint64 `json:"joinTime"` - NickName string `json:"nickName"` - FaceUrl string `json:"faceUrl"` -} - -type kickGroupMemberApiReq struct { - GroupID string `json:"groupID"` - UidListInfo []groupMemberFullInfo `json:"uidListInfo"` - Reason string `json:"reason"` - OperationID string `json:"operationID"` -} - -func (c *kickGroupMemberApiReq) ContentToString() string { - data, _ := json.Marshal(c) - dataString := string(data) - return dataString -} - func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGroupMemberReq) (*pbGroup.KickGroupMemberResp, error) { - log.NewInfo(req.OperationID, "KickGroupMember failed ", req.String()) + log.NewInfo(req.OperationID, "KickGroupMember args ", req.String()) ownerList, err := imdb.GetOwnerManagerByGroupId(req.GroupID) if err != nil { log.NewError(req.OperationID, "GetOwnerManagerByGroupId failed ", err.Error(), req.GroupID) @@ -368,209 +303,188 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou for _, v := range ownerList { if v.UserID == req.OpUserID { flag = 1 - log.NewInfo(req.OperationID, "is group owner ", req.OpUserID, req.GroupID) + log.NewDebug(req.OperationID, "is group owner ", req.OpUserID, req.GroupID) break } } if flag != 1 { - if utils.IsContain(req.OpUserID, config.Config.Manager.AppManagerUid) { + if token_verify.IsMangerUserID(req.OpUserID) { flag = 1 - log.NewInfo(req.OperationID, "is app manager ", req.OpUserID, req.GroupID) + log.NewDebug(req.OperationID, "is app manager ", req.OpUserID) } } if flag != 1 { - log.NewError(req.OperationID, "failed, no access kick") + log.NewError(req.OperationID, "failed, no access kick ") return &pbGroup.KickGroupMemberResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } - if len(req.UidListInfo) == 0 { + if len(req.KickedUserIDList) == 0 { log.NewError(req.OperationID, "failed, kick list 0") return &pbGroup.KickGroupMemberResp{ErrCode: constant.ErrParam.ErrCode, ErrMsg: constant.ErrParam.ErrMsg}, nil } + groupOwnerUserID := "" + for _, v := range ownerList { + if v.AdministratorLevel == 1 { + groupOwnerUserID = v.UserID + } + } + //remove var resp pbGroup.KickGroupMemberResp - for _, v := range req.UidListInfo { + for _, v := range req.KickedUserIDList { //owner cant kicked - if v.UserId == req.OpUserID { - log.NewError(req.OperationID, v.UserId, "failed, can't kick owner ", req.OpUserID) - resp.Id2Result = append(resp.Id2Result, &pbGroup.Id2Result{UId: v.UserId, Result: -1}) + if v == groupOwnerUserID { + log.NewError(req.OperationID, "failed, can't kick owner ", v) + resp.Id2ResultList = append(resp.Id2ResultList, &pbGroup.Id2Result{UserID: v, Result: -1}) continue } - err := imdb.RemoveGroupMember(req.GroupID, v.UserId) + err := imdb.RemoveGroupMember(req.GroupID, v) if err != nil { - log.NewError(req.OperationID, "RemoveGroupMember failed ", err.Error(), req.GroupID, v.UserId) - resp.Id2Result = append(resp.Id2Result, &pbGroup.Id2Result{UId: v.UserId, Result: -1}) + log.NewError(req.OperationID, "RemoveGroupMember failed ", err.Error(), req.GroupID, v) + resp.Id2ResultList = append(resp.Id2ResultList, &pbGroup.Id2Result{UserID: v, Result: -1}) } else { - resp.Id2Result = append(resp.Id2Result, &pbGroup.Id2Result{UId: v.UserId, Result: 0}) + resp.Id2ResultList = append(resp.Id2ResultList, &pbGroup.Id2Result{UserID: v, Result: 0}) } - - err = db.DB.DelGroupMember(req.GroupID, v.UserId) + err = db.DB.DelGroupMember(req.GroupID, v) if err != nil { log.NewError(req.OperationID, "DelGroupMember failed ", err.Error(), req.GroupID, v.UserId) } } - for _, v := range req.UidListInfo { - chat.MemberKickedNotificationID(req.OperationID, req.GroupID, req.OpUserID, v.UserId, req.Reason) + for _, v := range req.KickedUserIDList { + chat.MemberKickedNotification(req.OperationID, req.GroupID, req.OpUserID, v, req.Reason) } resp.ErrCode = 0 + log.NewInfo(req.OperationID, "GetGroupMemberList rpc return ", resp) return &resp, nil } func (s *groupServer) GetGroupMembersInfo(ctx context.Context, req *pbGroup.GetGroupMembersInfoReq) (*pbGroup.GetGroupMembersInfoResp, error) { - claims, err := token_verify.ParseToken(req.Token) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) - return &pbGroup.GetGroupMembersInfoResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil - } - log.InfoByKv(claims.UID, req.OperationID, "param: ", req.MemberList) + log.NewInfo(req.OperationID, "GetGroupMembersInfo args ", req.String()) + var resp pbGroup.GetGroupMembersInfoResp for _, v := range req.MemberList { - var memberNode pbGroup.GroupMemberFullInfo + var memberNode open_im_sdk.GroupMemberFullInfo memberInfo, err := imdb.GetMemberInfoById(req.GroupID, v) - memberNode.UserId = v - fmt.Println("id : ", memberNode.UserId) + memberNode.UserID = v if err != nil { - log.Error(claims.UID, req.OperationID, req.GroupID, v, "GetMemberInfoById failed, ", err.Error()) - //error occurs, only id is valid - resp.MemberList = append(resp.MemberList, &memberNode) + log.NewError(req.OperationID, "GetMemberInfoById failed ", err.Error(), req.GroupID, v) continue + } else { + utils.CopyStructFields(&memberNode, memberInfo) + resp.MemberList = append(resp.MemberList, &memberNode) } - user, err := imdb.FindUserByUID(v) - if err == nil && user != nil { - memberNode.FaceUrl = user.FaceUrl - memberNode.JoinTime = uint64(memberInfo.JoinTime.Unix()) - memberNode.UserId = user.UserID - memberNode.NickName = memberInfo.NickName - memberNode.Role = memberInfo.AdministratorLevel - } - resp.MemberList = append(resp.MemberList, &memberNode) } resp.ErrCode = 0 + log.NewInfo(req.OperationID, "GetGroupMembersInfo rpc return ", resp) return &resp, nil } -func (s *groupServer) GetGroupApplicationList(_ context.Context, pb *pbGroup.GetGroupApplicationListReq) (*pbGroup.GetGroupApplicationListResp, error) { - log.Info("", "", "rpc GetGroupApplicationList call start..., [pb: %s]", pb.String()) - - reply, err := im_mysql_model.GetGroupApplicationList(pb.OpUserID) +func (s *groupServer) GetGroupApplicationList(_ context.Context, req *pbGroup.GetGroupApplicationListReq) (*pbGroup.GetGroupApplicationListResp, error) { + log.NewInfo(req.OperationID, "GetGroupMembersInfo args ", req.String()) + reply, err := im_mysql_model.GetGroupApplicationList(req.OpUserID) if err != nil { + log.NewError(req.OperationID, "GetGroupApplicationList failed ", err.Error(), req.OpUserID) return &pbGroup.GetGroupApplicationListResp{ErrCode: 701, ErrMsg: "GetGroupApplicationList failed"}, nil } - log.Info("", "", "rpc GetGroupApplicationList call..., im_mysql_model.GetGroupApplicationList") - + log.NewInfo(req.OperationID, "GetGroupMembersInfo rpc return ", reply) return reply, nil } func (s *groupServer) GetGroupsInfo(ctx context.Context, req *pbGroup.GetGroupsInfoReq) (*pbGroup.GetGroupsInfoResp, error) { - log.Info(req.Token, req.OperationID, "rpc get group info is server,args=%s", req.String()) - //Parse token, to find current user information - claims, err := token_verify.ParseToken(req.Token) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) - return &pbGroup.GetGroupsInfoResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil - } - log.Info("", req.OperationID, "args:", req.GroupIDList, claims.UID) - groupsInfoList := make([]*pbGroup.GroupInfo, 0) + log.NewInfo(req.OperationID, "GetGroupsInfo args ", req.String()) + groupsInfoList := make([]*open_im_sdk.GroupInfo, 0) for _, groupID := range req.GroupIDList { groupInfoFromMysql, err := im_mysql_model.FindGroupInfoByGroupId(groupID) if err != nil { - log.Error(req.Token, req.OperationID, "find group info failed,err=%s", err.Error()) + log.NewError(req.OperationID, "FindGroupInfoByGroupId failed ", err.Error(), groupID) continue } - var groupInfo pbGroup.GroupInfo - groupInfo.GroupId = groupID - groupInfo.GroupName = groupInfoFromMysql.GroupName - groupInfo.Introduction = groupInfoFromMysql.Introduction - groupInfo.Notification = groupInfoFromMysql.Notification - groupInfo.FaceUrl = groupInfoFromMysql.FaceUrl - groupInfo.OwnerId = im_mysql_model.GetGroupOwnerByGroupId(groupID) - groupInfo.MemberCount = uint32(im_mysql_model.GetGroupMemberNumByGroupId(groupID)) - groupInfo.CreateTime = uint64(groupInfoFromMysql.CreateTime.Unix()) - + var groupInfo open_im_sdk.GroupInfo + utils.CopyStructFields(&groupInfo, groupInfoFromMysql) groupsInfoList = append(groupsInfoList, &groupInfo) } - log.Info(req.Token, req.OperationID, "rpc get groupsInfo success return") - return &pbGroup.GetGroupsInfoResp{Data: groupsInfoList}, nil + + resp := pbGroup.GetGroupsInfoResp{GroupInfoList: groupsInfoList} + log.NewInfo(req.OperationID, "GetGroupsInfo rpc return ", resp) + return &resp, nil } -func (s *groupServer) GroupApplicationResponse(_ context.Context, pb *pbGroup.GroupApplicationResponseReq) (*pbGroup.GroupApplicationResponseResp, error) { - log.NewInfo(pb.OperationID, "GroupApplicationResponse args: ", pb.String()) - reply, err := imdb.GroupApplicationResponse(pb) +func (s *groupServer) GroupApplicationResponse(_ context.Context, req *pbGroup.GroupApplicationResponseReq) (*pbGroup.CommonResp, error) { + log.NewInfo(req.OperationID, "GroupApplicationResponse args ", req.String()) + reply, err := imdb.GroupApplicationResponse(req) if err != nil { - log.NewError(pb.OperationID, "GroupApplicationResponse failed ", err.Error(), pb.String()) - return &pbGroup.GroupApplicationResponseResp{ErrCode: 702, ErrMsg: err.Error()}, nil + log.NewError(req.OperationID, "GroupApplicationResponse failed ", err.Error(), req.String()) + return &pbGroup.CommonResp{ErrCode: 702, ErrMsg: err.Error()}, nil } - if pb.HandleResult == 1 { - if pb.ToUserID == "0" { - err = db.DB.AddGroupMember(pb.GroupID, pb.FromUserID) + if req.HandleResult == 1 { + if req.ToUserID == "0" { + err = db.DB.AddGroupMember(req.GroupID, req.FromUserID) if err != nil { - log.Error("", "", "rpc GroupApplicationResponse call..., db.DB.AddGroupMember fail [pb: %s] [err: %s]", pb.String(), err.Error()) - return nil, err + log.NewError(req.OperationID, "AddGroupMember failed ", err.Error(), req.GroupID, req.FromUserID) } } else { - err = db.DB.AddGroupMember(pb.GroupID, pb.ToUserID) + err = db.DB.AddGroupMember(req.GroupID, req.ToUserID) if err != nil { - log.Error("", "", "rpc GroupApplicationResponse call..., db.DB.AddGroupMember fail [pb: %s] [err: %s]", pb.String(), err.Error()) - return nil, err + log.NewError(req.OperationID, "AddGroupMember failed ", err.Error(), req.GroupID, req.ToUserID) } } } - if pb.ToUserID == "0" { - group, err := imdb.FindGroupInfoByGroupId(pb.GroupID) + if req.ToUserID == "0" { + group, err := imdb.FindGroupInfoByGroupId(req.GroupID) if err != nil { - log.NewError(pb.OperationID, "FindGroupInfoByGroupId failed ", pb.GroupID) + log.NewError(req.OperationID, "FindGroupInfoByGroupId failed ", req.GroupID) return reply, nil } - member, err := imdb.FindGroupMemberInfoByGroupIdAndUserId(pb.GroupID, pb.OpUserID) + member, err := imdb.FindGroupMemberInfoByGroupIdAndUserId(req.GroupID, req.OpUserID) if err != nil { - log.NewError(pb.OperationID, "FindGroupMemberInfoByGroupIdAndUserId failed ", pb.GroupID, pb.OpUserID) + log.NewError(req.OperationID, "FindGroupMemberInfoByGroupIdAndUserId failed ", req.GroupID, req.OpUserID) return reply, nil } - chat.ApplicationProcessedNotification(pb.OperationID, pb.FromUserID, *group, *member, pb.HandleResult, pb.HandledMsg) - if pb.HandleResult == 1 { - entrantUser, err := imdb.FindGroupMemberInfoByGroupIdAndUserId(pb.GroupID, pb.FromUserID) + chat.ApplicationProcessedNotification(req.OperationID, req.FromUserID, *group, *member, req.HandleResult, req.HandledMsg) + if req.HandleResult == 1 { + entrantUser, err := imdb.FindGroupMemberInfoByGroupIdAndUserId(req.GroupID, req.FromUserID) if err != nil { - log.NewError(pb.OperationID, "FindGroupMemberInfoByGroupIdAndUserId failed ", err.Error(), pb.GroupID, pb.FromUserID) + log.NewError(req.OperationID, "FindGroupMemberInfoByGroupIdAndUserId failed ", err.Error(), req.GroupID, req.FromUserID) return reply, nil } - chat.MemberEnterNotification(pb.OperationID, group, entrantUser) + chat.MemberEnterNotification(req.OperationID, req.GroupID, entrantUser) } } else { - log.NewError(pb.OperationID, "args failed ", pb.String()) + log.NewError(req.OperationID, "args failed ", req.String()) } - log.NewInfo(pb.OperationID, "rpc GroupApplicationResponse ok ", reply) + log.NewInfo(req.OperationID, "rpc GroupApplicationResponse ok ", reply) return reply, nil } func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq) (*pbGroup.CommonResp, error) { - log.NewInfo(req.Token, req.OperationID, "JoinGroup args ", req.String()) + log.NewInfo(req.OperationID, "JoinGroup args ", req.String()) //Parse token, to find current user information - claims, err := token_verify.ParseToken(req.Token) + //claims, err := token_verify.ParseToken(req.Token) + //if err != nil { + // log.NewError(req.OperationID, "ParseToken failed", err.Error(), req.String()) + // return &pbGroup.CommonResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil + //} + applicationUserInfo, err := im_mysql_model.FindUserByUID(req.FromUserID) if err != nil { - log.NewError(req.OperationID, "ParseToken failed", err.Error(), req.String()) - return &pbGroup.CommonResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil - } - applicationUserInfo, err := im_mysql_model.FindUserByUID(claims.UID) - if err != nil { - log.NewError(req.OperationID, "FindUserByUID failed", err.Error(), claims.UID) + log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), req.FromUserID) return &pbGroup.CommonResp{ErrCode: constant.ErrSearchUserInfo.ErrCode, ErrMsg: constant.ErrSearchUserInfo.ErrMsg}, nil } - _, err = im_mysql_model.FindGroupRequestUserInfoByGroupIDAndUid(req.GroupID, claims.UID) + _, err = im_mysql_model.FindGroupRequestUserInfoByGroupIDAndUid(req.GroupID, req.FromUserID) if err == nil { - err = im_mysql_model.DelGroupRequest(req.GroupID, claims.UID, "0") + err = im_mysql_model.DelGroupRequest(req.GroupID, req.FromUserID, "0") } - if err = im_mysql_model.InsertIntoGroupRequest(req.GroupID, claims.UID, "0", req.Message, applicationUserInfo.Nickname, applicationUserInfo.FaceUrl); err != nil { - log.Error(req.Token, req.OperationID, "Insert into group request failed,er=%s", err.Error()) + if err = im_mysql_model.InsertIntoGroupRequest(req.GroupID, req.FromUserID, "0", req.ReqMessage, applicationUserInfo.Nickname, applicationUserInfo.FaceUrl); err != nil { + log.NewError(req.OperationID, "InsertIntoGroupRequest ", err.Error(), req.GroupID, req.FromUserID, "0", req.ReqMessage, applicationUserInfo.Nickname, applicationUserInfo.FaceUrl) return &pbGroup.CommonResp{ErrCode: constant.ErrJoinGroupApplication.ErrCode, ErrMsg: constant.ErrJoinGroupApplication.ErrMsg}, nil } @@ -620,9 +534,9 @@ func hasAccess(req *pbGroup.SetGroupInfoReq) bool { if utils.IsContain(req.OpUserID, config.Config.Manager.AppManagerUid) { return true } - groupUserInfo, err := im_mysql_model.FindGroupMemberInfoByGroupIdAndUserId(req.GroupID, req.OpUserID) + groupUserInfo, err := im_mysql_model.FindGroupMemberInfoByGroupIdAndUserId(req.GroupInfo.GroupID, req.OpUserID) if err != nil { - log.NewError(req.OperationID, "FindGroupMemberInfoByGroupIdAndUserId failed, ", err.Error(), req.GroupID, req.OpUserID) + log.NewError(req.OperationID, "FindGroupMemberInfoByGroupIdAndUserId failed, ", err.Error(), req.GroupInfo.GroupID, req.OpUserID) return false } @@ -638,39 +552,39 @@ func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInf return &pbGroup.CommonResp{ErrCode: constant.ErrSetGroupInfo.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } - group, err := im_mysql_model.FindGroupInfoByGroupId(req.GroupID) + group, err := im_mysql_model.FindGroupInfoByGroupId(req.GroupInfo.GroupID) if err != nil { - log.NewError(req.OperationID, "FindGroupInfoByGroupId failed, ", err.Error(), req.GroupID) + log.NewError(req.OperationID, "FindGroupInfoByGroupId failed, ", err.Error(), req.GroupInfo.GroupID) return &pbGroup.CommonResp{ErrCode: constant.ErrSetGroupInfo.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } ////bitwise operators: 1:groupName; 10:Notification 100:Introduction; 1000:FaceUrl var changedType int32 - if group.GroupName != req.GroupName && req.GroupName != "" { + if group.GroupName != req.GroupInfo.GroupName && req.GroupInfo.GroupName != "" { changedType = 1 } - if group.Notification != req.Notification && req.Notification != "" { + if group.Notification != req.GroupInfo.Notification && req.GroupInfo.Notification != "" { changedType = changedType | (1 << 1) } - if group.Introduction != req.Introduction && req.Introduction != "" { + if group.Introduction != req.GroupInfo.Introduction && req.GroupInfo.Introduction != "" { changedType = changedType | (1 << 2) } - if group.FaceUrl != req.FaceUrl && req.FaceUrl != "" { + if group.FaceUrl != req.GroupInfo.FaceUrl && req.GroupInfo.FaceUrl != "" { changedType = changedType | (1 << 3) } //only administrators can set group information - if err = im_mysql_model.SetGroupInfo(req.GroupID, req.GroupName, req.Introduction, req.Notification, req.FaceUrl, ""); err != nil { + if err = im_mysql_model.SetGroupInfo(req.GroupInfo.GroupID, req.GroupInfo.GroupName, req.GroupInfo.Introduction, req.GroupInfo.Notification, req.GroupInfo.FaceUrl, ""); err != nil { return &pbGroup.CommonResp{ErrCode: constant.ErrSetGroupInfo.ErrCode, ErrMsg: constant.ErrSetGroupInfo.ErrMsg}, nil } if changedType != 0 { - chat.GroupInfoChangedNotification(req.OperationID, changedType, req.GroupID, req.OpUserID) + chat.GroupInfoChangedNotification(req.OperationID, changedType, req.GroupInfo.GroupID, req.OpUserID) } return &pbGroup.CommonResp{}, nil } -func (s *groupServer) TransferGroupOwner(_ context.Context, pb *pbGroup.TransferGroupOwnerReq) (*pbGroup.TransferGroupOwnerResp, error) { +func (s *groupServer) TransferGroupOwner(_ context.Context, pb *pbGroup.TransferGroupOwnerReq) (*pbGroup.CommonResp, error) { log.Info("", "", "rpc TransferGroupOwner call start..., [pb: %s]", pb.String()) reply, err := im_mysql_model.TransferGroupOwner(pb) diff --git a/pkg/common/constant/constant.go b/pkg/common/constant/constant.go index 9cabc19b3..9cfdf5859 100644 --- a/pkg/common/constant/constant.go +++ b/pkg/common/constant/constant.go @@ -10,7 +10,7 @@ const ( Application = 0 AgreeApplication = 1 - //feiend related + //friend related BlackListFlag = 1 ApplicationFriendFlag = 0 FriendFlag = 1 diff --git a/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go b/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go index 1a7308cb9..9ccf17a0e 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go @@ -5,6 +5,7 @@ import ( "time" ) +// reqId add userId func ReplaceIntoFriendReq(reqId, userId string, flag int32, reqMessage string) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { @@ -44,6 +45,7 @@ func FindSelfApplyFromFriendReq(userId string) ([]FriendRequest, error) { return usersInfo, nil } +//reqId apply to add userId already func FindFriendApplyFromFriendReqByUid(reqId, userId string) (*FriendRequest, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { @@ -57,6 +59,7 @@ func FindFriendApplyFromFriendReqByUid(reqId, userId string) (*FriendRequest, er return &friendRequest, nil } +//userId process reqId func UpdateFriendRelationshipToFriendReq(reqId, userId string, flag int32) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go index 46381dd45..578b56632 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go @@ -212,6 +212,19 @@ func GetGroupOwnerByGroupId(groupId string) string { return "" } +func GetGroupOwnerInfoByGroupId(groupId string) (*GroupMember, error) { + omList, err := GetOwnerManagerByGroupId(groupId) + if err != nil { + return nil, err + } + for _, v := range omList { + if v.AdministratorLevel == 1 { + return v, nil + } + } + return nil, nil +} + func InsertGroupMember(groupId, userId, nickName, userFaceUrl string, role int32) error { return InsertIntoGroupMember(groupId, userId, nickName, userFaceUrl, role) } diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_model.go index 798f9bf1d..d9c69fdc0 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_model.go @@ -164,12 +164,12 @@ func GetGroupApplicationList(uid string) (*group.GetGroupApplicationListResp, er return reply, nil } -func TransferGroupOwner(pb *group.TransferGroupOwnerReq) (*group.TransferGroupOwnerResp, error) { - oldOwner, err := FindGroupMemberInfoByGroupIdAndUserId(pb.GroupID, pb.OldOwner) +func TransferGroupOwner(pb *group.TransferGroupOwnerReq) (*group.CommonResp, error) { + oldOwner, err := FindGroupMemberInfoByGroupIdAndUserId(pb.GroupID, pb.OldOwnerUserID) if err != nil { return nil, err } - newOwner, err := FindGroupMemberInfoByGroupIdAndUserId(pb.GroupID, pb.NewOwner) + newOwner, err := FindGroupMemberInfoByGroupIdAndUserId(pb.GroupID, pb.NewOwnerUserID) if err != nil { return nil, err } @@ -178,19 +178,19 @@ func TransferGroupOwner(pb *group.TransferGroupOwnerReq) (*group.TransferGroupOw return nil, errors.New("the self") } - if err = UpdateTheUserAdministratorLevel(pb.GroupID, pb.OldOwner, 0); err != nil { + if err = UpdateTheUserAdministratorLevel(pb.GroupID, pb.OldOwnerUserID, 0); err != nil { return nil, err } - if err = UpdateTheUserAdministratorLevel(pb.GroupID, pb.NewOwner, 1); err != nil { - UpdateTheUserAdministratorLevel(pb.GroupID, pb.OldOwner, 1) + if err = UpdateTheUserAdministratorLevel(pb.GroupID, pb.NewOwnerUserID, 1); err != nil { + UpdateTheUserAdministratorLevel(pb.GroupID, pb.OldOwnerUserID, 1) return nil, err } - return &group.TransferGroupOwnerResp{}, nil + return &group.CommonResp{}, nil } -func GroupApplicationResponse(pb *group.GroupApplicationResponseReq) (*group.GroupApplicationResponseResp, error) { +func GroupApplicationResponse(pb *group.GroupApplicationResponseReq) (*group.CommonResp, error) { ownerUser, err := FindGroupMemberInfoByGroupIdAndUserId(pb.GroupID, pb.OwnerID) if err != nil { diff --git a/pkg/common/db/mysql_model/im_mysql_model/model_struct.go b/pkg/common/db/mysql_model/im_mysql_model/model_struct.go index 198362ca2..f25f4081f 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/model_struct.go +++ b/pkg/common/db/mysql_model/im_mysql_model/model_struct.go @@ -41,7 +41,7 @@ type Group struct { Notification string `gorm:"column:notification"` FaceUrl string `gorm:"column:face_url"` CreateTime time.Time `gorm:"column:create_time"` - Ex string `gorm:"column:ex"` + Ext string `gorm:"column:ex"` } type GroupMember struct { diff --git a/pkg/common/token_verify/jwt_token.go b/pkg/common/token_verify/jwt_token.go index 961919605..1f3f444b2 100644 --- a/pkg/common/token_verify/jwt_token.go +++ b/pkg/common/token_verify/jwt_token.go @@ -5,6 +5,7 @@ import ( "Open_IM/pkg/common/constant" commonDB "Open_IM/pkg/common/db" "Open_IM/pkg/common/log" + "Open_IM/pkg/utils" "github.com/golang-jwt/jwt/v4" "time" ) @@ -80,6 +81,43 @@ func GetClaimFromToken(tokensString string) (*Claims, error) { } } +func IsAppManagerAccess(token string, OpUserID string) bool { + claims, err := ParseToken(token) + if err != nil { + return false + } + if utils.IsContain(claims.UID, config.Config.Manager.AppManagerUid) && claims.UID == OpUserID { + return true + } + return false +} + +func IsMangerUserID(OpUserID string) bool { + if utils.IsContain(OpUserID, config.Config.Manager.AppManagerUid) { + return true + } else { + return false + } +} + +func CheckAccess(OpUserID string, OwnerUserID string) bool { + if utils.IsContain(OpUserID, config.Config.Manager.AppManagerUid) { + return true + } + if OpUserID == OwnerUserID { + return true + } + return false +} + +func GetUserIDFromToken(token string) (bool, string) { + claims, err := ParseToken(token) + if err != nil { + return false, "" + } + return true, claims.UID +} + func ParseToken(tokensString string) (claims *Claims, err error) { claims, err = GetClaimFromToken(tokensString) diff --git a/pkg/proto/friend/friend.pb.go b/pkg/proto/friend/friend.pb.go index a393857af..a0c0fb25e 100644 --- a/pkg/proto/friend/friend.pb.go +++ b/pkg/proto/friend/friend.pb.go @@ -6,6 +6,7 @@ package friend // import "./friend" import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" +import sdk_ws "Open_IM/pkg/proto/sdk_ws" import ( context "golang.org/x/net/context" @@ -24,8 +25,8 @@ var _ = math.Inf const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type CommonResp struct { - ErrorCode int32 `protobuf:"varint,1,opt,name=errorCode" json:"errorCode,omitempty"` - ErrorMsg string `protobuf:"bytes,2,opt,name=errorMsg" json:"errorMsg,omitempty"` + ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -35,7 +36,7 @@ func (m *CommonResp) Reset() { *m = CommonResp{} } func (m *CommonResp) String() string { return proto.CompactTextString(m) } func (*CommonResp) ProtoMessage() {} func (*CommonResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_03bf5fbe59a174aa, []int{0} + return fileDescriptor_friend_525e368387d696e2, []int{0} } func (m *CommonResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CommonResp.Unmarshal(m, b) @@ -55,24 +56,84 @@ func (m *CommonResp) XXX_DiscardUnknown() { var xxx_messageInfo_CommonResp proto.InternalMessageInfo -func (m *CommonResp) GetErrorCode() int32 { +func (m *CommonResp) GetErrCode() int32 { if m != nil { - return m.ErrorCode + return m.ErrCode } return 0 } -func (m *CommonResp) GetErrorMsg() string { +func (m *CommonResp) GetErrMsg() string { if m != nil { - return m.ErrorMsg + return m.ErrMsg + } + return "" +} + +type CommID struct { + OpUserID string `protobuf:"bytes,1,opt,name=OpUserID" json:"OpUserID,omitempty"` + OperationID string `protobuf:"bytes,2,opt,name=OperationID" json:"OperationID,omitempty"` + ToUserID string `protobuf:"bytes,4,opt,name=ToUserID" json:"ToUserID,omitempty"` + FromUserID string `protobuf:"bytes,5,opt,name=FromUserID" json:"FromUserID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CommID) Reset() { *m = CommID{} } +func (m *CommID) String() string { return proto.CompactTextString(m) } +func (*CommID) ProtoMessage() {} +func (*CommID) Descriptor() ([]byte, []int) { + return fileDescriptor_friend_525e368387d696e2, []int{1} +} +func (m *CommID) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CommID.Unmarshal(m, b) +} +func (m *CommID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CommID.Marshal(b, m, deterministic) +} +func (dst *CommID) XXX_Merge(src proto.Message) { + xxx_messageInfo_CommID.Merge(dst, src) +} +func (m *CommID) XXX_Size() int { + return xxx_messageInfo_CommID.Size(m) +} +func (m *CommID) XXX_DiscardUnknown() { + xxx_messageInfo_CommID.DiscardUnknown(m) +} + +var xxx_messageInfo_CommID proto.InternalMessageInfo + +func (m *CommID) GetOpUserID() string { + if m != nil { + return m.OpUserID + } + return "" +} + +func (m *CommID) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +func (m *CommID) GetToUserID() string { + if m != nil { + return m.ToUserID + } + return "" +} + +func (m *CommID) GetFromUserID() string { + if m != nil { + return m.FromUserID } return "" } type GetFriendsInfoReq struct { - Uid string `protobuf:"bytes,1,opt,name=uid" json:"uid,omitempty"` - OperationID string `protobuf:"bytes,2,opt,name=OperationID" json:"OperationID,omitempty"` - Token string `protobuf:"bytes,3,opt,name=Token" json:"Token,omitempty"` + CommID *CommID `protobuf:"bytes,1,opt,name=CommID" json:"CommID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -82,7 +143,7 @@ func (m *GetFriendsInfoReq) Reset() { *m = GetFriendsInfoReq{} } func (m *GetFriendsInfoReq) String() string { return proto.CompactTextString(m) } func (*GetFriendsInfoReq) ProtoMessage() {} func (*GetFriendsInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_03bf5fbe59a174aa, []int{1} + return fileDescriptor_friend_525e368387d696e2, []int{2} } func (m *GetFriendsInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendsInfoReq.Unmarshal(m, b) @@ -102,41 +163,27 @@ func (m *GetFriendsInfoReq) XXX_DiscardUnknown() { var xxx_messageInfo_GetFriendsInfoReq proto.InternalMessageInfo -func (m *GetFriendsInfoReq) GetUid() string { +func (m *GetFriendsInfoReq) GetCommID() *CommID { if m != nil { - return m.Uid + return m.CommID } - return "" -} - -func (m *GetFriendsInfoReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - -func (m *GetFriendsInfoReq) GetToken() string { - if m != nil { - return m.Token - } - return "" + return nil } type GetFriendInfoResp struct { - ErrorCode int32 `protobuf:"varint,1,opt,name=errorCode" json:"errorCode,omitempty"` - ErrorMsg string `protobuf:"bytes,2,opt,name=errorMsg" json:"errorMsg,omitempty"` - Data *GetFriendData `protobuf:"bytes,3,opt,name=Data" json:"Data,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` + Data *FriendInfo `protobuf:"bytes,3,opt,name=Data" json:"Data,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GetFriendInfoResp) Reset() { *m = GetFriendInfoResp{} } func (m *GetFriendInfoResp) String() string { return proto.CompactTextString(m) } func (*GetFriendInfoResp) ProtoMessage() {} func (*GetFriendInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_03bf5fbe59a174aa, []int{2} + return fileDescriptor_friend_525e368387d696e2, []int{3} } func (m *GetFriendInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendInfoResp.Unmarshal(m, b) @@ -156,150 +203,100 @@ func (m *GetFriendInfoResp) XXX_DiscardUnknown() { var xxx_messageInfo_GetFriendInfoResp proto.InternalMessageInfo -func (m *GetFriendInfoResp) GetErrorCode() int32 { +func (m *GetFriendInfoResp) GetErrCode() int32 { if m != nil { - return m.ErrorCode + return m.ErrCode } return 0 } -func (m *GetFriendInfoResp) GetErrorMsg() string { +func (m *GetFriendInfoResp) GetErrMsg() string { if m != nil { - return m.ErrorMsg + return m.ErrMsg } return "" } -func (m *GetFriendInfoResp) GetData() *GetFriendData { +func (m *GetFriendInfoResp) GetData() *FriendInfo { if m != nil { return m.Data } return nil } -type GetFriendData struct { - Uid string `protobuf:"bytes,1,opt,name=uid" json:"uid,omitempty"` - Icon string `protobuf:"bytes,2,opt,name=icon" json:"icon,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name" json:"name,omitempty"` - Gender int32 `protobuf:"varint,4,opt,name=gender" json:"gender,omitempty"` - Mobile string `protobuf:"bytes,5,opt,name=mobile" json:"mobile,omitempty"` - Birth string `protobuf:"bytes,6,opt,name=birth" json:"birth,omitempty"` - Email string `protobuf:"bytes,7,opt,name=email" json:"email,omitempty"` - Ex string `protobuf:"bytes,8,opt,name=ex" json:"ex,omitempty"` - Comment string `protobuf:"bytes,9,opt,name=comment" json:"comment,omitempty"` - IsFriend int32 `protobuf:"varint,10,opt,name=isFriend" json:"isFriend,omitempty"` - IsInBlackList int32 `protobuf:"varint,11,opt,name=isInBlackList" json:"isInBlackList,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +type FriendInfo struct { + OwnerUserID string `protobuf:"bytes,1,opt,name=OwnerUserID" json:"OwnerUserID,omitempty"` + Remark string `protobuf:"bytes,2,opt,name=Remark" json:"Remark,omitempty"` + CreateTime uint64 `protobuf:"varint,3,opt,name=CreateTime" json:"CreateTime,omitempty"` + FriendUser *sdk_ws.UserInfo `protobuf:"bytes,4,opt,name=FriendUser" json:"FriendUser,omitempty"` + IsBlack int32 `protobuf:"varint,5,opt,name=IsBlack" json:"IsBlack,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *GetFriendData) Reset() { *m = GetFriendData{} } -func (m *GetFriendData) String() string { return proto.CompactTextString(m) } -func (*GetFriendData) ProtoMessage() {} -func (*GetFriendData) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_03bf5fbe59a174aa, []int{3} +func (m *FriendInfo) Reset() { *m = FriendInfo{} } +func (m *FriendInfo) String() string { return proto.CompactTextString(m) } +func (*FriendInfo) ProtoMessage() {} +func (*FriendInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_friend_525e368387d696e2, []int{4} } -func (m *GetFriendData) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetFriendData.Unmarshal(m, b) +func (m *FriendInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FriendInfo.Unmarshal(m, b) } -func (m *GetFriendData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetFriendData.Marshal(b, m, deterministic) +func (m *FriendInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FriendInfo.Marshal(b, m, deterministic) } -func (dst *GetFriendData) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetFriendData.Merge(dst, src) +func (dst *FriendInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_FriendInfo.Merge(dst, src) } -func (m *GetFriendData) XXX_Size() int { - return xxx_messageInfo_GetFriendData.Size(m) +func (m *FriendInfo) XXX_Size() int { + return xxx_messageInfo_FriendInfo.Size(m) } -func (m *GetFriendData) XXX_DiscardUnknown() { - xxx_messageInfo_GetFriendData.DiscardUnknown(m) +func (m *FriendInfo) XXX_DiscardUnknown() { + xxx_messageInfo_FriendInfo.DiscardUnknown(m) } -var xxx_messageInfo_GetFriendData proto.InternalMessageInfo +var xxx_messageInfo_FriendInfo proto.InternalMessageInfo -func (m *GetFriendData) GetUid() string { +func (m *FriendInfo) GetOwnerUserID() string { if m != nil { - return m.Uid + return m.OwnerUserID } return "" } -func (m *GetFriendData) GetIcon() string { +func (m *FriendInfo) GetRemark() string { if m != nil { - return m.Icon + return m.Remark } return "" } -func (m *GetFriendData) GetName() string { +func (m *FriendInfo) GetCreateTime() uint64 { if m != nil { - return m.Name - } - return "" -} - -func (m *GetFriendData) GetGender() int32 { - if m != nil { - return m.Gender + return m.CreateTime } return 0 } -func (m *GetFriendData) GetMobile() string { +func (m *FriendInfo) GetFriendUser() *sdk_ws.UserInfo { if m != nil { - return m.Mobile + return m.FriendUser } - return "" + return nil } -func (m *GetFriendData) GetBirth() string { +func (m *FriendInfo) GetIsBlack() int32 { if m != nil { - return m.Birth - } - return "" -} - -func (m *GetFriendData) GetEmail() string { - if m != nil { - return m.Email - } - return "" -} - -func (m *GetFriendData) GetEx() string { - if m != nil { - return m.Ex - } - return "" -} - -func (m *GetFriendData) GetComment() string { - if m != nil { - return m.Comment - } - return "" -} - -func (m *GetFriendData) GetIsFriend() int32 { - if m != nil { - return m.IsFriend - } - return 0 -} - -func (m *GetFriendData) GetIsInBlackList() int32 { - if m != nil { - return m.IsInBlackList + return m.IsBlack } return 0 } type AddFriendReq struct { - Uid string `protobuf:"bytes,1,opt,name=uid" json:"uid,omitempty"` - OperationID string `protobuf:"bytes,2,opt,name=OperationID" json:"OperationID,omitempty"` - Token string `protobuf:"bytes,3,opt,name=Token" json:"Token,omitempty"` - ReqMessage string `protobuf:"bytes,4,opt,name=ReqMessage" json:"ReqMessage,omitempty"` + CommID *CommID `protobuf:"bytes,1,opt,name=CommID" json:"CommID,omitempty"` + ReqMessage string `protobuf:"bytes,2,opt,name=ReqMessage" json:"ReqMessage,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -309,7 +306,7 @@ func (m *AddFriendReq) Reset() { *m = AddFriendReq{} } func (m *AddFriendReq) String() string { return proto.CompactTextString(m) } func (*AddFriendReq) ProtoMessage() {} func (*AddFriendReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_03bf5fbe59a174aa, []int{4} + return fileDescriptor_friend_525e368387d696e2, []int{5} } func (m *AddFriendReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddFriendReq.Unmarshal(m, b) @@ -329,25 +326,11 @@ func (m *AddFriendReq) XXX_DiscardUnknown() { var xxx_messageInfo_AddFriendReq proto.InternalMessageInfo -func (m *AddFriendReq) GetUid() string { +func (m *AddFriendReq) GetCommID() *CommID { if m != nil { - return m.Uid + return m.CommID } - return "" -} - -func (m *AddFriendReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - -func (m *AddFriendReq) GetToken() string { - if m != nil { - return m.Token - } - return "" + return nil } func (m *AddFriendReq) GetReqMessage() string { @@ -358,10 +341,10 @@ func (m *AddFriendReq) GetReqMessage() string { } type ImportFriendReq struct { - UidList []string `protobuf:"bytes,1,rep,name=uidList" json:"uidList,omitempty"` + FriendUserIDList []string `protobuf:"bytes,1,rep,name=FriendUserIDList" json:"FriendUserIDList,omitempty"` OperationID string `protobuf:"bytes,2,opt,name=OperationID" json:"OperationID,omitempty"` - Token string `protobuf:"bytes,3,opt,name=Token" json:"Token,omitempty"` - OwnerUid string `protobuf:"bytes,4,opt,name=OwnerUid" json:"OwnerUid,omitempty"` + FromUserID string `protobuf:"bytes,3,opt,name=FromUserID" json:"FromUserID,omitempty"` + OpUserID string `protobuf:"bytes,4,opt,name=OpUserID" json:"OpUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -371,7 +354,7 @@ func (m *ImportFriendReq) Reset() { *m = ImportFriendReq{} } func (m *ImportFriendReq) String() string { return proto.CompactTextString(m) } func (*ImportFriendReq) ProtoMessage() {} func (*ImportFriendReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_03bf5fbe59a174aa, []int{5} + return fileDescriptor_friend_525e368387d696e2, []int{6} } func (m *ImportFriendReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ImportFriendReq.Unmarshal(m, b) @@ -391,9 +374,9 @@ func (m *ImportFriendReq) XXX_DiscardUnknown() { var xxx_messageInfo_ImportFriendReq proto.InternalMessageInfo -func (m *ImportFriendReq) GetUidList() []string { +func (m *ImportFriendReq) GetFriendUserIDList() []string { if m != nil { - return m.UidList + return m.FriendUserIDList } return nil } @@ -405,16 +388,16 @@ func (m *ImportFriendReq) GetOperationID() string { return "" } -func (m *ImportFriendReq) GetToken() string { +func (m *ImportFriendReq) GetFromUserID() string { if m != nil { - return m.Token + return m.FromUserID } return "" } -func (m *ImportFriendReq) GetOwnerUid() string { +func (m *ImportFriendReq) GetOpUserID() string { if m != nil { - return m.OwnerUid + return m.OpUserID } return "" } @@ -431,7 +414,7 @@ func (m *ImportFriendResp) Reset() { *m = ImportFriendResp{} } func (m *ImportFriendResp) String() string { return proto.CompactTextString(m) } func (*ImportFriendResp) ProtoMessage() {} func (*ImportFriendResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_03bf5fbe59a174aa, []int{6} + return fileDescriptor_friend_525e368387d696e2, []int{7} } func (m *ImportFriendResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ImportFriendResp.Unmarshal(m, b) @@ -466,8 +449,7 @@ func (m *ImportFriendResp) GetFailedUidList() []string { } type GetFriendApplyReq struct { - OperationID string `protobuf:"bytes,1,opt,name=OperationID" json:"OperationID,omitempty"` - Token string `protobuf:"bytes,2,opt,name=Token" json:"Token,omitempty"` + CommID *CommID `protobuf:"bytes,1,opt,name=CommID" json:"CommID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -477,7 +459,7 @@ func (m *GetFriendApplyReq) Reset() { *m = GetFriendApplyReq{} } func (m *GetFriendApplyReq) String() string { return proto.CompactTextString(m) } func (*GetFriendApplyReq) ProtoMessage() {} func (*GetFriendApplyReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_03bf5fbe59a174aa, []int{7} + return fileDescriptor_friend_525e368387d696e2, []int{8} } func (m *GetFriendApplyReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendApplyReq.Unmarshal(m, b) @@ -497,23 +479,16 @@ func (m *GetFriendApplyReq) XXX_DiscardUnknown() { var xxx_messageInfo_GetFriendApplyReq proto.InternalMessageInfo -func (m *GetFriendApplyReq) GetOperationID() string { +func (m *GetFriendApplyReq) GetCommID() *CommID { if m != nil { - return m.OperationID + return m.CommID } - return "" -} - -func (m *GetFriendApplyReq) GetToken() string { - if m != nil { - return m.Token - } - return "" + return nil } type GetFriendApplyResp struct { - ErrorCode int32 `protobuf:"varint,1,opt,name=errorCode" json:"errorCode,omitempty"` - ErrorMsg string `protobuf:"bytes,2,opt,name=errorMsg" json:"errorMsg,omitempty"` + ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` Data []*ApplyUserInfo `protobuf:"bytes,4,rep,name=data" json:"data,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -524,7 +499,7 @@ func (m *GetFriendApplyResp) Reset() { *m = GetFriendApplyResp{} } func (m *GetFriendApplyResp) String() string { return proto.CompactTextString(m) } func (*GetFriendApplyResp) ProtoMessage() {} func (*GetFriendApplyResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_03bf5fbe59a174aa, []int{8} + return fileDescriptor_friend_525e368387d696e2, []int{9} } func (m *GetFriendApplyResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendApplyResp.Unmarshal(m, b) @@ -544,16 +519,16 @@ func (m *GetFriendApplyResp) XXX_DiscardUnknown() { var xxx_messageInfo_GetFriendApplyResp proto.InternalMessageInfo -func (m *GetFriendApplyResp) GetErrorCode() int32 { +func (m *GetFriendApplyResp) GetErrCode() int32 { if m != nil { - return m.ErrorCode + return m.ErrCode } return 0 } -func (m *GetFriendApplyResp) GetErrorMsg() string { +func (m *GetFriendApplyResp) GetErrMsg() string { if m != nil { - return m.ErrorMsg + return m.ErrMsg } return "" } @@ -566,27 +541,20 @@ func (m *GetFriendApplyResp) GetData() []*ApplyUserInfo { } type ApplyUserInfo struct { - Uid string `protobuf:"bytes,1,opt,name=uid" json:"uid,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` - Icon string `protobuf:"bytes,3,opt,name=icon" json:"icon,omitempty"` - Gender int32 `protobuf:"varint,4,opt,name=gender" json:"gender,omitempty"` - Mobile string `protobuf:"bytes,5,opt,name=mobile" json:"mobile,omitempty"` - Birth string `protobuf:"bytes,6,opt,name=birth" json:"birth,omitempty"` - Email string `protobuf:"bytes,7,opt,name=email" json:"email,omitempty"` - Ex string `protobuf:"bytes,8,opt,name=ex" json:"ex,omitempty"` - Flag int32 `protobuf:"varint,9,opt,name=flag" json:"flag,omitempty"` - ApplyTime string `protobuf:"bytes,10,opt,name=applyTime" json:"applyTime,omitempty"` - ReqMessage string `protobuf:"bytes,11,opt,name=reqMessage" json:"reqMessage,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + UserInfo *sdk_ws.PublicUserInfo `protobuf:"bytes,1,opt,name=UserInfo" json:"UserInfo,omitempty"` + ApplyTime int64 `protobuf:"varint,2,opt,name=applyTime" json:"applyTime,omitempty"` + ReqMessage string `protobuf:"bytes,3,opt,name=reqMessage" json:"reqMessage,omitempty"` + Flag int32 `protobuf:"varint,4,opt,name=Flag" json:"Flag,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *ApplyUserInfo) Reset() { *m = ApplyUserInfo{} } func (m *ApplyUserInfo) String() string { return proto.CompactTextString(m) } func (*ApplyUserInfo) ProtoMessage() {} func (*ApplyUserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_03bf5fbe59a174aa, []int{9} + return fileDescriptor_friend_525e368387d696e2, []int{10} } func (m *ApplyUserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ApplyUserInfo.Unmarshal(m, b) @@ -606,58 +574,23 @@ func (m *ApplyUserInfo) XXX_DiscardUnknown() { var xxx_messageInfo_ApplyUserInfo proto.InternalMessageInfo -func (m *ApplyUserInfo) GetUid() string { +func (m *ApplyUserInfo) GetUserInfo() *sdk_ws.PublicUserInfo { if m != nil { - return m.Uid + return m.UserInfo } - return "" + return nil } -func (m *ApplyUserInfo) GetName() string { +func (m *ApplyUserInfo) GetApplyTime() int64 { if m != nil { - return m.Name - } - return "" -} - -func (m *ApplyUserInfo) GetIcon() string { - if m != nil { - return m.Icon - } - return "" -} - -func (m *ApplyUserInfo) GetGender() int32 { - if m != nil { - return m.Gender + return m.ApplyTime } return 0 } -func (m *ApplyUserInfo) GetMobile() string { +func (m *ApplyUserInfo) GetReqMessage() string { if m != nil { - return m.Mobile - } - return "" -} - -func (m *ApplyUserInfo) GetBirth() string { - if m != nil { - return m.Birth - } - return "" -} - -func (m *ApplyUserInfo) GetEmail() string { - if m != nil { - return m.Email - } - return "" -} - -func (m *ApplyUserInfo) GetEx() string { - if m != nil { - return m.Ex + return m.ReqMessage } return "" } @@ -669,23 +602,8 @@ func (m *ApplyUserInfo) GetFlag() int32 { return 0 } -func (m *ApplyUserInfo) GetApplyTime() string { - if m != nil { - return m.ApplyTime - } - return "" -} - -func (m *ApplyUserInfo) GetReqMessage() string { - if m != nil { - return m.ReqMessage - } - return "" -} - type GetFriendListReq struct { - OperationID string `protobuf:"bytes,1,opt,name=OperationID" json:"OperationID,omitempty"` - Token string `protobuf:"bytes,2,opt,name=Token" json:"Token,omitempty"` + CommID *CommID `protobuf:"bytes,1,opt,name=CommID" json:"CommID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -695,7 +613,7 @@ func (m *GetFriendListReq) Reset() { *m = GetFriendListReq{} } func (m *GetFriendListReq) String() string { return proto.CompactTextString(m) } func (*GetFriendListReq) ProtoMessage() {} func (*GetFriendListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_03bf5fbe59a174aa, []int{10} + return fileDescriptor_friend_525e368387d696e2, []int{11} } func (m *GetFriendListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendListReq.Unmarshal(m, b) @@ -715,34 +633,27 @@ func (m *GetFriendListReq) XXX_DiscardUnknown() { var xxx_messageInfo_GetFriendListReq proto.InternalMessageInfo -func (m *GetFriendListReq) GetOperationID() string { +func (m *GetFriendListReq) GetCommID() *CommID { if m != nil { - return m.OperationID + return m.CommID } - return "" -} - -func (m *GetFriendListReq) GetToken() string { - if m != nil { - return m.Token - } - return "" + return nil } type GetFriendListResp struct { - ErrorCode int32 `protobuf:"varint,1,opt,name=errorCode" json:"errorCode,omitempty"` - ErrorMsg string `protobuf:"bytes,2,opt,name=errorMsg" json:"errorMsg,omitempty"` - Data []*UserInfo `protobuf:"bytes,3,rep,name=data" json:"data,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` + Data []*FriendInfo `protobuf:"bytes,3,rep,name=Data" json:"Data,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GetFriendListResp) Reset() { *m = GetFriendListResp{} } func (m *GetFriendListResp) String() string { return proto.CompactTextString(m) } func (*GetFriendListResp) ProtoMessage() {} func (*GetFriendListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_03bf5fbe59a174aa, []int{11} + return fileDescriptor_friend_525e368387d696e2, []int{12} } func (m *GetFriendListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendListResp.Unmarshal(m, b) @@ -762,142 +673,29 @@ func (m *GetFriendListResp) XXX_DiscardUnknown() { var xxx_messageInfo_GetFriendListResp proto.InternalMessageInfo -func (m *GetFriendListResp) GetErrorCode() int32 { +func (m *GetFriendListResp) GetErrCode() int32 { if m != nil { - return m.ErrorCode + return m.ErrCode } return 0 } -func (m *GetFriendListResp) GetErrorMsg() string { +func (m *GetFriendListResp) GetErrMsg() string { if m != nil { - return m.ErrorMsg + return m.ErrMsg } return "" } -func (m *GetFriendListResp) GetData() []*UserInfo { +func (m *GetFriendListResp) GetData() []*FriendInfo { if m != nil { return m.Data } return nil } -type UserInfo struct { - Uid string `protobuf:"bytes,1,opt,name=uid" json:"uid,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name" json:"name,omitempty"` - Icon string `protobuf:"bytes,2,opt,name=icon" json:"icon,omitempty"` - Gender int32 `protobuf:"varint,4,opt,name=gender" json:"gender,omitempty"` - Mobile string `protobuf:"bytes,5,opt,name=mobile" json:"mobile,omitempty"` - Birth string `protobuf:"bytes,6,opt,name=birth" json:"birth,omitempty"` - Email string `protobuf:"bytes,7,opt,name=email" json:"email,omitempty"` - Ex string `protobuf:"bytes,8,opt,name=ex" json:"ex,omitempty"` - Comment string `protobuf:"bytes,9,opt,name=comment" json:"comment,omitempty"` - IsInBlackList int32 `protobuf:"varint,10,opt,name=isInBlackList" json:"isInBlackList,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *UserInfo) Reset() { *m = UserInfo{} } -func (m *UserInfo) String() string { return proto.CompactTextString(m) } -func (*UserInfo) ProtoMessage() {} -func (*UserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_03bf5fbe59a174aa, []int{12} -} -func (m *UserInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UserInfo.Unmarshal(m, b) -} -func (m *UserInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UserInfo.Marshal(b, m, deterministic) -} -func (dst *UserInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_UserInfo.Merge(dst, src) -} -func (m *UserInfo) XXX_Size() int { - return xxx_messageInfo_UserInfo.Size(m) -} -func (m *UserInfo) XXX_DiscardUnknown() { - xxx_messageInfo_UserInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_UserInfo proto.InternalMessageInfo - -func (m *UserInfo) GetUid() string { - if m != nil { - return m.Uid - } - return "" -} - -func (m *UserInfo) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *UserInfo) GetIcon() string { - if m != nil { - return m.Icon - } - return "" -} - -func (m *UserInfo) GetGender() int32 { - if m != nil { - return m.Gender - } - return 0 -} - -func (m *UserInfo) GetMobile() string { - if m != nil { - return m.Mobile - } - return "" -} - -func (m *UserInfo) GetBirth() string { - if m != nil { - return m.Birth - } - return "" -} - -func (m *UserInfo) GetEmail() string { - if m != nil { - return m.Email - } - return "" -} - -func (m *UserInfo) GetEx() string { - if m != nil { - return m.Ex - } - return "" -} - -func (m *UserInfo) GetComment() string { - if m != nil { - return m.Comment - } - return "" -} - -func (m *UserInfo) GetIsInBlackList() int32 { - if m != nil { - return m.IsInBlackList - } - return 0 -} - type AddBlacklistReq struct { - Uid string `protobuf:"bytes,1,opt,name=uid" json:"uid,omitempty"` - OperationID string `protobuf:"bytes,2,opt,name=OperationID" json:"OperationID,omitempty"` - Token string `protobuf:"bytes,3,opt,name=Token" json:"Token,omitempty"` - OwnerUid string `protobuf:"bytes,4,opt,name=OwnerUid" json:"OwnerUid,omitempty"` + CommID *CommID `protobuf:"bytes,1,opt,name=CommID" json:"CommID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -907,7 +705,7 @@ func (m *AddBlacklistReq) Reset() { *m = AddBlacklistReq{} } func (m *AddBlacklistReq) String() string { return proto.CompactTextString(m) } func (*AddBlacklistReq) ProtoMessage() {} func (*AddBlacklistReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_03bf5fbe59a174aa, []int{13} + return fileDescriptor_friend_525e368387d696e2, []int{13} } func (m *AddBlacklistReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddBlacklistReq.Unmarshal(m, b) @@ -927,38 +725,15 @@ func (m *AddBlacklistReq) XXX_DiscardUnknown() { var xxx_messageInfo_AddBlacklistReq proto.InternalMessageInfo -func (m *AddBlacklistReq) GetUid() string { +func (m *AddBlacklistReq) GetCommID() *CommID { if m != nil { - return m.Uid + return m.CommID } - return "" -} - -func (m *AddBlacklistReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - -func (m *AddBlacklistReq) GetToken() string { - if m != nil { - return m.Token - } - return "" -} - -func (m *AddBlacklistReq) GetOwnerUid() string { - if m != nil { - return m.OwnerUid - } - return "" + return nil } type RemoveBlacklistReq struct { - Uid string `protobuf:"bytes,1,opt,name=uid" json:"uid,omitempty"` - OperationID string `protobuf:"bytes,2,opt,name=OperationID" json:"OperationID,omitempty"` - Token string `protobuf:"bytes,3,opt,name=Token" json:"Token,omitempty"` + CommID *CommID `protobuf:"bytes,1,opt,name=CommID" json:"CommID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -968,7 +743,7 @@ func (m *RemoveBlacklistReq) Reset() { *m = RemoveBlacklistReq{} } func (m *RemoveBlacklistReq) String() string { return proto.CompactTextString(m) } func (*RemoveBlacklistReq) ProtoMessage() {} func (*RemoveBlacklistReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_03bf5fbe59a174aa, []int{14} + return fileDescriptor_friend_525e368387d696e2, []int{14} } func (m *RemoveBlacklistReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RemoveBlacklistReq.Unmarshal(m, b) @@ -988,30 +763,15 @@ func (m *RemoveBlacklistReq) XXX_DiscardUnknown() { var xxx_messageInfo_RemoveBlacklistReq proto.InternalMessageInfo -func (m *RemoveBlacklistReq) GetUid() string { +func (m *RemoveBlacklistReq) GetCommID() *CommID { if m != nil { - return m.Uid + return m.CommID } - return "" -} - -func (m *RemoveBlacklistReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - -func (m *RemoveBlacklistReq) GetToken() string { - if m != nil { - return m.Token - } - return "" + return nil } type GetBlacklistReq struct { - OperationID string `protobuf:"bytes,1,opt,name=OperationID" json:"OperationID,omitempty"` - Token string `protobuf:"bytes,2,opt,name=token" json:"token,omitempty"` + CommID *CommID `protobuf:"bytes,1,opt,name=CommID" json:"CommID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1021,7 +781,7 @@ func (m *GetBlacklistReq) Reset() { *m = GetBlacklistReq{} } func (m *GetBlacklistReq) String() string { return proto.CompactTextString(m) } func (*GetBlacklistReq) ProtoMessage() {} func (*GetBlacklistReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_03bf5fbe59a174aa, []int{15} + return fileDescriptor_friend_525e368387d696e2, []int{15} } func (m *GetBlacklistReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetBlacklistReq.Unmarshal(m, b) @@ -1041,34 +801,27 @@ func (m *GetBlacklistReq) XXX_DiscardUnknown() { var xxx_messageInfo_GetBlacklistReq proto.InternalMessageInfo -func (m *GetBlacklistReq) GetOperationID() string { +func (m *GetBlacklistReq) GetCommID() *CommID { if m != nil { - return m.OperationID + return m.CommID } - return "" -} - -func (m *GetBlacklistReq) GetToken() string { - if m != nil { - return m.Token - } - return "" + return nil } type GetBlacklistResp struct { - ErrorCode int32 `protobuf:"varint,1,opt,name=errorCode" json:"errorCode,omitempty"` - ErrorMsg string `protobuf:"bytes,2,opt,name=errorMsg" json:"errorMsg,omitempty"` - Data []*UserInfo `protobuf:"bytes,3,rep,name=data" json:"data,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` + Data []*sdk_ws.PublicUserInfo `protobuf:"bytes,3,rep,name=data" json:"data,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GetBlacklistResp) Reset() { *m = GetBlacklistResp{} } func (m *GetBlacklistResp) String() string { return proto.CompactTextString(m) } func (*GetBlacklistResp) ProtoMessage() {} func (*GetBlacklistResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_03bf5fbe59a174aa, []int{16} + return fileDescriptor_friend_525e368387d696e2, []int{16} } func (m *GetBlacklistResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetBlacklistResp.Unmarshal(m, b) @@ -1088,21 +841,21 @@ func (m *GetBlacklistResp) XXX_DiscardUnknown() { var xxx_messageInfo_GetBlacklistResp proto.InternalMessageInfo -func (m *GetBlacklistResp) GetErrorCode() int32 { +func (m *GetBlacklistResp) GetErrCode() int32 { if m != nil { - return m.ErrorCode + return m.ErrCode } return 0 } -func (m *GetBlacklistResp) GetErrorMsg() string { +func (m *GetBlacklistResp) GetErrMsg() string { if m != nil { - return m.ErrorMsg + return m.ErrMsg } return "" } -func (m *GetBlacklistResp) GetData() []*UserInfo { +func (m *GetBlacklistResp) GetData() []*sdk_ws.PublicUserInfo { if m != nil { return m.Data } @@ -1110,9 +863,7 @@ func (m *GetBlacklistResp) GetData() []*UserInfo { } type IsFriendReq struct { - Token string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"` - ReceiveUid string `protobuf:"bytes,2,opt,name=receiveUid" json:"receiveUid,omitempty"` - OperationID string `protobuf:"bytes,3,opt,name=OperationID" json:"OperationID,omitempty"` + CommID *CommID `protobuf:"bytes,1,opt,name=CommID" json:"CommID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1122,7 +873,7 @@ func (m *IsFriendReq) Reset() { *m = IsFriendReq{} } func (m *IsFriendReq) String() string { return proto.CompactTextString(m) } func (*IsFriendReq) ProtoMessage() {} func (*IsFriendReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_03bf5fbe59a174aa, []int{17} + return fileDescriptor_friend_525e368387d696e2, []int{17} } func (m *IsFriendReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IsFriendReq.Unmarshal(m, b) @@ -1142,31 +893,17 @@ func (m *IsFriendReq) XXX_DiscardUnknown() { var xxx_messageInfo_IsFriendReq proto.InternalMessageInfo -func (m *IsFriendReq) GetToken() string { +func (m *IsFriendReq) GetCommID() *CommID { if m != nil { - return m.Token + return m.CommID } - return "" -} - -func (m *IsFriendReq) GetReceiveUid() string { - if m != nil { - return m.ReceiveUid - } - return "" -} - -func (m *IsFriendReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" + return nil } type IsFriendResp struct { - ErrorCode int32 `protobuf:"varint,1,opt,name=errorCode" json:"errorCode,omitempty"` - ErrorMsg string `protobuf:"bytes,2,opt,name=errorMsg" json:"errorMsg,omitempty"` - ShipType int32 `protobuf:"varint,3,opt,name=shipType" json:"shipType,omitempty"` + ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` + ShipType int32 `protobuf:"varint,3,opt,name=ShipType" json:"ShipType,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1176,7 +913,7 @@ func (m *IsFriendResp) Reset() { *m = IsFriendResp{} } func (m *IsFriendResp) String() string { return proto.CompactTextString(m) } func (*IsFriendResp) ProtoMessage() {} func (*IsFriendResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_03bf5fbe59a174aa, []int{18} + return fileDescriptor_friend_525e368387d696e2, []int{18} } func (m *IsFriendResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IsFriendResp.Unmarshal(m, b) @@ -1196,16 +933,16 @@ func (m *IsFriendResp) XXX_DiscardUnknown() { var xxx_messageInfo_IsFriendResp proto.InternalMessageInfo -func (m *IsFriendResp) GetErrorCode() int32 { +func (m *IsFriendResp) GetErrCode() int32 { if m != nil { - return m.ErrorCode + return m.ErrCode } return 0 } -func (m *IsFriendResp) GetErrorMsg() string { +func (m *IsFriendResp) GetErrMsg() string { if m != nil { - return m.ErrorMsg + return m.ErrMsg } return "" } @@ -1218,9 +955,7 @@ func (m *IsFriendResp) GetShipType() int32 { } type IsInBlackListReq struct { - SendUid string `protobuf:"bytes,1,opt,name=sendUid" json:"sendUid,omitempty"` - ReceiveUid string `protobuf:"bytes,2,opt,name=receiveUid" json:"receiveUid,omitempty"` - OperationID string `protobuf:"bytes,3,opt,name=OperationID" json:"OperationID,omitempty"` + CommID *CommID `protobuf:"bytes,1,opt,name=CommID" json:"CommID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1230,7 +965,7 @@ func (m *IsInBlackListReq) Reset() { *m = IsInBlackListReq{} } func (m *IsInBlackListReq) String() string { return proto.CompactTextString(m) } func (*IsInBlackListReq) ProtoMessage() {} func (*IsInBlackListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_03bf5fbe59a174aa, []int{19} + return fileDescriptor_friend_525e368387d696e2, []int{19} } func (m *IsInBlackListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IsInBlackListReq.Unmarshal(m, b) @@ -1250,31 +985,17 @@ func (m *IsInBlackListReq) XXX_DiscardUnknown() { var xxx_messageInfo_IsInBlackListReq proto.InternalMessageInfo -func (m *IsInBlackListReq) GetSendUid() string { +func (m *IsInBlackListReq) GetCommID() *CommID { if m != nil { - return m.SendUid + return m.CommID } - return "" -} - -func (m *IsInBlackListReq) GetReceiveUid() string { - if m != nil { - return m.ReceiveUid - } - return "" -} - -func (m *IsInBlackListReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" + return nil } type IsInBlackListResp struct { - ErrorCode int32 `protobuf:"varint,1,opt,name=errorCode" json:"errorCode,omitempty"` - ErrorMsg string `protobuf:"bytes,2,opt,name=errorMsg" json:"errorMsg,omitempty"` - Response bool `protobuf:"varint,3,opt,name=response" json:"response,omitempty"` + ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` + Response bool `protobuf:"varint,3,opt,name=Response" json:"Response,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1284,7 +1005,7 @@ func (m *IsInBlackListResp) Reset() { *m = IsInBlackListResp{} } func (m *IsInBlackListResp) String() string { return proto.CompactTextString(m) } func (*IsInBlackListResp) ProtoMessage() {} func (*IsInBlackListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_03bf5fbe59a174aa, []int{20} + return fileDescriptor_friend_525e368387d696e2, []int{20} } func (m *IsInBlackListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IsInBlackListResp.Unmarshal(m, b) @@ -1304,16 +1025,16 @@ func (m *IsInBlackListResp) XXX_DiscardUnknown() { var xxx_messageInfo_IsInBlackListResp proto.InternalMessageInfo -func (m *IsInBlackListResp) GetErrorCode() int32 { +func (m *IsInBlackListResp) GetErrCode() int32 { if m != nil { - return m.ErrorCode + return m.ErrCode } return 0 } -func (m *IsInBlackListResp) GetErrorMsg() string { +func (m *IsInBlackListResp) GetErrMsg() string { if m != nil { - return m.ErrorMsg + return m.ErrMsg } return "" } @@ -1326,9 +1047,7 @@ func (m *IsInBlackListResp) GetResponse() bool { } type DeleteFriendReq struct { - Uid string `protobuf:"bytes,1,opt,name=uid" json:"uid,omitempty"` - OperationID string `protobuf:"bytes,2,opt,name=OperationID" json:"OperationID,omitempty"` - Token string `protobuf:"bytes,3,opt,name=Token" json:"Token,omitempty"` + CommID *CommID `protobuf:"bytes,1,opt,name=CommID" json:"CommID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1338,7 +1057,7 @@ func (m *DeleteFriendReq) Reset() { *m = DeleteFriendReq{} } func (m *DeleteFriendReq) String() string { return proto.CompactTextString(m) } func (*DeleteFriendReq) ProtoMessage() {} func (*DeleteFriendReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_03bf5fbe59a174aa, []int{21} + return fileDescriptor_friend_525e368387d696e2, []int{21} } func (m *DeleteFriendReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteFriendReq.Unmarshal(m, b) @@ -1358,32 +1077,16 @@ func (m *DeleteFriendReq) XXX_DiscardUnknown() { var xxx_messageInfo_DeleteFriendReq proto.InternalMessageInfo -func (m *DeleteFriendReq) GetUid() string { +func (m *DeleteFriendReq) GetCommID() *CommID { if m != nil { - return m.Uid + return m.CommID } - return "" -} - -func (m *DeleteFriendReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - -func (m *DeleteFriendReq) GetToken() string { - if m != nil { - return m.Token - } - return "" + return nil } type AddFriendResponseReq struct { - Uid string `protobuf:"bytes,1,opt,name=uid" json:"uid,omitempty"` + CommID *CommID `protobuf:"bytes,1,opt,name=CommID" json:"CommID,omitempty"` Flag int32 `protobuf:"varint,2,opt,name=flag" json:"flag,omitempty"` - OperationID string `protobuf:"bytes,3,opt,name=OperationID" json:"OperationID,omitempty"` - Token string `protobuf:"bytes,4,opt,name=Token" json:"Token,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1393,7 +1096,7 @@ func (m *AddFriendResponseReq) Reset() { *m = AddFriendResponseReq{} } func (m *AddFriendResponseReq) String() string { return proto.CompactTextString(m) } func (*AddFriendResponseReq) ProtoMessage() {} func (*AddFriendResponseReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_03bf5fbe59a174aa, []int{22} + return fileDescriptor_friend_525e368387d696e2, []int{22} } func (m *AddFriendResponseReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddFriendResponseReq.Unmarshal(m, b) @@ -1413,11 +1116,11 @@ func (m *AddFriendResponseReq) XXX_DiscardUnknown() { var xxx_messageInfo_AddFriendResponseReq proto.InternalMessageInfo -func (m *AddFriendResponseReq) GetUid() string { +func (m *AddFriendResponseReq) GetCommID() *CommID { if m != nil { - return m.Uid + return m.CommID } - return "" + return nil } func (m *AddFriendResponseReq) GetFlag() int32 { @@ -1427,25 +1130,9 @@ func (m *AddFriendResponseReq) GetFlag() int32 { return 0 } -func (m *AddFriendResponseReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - -func (m *AddFriendResponseReq) GetToken() string { - if m != nil { - return m.Token - } - return "" -} - type SetFriendCommentReq struct { - Uid string `protobuf:"bytes,1,opt,name=uid" json:"uid,omitempty"` - OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` - Comment string `protobuf:"bytes,3,opt,name=comment" json:"comment,omitempty"` - Token string `protobuf:"bytes,4,opt,name=token" json:"token,omitempty"` + CommID *CommID `protobuf:"bytes,1,opt,name=CommID" json:"CommID,omitempty"` + Remark string `protobuf:"bytes,2,opt,name=Remark" json:"Remark,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1455,7 +1142,7 @@ func (m *SetFriendCommentReq) Reset() { *m = SetFriendCommentReq{} } func (m *SetFriendCommentReq) String() string { return proto.CompactTextString(m) } func (*SetFriendCommentReq) ProtoMessage() {} func (*SetFriendCommentReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_03bf5fbe59a174aa, []int{23} + return fileDescriptor_friend_525e368387d696e2, []int{23} } func (m *SetFriendCommentReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetFriendCommentReq.Unmarshal(m, b) @@ -1475,39 +1162,26 @@ func (m *SetFriendCommentReq) XXX_DiscardUnknown() { var xxx_messageInfo_SetFriendCommentReq proto.InternalMessageInfo -func (m *SetFriendCommentReq) GetUid() string { +func (m *SetFriendCommentReq) GetCommID() *CommID { if m != nil { - return m.Uid + return m.CommID } - return "" + return nil } -func (m *SetFriendCommentReq) GetOperationID() string { +func (m *SetFriendCommentReq) GetRemark() string { if m != nil { - return m.OperationID - } - return "" -} - -func (m *SetFriendCommentReq) GetComment() string { - if m != nil { - return m.Comment - } - return "" -} - -func (m *SetFriendCommentReq) GetToken() string { - if m != nil { - return m.Token + return m.Remark } return "" } func init() { proto.RegisterType((*CommonResp)(nil), "friend.CommonResp") + proto.RegisterType((*CommID)(nil), "friend.CommID") proto.RegisterType((*GetFriendsInfoReq)(nil), "friend.GetFriendsInfoReq") proto.RegisterType((*GetFriendInfoResp)(nil), "friend.GetFriendInfoResp") - proto.RegisterType((*GetFriendData)(nil), "friend.GetFriendData") + proto.RegisterType((*FriendInfo)(nil), "friend.FriendInfo") proto.RegisterType((*AddFriendReq)(nil), "friend.AddFriendReq") proto.RegisterType((*ImportFriendReq)(nil), "friend.ImportFriendReq") proto.RegisterType((*ImportFriendResp)(nil), "friend.ImportFriendResp") @@ -1516,7 +1190,6 @@ func init() { proto.RegisterType((*ApplyUserInfo)(nil), "friend.ApplyUserInfo") proto.RegisterType((*GetFriendListReq)(nil), "friend.getFriendListReq") proto.RegisterType((*GetFriendListResp)(nil), "friend.getFriendListResp") - proto.RegisterType((*UserInfo)(nil), "friend.UserInfo") proto.RegisterType((*AddBlacklistReq)(nil), "friend.AddBlacklistReq") proto.RegisterType((*RemoveBlacklistReq)(nil), "friend.RemoveBlacklistReq") proto.RegisterType((*GetBlacklistReq)(nil), "friend.GetBlacklistReq") @@ -2031,72 +1704,68 @@ var _Friend_serviceDesc = grpc.ServiceDesc{ Metadata: "friend/friend.proto", } -func init() { proto.RegisterFile("friend/friend.proto", fileDescriptor_friend_03bf5fbe59a174aa) } +func init() { proto.RegisterFile("friend/friend.proto", fileDescriptor_friend_525e368387d696e2) } -var fileDescriptor_friend_03bf5fbe59a174aa = []byte{ - // 1013 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x57, 0xcd, 0x6e, 0xdb, 0x46, - 0x10, 0x86, 0x48, 0xc9, 0x96, 0x46, 0x72, 0x24, 0xad, 0xdd, 0x96, 0x65, 0x83, 0x42, 0x20, 0x72, - 0x48, 0x2f, 0x2e, 0xe0, 0x22, 0xa7, 0x9c, 0x14, 0xbb, 0x0e, 0xd4, 0x34, 0x08, 0xc0, 0xd8, 0x97, - 0x16, 0x2d, 0x40, 0x8b, 0x23, 0x66, 0x11, 0xfe, 0x85, 0xcb, 0x24, 0xf6, 0xa9, 0xc7, 0x9e, 0xfb, - 0x28, 0x7d, 0xb3, 0x3e, 0x42, 0xb1, 0xbb, 0x24, 0x77, 0xf9, 0xa3, 0x34, 0xa8, 0x1c, 0xe7, 0x24, - 0xce, 0x70, 0x35, 0x3b, 0xdf, 0xcc, 0x7c, 0x33, 0x43, 0x38, 0xdc, 0x64, 0x14, 0x63, 0xff, 0x7b, - 0xf9, 0x73, 0x9c, 0x66, 0x49, 0x9e, 0x90, 0x3d, 0x29, 0x39, 0xe7, 0x00, 0xa7, 0x49, 0x14, 0x25, - 0xb1, 0x8b, 0x2c, 0x25, 0xf7, 0x61, 0x84, 0x59,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0xe0, 0xa0, 0x36, 0x17, 0x89, 0x55, 0x1e, 0x6e, 0x8e, 0x5e, 0x15, 0x94, 0xf6, 0x20, - 0x7d, 0x0c, 0x13, 0x4f, 0xeb, 0xfa, 0xe4, 0x2b, 0x2d, 0x2e, 0x7a, 0xcb, 0xec, 0x0c, 0xcd, 0x12, - 0xa6, 0x59, 0xbd, 0x73, 0x93, 0xca, 0xe3, 0x76, 0x4b, 0xef, 0x34, 0xf1, 0x48, 0xad, 0xe9, 0xe4, - 0xb0, 0x7c, 0xaf, 0xf5, 0x3b, 0xfb, 0xa8, 0xad, 0x94, 0xe0, 0x6b, 0xd3, 0x4b, 0x81, 0x6f, 0xb6, - 0x17, 0x05, 0xbe, 0xdd, 0x08, 0x96, 0x30, 0x09, 0xb4, 0x76, 0xae, 0xc0, 0x37, 0xe6, 0x85, 0x6d, - 0x75, 0xbf, 0x90, 0xf1, 0xf3, 0x35, 0xd6, 0x2b, 0x13, 0x8d, 0x5e, 0xd0, 0x09, 0xfe, 0x47, 0x98, - 0x7b, 0x4d, 0x56, 0x93, 0xfb, 0x1d, 0x95, 0x59, 0x11, 0xbe, 0xd3, 0xcc, 0x29, 0xcc, 0x58, 0x83, - 0xa6, 0xe4, 0x9b, 0xf2, 0x5c, 0x07, 0x81, 0xb7, 0xe4, 0x72, 0xa2, 0xaf, 0xfc, 0x0a, 0x48, 0xe3, - 0x4b, 0x44, 0xc5, 0xa2, 0xf9, 0x85, 0xf0, 0x64, 0xfe, 0xcb, 0xf4, 0xb8, 0xf8, 0xfe, 0x7e, 0x2c, - 0x7f, 0xae, 0xf6, 0xc4, 0x77, 0xf8, 0x0f, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x6e, 0xf2, 0x29, - 0xc4, 0x9e, 0x0f, 0x00, 0x00, +var fileDescriptor_friend_525e368387d696e2 = []byte{ + // 950 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x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, 0xed, 0xfd, 0xd6, 0x1f, 0xe7, 0x7f, 0x5e, 0x4e, + 0xe4, 0xcf, 0x9b, 0x6d, 0xf1, 0xcf, 0xe4, 0xdb, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0x3e, 0x04, + 0x07, 0x68, 0xdb, 0x0c, 0x00, 0x00, } diff --git a/pkg/proto/friend/friend.proto b/pkg/proto/friend/friend.proto index 52b50d277..4591e9704 100644 --- a/pkg/proto/friend/friend.proto +++ b/pkg/proto/friend/friend.proto @@ -1,168 +1,137 @@ syntax = "proto3"; +import "Open_IM/pkg/proto/sdk_ws/ws.proto"; option go_package = "./friend;friend"; package friend; message CommonResp{ - int32 errorCode = 1; - string errorMsg = 2; + int32 errCode = 1; + string errMsg = 2; +} + +message CommID{ + string OpUserID = 1; + string OperationID = 2; + string ToUserID = 4; + string FromUserID = 5; } message GetFriendsInfoReq{ - string uid = 1; - string OperationID = 2; - string Token = 3; -} -message GetFriendInfoResp{ - int32 errorCode = 1; - string errorMsg = 2; - GetFriendData Data = 3; + CommID CommID = 1; } -message GetFriendData{ - string uid = 1; - string icon = 2; - string name = 3; - int32 gender = 4; - string mobile = 5; - string birth = 6; - string email = 7; - string ex = 8; - string comment = 9; - int32 isFriend = 10; - int32 isInBlackList = 11; +message GetFriendInfoResp{ + int32 ErrCode = 1; + string ErrMsg = 2; + FriendInfo Data = 3; } +message FriendInfo{ + string OwnerUserID = 1; + string Remark = 2; + uint64 CreateTime = 3; + open_im_sdk.UserInfo FriendUser = 4; + int32 IsBlack = 5; +} + + message AddFriendReq{ - string uid = 1; - string OperationID = 2; - string Token = 3; - string ReqMessage = 4; + CommID CommID = 1; + string ReqMessage = 2; } - message ImportFriendReq{ - repeated string uidList = 1; + repeated string FriendUserIDList = 1; string OperationID = 2; - string Token = 3; - string OwnerUid = 4; + string FromUserID = 3; + string OpUserID = 4; } + message ImportFriendResp{ CommonResp commonResp = 1; repeated string failedUidList = 2; } message GetFriendApplyReq{ - string OperationID = 1; - string Token = 2; + CommID CommID = 1; } message GetFriendApplyResp{ - int32 errorCode = 1; - string errorMsg = 2; + int32 ErrCode = 1; + string ErrMsg = 2; repeated ApplyUserInfo data = 4; } message ApplyUserInfo{ - string uid = 1; - string name = 2; - string icon = 3; - int32 gender = 4; - string mobile = 5; - string birth = 6; - string email = 7; - string ex = 8; - int32 flag = 9; - string applyTime = 10; - string reqMessage = 11; + open_im_sdk.PublicUserInfo UserInfo = 1; + int64 applyTime = 2; + string reqMessage = 3; + int32 Flag = 4; } message getFriendListReq{ - string OperationID = 1; - string Token = 2; -} -message getFriendListResp{ - int32 errorCode = 1; - string errorMsg = 2; - repeated UserInfo data = 3; -} -message UserInfo{ - string uid = 1; - string name = 3; - string icon = 2; - int32 gender = 4; - string mobile = 5; - string birth = 6; - string email = 7; - string ex = 8; - string comment = 9; - int32 isInBlackList = 10; + CommID CommID = 1; } +message getFriendListResp{ + int32 ErrCode = 1; + string ErrMsg = 2; + repeated FriendInfo Data = 3; +} + + message AddBlacklistReq{ - string uid = 1; - string OperationID = 2; - string Token = 3; - string OwnerUid = 4; + CommID CommID = 1; } message RemoveBlacklistReq{ - string uid = 1; - string OperationID = 2; - string Token = 3; + CommID CommID = 1; } message GetBlacklistReq{ - string OperationID = 1; - string token = 2; + CommID CommID = 1; } + message GetBlacklistResp{ - int32 errorCode = 1; - string errorMsg = 2; - repeated UserInfo data = 3; + int32 ErrCode = 1; + string ErrMsg = 2; + repeated open_im_sdk.PublicUserInfo data = 3; } message IsFriendReq{ - string token = 1; - string receiveUid = 2; - string OperationID = 3; + CommID CommID = 1; } + message IsFriendResp{ - int32 errorCode = 1; - string errorMsg = 2; - int32 shipType = 3; + int32 ErrCode = 1; + string ErrMsg = 2; + int32 ShipType = 3; } + message IsInBlackListReq{ - string sendUid = 1; - string receiveUid = 2; - string OperationID = 3; + CommID CommID = 1; } + message IsInBlackListResp{ - int32 errorCode = 1; - string errorMsg = 2; - bool response = 3; + int32 ErrCode = 1; + string ErrMsg = 2; + bool Response = 3; } message DeleteFriendReq{ - string uid = 1; - string OperationID = 2; - string Token = 3; + CommID CommID = 1; } message AddFriendResponseReq{ - string uid = 1; + CommID CommID = 1; int32 flag = 2; - string OperationID = 3; - string Token = 4; } message SetFriendCommentReq{ - string uid = 1; - string operationID = 2; - string comment = 3; - string token = 4; + CommID CommID = 1; + string Remark = 2; } service friend{ diff --git a/pkg/proto/group/group.pb.go b/pkg/proto/group/group.pb.go index bc8371177..b18a09367 100644 --- a/pkg/proto/group/group.pb.go +++ b/pkg/proto/group/group.pb.go @@ -6,6 +6,7 @@ package group // import "./group" import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" +import sdk_ws "Open_IM/pkg/proto/sdk_ws" import ( context "golang.org/x/net/context" @@ -35,7 +36,7 @@ func (m *CommonResp) Reset() { *m = CommonResp{} } func (m *CommonResp) String() string { return proto.CompactTextString(m) } func (*CommonResp) ProtoMessage() {} func (*CommonResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ac6850665f72c22b, []int{0} + return fileDescriptor_group_23d97c4cd172f0ff, []int{0} } func (m *CommonResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CommonResp.Unmarshal(m, b) @@ -69,16 +70,62 @@ func (m *CommonResp) GetErrMsg() string { return "" } +type GroupAddMemberInfo struct { + UserID string `protobuf:"bytes,1,opt,name=UserID" json:"UserID,omitempty"` + Role int32 `protobuf:"varint,2,opt,name=Role" json:"Role,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GroupAddMemberInfo) Reset() { *m = GroupAddMemberInfo{} } +func (m *GroupAddMemberInfo) String() string { return proto.CompactTextString(m) } +func (*GroupAddMemberInfo) ProtoMessage() {} +func (*GroupAddMemberInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_group_23d97c4cd172f0ff, []int{1} +} +func (m *GroupAddMemberInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupAddMemberInfo.Unmarshal(m, b) +} +func (m *GroupAddMemberInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupAddMemberInfo.Marshal(b, m, deterministic) +} +func (dst *GroupAddMemberInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupAddMemberInfo.Merge(dst, src) +} +func (m *GroupAddMemberInfo) XXX_Size() int { + return xxx_messageInfo_GroupAddMemberInfo.Size(m) +} +func (m *GroupAddMemberInfo) XXX_DiscardUnknown() { + xxx_messageInfo_GroupAddMemberInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupAddMemberInfo proto.InternalMessageInfo + +func (m *GroupAddMemberInfo) GetUserID() string { + if m != nil { + return m.UserID + } + return "" +} + +func (m *GroupAddMemberInfo) GetRole() int32 { + if m != nil { + return m.Role + } + return 0 +} + type CreateGroupReq struct { - MemberList []*GroupAddMemberInfo `protobuf:"bytes,1,rep,name=memberList" json:"memberList,omitempty"` - GroupName string `protobuf:"bytes,2,opt,name=groupName" json:"groupName,omitempty"` - Introduction string `protobuf:"bytes,3,opt,name=introduction" json:"introduction,omitempty"` - Notification string `protobuf:"bytes,4,opt,name=notification" json:"notification,omitempty"` - FaceUrl string `protobuf:"bytes,5,opt,name=faceUrl" json:"faceUrl,omitempty"` - Token string `protobuf:"bytes,6,opt,name=token" json:"token,omitempty"` - OperationID string `protobuf:"bytes,7,opt,name=operationID" json:"operationID,omitempty"` + InitMemberList []*GroupAddMemberInfo `protobuf:"bytes,1,rep,name=InitMemberList" json:"InitMemberList,omitempty"` + GroupName string `protobuf:"bytes,2,opt,name=GroupName" json:"GroupName,omitempty"` + Introduction string `protobuf:"bytes,3,opt,name=Introduction" json:"Introduction,omitempty"` + Notification string `protobuf:"bytes,4,opt,name=Notification" json:"Notification,omitempty"` + FaceUrl string `protobuf:"bytes,5,opt,name=FaceUrl" json:"FaceUrl,omitempty"` + Ext string `protobuf:"bytes,6,opt,name=Ext" json:"Ext,omitempty"` + OperationID string `protobuf:"bytes,7,opt,name=OperationID" json:"OperationID,omitempty"` OpUserID string `protobuf:"bytes,8,opt,name=OpUserID" json:"OpUserID,omitempty"` - Ext string `protobuf:"bytes,9,opt,name=Ext" json:"Ext,omitempty"` + FromUserID string `protobuf:"bytes,9,opt,name=FromUserID" json:"FromUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -88,7 +135,7 @@ func (m *CreateGroupReq) Reset() { *m = CreateGroupReq{} } func (m *CreateGroupReq) String() string { return proto.CompactTextString(m) } func (*CreateGroupReq) ProtoMessage() {} func (*CreateGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ac6850665f72c22b, []int{1} + return fileDescriptor_group_23d97c4cd172f0ff, []int{2} } func (m *CreateGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreateGroupReq.Unmarshal(m, b) @@ -108,9 +155,9 @@ func (m *CreateGroupReq) XXX_DiscardUnknown() { var xxx_messageInfo_CreateGroupReq proto.InternalMessageInfo -func (m *CreateGroupReq) GetMemberList() []*GroupAddMemberInfo { +func (m *CreateGroupReq) GetInitMemberList() []*GroupAddMemberInfo { if m != nil { - return m.MemberList + return m.InitMemberList } return nil } @@ -143,9 +190,9 @@ func (m *CreateGroupReq) GetFaceUrl() string { return "" } -func (m *CreateGroupReq) GetToken() string { +func (m *CreateGroupReq) GetExt() string { if m != nil { - return m.Token + return m.Ext } return "" } @@ -164,73 +211,27 @@ func (m *CreateGroupReq) GetOpUserID() string { return "" } -func (m *CreateGroupReq) GetExt() string { +func (m *CreateGroupReq) GetFromUserID() string { if m != nil { - return m.Ext + return m.FromUserID } return "" } -type GroupAddMemberInfo struct { - Uid string `protobuf:"bytes,1,opt,name=uid" json:"uid,omitempty"` - SetRole int32 `protobuf:"varint,2,opt,name=setRole" json:"setRole,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GroupAddMemberInfo) Reset() { *m = GroupAddMemberInfo{} } -func (m *GroupAddMemberInfo) String() string { return proto.CompactTextString(m) } -func (*GroupAddMemberInfo) ProtoMessage() {} -func (*GroupAddMemberInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ac6850665f72c22b, []int{2} -} -func (m *GroupAddMemberInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GroupAddMemberInfo.Unmarshal(m, b) -} -func (m *GroupAddMemberInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GroupAddMemberInfo.Marshal(b, m, deterministic) -} -func (dst *GroupAddMemberInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_GroupAddMemberInfo.Merge(dst, src) -} -func (m *GroupAddMemberInfo) XXX_Size() int { - return xxx_messageInfo_GroupAddMemberInfo.Size(m) -} -func (m *GroupAddMemberInfo) XXX_DiscardUnknown() { - xxx_messageInfo_GroupAddMemberInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_GroupAddMemberInfo proto.InternalMessageInfo - -func (m *GroupAddMemberInfo) GetUid() string { - if m != nil { - return m.Uid - } - return "" -} - -func (m *GroupAddMemberInfo) GetSetRole() int32 { - if m != nil { - return m.SetRole - } - return 0 -} - type CreateGroupResp struct { - ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` - ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` - GroupID string `protobuf:"bytes,3,opt,name=groupID" json:"groupID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` + GroupInfo *sdk_ws.GroupInfo `protobuf:"bytes,3,opt,name=GroupInfo" json:"GroupInfo,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *CreateGroupResp) Reset() { *m = CreateGroupResp{} } func (m *CreateGroupResp) String() string { return proto.CompactTextString(m) } func (*CreateGroupResp) ProtoMessage() {} func (*CreateGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ac6850665f72c22b, []int{3} + return fileDescriptor_group_23d97c4cd172f0ff, []int{3} } func (m *CreateGroupResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreateGroupResp.Unmarshal(m, b) @@ -264,18 +265,17 @@ func (m *CreateGroupResp) GetErrMsg() string { return "" } -func (m *CreateGroupResp) GetGroupID() string { +func (m *CreateGroupResp) GetGroupInfo() *sdk_ws.GroupInfo { if m != nil { - return m.GroupID + return m.GroupInfo } - return "" + return nil } type GetGroupsInfoReq struct { - GroupIDList []string `protobuf:"bytes,1,rep,name=groupIDList" json:"groupIDList,omitempty"` - Token string `protobuf:"bytes,2,opt,name=token" json:"token,omitempty"` - OperationID string `protobuf:"bytes,3,opt,name=operationID" json:"operationID,omitempty"` - OpUserID string `protobuf:"bytes,4,opt,name=OpUserID" json:"OpUserID,omitempty"` + GroupIDList []string `protobuf:"bytes,1,rep,name=GroupIDList" json:"GroupIDList,omitempty"` + OperationID string `protobuf:"bytes,2,opt,name=OperationID" json:"OperationID,omitempty"` + OpUserID string `protobuf:"bytes,3,opt,name=OpUserID" json:"OpUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -285,7 +285,7 @@ func (m *GetGroupsInfoReq) Reset() { *m = GetGroupsInfoReq{} } func (m *GetGroupsInfoReq) String() string { return proto.CompactTextString(m) } func (*GetGroupsInfoReq) ProtoMessage() {} func (*GetGroupsInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ac6850665f72c22b, []int{4} + return fileDescriptor_group_23d97c4cd172f0ff, []int{4} } func (m *GetGroupsInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupsInfoReq.Unmarshal(m, b) @@ -312,13 +312,6 @@ func (m *GetGroupsInfoReq) GetGroupIDList() []string { return nil } -func (m *GetGroupsInfoReq) GetToken() string { - if m != nil { - return m.Token - } - return "" -} - func (m *GetGroupsInfoReq) GetOperationID() string { if m != nil { return m.OperationID @@ -334,19 +327,19 @@ func (m *GetGroupsInfoReq) GetOpUserID() string { } type GetGroupsInfoResp struct { - ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` - ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` - Data []*GroupInfo `protobuf:"bytes,3,rep,name=data" json:"data,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` + GroupInfoList []*sdk_ws.GroupInfo `protobuf:"bytes,3,rep,name=GroupInfoList" json:"GroupInfoList,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GetGroupsInfoResp) Reset() { *m = GetGroupsInfoResp{} } func (m *GetGroupsInfoResp) String() string { return proto.CompactTextString(m) } func (*GetGroupsInfoResp) ProtoMessage() {} func (*GetGroupsInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ac6850665f72c22b, []int{5} + return fileDescriptor_group_23d97c4cd172f0ff, []int{5} } func (m *GetGroupsInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupsInfoResp.Unmarshal(m, b) @@ -380,32 +373,28 @@ func (m *GetGroupsInfoResp) GetErrMsg() string { return "" } -func (m *GetGroupsInfoResp) GetData() []*GroupInfo { +func (m *GetGroupsInfoResp) GetGroupInfoList() []*sdk_ws.GroupInfo { if m != nil { - return m.Data + return m.GroupInfoList } return nil } type SetGroupInfoReq struct { - GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` - GroupName string `protobuf:"bytes,2,opt,name=groupName" json:"groupName,omitempty"` - Notification string `protobuf:"bytes,3,opt,name=notification" json:"notification,omitempty"` - Introduction string `protobuf:"bytes,4,opt,name=introduction" json:"introduction,omitempty"` - FaceUrl string `protobuf:"bytes,5,opt,name=faceUrl" json:"faceUrl,omitempty"` - Token string `protobuf:"bytes,6,opt,name=token" json:"token,omitempty"` - OperationID string `protobuf:"bytes,7,opt,name=operationID" json:"operationID,omitempty"` - OpUserID string `protobuf:"bytes,8,opt,name=OpUserID" json:"OpUserID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + GroupInfo *sdk_ws.GroupInfo `protobuf:"bytes,1,opt,name=GroupInfo" json:"GroupInfo,omitempty"` + OpUserID string `protobuf:"bytes,2,opt,name=OpUserID" json:"OpUserID,omitempty"` + FromUserID string `protobuf:"bytes,3,opt,name=FromUserID" json:"FromUserID,omitempty"` + OperationID string `protobuf:"bytes,4,opt,name=OperationID" json:"OperationID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *SetGroupInfoReq) Reset() { *m = SetGroupInfoReq{} } func (m *SetGroupInfoReq) String() string { return proto.CompactTextString(m) } func (*SetGroupInfoReq) ProtoMessage() {} func (*SetGroupInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ac6850665f72c22b, []int{6} + return fileDescriptor_group_23d97c4cd172f0ff, []int{6} } func (m *SetGroupInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetGroupInfoReq.Unmarshal(m, b) @@ -425,44 +414,23 @@ func (m *SetGroupInfoReq) XXX_DiscardUnknown() { var xxx_messageInfo_SetGroupInfoReq proto.InternalMessageInfo -func (m *SetGroupInfoReq) GetGroupID() string { +func (m *SetGroupInfoReq) GetGroupInfo() *sdk_ws.GroupInfo { if m != nil { - return m.GroupID + return m.GroupInfo + } + return nil +} + +func (m *SetGroupInfoReq) GetOpUserID() string { + if m != nil { + return m.OpUserID } return "" } -func (m *SetGroupInfoReq) GetGroupName() string { +func (m *SetGroupInfoReq) GetFromUserID() string { if m != nil { - return m.GroupName - } - return "" -} - -func (m *SetGroupInfoReq) GetNotification() string { - if m != nil { - return m.Notification - } - return "" -} - -func (m *SetGroupInfoReq) GetIntroduction() string { - if m != nil { - return m.Introduction - } - return "" -} - -func (m *SetGroupInfoReq) GetFaceUrl() string { - if m != nil { - return m.FaceUrl - } - return "" -} - -func (m *SetGroupInfoReq) GetToken() string { - if m != nil { - return m.Token + return m.FromUserID } return "" } @@ -474,16 +442,11 @@ func (m *SetGroupInfoReq) GetOperationID() string { return "" } -func (m *SetGroupInfoReq) GetOpUserID() string { - if m != nil { - return m.OpUserID - } - return "" -} - +// owner or manager type GetGroupApplicationListReq struct { OpUserID string `protobuf:"bytes,1,opt,name=OpUserID" json:"OpUserID,omitempty"` OperationID string `protobuf:"bytes,2,opt,name=OperationID" json:"OperationID,omitempty"` + FromUserID string `protobuf:"bytes,3,opt,name=FromUserID" json:"FromUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -493,7 +456,7 @@ func (m *GetGroupApplicationListReq) Reset() { *m = GetGroupApplicationL func (m *GetGroupApplicationListReq) String() string { return proto.CompactTextString(m) } func (*GetGroupApplicationListReq) ProtoMessage() {} func (*GetGroupApplicationListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ac6850665f72c22b, []int{7} + return fileDescriptor_group_23d97c4cd172f0ff, []int{7} } func (m *GetGroupApplicationListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupApplicationListReq.Unmarshal(m, b) @@ -527,6 +490,13 @@ func (m *GetGroupApplicationListReq) GetOperationID() string { return "" } +func (m *GetGroupApplicationListReq) GetFromUserID() string { + if m != nil { + return m.FromUserID + } + return "" +} + type GetGroupApplicationList_Data_User struct { ID string `protobuf:"bytes,1,opt,name=ID" json:"ID,omitempty"` GroupID string `protobuf:"bytes,2,opt,name=GroupID" json:"GroupID,omitempty"` @@ -553,7 +523,7 @@ func (m *GetGroupApplicationList_Data_User) Reset() { *m = GetGroupAppli func (m *GetGroupApplicationList_Data_User) String() string { return proto.CompactTextString(m) } func (*GetGroupApplicationList_Data_User) ProtoMessage() {} func (*GetGroupApplicationList_Data_User) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ac6850665f72c22b, []int{8} + return fileDescriptor_group_23d97c4cd172f0ff, []int{8} } func (m *GetGroupApplicationList_Data_User) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupApplicationList_Data_User.Unmarshal(m, b) @@ -697,7 +667,7 @@ func (m *GetGroupApplicationListData) Reset() { *m = GetGroupApplication func (m *GetGroupApplicationListData) String() string { return proto.CompactTextString(m) } func (*GetGroupApplicationListData) ProtoMessage() {} func (*GetGroupApplicationListData) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ac6850665f72c22b, []int{9} + return fileDescriptor_group_23d97c4cd172f0ff, []int{9} } func (m *GetGroupApplicationListData) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupApplicationListData.Unmarshal(m, b) @@ -744,7 +714,7 @@ func (m *GetGroupApplicationListResp) Reset() { *m = GetGroupApplication func (m *GetGroupApplicationListResp) String() string { return proto.CompactTextString(m) } func (*GetGroupApplicationListResp) ProtoMessage() {} func (*GetGroupApplicationListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ac6850665f72c22b, []int{10} + return fileDescriptor_group_23d97c4cd172f0ff, []int{10} } func (m *GetGroupApplicationListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupApplicationListResp.Unmarshal(m, b) @@ -787,8 +757,8 @@ func (m *GetGroupApplicationListResp) GetData() *GetGroupApplicationListData { type TransferGroupOwnerReq struct { GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` - OldOwner string `protobuf:"bytes,2,opt,name=OldOwner" json:"OldOwner,omitempty"` - NewOwner string `protobuf:"bytes,3,opt,name=NewOwner" json:"NewOwner,omitempty"` + OldOwnerUserID string `protobuf:"bytes,2,opt,name=OldOwnerUserID" json:"OldOwnerUserID,omitempty"` + NewOwnerUserID string `protobuf:"bytes,3,opt,name=NewOwnerUserID" json:"NewOwnerUserID,omitempty"` OperationID string `protobuf:"bytes,4,opt,name=OperationID" json:"OperationID,omitempty"` OpUserID string `protobuf:"bytes,5,opt,name=OpUserID" json:"OpUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -800,7 +770,7 @@ func (m *TransferGroupOwnerReq) Reset() { *m = TransferGroupOwnerReq{} } func (m *TransferGroupOwnerReq) String() string { return proto.CompactTextString(m) } func (*TransferGroupOwnerReq) ProtoMessage() {} func (*TransferGroupOwnerReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ac6850665f72c22b, []int{11} + return fileDescriptor_group_23d97c4cd172f0ff, []int{11} } func (m *TransferGroupOwnerReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TransferGroupOwnerReq.Unmarshal(m, b) @@ -827,16 +797,16 @@ func (m *TransferGroupOwnerReq) GetGroupID() string { return "" } -func (m *TransferGroupOwnerReq) GetOldOwner() string { +func (m *TransferGroupOwnerReq) GetOldOwnerUserID() string { if m != nil { - return m.OldOwner + return m.OldOwnerUserID } return "" } -func (m *TransferGroupOwnerReq) GetNewOwner() string { +func (m *TransferGroupOwnerReq) GetNewOwnerUserID() string { if m != nil { - return m.NewOwner + return m.NewOwnerUserID } return "" } @@ -855,56 +825,10 @@ func (m *TransferGroupOwnerReq) GetOpUserID() string { return "" } -type TransferGroupOwnerResp struct { - ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` - ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TransferGroupOwnerResp) Reset() { *m = TransferGroupOwnerResp{} } -func (m *TransferGroupOwnerResp) String() string { return proto.CompactTextString(m) } -func (*TransferGroupOwnerResp) ProtoMessage() {} -func (*TransferGroupOwnerResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ac6850665f72c22b, []int{12} -} -func (m *TransferGroupOwnerResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TransferGroupOwnerResp.Unmarshal(m, b) -} -func (m *TransferGroupOwnerResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TransferGroupOwnerResp.Marshal(b, m, deterministic) -} -func (dst *TransferGroupOwnerResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransferGroupOwnerResp.Merge(dst, src) -} -func (m *TransferGroupOwnerResp) XXX_Size() int { - return xxx_messageInfo_TransferGroupOwnerResp.Size(m) -} -func (m *TransferGroupOwnerResp) XXX_DiscardUnknown() { - xxx_messageInfo_TransferGroupOwnerResp.DiscardUnknown(m) -} - -var xxx_messageInfo_TransferGroupOwnerResp proto.InternalMessageInfo - -func (m *TransferGroupOwnerResp) GetErrCode() int32 { - if m != nil { - return m.ErrCode - } - return 0 -} - -func (m *TransferGroupOwnerResp) GetErrMsg() string { - if m != nil { - return m.ErrMsg - } - return "" -} - type JoinGroupReq struct { - GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` - Message string `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"` - Token string `protobuf:"bytes,3,opt,name=token" json:"token,omitempty"` + GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` + ReqMessage string `protobuf:"bytes,2,opt,name=ReqMessage" json:"ReqMessage,omitempty"` + FromUserID string `protobuf:"bytes,3,opt,name=FromUserID" json:"FromUserID,omitempty"` OperationID string `protobuf:"bytes,4,opt,name=OperationID" json:"OperationID,omitempty"` OpUserID string `protobuf:"bytes,5,opt,name=OpUserID" json:"OpUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -916,7 +840,7 @@ func (m *JoinGroupReq) Reset() { *m = JoinGroupReq{} } func (m *JoinGroupReq) String() string { return proto.CompactTextString(m) } func (*JoinGroupReq) ProtoMessage() {} func (*JoinGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ac6850665f72c22b, []int{13} + return fileDescriptor_group_23d97c4cd172f0ff, []int{12} } func (m *JoinGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JoinGroupReq.Unmarshal(m, b) @@ -943,16 +867,16 @@ func (m *JoinGroupReq) GetGroupID() string { return "" } -func (m *JoinGroupReq) GetMessage() string { +func (m *JoinGroupReq) GetReqMessage() string { if m != nil { - return m.Message + return m.ReqMessage } return "" } -func (m *JoinGroupReq) GetToken() string { +func (m *JoinGroupReq) GetFromUserID() string { if m != nil { - return m.Token + return m.FromUserID } return "" } @@ -972,20 +896,15 @@ func (m *JoinGroupReq) GetOpUserID() string { } type GroupApplicationResponseReq struct { - OperationID string `protobuf:"bytes,1,opt,name=OperationID" json:"OperationID,omitempty"` - OpUserID string `protobuf:"bytes,2,opt,name=OpUserID" json:"OpUserID,omitempty"` - GroupID string `protobuf:"bytes,3,opt,name=GroupID" json:"GroupID,omitempty"` - FromUserID string `protobuf:"bytes,4,opt,name=FromUserID" json:"FromUserID,omitempty"` - FromUserNickName string `protobuf:"bytes,5,opt,name=FromUserNickName" json:"FromUserNickName,omitempty"` - FromUserFaceUrl string `protobuf:"bytes,6,opt,name=FromUserFaceUrl" json:"FromUserFaceUrl,omitempty"` - ToUserID string `protobuf:"bytes,7,opt,name=ToUserID" json:"ToUserID,omitempty"` - ToUserNickName string `protobuf:"bytes,8,opt,name=ToUserNickName" json:"ToUserNickName,omitempty"` - ToUserFaceUrl string `protobuf:"bytes,9,opt,name=ToUserFaceUrl" json:"ToUserFaceUrl,omitempty"` - AddTime int64 `protobuf:"varint,10,opt,name=AddTime" json:"AddTime,omitempty"` - RequestMsg string `protobuf:"bytes,11,opt,name=RequestMsg" json:"RequestMsg,omitempty"` - HandledMsg string `protobuf:"bytes,12,opt,name=HandledMsg" json:"HandledMsg,omitempty"` - Type int32 `protobuf:"varint,13,opt,name=Type" json:"Type,omitempty"` - HandleStatus int32 `protobuf:"varint,14,opt,name=HandleStatus" json:"HandleStatus,omitempty"` + OperationID string `protobuf:"bytes,1,opt,name=OperationID" json:"OperationID,omitempty"` + OpUserID string `protobuf:"bytes,2,opt,name=OpUserID" json:"OpUserID,omitempty"` + GroupID string `protobuf:"bytes,3,opt,name=GroupID" json:"GroupID,omitempty"` + FromUserID string `protobuf:"bytes,4,opt,name=FromUserID" json:"FromUserID,omitempty"` + ToUserID string `protobuf:"bytes,7,opt,name=ToUserID" json:"ToUserID,omitempty"` + AddTime int64 `protobuf:"varint,10,opt,name=AddTime" json:"AddTime,omitempty"` + HandledMsg string `protobuf:"bytes,12,opt,name=HandledMsg" json:"HandledMsg,omitempty"` + // int32 Type = 13; + // int32 HandleStatus = 14; HandleResult int32 `protobuf:"varint,15,opt,name=HandleResult" json:"HandleResult,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -996,7 +915,7 @@ func (m *GroupApplicationResponseReq) Reset() { *m = GroupApplicationRes func (m *GroupApplicationResponseReq) String() string { return proto.CompactTextString(m) } func (*GroupApplicationResponseReq) ProtoMessage() {} func (*GroupApplicationResponseReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ac6850665f72c22b, []int{14} + return fileDescriptor_group_23d97c4cd172f0ff, []int{13} } func (m *GroupApplicationResponseReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupApplicationResponseReq.Unmarshal(m, b) @@ -1044,20 +963,6 @@ func (m *GroupApplicationResponseReq) GetFromUserID() string { return "" } -func (m *GroupApplicationResponseReq) GetFromUserNickName() string { - if m != nil { - return m.FromUserNickName - } - return "" -} - -func (m *GroupApplicationResponseReq) GetFromUserFaceUrl() string { - if m != nil { - return m.FromUserFaceUrl - } - return "" -} - func (m *GroupApplicationResponseReq) GetToUserID() string { if m != nil { return m.ToUserID @@ -1065,20 +970,6 @@ func (m *GroupApplicationResponseReq) GetToUserID() string { return "" } -func (m *GroupApplicationResponseReq) GetToUserNickName() string { - if m != nil { - return m.ToUserNickName - } - return "" -} - -func (m *GroupApplicationResponseReq) GetToUserFaceUrl() string { - if m != nil { - return m.ToUserFaceUrl - } - return "" -} - func (m *GroupApplicationResponseReq) GetAddTime() int64 { if m != nil { return m.AddTime @@ -1086,13 +977,6 @@ func (m *GroupApplicationResponseReq) GetAddTime() int64 { return 0 } -func (m *GroupApplicationResponseReq) GetRequestMsg() string { - if m != nil { - return m.RequestMsg - } - return "" -} - func (m *GroupApplicationResponseReq) GetHandledMsg() string { if m != nil { return m.HandledMsg @@ -1100,20 +984,6 @@ func (m *GroupApplicationResponseReq) GetHandledMsg() string { return "" } -func (m *GroupApplicationResponseReq) GetType() int32 { - if m != nil { - return m.Type - } - return 0 -} - -func (m *GroupApplicationResponseReq) GetHandleStatus() int32 { - if m != nil { - return m.HandleStatus - } - return 0 -} - func (m *GroupApplicationResponseReq) GetHandleResult() int32 { if m != nil { return m.HandleResult @@ -1121,57 +991,11 @@ func (m *GroupApplicationResponseReq) GetHandleResult() int32 { return 0 } -type GroupApplicationResponseResp struct { - ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` - ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GroupApplicationResponseResp) Reset() { *m = GroupApplicationResponseResp{} } -func (m *GroupApplicationResponseResp) String() string { return proto.CompactTextString(m) } -func (*GroupApplicationResponseResp) ProtoMessage() {} -func (*GroupApplicationResponseResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ac6850665f72c22b, []int{15} -} -func (m *GroupApplicationResponseResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GroupApplicationResponseResp.Unmarshal(m, b) -} -func (m *GroupApplicationResponseResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GroupApplicationResponseResp.Marshal(b, m, deterministic) -} -func (dst *GroupApplicationResponseResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_GroupApplicationResponseResp.Merge(dst, src) -} -func (m *GroupApplicationResponseResp) XXX_Size() int { - return xxx_messageInfo_GroupApplicationResponseResp.Size(m) -} -func (m *GroupApplicationResponseResp) XXX_DiscardUnknown() { - xxx_messageInfo_GroupApplicationResponseResp.DiscardUnknown(m) -} - -var xxx_messageInfo_GroupApplicationResponseResp proto.InternalMessageInfo - -func (m *GroupApplicationResponseResp) GetErrCode() int32 { - if m != nil { - return m.ErrCode - } - return 0 -} - -func (m *GroupApplicationResponseResp) GetErrMsg() string { - if m != nil { - return m.ErrMsg - } - return "" -} - type SetOwnerGroupNickNameReq struct { - GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` - NickName string `protobuf:"bytes,2,opt,name=nickName" json:"nickName,omitempty"` + GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` + Nickname string `protobuf:"bytes,2,opt,name=Nickname" json:"Nickname,omitempty"` OperationID string `protobuf:"bytes,3,opt,name=OperationID" json:"OperationID,omitempty"` - Token string `protobuf:"bytes,4,opt,name=token" json:"token,omitempty"` + FromUserID string `protobuf:"bytes,4,opt,name=FromUserID" json:"FromUserID,omitempty"` OpUserID string `protobuf:"bytes,5,opt,name=OpUserID" json:"OpUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1182,7 +1006,7 @@ func (m *SetOwnerGroupNickNameReq) Reset() { *m = SetOwnerGroupNickNameR func (m *SetOwnerGroupNickNameReq) String() string { return proto.CompactTextString(m) } func (*SetOwnerGroupNickNameReq) ProtoMessage() {} func (*SetOwnerGroupNickNameReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ac6850665f72c22b, []int{16} + return fileDescriptor_group_23d97c4cd172f0ff, []int{14} } func (m *SetOwnerGroupNickNameReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetOwnerGroupNickNameReq.Unmarshal(m, b) @@ -1209,9 +1033,9 @@ func (m *SetOwnerGroupNickNameReq) GetGroupID() string { return "" } -func (m *SetOwnerGroupNickNameReq) GetNickName() string { +func (m *SetOwnerGroupNickNameReq) GetNickname() string { if m != nil { - return m.NickName + return m.Nickname } return "" } @@ -1223,9 +1047,9 @@ func (m *SetOwnerGroupNickNameReq) GetOperationID() string { return "" } -func (m *SetOwnerGroupNickNameReq) GetToken() string { +func (m *SetOwnerGroupNickNameReq) GetFromUserID() string { if m != nil { - return m.Token + return m.FromUserID } return "" } @@ -1238,9 +1062,9 @@ func (m *SetOwnerGroupNickNameReq) GetOpUserID() string { } type QuitGroupReq struct { - GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` - OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` - Token string `protobuf:"bytes,3,opt,name=token" json:"token,omitempty"` + GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` + OperationID string `protobuf:"bytes,2,opt,name=OperationID" json:"OperationID,omitempty"` + FromUserID string `protobuf:"bytes,3,opt,name=FromUserID" json:"FromUserID,omitempty"` OpUserID string `protobuf:"bytes,4,opt,name=OpUserID" json:"OpUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1251,7 +1075,7 @@ func (m *QuitGroupReq) Reset() { *m = QuitGroupReq{} } func (m *QuitGroupReq) String() string { return proto.CompactTextString(m) } func (*QuitGroupReq) ProtoMessage() {} func (*QuitGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ac6850665f72c22b, []int{17} + return fileDescriptor_group_23d97c4cd172f0ff, []int{15} } func (m *QuitGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_QuitGroupReq.Unmarshal(m, b) @@ -1285,9 +1109,9 @@ func (m *QuitGroupReq) GetOperationID() string { return "" } -func (m *QuitGroupReq) GetToken() string { +func (m *QuitGroupReq) GetFromUserID() string { if m != nil { - return m.Token + return m.FromUserID } return "" } @@ -1299,185 +1123,12 @@ func (m *QuitGroupReq) GetOpUserID() string { return "" } -type GroupApplicationUserInfo struct { - GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` - Uid string `protobuf:"bytes,2,opt,name=uid" json:"uid,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name" json:"name,omitempty"` - Icon string `protobuf:"bytes,4,opt,name=icon" json:"icon,omitempty"` - ReqMsg string `protobuf:"bytes,5,opt,name=reqMsg" json:"reqMsg,omitempty"` - ApplicationTime int64 `protobuf:"varint,6,opt,name=applicationTime" json:"applicationTime,omitempty"` - Flag int32 `protobuf:"varint,7,opt,name=flag" json:"flag,omitempty"` - OperatorID string `protobuf:"bytes,8,opt,name=operatorID" json:"operatorID,omitempty"` - HandledMsg string `protobuf:"bytes,9,opt,name=handledMsg" json:"handledMsg,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GroupApplicationUserInfo) Reset() { *m = GroupApplicationUserInfo{} } -func (m *GroupApplicationUserInfo) String() string { return proto.CompactTextString(m) } -func (*GroupApplicationUserInfo) ProtoMessage() {} -func (*GroupApplicationUserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ac6850665f72c22b, []int{18} -} -func (m *GroupApplicationUserInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GroupApplicationUserInfo.Unmarshal(m, b) -} -func (m *GroupApplicationUserInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GroupApplicationUserInfo.Marshal(b, m, deterministic) -} -func (dst *GroupApplicationUserInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_GroupApplicationUserInfo.Merge(dst, src) -} -func (m *GroupApplicationUserInfo) XXX_Size() int { - return xxx_messageInfo_GroupApplicationUserInfo.Size(m) -} -func (m *GroupApplicationUserInfo) XXX_DiscardUnknown() { - xxx_messageInfo_GroupApplicationUserInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_GroupApplicationUserInfo proto.InternalMessageInfo - -func (m *GroupApplicationUserInfo) GetGroupID() string { - if m != nil { - return m.GroupID - } - return "" -} - -func (m *GroupApplicationUserInfo) GetUid() string { - if m != nil { - return m.Uid - } - return "" -} - -func (m *GroupApplicationUserInfo) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *GroupApplicationUserInfo) GetIcon() string { - if m != nil { - return m.Icon - } - return "" -} - -func (m *GroupApplicationUserInfo) GetReqMsg() string { - if m != nil { - return m.ReqMsg - } - return "" -} - -func (m *GroupApplicationUserInfo) GetApplicationTime() int64 { - if m != nil { - return m.ApplicationTime - } - return 0 -} - -func (m *GroupApplicationUserInfo) GetFlag() int32 { - if m != nil { - return m.Flag - } - return 0 -} - -func (m *GroupApplicationUserInfo) GetOperatorID() string { - if m != nil { - return m.OperatorID - } - return "" -} - -func (m *GroupApplicationUserInfo) GetHandledMsg() string { - if m != nil { - return m.HandledMsg - } - return "" -} - -type GroupMemberFullInfo struct { - UserId string `protobuf:"bytes,1,opt,name=userId" json:"userId,omitempty"` - Role int32 `protobuf:"varint,2,opt,name=role" json:"role,omitempty"` - JoinTime uint64 `protobuf:"varint,3,opt,name=joinTime" json:"joinTime,omitempty"` - NickName string `protobuf:"bytes,4,opt,name=nickName" json:"nickName,omitempty"` - FaceUrl string `protobuf:"bytes,5,opt,name=faceUrl" json:"faceUrl,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GroupMemberFullInfo) Reset() { *m = GroupMemberFullInfo{} } -func (m *GroupMemberFullInfo) String() string { return proto.CompactTextString(m) } -func (*GroupMemberFullInfo) ProtoMessage() {} -func (*GroupMemberFullInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ac6850665f72c22b, []int{19} -} -func (m *GroupMemberFullInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GroupMemberFullInfo.Unmarshal(m, b) -} -func (m *GroupMemberFullInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GroupMemberFullInfo.Marshal(b, m, deterministic) -} -func (dst *GroupMemberFullInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_GroupMemberFullInfo.Merge(dst, src) -} -func (m *GroupMemberFullInfo) XXX_Size() int { - return xxx_messageInfo_GroupMemberFullInfo.Size(m) -} -func (m *GroupMemberFullInfo) XXX_DiscardUnknown() { - xxx_messageInfo_GroupMemberFullInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_GroupMemberFullInfo proto.InternalMessageInfo - -func (m *GroupMemberFullInfo) GetUserId() string { - if m != nil { - return m.UserId - } - return "" -} - -func (m *GroupMemberFullInfo) GetRole() int32 { - if m != nil { - return m.Role - } - return 0 -} - -func (m *GroupMemberFullInfo) GetJoinTime() uint64 { - if m != nil { - return m.JoinTime - } - return 0 -} - -func (m *GroupMemberFullInfo) GetNickName() string { - if m != nil { - return m.NickName - } - return "" -} - -func (m *GroupMemberFullInfo) GetFaceUrl() string { - if m != nil { - return m.FaceUrl - } - return "" -} - type GetGroupMemberListReq struct { - GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` - Token string `protobuf:"bytes,2,opt,name=token" json:"token,omitempty"` - OperationID string `protobuf:"bytes,3,opt,name=operationID" json:"operationID,omitempty"` - Filter int32 `protobuf:"varint,4,opt,name=filter" json:"filter,omitempty"` - NextSeq int32 `protobuf:"varint,5,opt,name=nextSeq" json:"nextSeq,omitempty"` - OpUserID string `protobuf:"bytes,6,opt,name=OpUserID" json:"OpUserID,omitempty"` + GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` + OpUserID string `protobuf:"bytes,2,opt,name=OpUserID" json:"OpUserID,omitempty"` + OperationID string `protobuf:"bytes,3,opt,name=OperationID" json:"OperationID,omitempty"` + Filter int32 `protobuf:"varint,4,opt,name=Filter" json:"Filter,omitempty"` + NextSeq int32 `protobuf:"varint,5,opt,name=NextSeq" json:"NextSeq,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1487,7 +1138,7 @@ func (m *GetGroupMemberListReq) Reset() { *m = GetGroupMemberListReq{} } func (m *GetGroupMemberListReq) String() string { return proto.CompactTextString(m) } func (*GetGroupMemberListReq) ProtoMessage() {} func (*GetGroupMemberListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ac6850665f72c22b, []int{20} + return fileDescriptor_group_23d97c4cd172f0ff, []int{16} } func (m *GetGroupMemberListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMemberListReq.Unmarshal(m, b) @@ -1514,9 +1165,9 @@ func (m *GetGroupMemberListReq) GetGroupID() string { return "" } -func (m *GetGroupMemberListReq) GetToken() string { +func (m *GetGroupMemberListReq) GetOpUserID() string { if m != nil { - return m.Token + return m.OpUserID } return "" } @@ -1542,28 +1193,21 @@ func (m *GetGroupMemberListReq) GetNextSeq() int32 { return 0 } -func (m *GetGroupMemberListReq) GetOpUserID() string { - if m != nil { - return m.OpUserID - } - return "" -} - type GetGroupMemberListResp struct { - ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` - ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` - MemberList []*GroupMemberFullInfo `protobuf:"bytes,3,rep,name=memberList" json:"memberList,omitempty"` - NextSeq int32 `protobuf:"varint,4,opt,name=nextSeq" json:"nextSeq,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` + MemberList []*sdk_ws.GroupMemberFullInfo `protobuf:"bytes,3,rep,name=memberList" json:"memberList,omitempty"` + NextSeq int32 `protobuf:"varint,4,opt,name=nextSeq" json:"nextSeq,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GetGroupMemberListResp) Reset() { *m = GetGroupMemberListResp{} } func (m *GetGroupMemberListResp) String() string { return proto.CompactTextString(m) } func (*GetGroupMemberListResp) ProtoMessage() {} func (*GetGroupMemberListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ac6850665f72c22b, []int{21} + return fileDescriptor_group_23d97c4cd172f0ff, []int{17} } func (m *GetGroupMemberListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMemberListResp.Unmarshal(m, b) @@ -1597,7 +1241,7 @@ func (m *GetGroupMemberListResp) GetErrMsg() string { return "" } -func (m *GetGroupMemberListResp) GetMemberList() []*GroupMemberFullInfo { +func (m *GetGroupMemberListResp) GetMemberList() []*sdk_ws.GroupMemberFullInfo { if m != nil { return m.MemberList } @@ -1612,11 +1256,10 @@ func (m *GetGroupMemberListResp) GetNextSeq() int32 { } type GetGroupMembersInfoReq struct { - GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` + GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` MemberList []string `protobuf:"bytes,2,rep,name=memberList" json:"memberList,omitempty"` - Token string `protobuf:"bytes,3,opt,name=token" json:"token,omitempty"` - OperationID string `protobuf:"bytes,4,opt,name=operationID" json:"operationID,omitempty"` - OpUserID string `protobuf:"bytes,5,opt,name=OpUserID" json:"OpUserID,omitempty"` + OpUserID string `protobuf:"bytes,3,opt,name=OpUserID" json:"OpUserID,omitempty"` + OperationID string `protobuf:"bytes,4,opt,name=OperationID" json:"OperationID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1626,7 +1269,7 @@ func (m *GetGroupMembersInfoReq) Reset() { *m = GetGroupMembersInfoReq{} func (m *GetGroupMembersInfoReq) String() string { return proto.CompactTextString(m) } func (*GetGroupMembersInfoReq) ProtoMessage() {} func (*GetGroupMembersInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ac6850665f72c22b, []int{22} + return fileDescriptor_group_23d97c4cd172f0ff, []int{18} } func (m *GetGroupMembersInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMembersInfoReq.Unmarshal(m, b) @@ -1660,9 +1303,9 @@ func (m *GetGroupMembersInfoReq) GetMemberList() []string { return nil } -func (m *GetGroupMembersInfoReq) GetToken() string { +func (m *GetGroupMembersInfoReq) GetOpUserID() string { if m != nil { - return m.Token + return m.OpUserID } return "" } @@ -1674,27 +1317,20 @@ func (m *GetGroupMembersInfoReq) GetOperationID() string { return "" } -func (m *GetGroupMembersInfoReq) GetOpUserID() string { - if m != nil { - return m.OpUserID - } - return "" -} - type GetGroupMembersInfoResp struct { - ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` - ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` - MemberList []*GroupMemberFullInfo `protobuf:"bytes,3,rep,name=memberList" json:"memberList,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` + MemberList []*sdk_ws.GroupMemberFullInfo `protobuf:"bytes,3,rep,name=memberList" json:"memberList,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GetGroupMembersInfoResp) Reset() { *m = GetGroupMembersInfoResp{} } func (m *GetGroupMembersInfoResp) String() string { return proto.CompactTextString(m) } func (*GetGroupMembersInfoResp) ProtoMessage() {} func (*GetGroupMembersInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ac6850665f72c22b, []int{23} + return fileDescriptor_group_23d97c4cd172f0ff, []int{19} } func (m *GetGroupMembersInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMembersInfoResp.Unmarshal(m, b) @@ -1728,7 +1364,7 @@ func (m *GetGroupMembersInfoResp) GetErrMsg() string { return "" } -func (m *GetGroupMembersInfoResp) GetMemberList() []*GroupMemberFullInfo { +func (m *GetGroupMembersInfoResp) GetMemberList() []*sdk_ws.GroupMemberFullInfo { if m != nil { return m.MemberList } @@ -1736,22 +1372,21 @@ func (m *GetGroupMembersInfoResp) GetMemberList() []*GroupMemberFullInfo { } type KickGroupMemberReq struct { - GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` - UidListInfo []*GroupMemberFullInfo `protobuf:"bytes,2,rep,name=uidListInfo" json:"uidListInfo,omitempty"` - Reason string `protobuf:"bytes,3,opt,name=reason" json:"reason,omitempty"` - Token string `protobuf:"bytes,4,opt,name=token" json:"token,omitempty"` - OperationID string `protobuf:"bytes,5,opt,name=operationID" json:"operationID,omitempty"` - OpUserID string `protobuf:"bytes,6,opt,name=OpUserID" json:"OpUserID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` + KickedUserIDList []string `protobuf:"bytes,2,rep,name=KickedUserIDList" json:"KickedUserIDList,omitempty"` + Reason string `protobuf:"bytes,3,opt,name=Reason" json:"Reason,omitempty"` + OperationID string `protobuf:"bytes,5,opt,name=OperationID" json:"OperationID,omitempty"` + OpUserID string `protobuf:"bytes,6,opt,name=OpUserID" json:"OpUserID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *KickGroupMemberReq) Reset() { *m = KickGroupMemberReq{} } func (m *KickGroupMemberReq) String() string { return proto.CompactTextString(m) } func (*KickGroupMemberReq) ProtoMessage() {} func (*KickGroupMemberReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ac6850665f72c22b, []int{24} + return fileDescriptor_group_23d97c4cd172f0ff, []int{20} } func (m *KickGroupMemberReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_KickGroupMemberReq.Unmarshal(m, b) @@ -1778,9 +1413,9 @@ func (m *KickGroupMemberReq) GetGroupID() string { return "" } -func (m *KickGroupMemberReq) GetUidListInfo() []*GroupMemberFullInfo { +func (m *KickGroupMemberReq) GetKickedUserIDList() []string { if m != nil { - return m.UidListInfo + return m.KickedUserIDList } return nil } @@ -1792,13 +1427,6 @@ func (m *KickGroupMemberReq) GetReason() string { return "" } -func (m *KickGroupMemberReq) GetToken() string { - if m != nil { - return m.Token - } - return "" -} - func (m *KickGroupMemberReq) GetOperationID() string { if m != nil { return m.OperationID @@ -1814,8 +1442,8 @@ func (m *KickGroupMemberReq) GetOpUserID() string { } type Id2Result struct { - UId string `protobuf:"bytes,1,opt,name=uId" json:"uId,omitempty"` - Result int32 `protobuf:"varint,2,opt,name=result" json:"result,omitempty"` + UserID string `protobuf:"bytes,1,opt,name=UserID" json:"UserID,omitempty"` + Result int32 `protobuf:"varint,2,opt,name=Result" json:"Result,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1825,7 +1453,7 @@ func (m *Id2Result) Reset() { *m = Id2Result{} } func (m *Id2Result) String() string { return proto.CompactTextString(m) } func (*Id2Result) ProtoMessage() {} func (*Id2Result) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ac6850665f72c22b, []int{25} + return fileDescriptor_group_23d97c4cd172f0ff, []int{21} } func (m *Id2Result) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Id2Result.Unmarshal(m, b) @@ -1845,9 +1473,9 @@ func (m *Id2Result) XXX_DiscardUnknown() { var xxx_messageInfo_Id2Result proto.InternalMessageInfo -func (m *Id2Result) GetUId() string { +func (m *Id2Result) GetUserID() string { if m != nil { - return m.UId + return m.UserID } return "" } @@ -1862,7 +1490,7 @@ func (m *Id2Result) GetResult() int32 { type KickGroupMemberResp struct { ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` - Id2Result []*Id2Result `protobuf:"bytes,3,rep,name=id2result" json:"id2result,omitempty"` + Id2ResultList []*Id2Result `protobuf:"bytes,3,rep,name=Id2ResultList" json:"Id2ResultList,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1872,7 +1500,7 @@ func (m *KickGroupMemberResp) Reset() { *m = KickGroupMemberResp{} } func (m *KickGroupMemberResp) String() string { return proto.CompactTextString(m) } func (*KickGroupMemberResp) ProtoMessage() {} func (*KickGroupMemberResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ac6850665f72c22b, []int{26} + return fileDescriptor_group_23d97c4cd172f0ff, []int{22} } func (m *KickGroupMemberResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_KickGroupMemberResp.Unmarshal(m, b) @@ -1906,15 +1534,15 @@ func (m *KickGroupMemberResp) GetErrMsg() string { return "" } -func (m *KickGroupMemberResp) GetId2Result() []*Id2Result { +func (m *KickGroupMemberResp) GetId2ResultList() []*Id2Result { if m != nil { - return m.Id2Result + return m.Id2ResultList } return nil } type GetJoinedGroupListReq struct { - Token string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"` + FromUserID string `protobuf:"bytes,1,opt,name=FromUserID" json:"FromUserID,omitempty"` OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` OpUserID string `protobuf:"bytes,3,opt,name=OpUserID" json:"OpUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -1926,7 +1554,7 @@ func (m *GetJoinedGroupListReq) Reset() { *m = GetJoinedGroupListReq{} } func (m *GetJoinedGroupListReq) String() string { return proto.CompactTextString(m) } func (*GetJoinedGroupListReq) ProtoMessage() {} func (*GetJoinedGroupListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ac6850665f72c22b, []int{27} + return fileDescriptor_group_23d97c4cd172f0ff, []int{23} } func (m *GetJoinedGroupListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetJoinedGroupListReq.Unmarshal(m, b) @@ -1946,9 +1574,9 @@ func (m *GetJoinedGroupListReq) XXX_DiscardUnknown() { var xxx_messageInfo_GetJoinedGroupListReq proto.InternalMessageInfo -func (m *GetJoinedGroupListReq) GetToken() string { +func (m *GetJoinedGroupListReq) GetFromUserID() string { if m != nil { - return m.Token + return m.FromUserID } return "" } @@ -1967,114 +1595,20 @@ func (m *GetJoinedGroupListReq) GetOpUserID() string { return "" } -type GroupInfo struct { - GroupId string `protobuf:"bytes,1,opt,name=groupId" json:"groupId,omitempty"` - GroupName string `protobuf:"bytes,2,opt,name=groupName" json:"groupName,omitempty"` - Notification string `protobuf:"bytes,3,opt,name=notification" json:"notification,omitempty"` - Introduction string `protobuf:"bytes,4,opt,name=introduction" json:"introduction,omitempty"` - FaceUrl string `protobuf:"bytes,5,opt,name=faceUrl" json:"faceUrl,omitempty"` - CreateTime uint64 `protobuf:"varint,6,opt,name=createTime" json:"createTime,omitempty"` - OwnerId string `protobuf:"bytes,7,opt,name=ownerId" json:"ownerId,omitempty"` - MemberCount uint32 `protobuf:"varint,8,opt,name=memberCount" json:"memberCount,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GroupInfo) Reset() { *m = GroupInfo{} } -func (m *GroupInfo) String() string { return proto.CompactTextString(m) } -func (*GroupInfo) ProtoMessage() {} -func (*GroupInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ac6850665f72c22b, []int{28} -} -func (m *GroupInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GroupInfo.Unmarshal(m, b) -} -func (m *GroupInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GroupInfo.Marshal(b, m, deterministic) -} -func (dst *GroupInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_GroupInfo.Merge(dst, src) -} -func (m *GroupInfo) XXX_Size() int { - return xxx_messageInfo_GroupInfo.Size(m) -} -func (m *GroupInfo) XXX_DiscardUnknown() { - xxx_messageInfo_GroupInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_GroupInfo proto.InternalMessageInfo - -func (m *GroupInfo) GetGroupId() string { - if m != nil { - return m.GroupId - } - return "" -} - -func (m *GroupInfo) GetGroupName() string { - if m != nil { - return m.GroupName - } - return "" -} - -func (m *GroupInfo) GetNotification() string { - if m != nil { - return m.Notification - } - return "" -} - -func (m *GroupInfo) GetIntroduction() string { - if m != nil { - return m.Introduction - } - return "" -} - -func (m *GroupInfo) GetFaceUrl() string { - if m != nil { - return m.FaceUrl - } - return "" -} - -func (m *GroupInfo) GetCreateTime() uint64 { - if m != nil { - return m.CreateTime - } - return 0 -} - -func (m *GroupInfo) GetOwnerId() string { - if m != nil { - return m.OwnerId - } - return "" -} - -func (m *GroupInfo) GetMemberCount() uint32 { - if m != nil { - return m.MemberCount - } - return 0 -} - type GetJoinedGroupListResp struct { - ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` - ErrorMsg string `protobuf:"bytes,2,opt,name=ErrorMsg" json:"ErrorMsg,omitempty"` - GroupList []*GroupInfo `protobuf:"bytes,3,rep,name=GroupList" json:"GroupList,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` + GroupList []*sdk_ws.GroupInfo `protobuf:"bytes,3,rep,name=GroupList" json:"GroupList,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GetJoinedGroupListResp) Reset() { *m = GetJoinedGroupListResp{} } func (m *GetJoinedGroupListResp) String() string { return proto.CompactTextString(m) } func (*GetJoinedGroupListResp) ProtoMessage() {} func (*GetJoinedGroupListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ac6850665f72c22b, []int{29} + return fileDescriptor_group_23d97c4cd172f0ff, []int{24} } func (m *GetJoinedGroupListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetJoinedGroupListResp.Unmarshal(m, b) @@ -2101,14 +1635,14 @@ func (m *GetJoinedGroupListResp) GetErrCode() int32 { return 0 } -func (m *GetJoinedGroupListResp) GetErrorMsg() string { +func (m *GetJoinedGroupListResp) GetErrMsg() string { if m != nil { - return m.ErrorMsg + return m.ErrMsg } return "" } -func (m *GetJoinedGroupListResp) GetGroupList() []*GroupInfo { +func (m *GetJoinedGroupListResp) GetGroupList() []*sdk_ws.GroupInfo { if m != nil { return m.GroupList } @@ -2116,11 +1650,10 @@ func (m *GetJoinedGroupListResp) GetGroupList() []*GroupInfo { } type InviteUserToGroupReq struct { - Token string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"` - OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` - GroupID string `protobuf:"bytes,3,opt,name=groupID" json:"groupID,omitempty"` - Reason string `protobuf:"bytes,4,opt,name=reason" json:"reason,omitempty"` - UidList []string `protobuf:"bytes,5,rep,name=uidList" json:"uidList,omitempty"` + OperationID string `protobuf:"bytes,2,opt,name=OperationID" json:"OperationID,omitempty"` + GroupID string `protobuf:"bytes,3,opt,name=GroupID" json:"GroupID,omitempty"` + Reason string `protobuf:"bytes,4,opt,name=Reason" json:"Reason,omitempty"` + InvitedUserIDList []string `protobuf:"bytes,5,rep,name=InvitedUserIDList" json:"InvitedUserIDList,omitempty"` OpUserID string `protobuf:"bytes,6,opt,name=OpUserID" json:"OpUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -2131,7 +1664,7 @@ func (m *InviteUserToGroupReq) Reset() { *m = InviteUserToGroupReq{} } func (m *InviteUserToGroupReq) String() string { return proto.CompactTextString(m) } func (*InviteUserToGroupReq) ProtoMessage() {} func (*InviteUserToGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ac6850665f72c22b, []int{30} + return fileDescriptor_group_23d97c4cd172f0ff, []int{25} } func (m *InviteUserToGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_InviteUserToGroupReq.Unmarshal(m, b) @@ -2151,13 +1684,6 @@ func (m *InviteUserToGroupReq) XXX_DiscardUnknown() { var xxx_messageInfo_InviteUserToGroupReq proto.InternalMessageInfo -func (m *InviteUserToGroupReq) GetToken() string { - if m != nil { - return m.Token - } - return "" -} - func (m *InviteUserToGroupReq) GetOperationID() string { if m != nil { return m.OperationID @@ -2179,9 +1705,9 @@ func (m *InviteUserToGroupReq) GetReason() string { return "" } -func (m *InviteUserToGroupReq) GetUidList() []string { +func (m *InviteUserToGroupReq) GetInvitedUserIDList() []string { if m != nil { - return m.UidList + return m.InvitedUserIDList } return nil } @@ -2196,7 +1722,7 @@ func (m *InviteUserToGroupReq) GetOpUserID() string { type InviteUserToGroupResp struct { ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` - Id2Result []*Id2Result `protobuf:"bytes,3,rep,name=Id2Result" json:"Id2Result,omitempty"` + Id2ResultList []*Id2Result `protobuf:"bytes,3,rep,name=Id2ResultList" json:"Id2ResultList,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2206,7 +1732,7 @@ func (m *InviteUserToGroupResp) Reset() { *m = InviteUserToGroupResp{} } func (m *InviteUserToGroupResp) String() string { return proto.CompactTextString(m) } func (*InviteUserToGroupResp) ProtoMessage() {} func (*InviteUserToGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ac6850665f72c22b, []int{31} + return fileDescriptor_group_23d97c4cd172f0ff, []int{26} } func (m *InviteUserToGroupResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_InviteUserToGroupResp.Unmarshal(m, b) @@ -2240,17 +1766,17 @@ func (m *InviteUserToGroupResp) GetErrMsg() string { return "" } -func (m *InviteUserToGroupResp) GetId2Result() []*Id2Result { +func (m *InviteUserToGroupResp) GetId2ResultList() []*Id2Result { if m != nil { - return m.Id2Result + return m.Id2ResultList } return nil } type GetGroupAllMemberReq struct { - GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` - Token string `protobuf:"bytes,2,opt,name=token" json:"token,omitempty"` - OperationID string `protobuf:"bytes,3,opt,name=operationID" json:"operationID,omitempty"` + GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` + FromUserID string `protobuf:"bytes,2,opt,name=FromUserID" json:"FromUserID,omitempty"` + OperationID string `protobuf:"bytes,3,opt,name=OperationID" json:"OperationID,omitempty"` OpUserID string `protobuf:"bytes,4,opt,name=OpUserID" json:"OpUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -2261,7 +1787,7 @@ func (m *GetGroupAllMemberReq) Reset() { *m = GetGroupAllMemberReq{} } func (m *GetGroupAllMemberReq) String() string { return proto.CompactTextString(m) } func (*GetGroupAllMemberReq) ProtoMessage() {} func (*GetGroupAllMemberReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ac6850665f72c22b, []int{32} + return fileDescriptor_group_23d97c4cd172f0ff, []int{27} } func (m *GetGroupAllMemberReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupAllMemberReq.Unmarshal(m, b) @@ -2288,9 +1814,9 @@ func (m *GetGroupAllMemberReq) GetGroupID() string { return "" } -func (m *GetGroupAllMemberReq) GetToken() string { +func (m *GetGroupAllMemberReq) GetFromUserID() string { if m != nil { - return m.Token + return m.FromUserID } return "" } @@ -2310,19 +1836,19 @@ func (m *GetGroupAllMemberReq) GetOpUserID() string { } type GetGroupAllMemberResp struct { - ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` - ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` - MemberList []*GroupMemberFullInfo `protobuf:"bytes,3,rep,name=memberList" json:"memberList,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` + MemberList []*sdk_ws.GroupMemberFullInfo `protobuf:"bytes,3,rep,name=memberList" json:"memberList,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GetGroupAllMemberResp) Reset() { *m = GetGroupAllMemberResp{} } func (m *GetGroupAllMemberResp) String() string { return proto.CompactTextString(m) } func (*GetGroupAllMemberResp) ProtoMessage() {} func (*GetGroupAllMemberResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_ac6850665f72c22b, []int{33} + return fileDescriptor_group_23d97c4cd172f0ff, []int{28} } func (m *GetGroupAllMemberResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupAllMemberResp.Unmarshal(m, b) @@ -2356,7 +1882,7 @@ func (m *GetGroupAllMemberResp) GetErrMsg() string { return "" } -func (m *GetGroupAllMemberResp) GetMemberList() []*GroupMemberFullInfo { +func (m *GetGroupAllMemberResp) GetMemberList() []*sdk_ws.GroupMemberFullInfo { if m != nil { return m.MemberList } @@ -2365,8 +1891,8 @@ func (m *GetGroupAllMemberResp) GetMemberList() []*GroupMemberFullInfo { func init() { proto.RegisterType((*CommonResp)(nil), "group.CommonResp") - proto.RegisterType((*CreateGroupReq)(nil), "group.CreateGroupReq") proto.RegisterType((*GroupAddMemberInfo)(nil), "group.GroupAddMemberInfo") + proto.RegisterType((*CreateGroupReq)(nil), "group.CreateGroupReq") proto.RegisterType((*CreateGroupResp)(nil), "group.CreateGroupResp") proto.RegisterType((*GetGroupsInfoReq)(nil), "group.GetGroupsInfoReq") proto.RegisterType((*GetGroupsInfoResp)(nil), "group.GetGroupsInfoResp") @@ -2376,14 +1902,10 @@ func init() { proto.RegisterType((*GetGroupApplicationListData)(nil), "group.GetGroupApplicationListData") proto.RegisterType((*GetGroupApplicationListResp)(nil), "group.GetGroupApplicationListResp") proto.RegisterType((*TransferGroupOwnerReq)(nil), "group.TransferGroupOwnerReq") - proto.RegisterType((*TransferGroupOwnerResp)(nil), "group.TransferGroupOwnerResp") proto.RegisterType((*JoinGroupReq)(nil), "group.JoinGroupReq") proto.RegisterType((*GroupApplicationResponseReq)(nil), "group.GroupApplicationResponseReq") - proto.RegisterType((*GroupApplicationResponseResp)(nil), "group.GroupApplicationResponseResp") proto.RegisterType((*SetOwnerGroupNickNameReq)(nil), "group.SetOwnerGroupNickNameReq") proto.RegisterType((*QuitGroupReq)(nil), "group.QuitGroupReq") - proto.RegisterType((*GroupApplicationUserInfo)(nil), "group.GroupApplicationUserInfo") - proto.RegisterType((*GroupMemberFullInfo)(nil), "group.GroupMemberFullInfo") proto.RegisterType((*GetGroupMemberListReq)(nil), "group.GetGroupMemberListReq") proto.RegisterType((*GetGroupMemberListResp)(nil), "group.GetGroupMemberListResp") proto.RegisterType((*GetGroupMembersInfoReq)(nil), "group.GetGroupMembersInfoReq") @@ -2391,11 +1913,10 @@ func init() { proto.RegisterType((*KickGroupMemberReq)(nil), "group.KickGroupMemberReq") proto.RegisterType((*Id2Result)(nil), "group.Id2Result") proto.RegisterType((*KickGroupMemberResp)(nil), "group.KickGroupMemberResp") - proto.RegisterType((*GetJoinedGroupListReq)(nil), "group.getJoinedGroupListReq") - proto.RegisterType((*GroupInfo)(nil), "group.GroupInfo") - proto.RegisterType((*GetJoinedGroupListResp)(nil), "group.getJoinedGroupListResp") - proto.RegisterType((*InviteUserToGroupReq)(nil), "group.inviteUserToGroupReq") - proto.RegisterType((*InviteUserToGroupResp)(nil), "group.inviteUserToGroupResp") + proto.RegisterType((*GetJoinedGroupListReq)(nil), "group.GetJoinedGroupListReq") + proto.RegisterType((*GetJoinedGroupListResp)(nil), "group.GetJoinedGroupListResp") + proto.RegisterType((*InviteUserToGroupReq)(nil), "group.InviteUserToGroupReq") + proto.RegisterType((*InviteUserToGroupResp)(nil), "group.InviteUserToGroupResp") proto.RegisterType((*GetGroupAllMemberReq)(nil), "group.GetGroupAllMemberReq") proto.RegisterType((*GetGroupAllMemberResp)(nil), "group.GetGroupAllMemberResp") } @@ -2417,8 +1938,8 @@ type GroupClient interface { GetGroupsInfo(ctx context.Context, in *GetGroupsInfoReq, opts ...grpc.CallOption) (*GetGroupsInfoResp, error) SetGroupInfo(ctx context.Context, in *SetGroupInfoReq, opts ...grpc.CallOption) (*CommonResp, error) GetGroupApplicationList(ctx context.Context, in *GetGroupApplicationListReq, opts ...grpc.CallOption) (*GetGroupApplicationListResp, error) - TransferGroupOwner(ctx context.Context, in *TransferGroupOwnerReq, opts ...grpc.CallOption) (*TransferGroupOwnerResp, error) - GroupApplicationResponse(ctx context.Context, in *GroupApplicationResponseReq, opts ...grpc.CallOption) (*GroupApplicationResponseResp, error) + TransferGroupOwner(ctx context.Context, in *TransferGroupOwnerReq, opts ...grpc.CallOption) (*CommonResp, error) + GroupApplicationResponse(ctx context.Context, in *GroupApplicationResponseReq, opts ...grpc.CallOption) (*CommonResp, error) // rpc setOwnerGroupNickName(SetOwnerGroupNickNameReq) returns(CommonResp); GetGroupMemberList(ctx context.Context, in *GetGroupMemberListReq, opts ...grpc.CallOption) (*GetGroupMemberListResp, error) GetGroupMembersInfo(ctx context.Context, in *GetGroupMembersInfoReq, opts ...grpc.CallOption) (*GetGroupMembersInfoResp, error) @@ -2490,8 +2011,8 @@ func (c *groupClient) GetGroupApplicationList(ctx context.Context, in *GetGroupA return out, nil } -func (c *groupClient) TransferGroupOwner(ctx context.Context, in *TransferGroupOwnerReq, opts ...grpc.CallOption) (*TransferGroupOwnerResp, error) { - out := new(TransferGroupOwnerResp) +func (c *groupClient) TransferGroupOwner(ctx context.Context, in *TransferGroupOwnerReq, opts ...grpc.CallOption) (*CommonResp, error) { + out := new(CommonResp) err := grpc.Invoke(ctx, "/group.group/transferGroupOwner", in, out, c.cc, opts...) if err != nil { return nil, err @@ -2499,8 +2020,8 @@ func (c *groupClient) TransferGroupOwner(ctx context.Context, in *TransferGroupO return out, nil } -func (c *groupClient) GroupApplicationResponse(ctx context.Context, in *GroupApplicationResponseReq, opts ...grpc.CallOption) (*GroupApplicationResponseResp, error) { - out := new(GroupApplicationResponseResp) +func (c *groupClient) GroupApplicationResponse(ctx context.Context, in *GroupApplicationResponseReq, opts ...grpc.CallOption) (*CommonResp, error) { + out := new(CommonResp) err := grpc.Invoke(ctx, "/group.group/groupApplicationResponse", in, out, c.cc, opts...) if err != nil { return nil, err @@ -2571,8 +2092,8 @@ type GroupServer interface { GetGroupsInfo(context.Context, *GetGroupsInfoReq) (*GetGroupsInfoResp, error) SetGroupInfo(context.Context, *SetGroupInfoReq) (*CommonResp, error) GetGroupApplicationList(context.Context, *GetGroupApplicationListReq) (*GetGroupApplicationListResp, error) - TransferGroupOwner(context.Context, *TransferGroupOwnerReq) (*TransferGroupOwnerResp, error) - GroupApplicationResponse(context.Context, *GroupApplicationResponseReq) (*GroupApplicationResponseResp, error) + TransferGroupOwner(context.Context, *TransferGroupOwnerReq) (*CommonResp, error) + GroupApplicationResponse(context.Context, *GroupApplicationResponseReq) (*CommonResp, error) // rpc setOwnerGroupNickName(SetOwnerGroupNickNameReq) returns(CommonResp); GetGroupMemberList(context.Context, *GetGroupMemberListReq) (*GetGroupMemberListResp, error) GetGroupMembersInfo(context.Context, *GetGroupMembersInfoReq) (*GetGroupMembersInfoResp, error) @@ -2903,117 +2424,102 @@ var _Group_serviceDesc = grpc.ServiceDesc{ Metadata: "group/group.proto", } -func init() { proto.RegisterFile("group/group.proto", fileDescriptor_group_ac6850665f72c22b) } +func init() { proto.RegisterFile("group/group.proto", fileDescriptor_group_23d97c4cd172f0ff) } -var fileDescriptor_group_ac6850665f72c22b = []byte{ - // 1744 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0xdb, 0x6f, 0xdc, 0x44, - 0x17, 0x97, 0x77, 0xbd, 0x9b, 0xec, 0xc9, 0x7d, 0xd2, 0xa4, 0xfe, 0xd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- 0xe1, 0xd7, 0xb1, 0xd7, 0x3b, 0xf3, 0x49, 0xc0, 0x30, 0x3e, 0x28, 0xe8, 0xd1, 0xff, 0x61, 0x91, - 0x79, 0x29, 0x2d, 0x81, 0x5a, 0xe6, 0xb4, 0x68, 0x1b, 0x96, 0x44, 0xdf, 0x43, 0x1e, 0x1f, 0x73, - 0xd4, 0x30, 0xaf, 0x46, 0xd7, 0x60, 0x81, 0xf5, 0x15, 0x76, 0xf3, 0xd4, 0x2e, 0xab, 0x24, 0xfb, - 0xc7, 0xd7, 0x42, 0xb4, 0xc6, 0x02, 0xdb, 0x3f, 0x45, 0x45, 0x30, 0x3b, 0x7d, 0x11, 0x62, 0x63, - 0x91, 0x61, 0x46, 0xbe, 0x49, 0x04, 0x33, 0x93, 0x93, 0xc4, 0x49, 0x26, 0xb1, 0xb1, 0x44, 0xdb, - 0x32, 0xba, 0xd4, 0xc6, 0xc6, 0xf1, 0x64, 0x98, 0x18, 0xcb, 0xaa, 0x0d, 0xd3, 0x59, 0x63, 0xb8, - 0x52, 0x11, 0x1a, 0x24, 0x32, 0x48, 0xa8, 0xef, 0x05, 0x13, 0x3f, 0xe1, 0xe9, 0xce, 0x04, 0x74, - 0x13, 0x74, 0xea, 0x6b, 0x83, 0x26, 0xf5, 0xb6, 0x48, 0xea, 0xf3, 0x42, 0xcc, 0xa6, 0xbd, 0xac, - 0x57, 0x5a, 0xe5, 0x9c, 0x53, 0x92, 0xcc, 0xdb, 0xa0, 0xef, 0x33, 0x92, 0xd1, 0xb6, 0xe7, 0x76, - 0xad, 0x7a, 0x7f, 0x88, 0xa5, 0x4d, 0xed, 0xad, 0x9f, 0x35, 0x58, 0x3b, 0x8d, 0x1c, 0x3f, 0xee, - 0xe3, 0x88, 0x9a, 0xde, 0x7f, 0xe6, 0xe3, 0x88, 0x93, 0xcf, 0x51, 0x96, 0x7c, 0x44, 0xf0, 0x93, - 0x54, 0x1c, 0xba, 0xd4, 0x90, 0x7b, 0x21, 0x65, 0x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0x00, 0x72, 0xc9, 0xa5, 0x87, 0xb1, 0x5c, - 0x72, 0xc5, 0xc9, 0x71, 0x0c, 0x2b, 0x05, 0x6a, 0x44, 0x57, 0x78, 0x9f, 0x32, 0xb2, 0x37, 0x37, - 0xaa, 0x1b, 0xd9, 0x78, 0x83, 0x3c, 0xcf, 0xc8, 0xf1, 0xca, 0x88, 0xd0, 0xdc, 0xa8, 0x6e, 0x8c, - 0xc3, 0xdb, 0x4b, 0x8f, 0x16, 0x76, 0xd8, 0x9f, 0x59, 0xef, 0xd2, 0xdf, 0x27, 0x6d, 0xfa, 0x9f, - 0xd6, 0xf5, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0xdb, 0x12, 0xfa, 0x38, 0xe8, 0x1a, 0x00, 0x00, +var fileDescriptor_group_23d97c4cd172f0ff = []byte{ + // 1492 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0xcb, 0x6f, 0x1c, 0x45, + 0x13, 0xd7, 0xec, 0xc3, 0xf1, 0x96, 0x1f, 0x6b, 0x77, 0x62, 0x67, 0xbe, 0x89, 0xbf, 0xc8, 0x19, + 0xa1, 0xc8, 0x8a, 0x90, 0x2d, 0x39, 0x08, 0x09, 0x25, 0x42, 0x71, 0xfc, 0x48, 0x16, 0xb0, 0xad, + 0x8c, 0x37, 0x17, 0x2e, 0x66, 0xb2, 0xd3, 0x59, 0x0d, 0x3b, 0x3b, 0x33, 0x3b, 0x3d, 0x8b, 0x13, + 0x2e, 0x80, 0x90, 0xe0, 0x80, 0x80, 0x5c, 0x39, 0x72, 0x80, 0x23, 0xe2, 0xc0, 0x9d, 0x03, 0xff, + 0x18, 0xea, 0xc7, 0xcc, 0xf6, 0xf4, 0x3c, 0x76, 0x65, 0x4b, 0xe4, 0xb2, 0xda, 0xae, 0xaa, 0xee, + 0x7a, 0x74, 0xd5, 0xaf, 0x6a, 0x1a, 0x56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05, 0x97, 0x84, 0xa8, 0x0b, 0xd7, 0xfb, 0xf9, 0x9e, + 0x8e, 0x8a, 0x77, 0xa5, 0x37, 0x7b, 0xbb, 0x8a, 0x4d, 0x42, 0xf4, 0x14, 0xda, 0x83, 0x6c, 0xab, + 0x42, 0xc9, 0x0b, 0x65, 0xbe, 0x63, 0x1b, 0x46, 0x19, 0x2b, 0x75, 0x59, 0xc1, 0x7e, 0xd9, 0xe5, + 0x7c, 0x3b, 0x92, 0x5d, 0x2e, 0x6a, 0x1a, 0x27, 0xb0, 0xea, 0xaa, 0xa0, 0x88, 0x6e, 0x25, 0x38, + 0x56, 0x80, 0xf2, 0xc6, 0x46, 0x39, 0x93, 0x9f, 0xd7, 0x57, 0xf1, 0x24, 0x3d, 0xaf, 0x08, 0xfa, + 0x8c, 0x8d, 0x72, 0x26, 0x09, 0x1f, 0xb7, 0x3f, 0x5d, 0xda, 0xe6, 0x6f, 0xd6, 0x0f, 0xd8, 0xef, + 0x8b, 0x39, 0xf6, 0x20, 0x7d, 0xff, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xd5, 0x63, 0xdb, + 0xcf, 0x16, 0x00, 0x00, } diff --git a/pkg/proto/group/group.proto b/pkg/proto/group/group.proto index 5b3deb002..f81b9da41 100644 --- a/pkg/proto/group/group.proto +++ b/pkg/proto/group/group.proto @@ -1,4 +1,5 @@ syntax = "proto3"; +import "Open_IM/pkg/proto/sdk_ws/ws.proto"; option go_package = "./group;group"; package group; @@ -7,58 +8,54 @@ message CommonResp{ string ErrMsg = 2; } -message CreateGroupReq{ - repeated GroupAddMemberInfo memberList = 1; - string groupName = 2; - string introduction = 3; - string notification = 4; - string faceUrl = 5; - string token = 6; - string operationID = 7; - string OpUserID = 8; - string Ext = 9; +message GroupAddMemberInfo{ + string UserID = 1; + int32 Role = 2; } - -message GroupAddMemberInfo{ - string uid = 1; - int32 setRole = 2; +message CreateGroupReq{ + repeated GroupAddMemberInfo InitMemberList = 1; // + string GroupName = 2; + string Introduction = 3; + string Notification = 4; + string FaceUrl = 5; + string Ext = 6; + string OperationID = 7; + string OpUserID = 8; + string FromUserID = 9; } message CreateGroupResp{ int32 ErrCode = 1; string ErrMsg = 2; - string groupID = 3; + open_im_sdk.GroupInfo GroupInfo = 3; } message GetGroupsInfoReq{ - repeated string groupIDList = 1; - string token = 2; - string operationID = 3; - string OpUserID = 4; + repeated string GroupIDList = 1; + string OperationID = 2; + string OpUserID = 3; } message GetGroupsInfoResp{ int32 ErrCode = 1; string ErrMsg = 2; - repeated GroupInfo data = 3; + repeated open_im_sdk.GroupInfo GroupInfoList = 3; } + message SetGroupInfoReq{ - string groupID = 1; - string groupName = 2; - string notification = 3; - string introduction = 4; - string faceUrl = 5; - string token = 6; - string operationID = 7; - string OpUserID = 8; + open_im_sdk.GroupInfo GroupInfo = 1; + string OpUserID = 2; + string FromUserID = 3; + string OperationID = 4; } - +//owner or manager message GetGroupApplicationListReq { string OpUserID = 1; string OperationID = 2; + string FromUserID = 3; //owner or manager } message GetGroupApplicationList_Data_User { @@ -93,21 +90,17 @@ message GetGroupApplicationListResp { message TransferGroupOwnerReq { string GroupID = 1; - string OldOwner = 2; - string NewOwner = 3; + string OldOwnerUserID = 2; + string NewOwnerUserID = 3; string OperationID = 4; string OpUserID = 5; } -message TransferGroupOwnerResp{ - int32 ErrCode = 1; - string ErrMsg = 2; -} message JoinGroupReq{ - string groupID = 1; - string message = 2; - string token = 3; + string GroupID = 1; + string ReqMessage = 2; + string FromUserID = 3; string OperationID = 4; string OpUserID = 5; } @@ -117,166 +110,124 @@ message GroupApplicationResponseReq{ string OpUserID = 2; string GroupID = 3; string FromUserID = 4; //请求加群:请求者,邀请加群:邀请人 - string FromUserNickName = 5; - string FromUserFaceUrl = 6; string ToUserID = 7; //请求加群:0,邀请加群:被邀请人 - string ToUserNickName = 8; - string ToUserFaceUrl = 9; int64 AddTime = 10; - string RequestMsg = 11; string HandledMsg = 12; - int32 Type = 13; - int32 HandleStatus = 14; - int32 HandleResult = 15; + // int32 Type = 13; +// int32 HandleStatus = 14; + int32 HandleResult = 15; } -message GroupApplicationResponseResp{ - int32 ErrCode = 1; - string ErrMsg = 2; -} + message SetOwnerGroupNickNameReq{ - string groupID = 1; - string nickName = 2; + string GroupID = 1; + string Nickname = 2; string OperationID = 3; - string token = 4; + string FromUserID = 4; string OpUserID = 5; } message QuitGroupReq{ - string groupID = 1; - string operationID = 2; - string token = 3; + string GroupID = 1; + string OperationID = 2; + string FromUserID = 3; string OpUserID = 4; } -message GroupApplicationUserInfo{ - string groupID = 1; - string uid = 2; - string name = 3; - string icon = 4; - string reqMsg = 5; - int64 applicationTime = 6; - int32 flag = 7; - string operatorID = 8; - string handledMsg = 9; -} - -message GroupMemberFullInfo { - string userId = 1; - int32 role = 2; - uint64 joinTime = 3; - string nickName = 4; - string faceUrl = 5; -} message GetGroupMemberListReq { - string groupID = 1; - string token = 2; - string operationID = 3; - int32 filter = 4; - int32 nextSeq = 5; - string OpUserID = 6; + string GroupID = 1; + string OpUserID = 2; + string OperationID = 3; + int32 Filter = 4; + int32 NextSeq = 5; } message GetGroupMemberListResp { int32 ErrCode = 1; string ErrMsg = 2; - repeated GroupMemberFullInfo memberList = 3; + repeated open_im_sdk.GroupMemberFullInfo memberList = 3; int32 nextSeq = 4; } message GetGroupMembersInfoReq { - string groupID = 1; + string GroupID = 1; repeated string memberList = 2; - string token = 3; - string operationID = 4; - string OpUserID = 5; + string OpUserID = 3; + string OperationID = 4; } message GetGroupMembersInfoResp { int32 ErrCode = 1; string ErrMsg = 2; - repeated GroupMemberFullInfo memberList = 3; - + repeated open_im_sdk.GroupMemberFullInfo memberList = 3; } message KickGroupMemberReq { - string groupID = 1; - repeated GroupMemberFullInfo uidListInfo = 2; - string reason = 3; - string token = 4; - string operationID = 5; + string GroupID = 1; + repeated string KickedUserIDList = 2; + string Reason = 3; + string OperationID = 5; string OpUserID = 6; } message Id2Result { - string uId = 1; - int32 result = 2; //0 ok; -1 error + string UserID = 1; + int32 Result = 2; //0 ok; -1 error } message KickGroupMemberResp { int32 ErrCode = 1; string ErrMsg = 2; - repeated Id2Result id2result = 3; + repeated Id2Result Id2ResultList = 3; } -message getJoinedGroupListReq { - string token = 1; +message GetJoinedGroupListReq { + string FromUserID = 1; string operationID = 2; string OpUserID = 3; } -message GroupInfo { - string groupId = 1; - string groupName = 2; - string notification = 3; - string introduction = 4; - string faceUrl = 5; - uint64 createTime = 6; - string ownerId = 7; - uint32 memberCount = 8; -} -message getJoinedGroupListResp{ +message GetJoinedGroupListResp{ int32 ErrCode = 1; - string ErrorMsg = 2; - repeated GroupInfo GroupList = 3; + string ErrMsg = 2; + repeated open_im_sdk.GroupInfo GroupList = 3; } -message inviteUserToGroupReq { - string token = 1; - string operationID = 2; - string groupID = 3; - string reason = 4; - repeated string uidList = 5; +message InviteUserToGroupReq { + string OperationID = 2; + string GroupID = 3; + string Reason = 4; + repeated string InvitedUserIDList = 5; string OpUserID = 6; } -message inviteUserToGroupResp { +message InviteUserToGroupResp { int32 ErrCode = 1; string ErrMsg = 2; - repeated Id2Result Id2Result = 3; // 0 ok, -1 error + repeated Id2Result Id2ResultList = 3; // 0 ok, -1 error } + message GetGroupAllMemberReq { - string groupID = 1; - string token = 2; - string operationID = 3; - string OpUserID = 4; + string GroupID = 1; + string OpUserID = 2; + string OperationID = 3; } message GetGroupAllMemberResp { int32 ErrCode = 1; string ErrMsg = 2; - repeated GroupMemberFullInfo memberList = 3; + repeated open_im_sdk.GroupMemberFullInfo memberList = 3; } @@ -288,14 +239,14 @@ service group{ rpc getGroupsInfo(GetGroupsInfoReq) returns(GetGroupsInfoResp); rpc setGroupInfo(SetGroupInfoReq) returns(CommonResp); rpc getGroupApplicationList(GetGroupApplicationListReq) returns(GetGroupApplicationListResp); - rpc transferGroupOwner(TransferGroupOwnerReq) returns(TransferGroupOwnerResp); - rpc groupApplicationResponse(GroupApplicationResponseReq) returns(GroupApplicationResponseResp); + rpc transferGroupOwner(TransferGroupOwnerReq) returns(CommonResp); + rpc groupApplicationResponse(GroupApplicationResponseReq) returns(CommonResp); // rpc setOwnerGroupNickName(SetOwnerGroupNickNameReq) returns(CommonResp); rpc getGroupMemberList(GetGroupMemberListReq) returns(GetGroupMemberListResp); rpc getGroupMembersInfo(GetGroupMembersInfoReq) returns(GetGroupMembersInfoResp); rpc kickGroupMember(KickGroupMemberReq) returns (KickGroupMemberResp); - rpc getJoinedGroupList(getJoinedGroupListReq) returns (getJoinedGroupListResp); - rpc inviteUserToGroup(inviteUserToGroupReq) returns (inviteUserToGroupResp); + rpc getJoinedGroupList(GetJoinedGroupListReq) returns (GetJoinedGroupListResp); + rpc inviteUserToGroup(InviteUserToGroupReq) returns (InviteUserToGroupResp); rpc getGroupAllMember(GetGroupAllMemberReq) returns(GetGroupAllMemberResp); } diff --git a/pkg/proto/sdk_ws/ws.pb.go b/pkg/proto/sdk_ws/ws.pb.go index 1ce815b28..4e7bd82bc 100644 --- a/pkg/proto/sdk_ws/ws.pb.go +++ b/pkg/proto/sdk_ws/ws.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: sdk_ws/ws.proto -package open_im_sdk // import "./sdk_ws" +package open_im_sdk import proto "github.com/golang/protobuf/proto" import fmt "fmt" @@ -32,7 +32,7 @@ func (m *PullMessageBySeqListResp) Reset() { *m = PullMessageBySeqListRe func (m *PullMessageBySeqListResp) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListResp) ProtoMessage() {} func (*PullMessageBySeqListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{0} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{0} } func (m *PullMessageBySeqListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListResp.Unmarshal(m, b) @@ -91,7 +91,7 @@ func (m *PullMessageBySeqListReq) Reset() { *m = PullMessageBySeqListReq func (m *PullMessageBySeqListReq) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListReq) ProtoMessage() {} func (*PullMessageBySeqListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{1} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{1} } func (m *PullMessageBySeqListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListReq.Unmarshal(m, b) @@ -128,7 +128,7 @@ func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} } func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqReq) ProtoMessage() {} func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{2} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{2} } func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) @@ -160,7 +160,7 @@ func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} } func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqResp) ProtoMessage() {} func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{3} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{3} } func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) @@ -208,7 +208,7 @@ func (m *GatherFormat) Reset() { *m = GatherFormat{} } func (m *GatherFormat) String() string { return proto.CompactTextString(m) } func (*GatherFormat) ProtoMessage() {} func (*GatherFormat) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{4} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{4} } func (m *GatherFormat) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GatherFormat.Unmarshal(m, b) @@ -276,7 +276,7 @@ func (m *MsgFormat) Reset() { *m = MsgFormat{} } func (m *MsgFormat) String() string { return proto.CompactTextString(m) } func (*MsgFormat) ProtoMessage() {} func (*MsgFormat) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{5} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{5} } func (m *MsgFormat) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgFormat.Unmarshal(m, b) @@ -401,7 +401,7 @@ func (m *UserSendMsgReq) Reset() { *m = UserSendMsgReq{} } func (m *UserSendMsgReq) String() string { return proto.CompactTextString(m) } func (*UserSendMsgReq) ProtoMessage() {} func (*UserSendMsgReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{6} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{6} } func (m *UserSendMsgReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserSendMsgReq.Unmarshal(m, b) @@ -511,7 +511,7 @@ func (m *UserSendMsgResp) Reset() { *m = UserSendMsgResp{} } func (m *UserSendMsgResp) String() string { return proto.CompactTextString(m) } func (*UserSendMsgResp) ProtoMessage() {} func (*UserSendMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{7} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{7} } func (m *UserSendMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserSendMsgResp.Unmarshal(m, b) @@ -580,7 +580,7 @@ func (m *MsgData) Reset() { *m = MsgData{} } func (m *MsgData) String() string { return proto.CompactTextString(m) } func (*MsgData) ProtoMessage() {} func (*MsgData) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{8} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{8} } func (m *MsgData) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgData.Unmarshal(m, b) @@ -741,7 +741,7 @@ func (m *OfflinePushInfo) Reset() { *m = OfflinePushInfo{} } func (m *OfflinePushInfo) String() string { return proto.CompactTextString(m) } func (*OfflinePushInfo) ProtoMessage() {} func (*OfflinePushInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{9} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{9} } func (m *OfflinePushInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OfflinePushInfo.Unmarshal(m, b) @@ -815,7 +815,7 @@ func (m *GroupInfo) Reset() { *m = GroupInfo{} } func (m *GroupInfo) String() string { return proto.CompactTextString(m) } func (*GroupInfo) ProtoMessage() {} func (*GroupInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{10} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{10} } func (m *GroupInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfo.Unmarshal(m, b) @@ -909,7 +909,7 @@ func (m *GroupMemberFullInfo) Reset() { *m = GroupMemberFullInfo{} } func (m *GroupMemberFullInfo) String() string { return proto.CompactTextString(m) } func (*GroupMemberFullInfo) ProtoMessage() {} func (*GroupMemberFullInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{11} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{11} } func (m *GroupMemberFullInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupMemberFullInfo.Unmarshal(m, b) @@ -996,7 +996,7 @@ func (m *UserInfo) Reset() { *m = UserInfo{} } func (m *UserInfo) String() string { return proto.CompactTextString(m) } func (*UserInfo) ProtoMessage() {} func (*UserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{12} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{12} } func (m *UserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserInfo.Unmarshal(m, b) @@ -1080,7 +1080,7 @@ func (m *PublicUserInfo) Reset() { *m = PublicUserInfo{} } func (m *PublicUserInfo) String() string { return proto.CompactTextString(m) } func (*PublicUserInfo) ProtoMessage() {} func (*PublicUserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{13} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{13} } func (m *PublicUserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PublicUserInfo.Unmarshal(m, b) @@ -1140,7 +1140,7 @@ func (m *TipsComm) Reset() { *m = TipsComm{} } func (m *TipsComm) String() string { return proto.CompactTextString(m) } func (*TipsComm) ProtoMessage() {} func (*TipsComm) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{14} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{14} } func (m *TipsComm) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TipsComm.Unmarshal(m, b) @@ -1189,7 +1189,7 @@ func (m *MemberEnterTips) Reset() { *m = MemberEnterTips{} } func (m *MemberEnterTips) String() string { return proto.CompactTextString(m) } func (*MemberEnterTips) ProtoMessage() {} func (*MemberEnterTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{15} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{15} } func (m *MemberEnterTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberEnterTips.Unmarshal(m, b) @@ -1244,7 +1244,7 @@ func (m *MemberLeaveTips) Reset() { *m = MemberLeaveTips{} } func (m *MemberLeaveTips) String() string { return proto.CompactTextString(m) } func (*MemberLeaveTips) ProtoMessage() {} func (*MemberLeaveTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{16} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{16} } func (m *MemberLeaveTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberLeaveTips.Unmarshal(m, b) @@ -1299,7 +1299,7 @@ func (m *MemberInvitedTips) Reset() { *m = MemberInvitedTips{} } func (m *MemberInvitedTips) String() string { return proto.CompactTextString(m) } func (*MemberInvitedTips) ProtoMessage() {} func (*MemberInvitedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{17} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{17} } func (m *MemberInvitedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInvitedTips.Unmarshal(m, b) @@ -1361,7 +1361,7 @@ func (m *MemberKickedTips) Reset() { *m = MemberKickedTips{} } func (m *MemberKickedTips) String() string { return proto.CompactTextString(m) } func (*MemberKickedTips) ProtoMessage() {} func (*MemberKickedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{18} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{18} } func (m *MemberKickedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberKickedTips.Unmarshal(m, b) @@ -1424,7 +1424,7 @@ func (m *MemberInfoChangedTips) Reset() { *m = MemberInfoChangedTips{} } func (m *MemberInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*MemberInfoChangedTips) ProtoMessage() {} func (*MemberInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{19} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{19} } func (m *MemberInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInfoChangedTips.Unmarshal(m, b) @@ -1493,7 +1493,7 @@ func (m *GroupCreatedTips) Reset() { *m = GroupCreatedTips{} } func (m *GroupCreatedTips) String() string { return proto.CompactTextString(m) } func (*GroupCreatedTips) ProtoMessage() {} func (*GroupCreatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{20} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{20} } func (m *GroupCreatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupCreatedTips.Unmarshal(m, b) @@ -1554,7 +1554,7 @@ func (m *GroupInfoChangedTips) Reset() { *m = GroupInfoChangedTips{} } func (m *GroupInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*GroupInfoChangedTips) ProtoMessage() {} func (*GroupInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{21} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{21} } func (m *GroupInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfoChangedTips.Unmarshal(m, b) @@ -1608,7 +1608,7 @@ func (m *ReceiveJoinApplicationTips) Reset() { *m = ReceiveJoinApplicati func (m *ReceiveJoinApplicationTips) String() string { return proto.CompactTextString(m) } func (*ReceiveJoinApplicationTips) ProtoMessage() {} func (*ReceiveJoinApplicationTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{22} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{22} } func (m *ReceiveJoinApplicationTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ReceiveJoinApplicationTips.Unmarshal(m, b) @@ -1663,7 +1663,7 @@ func (m *ApplicationProcessedTips) Reset() { *m = ApplicationProcessedTi func (m *ApplicationProcessedTips) String() string { return proto.CompactTextString(m) } func (*ApplicationProcessedTips) ProtoMessage() {} func (*ApplicationProcessedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{23} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{23} } func (m *ApplicationProcessedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ApplicationProcessedTips.Unmarshal(m, b) @@ -1726,7 +1726,7 @@ func (m *FriendInfo) Reset() { *m = FriendInfo{} } func (m *FriendInfo) String() string { return proto.CompactTextString(m) } func (*FriendInfo) ProtoMessage() {} func (*FriendInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{24} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{24} } func (m *FriendInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfo.Unmarshal(m, b) @@ -1787,7 +1787,7 @@ func (m *FriendApplication) Reset() { *m = FriendApplication{} } func (m *FriendApplication) String() string { return proto.CompactTextString(m) } func (*FriendApplication) ProtoMessage() {} func (*FriendApplication) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{25} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{25} } func (m *FriendApplication) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplication.Unmarshal(m, b) @@ -1843,7 +1843,7 @@ func (m *FriendApplicationAddedTips) Reset() { *m = FriendApplicationAdd func (m *FriendApplicationAddedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationAddedTips) ProtoMessage() {} func (*FriendApplicationAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{26} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{26} } func (m *FriendApplicationAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationAddedTips.Unmarshal(m, b) @@ -1906,7 +1906,7 @@ func (m *FriendApplicationProcessedTips) Reset() { *m = FriendApplicatio func (m *FriendApplicationProcessedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationProcessedTips) ProtoMessage() {} func (*FriendApplicationProcessedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{27} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{27} } func (m *FriendApplicationProcessedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationProcessedTips.Unmarshal(m, b) @@ -1966,7 +1966,7 @@ func (m *FriendAddedTips) Reset() { *m = FriendAddedTips{} } func (m *FriendAddedTips) String() string { return proto.CompactTextString(m) } func (*FriendAddedTips) ProtoMessage() {} func (*FriendAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{28} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{28} } func (m *FriendAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendAddedTips.Unmarshal(m, b) @@ -2012,7 +2012,7 @@ func (m *FriendDeletedTips) Reset() { *m = FriendDeletedTips{} } func (m *FriendDeletedTips) String() string { return proto.CompactTextString(m) } func (*FriendDeletedTips) ProtoMessage() {} func (*FriendDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{29} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{29} } func (m *FriendDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendDeletedTips.Unmarshal(m, b) @@ -2059,7 +2059,7 @@ func (m *BlackInfo) Reset() { *m = BlackInfo{} } func (m *BlackInfo) String() string { return proto.CompactTextString(m) } func (*BlackInfo) ProtoMessage() {} func (*BlackInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{30} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{30} } func (m *BlackInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackInfo.Unmarshal(m, b) @@ -2112,7 +2112,7 @@ func (m *BlackAddedTips) Reset() { *m = BlackAddedTips{} } func (m *BlackAddedTips) String() string { return proto.CompactTextString(m) } func (*BlackAddedTips) ProtoMessage() {} func (*BlackAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{31} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{31} } func (m *BlackAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackAddedTips.Unmarshal(m, b) @@ -2158,7 +2158,7 @@ func (m *BlackDeletedTips) Reset() { *m = BlackDeletedTips{} } func (m *BlackDeletedTips) String() string { return proto.CompactTextString(m) } func (*BlackDeletedTips) ProtoMessage() {} func (*BlackDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{32} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{32} } func (m *BlackDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackDeletedTips.Unmarshal(m, b) @@ -2205,7 +2205,7 @@ func (m *FriendInfoChangedTips) Reset() { *m = FriendInfoChangedTips{} } func (m *FriendInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*FriendInfoChangedTips) ProtoMessage() {} func (*FriendInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{33} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{33} } func (m *FriendInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfoChangedTips.Unmarshal(m, b) @@ -2260,7 +2260,7 @@ func (m *SelfInfoUpdatedTips) Reset() { *m = SelfInfoUpdatedTips{} } func (m *SelfInfoUpdatedTips) String() string { return proto.CompactTextString(m) } func (*SelfInfoUpdatedTips) ProtoMessage() {} func (*SelfInfoUpdatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{34} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{34} } func (m *SelfInfoUpdatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SelfInfoUpdatedTips.Unmarshal(m, b) @@ -2341,124 +2341,124 @@ func init() { proto.RegisterType((*SelfInfoUpdatedTips)(nil), "open_im_sdk.SelfInfoUpdatedTips") } -func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_a9634e8f434358ba) } +func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_ca4877c90b77c1e9) } -var fileDescriptor_ws_a9634e8f434358ba = []byte{ - // 1855 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x59, 0x5f, 0x6f, 0xdc, 0x5a, - 0x11, 0x97, 0xf7, 0x5f, 0xb2, 0xb3, 0x69, 0x92, 0xba, 0x6d, 0xae, 0x29, 0x57, 0x55, 0xb0, 0x10, - 0x8a, 0xae, 0xae, 0x52, 0x91, 0x08, 0x71, 0xdb, 0x2b, 0xe0, 0x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, 0x0d, 0x99, 0x4d, 0xd1, 0xb7, 0xc7, 0xd0, 0x12, 0x90, 0x0c, 0xff, 0x93, 0x39, 0xd5, - 0x17, 0xa1, 0x8b, 0xe7, 0xaa, 0xa7, 0xda, 0x3c, 0x4f, 0x3f, 0xcb, 0xa9, 0xd9, 0x65, 0x21, 0xcb, - 0x3e, 0xac, 0xaf, 0x5f, 0x1b, 0xd0, 0x3e, 0x0c, 0x5d, 0x6f, 0x44, 0x83, 0xfb, 0xa4, 0x3a, 0xb8, - 0xd7, 0xef, 0xb3, 0x72, 0x7c, 0x6f, 0x1a, 0xd3, 0x27, 0xd2, 0x8f, 0x32, 0xa5, 0xd7, 0x1f, 0x5d, - 0x68, 0xdb, 0x3e, 0xac, 0x93, 0x50, 0x16, 0xfe, 0x73, 0x68, 0x12, 0x32, 0x77, 0x0f, 0x16, 0xe9, - 0x38, 0x42, 0x69, 0xc1, 0x4a, 0x0c, 0x60, 0x93, 0xd4, 0xd5, 0xa2, 0x7f, 0x08, 0x3f, 0xbf, 0x31, - 0xe0, 0x41, 0xd9, 0x2e, 0xf5, 0x23, 0xb9, 0x74, 0x8b, 0xf7, 0x67, 0x16, 0xfc, 0x42, 0xe3, 0xb3, - 0xd8, 0xdd, 0xfb, 0xf7, 0x06, 0xdc, 0xeb, 0xb3, 0x70, 0x80, 0xa6, 0xaf, 0xc6, 0x7e, 0x71, 0x67, - 0x79, 0x02, 0x6b, 0x08, 0xe7, 0xa7, 0x5e, 0xbf, 0xdd, 0x35, 0xd5, 0x0f, 0x18, 0xed, 0xe1, 0xd6, - 0x4f, 0xef, 0xef, 0x3e, 0x16, 0xff, 0xe5, 0xf9, 0x52, 0x39, 0xf4, 0x4d, 0x8b, 0xfe, 0xdf, 0xb3, - 0xff, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x45, 0x72, 0x9b, 0x6e, 0x02, 0x1a, 0x00, 0x00, +var fileDescriptor_ws_ca4877c90b77c1e9 = []byte{ + // 1841 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x59, 0xdd, 0x6f, 0xdc, 0x5a, + 0x11, 0x97, 0xf7, 0x2b, 0xd9, 0xd9, 0x34, 0x49, 0xdd, 0x8f, 0x6b, 0xca, 0x55, 0x15, 0x2c, 0x84, + 0xa2, 0xab, 0xab, 0x5c, 0x91, 0x08, 0x71, 0x5b, 0x04, 0xdc, 0x24, 0x9b, 0x44, 0x5b, 0x9a, 0x6e, + 0xe4, 0x6d, 0xc5, 0x63, 0xe5, 0xda, 0x67, 0x37, 0x66, 0xfd, 0xb1, 0xf1, 0xf1, 0x6e, 0xdb, 0xbf, + 0x04, 0x09, 0x09, 0x09, 0xc4, 0x03, 0x42, 0xbc, 0x20, 0x84, 0xf8, 0x23, 0x10, 0xe2, 0x8f, 0x40, + 0xf0, 0xc8, 0x0b, 0xaf, 0x08, 0x09, 0xcd, 0x9c, 0x63, 0xfb, 0x9c, 0xf5, 0x92, 0xec, 0xe6, 0xaa, + 0x7d, 0xf3, 0xfc, 0x3c, 0x73, 0xe6, 0xeb, 0x37, 0xe3, 0x93, 0x0d, 0x6c, 0x71, 0x7f, 0xfc, 0xfa, + 0x2d, 0xff, 0xe2, 0x2d, 0xdf, 0x9b, 0xa4, 0x49, 0x96, 0x98, 0x9d, 0x64, 0xc2, 0xe2, 0xd7, 0x41, + 0xf4, 0x9a, 0xfb, 0x63, 0xfb, 0x2f, 0x06, 0x58, 0x17, 0xd3, 0x30, 0x3c, 0x67, 0x9c, 0xbb, 0x23, + 0x76, 0xf4, 0x7e, 0xc0, 0xae, 0x9e, 0x07, 0x3c, 0x73, 0x18, 0x9f, 0x98, 0x0f, 0xa1, 0x75, 0xee, + 0xbe, 0x1b, 0xb0, 0x2b, 0xcb, 0xd8, 0x31, 0x76, 0xeb, 0x8e, 0x94, 0x08, 0x0f, 0x62, 0xc4, 0x6b, + 0x12, 0x27, 0xc9, 0xf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xf9, 0x7e, 0xc2, 0xac, 0x06, 0xbd, + 0x55, 0x21, 0xd4, 0x18, 0xb0, 0x74, 0x46, 0x45, 0xee, 0x75, 0xad, 0x26, 0x1d, 0xac, 0x42, 0x78, + 0xba, 0x34, 0xb0, 0x5a, 0xf4, 0x36, 0x17, 0xcd, 0x6d, 0xa8, 0x63, 0x59, 0xd6, 0xa8, 0x2c, 0xf8, + 0x68, 0x3e, 0x82, 0x75, 0x8c, 0xf5, 0x65, 0x10, 0x31, 0x6b, 0x9d, 0xe0, 0x42, 0x36, 0x3f, 0x83, + 0x6d, 0x7c, 0x66, 0xe9, 0x45, 0xe8, 0x66, 0xc3, 0x24, 0x8d, 0x7a, 0x5d, 0xab, 0x4d, 0x01, 0x55, + 0x70, 0xf3, 0x3b, 0xb0, 0x29, 0xb0, 0x17, 0x81, 0x37, 0x7e, 0xe1, 0x46, 0xcc, 0x02, 0x72, 0x3d, + 0x87, 0x9a, 0xdf, 0x86, 0x3b, 0x02, 0x39, 0x75, 0x3d, 0xf6, 0xca, 0x79, 0x6e, 0x75, 0x48, 0x4d, + 0x07, 0xa9, 0x0a, 0x61, 0xc0, 0xe2, 0x4c, 0xe4, 0xb8, 0x21, 0x72, 0x54, 0x20, 0xfb, 0x6f, 0x75, + 0xd8, 0x44, 0xa6, 0xa1, 0xdd, 0x39, 0x1f, 0x21, 0xab, 0x8e, 0x60, 0xad, 0x3f, 0xc9, 0x82, 0x24, + 0xe6, 0xc4, 0xaa, 0xce, 0xfe, 0xae, 0xd6, 0x41, 0x5d, 0x7b, 0x4f, 0xaa, 0x9e, 0xc4, 0x59, 0xfa, + 0xde, 0xc9, 0x0d, 0x17, 0xa4, 0x51, 0x5b, 0x2e, 0x8d, 0xfa, 0xa2, 0x34, 0x1e, 0x03, 0x28, 0xa5, + 0x13, 0xbd, 0x54, 0x10, 0xd1, 0x4a, 0xce, 0x83, 0x24, 0xa6, 0x66, 0x37, 0x45, 0xb3, 0x15, 0x48, + 0x25, 0x4a, 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xd7, 0x39, 0xf8, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x4b, 0x94, 0x7a, 0xcf, 0xea, 0x19, 0x00, + 0x00, } diff --git a/pkg/proto/sdk_ws/ws.proto b/pkg/proto/sdk_ws/ws.proto index 8d6713f75..c0f93c5ad 100644 --- a/pkg/proto/sdk_ws/ws.proto +++ b/pkg/proto/sdk_ws/ws.proto @@ -1,6 +1,6 @@ syntax = "proto3"; package open_im_sdk;//The package name to which the proto file belongs -option go_package = "./sdk_ws;open_im_sdk";//The generated go pb file is in the current directory, and the package name is open_im_sdk +//option go_package = "./sdk_ws;open_im_sdk";//The generated go pb file is in the current directory, and the package name is open_im_sdk message PullMessageBySeqListResp { @@ -110,6 +110,7 @@ message GroupInfo{ PublicUserInfo Owner = 6; uint64 CreateTime = 7; uint32 MemberCount = 8; + string Ext = 9; } @@ -133,6 +134,7 @@ message UserInfo{ string Mobile = 5; string Birth = 6; string Email = 7; + string Ext = 8; } //No permissions required From 5f09d6a26fc30303b4f047177bd143a7640f9f2d Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 23 Dec 2021 17:34:32 +0800 Subject: [PATCH 019/337] send msg file modify --- cmd/open_im_api/main.go | 2 +- cmd/rpc/open_im_msg/main.go | 2 +- internal/api/chat/send_msg.go | 16 +- internal/msg_gateway/gate/logic.go | 48 +- internal/msg_gateway/gate/rpc_server.go | 80 +-- internal/msg_gateway/gate/ws_server.go | 155 +++-- internal/msg_transfer/logic/db.go | 12 +- .../msg_transfer/logic/history_msg_handler.go | 109 ++-- .../logic/persistent_msg_handler.go | 32 +- internal/push/logic/push_handler.go | 24 +- internal/push/logic/push_rpc_server.go | 18 +- internal/push/logic/push_to_client.go | 199 +++--- internal/rpc/{chat => msg}/pull_message.go | 34 +- internal/rpc/{chat => msg}/rpcChat.go | 2 +- pkg/common/db/mongoModel.go | 81 +-- .../im_mysql_msg_model/chat_log_model.go | 27 +- pkg/proto/chat/chat.proto | 118 ++-- pkg/proto/sdk_ws/ws.pb.go | 607 ++++++------------ pkg/proto/sdk_ws/ws.proto | 99 +-- pkg/utils/map.go | 6 +- 20 files changed, 682 insertions(+), 989 deletions(-) rename internal/rpc/{chat => msg}/pull_message.go (81%) rename internal/rpc/{chat => msg}/rpcChat.go (99%) diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index f27e53277..d199bcdbb 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -75,7 +75,7 @@ func main() { thirdGroup.POST("/tencent_cloud_storage_credential", apiThird.TencentCloudStorageCredential) } //Message - chatGroup := r.Group("/chat") + chatGroup := r.Group("/msg") { chatGroup.POST("/newest_seq", apiChat.UserGetSeq) chatGroup.POST("/pull_msg", apiChat.UserPullMsg) diff --git a/cmd/rpc/open_im_msg/main.go b/cmd/rpc/open_im_msg/main.go index 0dffe8aaa..7344facf4 100644 --- a/cmd/rpc/open_im_msg/main.go +++ b/cmd/rpc/open_im_msg/main.go @@ -1,7 +1,7 @@ package main import ( - rpcChat "Open_IM/internal/rpc/chat" + rpcChat "Open_IM/internal/rpc/msg" "flag" ) diff --git a/internal/api/chat/send_msg.go b/internal/api/chat/send_msg.go index e48582eb1..310be2ec2 100644 --- a/internal/api/chat/send_msg.go +++ b/internal/api/chat/send_msg.go @@ -34,8 +34,8 @@ type paramsUserSendMsg struct { } } -func newUserSendMsgReq(token string, params *paramsUserSendMsg) *pbChat.UserSendMsgReq { - pbData := pbChat.UserSendMsgReq{ +func newUserSendMsgReq(token string, params *paramsUserSendMsg) *pbChat.SendMsgReq { + pbData := pbChat.SendMsgReq{ ReqIdentifier: params.ReqIdentifier, Token: token, SendID: params.SendID, @@ -70,20 +70,20 @@ func UserSendMsg(c *gin.Context) { log.InfoByKv("api call success to sendMsgReq", params.OperationID, "Parameters", params) pbData := newUserSendMsgReq(token, ¶ms) - log.Info("", "", "api UserSendMsg call start..., [data: %s]", pbData.String()) + log.Info("", "", "api SendMsg call start..., [data: %s]", pbData.String()) etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfflineMessageName) client := pbChat.NewChatClient(etcdConn) - log.Info("", "", "api UserSendMsg call, api call rpc...") + log.Info("", "", "api SendMsg call, api call rpc...") - reply, err := client.UserSendMsg(context.Background(), pbData) + reply, err := client.SendMsg(context.Background(), pbData) if err != nil { - log.NewError(params.OperationID, "UserSendMsg rpc failed, ", params, err.Error()) - c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "UserSendMsg rpc failed, " + err.Error()}) + log.NewError(params.OperationID, "SendMsg rpc failed, ", params, err.Error()) + c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "SendMsg rpc failed, " + err.Error()}) return } - log.Info("", "", "api UserSendMsg call end..., [data: %s] [reply: %s]", pbData.String(), reply.String()) + log.Info("", "", "api SendMsg call end..., [data: %s] [reply: %s]", pbData.String(), reply.String()) c.JSON(http.StatusOK, gin.H{ "errCode": reply.ErrCode, diff --git a/internal/msg_gateway/gate/logic.go b/internal/msg_gateway/gate/logic.go index 9b449d4b2..9838d0808 100644 --- a/internal/msg_gateway/gate/logic.go +++ b/internal/msg_gateway/gate/logic.go @@ -6,7 +6,7 @@ import ( "Open_IM/pkg/common/log" "Open_IM/pkg/grpc-etcdv3/getcdv3" pbChat "Open_IM/pkg/proto/chat" - open_im_sdk "Open_IM/pkg/proto/sdk_ws" + sdk_ws "Open_IM/pkg/proto/sdk_ws" "Open_IM/pkg/utils" "bytes" "context" @@ -86,7 +86,7 @@ func (ws *WServer) getSeqReq(conn *UserConn, m *Req) { } } func (ws *WServer) getSeqResp(conn *UserConn, m *Req, pb *pbChat.GetMaxAndMinSeqResp) { - var mReplyData open_im_sdk.GetMaxAndMinSeqResp + var mReplyData sdk_ws.GetMaxAndMinSeqResp mReplyData.MaxSeq = pb.GetMaxSeq() mReplyData.MinSeq = pb.GetMinSeq() b, _ := proto.Marshal(&mReplyData) @@ -131,7 +131,7 @@ func (ws *WServer) pullMsgReq(conn *UserConn, m *Req) { } func (ws *WServer) pullMsgResp(conn *UserConn, m *Req, pb *pbChat.PullMessageResp) { log.NewInfo(m.OperationID, "pullMsgResp come here ", pb.String()) - var mReplyData open_im_sdk.PullMessageBySeqListResp + var mReplyData sdk_ws.PullMessageBySeqListResp a, err := json.Marshal(pb.SingleUserMsg) if err != nil { log.NewError(m.OperationID, "GetSingleUserMsg,json marshal,err", err.Error()) @@ -170,10 +170,10 @@ func (ws *WServer) pullMsgBySeqListReq(conn *UserConn, m *Req) { log.NewInfo(m.OperationID, "Ws call success to pullMsgBySeqListReq start", m.SendID, m.ReqIdentifier, m.MsgIncr) nReply := new(pbChat.PullMessageResp) isPass, errCode, errMsg, data := ws.argsValidate(m, constant.WSPullMsgBySeqList) - log.NewInfo(m.OperationID, "Ws call success to pullMsgBySeqListReq middle", m.SendID, m.ReqIdentifier, m.MsgIncr, data.(open_im_sdk.PullMessageBySeqListReq).SeqList) + log.NewInfo(m.OperationID, "Ws call success to pullMsgBySeqListReq middle", m.SendID, m.ReqIdentifier, m.MsgIncr, data.(sdk_ws.PullMessageBySeqListReq).SeqList) if isPass { pbData := pbChat.PullMessageBySeqListReq{} - pbData.SeqList = data.(open_im_sdk.PullMessageBySeqListReq).SeqList + pbData.SeqList = data.(sdk_ws.PullMessageBySeqListReq).SeqList pbData.UserID = m.SendID pbData.OperationID = m.OperationID grpcConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfflineMessageName) @@ -196,32 +196,20 @@ func (ws *WServer) pullMsgBySeqListReq(conn *UserConn, m *Req) { } func (ws *WServer) sendMsgReq(conn *UserConn, m *Req, sendTime int64) { log.NewInfo(m.OperationID, "Ws call success to sendMsgReq start", m.MsgIncr, m.ReqIdentifier, m.SendID, sendTime) - nReply := new(pbChat.UserSendMsgResp) + nReply := new(pbChat.SendMsgResp) isPass, errCode, errMsg, pData := ws.argsValidate(m, constant.WSSendMsg) if isPass { - data := pData.(open_im_sdk.UserSendMsgReq) - pbData := pbChat.UserSendMsgReq{ - ReqIdentifier: m.ReqIdentifier, - Token: m.Token, - SendID: m.SendID, - OperationID: m.OperationID, - PlatformID: data.PlatformID, - SessionType: data.SessionType, - MsgFrom: data.MsgFrom, - ContentType: data.ContentType, - RecvID: data.RecvID, - ForceList: data.ForceList, - SenderNickName: data.SenderNickName, - SenderFaceURL: data.SenderFaceURL, - Content: data.Content, - Options: utils.MapIntToJsonString(data.Options), - ClientMsgID: data.ClientMsgID, - SendTime: sendTime, + data := pData.(sdk_ws.MsgData) + data.SendTime = sendTime + pbData := pbChat.SendMsgReq{ + Token: m.Token, + OperationID: m.OperationID, + MsgData: &data, } log.NewInfo(m.OperationID, "Ws call success to sendMsgReq middle", m.ReqIdentifier, m.SendID, m.MsgIncr, data) etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfflineMessageName) client := pbChat.NewChatClient(etcdConn) - reply, err := client.UserSendMsg(context.Background(), &pbData) + reply, err := client.SendMsg(context.Background(), &pbData) if err != nil { log.NewError(pbData.OperationID, "UserSendMsg err", err.Error()) nReply.ErrCode = 200 @@ -239,10 +227,10 @@ func (ws *WServer) sendMsgReq(conn *UserConn, m *Req, sendTime int64) { } } -func (ws *WServer) sendMsgResp(conn *UserConn, m *Req, pb *pbChat.UserSendMsgResp, sendTime int64) { +func (ws *WServer) sendMsgResp(conn *UserConn, m *Req, pb *pbChat.SendMsgResp, sendTime int64) { // := make(map[string]interface{}) - var mReplyData open_im_sdk.UserSendMsgResp + var mReplyData sdk_ws.UserSendMsgResp mReplyData.ClientMsgID = pb.GetClientMsgID() mReplyData.ServerMsgID = pb.GetServerMsgID() mReplyData.SendTime = sendTime @@ -263,12 +251,14 @@ func (ws *WServer) sendMsg(conn *UserConn, mReply interface{}) { enc := gob.NewEncoder(&b) err := enc.Encode(mReply) if err != nil { - log.NewError(mReply.(Resp).OperationID, mReply.(Resp).ReqIdentifier, mReply.(Resp).ErrCode, mReply.(Resp).ErrMsg, "Encode Msg error", conn.RemoteAddr().String(), ws.getUserUid(conn), err.Error()) + uid, platform := ws.getUserUid(conn) + log.NewError(mReply.(Resp).OperationID, mReply.(Resp).ReqIdentifier, mReply.(Resp).ErrCode, mReply.(Resp).ErrMsg, "Encode Msg error", conn.RemoteAddr().String(), uid, platform, err.Error()) return } err = ws.writeMsg(conn, websocket.BinaryMessage, b.Bytes()) if err != nil { - log.NewError(mReply.(Resp).OperationID, mReply.(Resp).ReqIdentifier, mReply.(Resp).ErrCode, mReply.(Resp).ErrMsg, "WS WriteMsg error", conn.RemoteAddr().String(), ws.getUserUid(conn), err.Error()) + uid, platform := ws.getUserUid(conn) + log.NewError(mReply.(Resp).OperationID, mReply.(Resp).ReqIdentifier, mReply.(Resp).ErrCode, mReply.(Resp).ErrMsg, "WS WriteMsg error", conn.RemoteAddr().String(), uid, platform, err.Error()) } } func (ws *WServer) sendErrMsg(conn *UserConn, errCode int32, errMsg string, reqIdentifier int32, msgIncr string, operationID string) { diff --git a/internal/msg_gateway/gate/rpc_server.go b/internal/msg_gateway/gate/rpc_server.go index a3ef373d6..4c9c03f34 100644 --- a/internal/msg_gateway/gate/rpc_server.go +++ b/internal/msg_gateway/gate/rpc_server.go @@ -6,7 +6,6 @@ import ( "Open_IM/pkg/common/log" "Open_IM/pkg/grpc-etcdv3/getcdv3" pbRelay "Open_IM/pkg/proto/relay" - open_im_sdk "Open_IM/pkg/proto/sdk_ws" "Open_IM/pkg/utils" "bytes" "context" @@ -55,26 +54,10 @@ func (r *RPCServer) run() { return } } -func (r *RPCServer) MsgToUser(_ context.Context, in *pbRelay.MsgToUserReq) (*pbRelay.MsgToUserResp, error) { +func (r *RPCServer) OnlinePushMsg(_ context.Context, in *pbRelay.OnlinePushMsgReq) (*pbRelay.OnlinePushMsgResp, error) { log.InfoByKv("PushMsgToUser is arriving", in.OperationID, "args", in.String()) var resp []*pbRelay.SingleMsgToUser - var RecvID string - msg := open_im_sdk.MsgData{ - SendID: in.SendID, - RecvID: in.RecvID, - MsgFrom: in.MsgFrom, - ContentType: in.ContentType, - SessionType: in.SessionType, - SenderNickName: in.SenderNickName, - SenderFaceURL: in.SenderFaceURL, - ClientMsgID: in.ClientMsgID, - ServerMsgID: in.ServerMsgID, - Content: in.Content, - Seq: in.RecvSeq, - SendTime: in.SendTime, - SenderPlatformID: in.PlatformID, - } - msgBytes, _ := proto.Marshal(&msg) + msgBytes, _ := proto.Marshal(in.MsgData) mReply := Resp{ ReqIdentifier: constant.WSPushMsg, OperationID: in.OperationID, @@ -86,65 +69,52 @@ func (r *RPCServer) MsgToUser(_ context.Context, in *pbRelay.MsgToUserReq) (*pbR if err != nil { log.NewError(in.OperationID, "data encode err", err.Error()) } - switch in.GetSessionType() { - case constant.SingleChatType: - RecvID = in.GetRecvID() - case constant.GroupChatType: - RecvID = strings.Split(in.GetRecvID(), " ")[0] - } var tag bool - var UIDAndPID []string - userIDList := genUidPlatformArray(RecvID) - for _, v := range userIDList { - UIDAndPID = strings.Split(v, " ") - if conn := ws.getUserConn(v); conn != nil { + recvID := in.MsgData.RecvID + platformList := genPlatformArray() + for _, v := range platformList { + if conn := ws.getUserConn(recvID, v); conn != nil { tag = true - resultCode := sendMsgToUser(conn, replyBytes.Bytes(), in, UIDAndPID[1], UIDAndPID[0]) + resultCode := sendMsgToUser(conn, replyBytes.Bytes(), in, v, recvID) temp := &pbRelay.SingleMsgToUser{ ResultCode: resultCode, - RecvID: UIDAndPID[0], - RecvPlatFormID: constant.PlatformNameToID(UIDAndPID[1]), + RecvID: recvID, + RecvPlatFormID: constant.PlatformNameToID(v), } resp = append(resp, temp) } else { temp := &pbRelay.SingleMsgToUser{ ResultCode: -1, - RecvID: UIDAndPID[0], - RecvPlatFormID: constant.PlatformNameToID(UIDAndPID[1]), + RecvID: recvID, + RecvPlatFormID: constant.PlatformNameToID(v), } resp = append(resp, temp) } } //Single chat sender synchronization message - if in.GetSessionType() == constant.SingleChatType && in.ContentType <= constant.Quote && in.ContentType != constant.Typing && in.ContentType != constant.HasReadReceipt { - userIDList = genUidPlatformArray(in.SendID) - for _, v := range userIDList { - UIDAndPID = strings.Split(v, " ") - if conn := ws.getUserConn(v); conn != nil { - _ = sendMsgToUser(conn, replyBytes.Bytes(), in, UIDAndPID[1], UIDAndPID[0]) - } + if in.MsgData.GetSessionType() == constant.SingleChatType { + for k, v := range ws.getSingleUserAllConn(recvID) { + _ = sendMsgToUser(v, replyBytes.Bytes(), in, k, recvID) } } if !tag { log.NewError(in.OperationID, "push err ,no matched ws conn not in map", in.String()) } - return &pbRelay.MsgToUserResp{ + return &pbRelay.OnlinePushMsgResp{ Resp: resp, }, nil } func (r *RPCServer) GetUsersOnlineStatus(_ context.Context, req *pbRelay.GetUsersOnlineStatusReq) (*pbRelay.GetUsersOnlineStatusResp, error) { log.NewDebug(req.OperationID, "rpc GetUsersOnlineStatus arrived server", req.String()) - var UIDAndPID []string var resp pbRelay.GetUsersOnlineStatusResp - for _, v1 := range req.UserIDList { - userIDList := genUidPlatformArray(v1) + for _, userID := range req.UserIDList { + platformList := genPlatformArray() temp := new(pbRelay.GetUsersOnlineStatusResp_SuccessResult) - temp.UserID = v1 - for _, v2 := range userIDList { - UIDAndPID = strings.Split(v2, " ") - if conn := ws.getUserConn(v2); conn != nil { + temp.UserID = userID + for _, platform := range platformList { + if conn := ws.getUserConn(userID, platform); conn != nil { ps := new(pbRelay.GetUsersOnlineStatusResp_SuccessDetail) - ps.Platform = UIDAndPID[1] + ps.Platform = platform ps.Status = constant.OnlineStatus temp.Status = constant.OnlineStatus temp.DetailPlatformStatus = append(temp.DetailPlatformStatus, ps) @@ -157,11 +127,11 @@ func (r *RPCServer) GetUsersOnlineStatus(_ context.Context, req *pbRelay.GetUser } return &resp, nil } -func sendMsgToUser(conn *UserConn, bMsg []byte, in *pbRelay.MsgToUserReq, RecvPlatForm, RecvID string) (ResultCode int64) { +func sendMsgToUser(conn *UserConn, bMsg []byte, in *pbRelay.OnlinePushMsgReq, RecvPlatForm, RecvID string) (ResultCode int64) { err := ws.writeMsg(conn, websocket.BinaryMessage, bMsg) if err != nil { log.ErrorByKv("PushMsgToUser is failed By Ws", "", "Addr", conn.RemoteAddr().String(), - "error", err, "senderPlatform", constant.PlatformIDToName(in.PlatformID), "recvPlatform", RecvPlatForm, "args", in.String(), "recvID", RecvID) + "error", err, "senderPlatform", constant.PlatformIDToName(in.MsgData.SenderPlatformID), "recvPlatform", RecvPlatForm, "args", in.String(), "recvID", RecvID) ResultCode = -2 return ResultCode } else { @@ -171,9 +141,9 @@ func sendMsgToUser(conn *UserConn, bMsg []byte, in *pbRelay.MsgToUserReq, RecvPl } } -func genUidPlatformArray(uid string) (array []string) { +func genPlatformArray() (array []string) { for i := 1; i <= constant.LinuxPlatformID; i++ { - array = append(array, uid+" "+constant.PlatformIDToName(int32(i))) + array = append(array, constant.PlatformIDToName(int32(i))) } return array } diff --git a/internal/msg_gateway/gate/ws_server.go b/internal/msg_gateway/gate/ws_server.go index fc6151cf1..150a11b64 100644 --- a/internal/msg_gateway/gate/ws_server.go +++ b/internal/msg_gateway/gate/ws_server.go @@ -9,6 +9,7 @@ import ( "Open_IM/pkg/utils" "bytes" "encoding/gob" + "github.com/garyburd/redigo/redis" "net/http" "sync" "time" @@ -24,15 +25,15 @@ type WServer struct { wsAddr string wsMaxConnNum int wsUpGrader *websocket.Upgrader - wsConnToUser map[*UserConn]string - wsUserToConn map[string]*UserConn + wsConnToUser map[*UserConn]map[string]string + wsUserToConn map[string]map[string]*UserConn } func (ws *WServer) onInit(wsPort int) { ws.wsAddr = ":" + utils.IntToString(wsPort) ws.wsMaxConnNum = config.Config.LongConnSvr.WebsocketMaxConnNum - ws.wsConnToUser = make(map[*UserConn]string) - ws.wsUserToConn = make(map[string]*UserConn) + ws.wsConnToUser = make(map[*UserConn]map[string]string) + ws.wsUserToConn = make(map[string]map[string]*UserConn) ws.wsUpGrader = &websocket.Upgrader{ HandshakeTimeout: time.Duration(config.Config.LongConnSvr.WebsocketTimeOut) * time.Second, ReadBufferSize: config.Config.LongConnSvr.WebsocketMaxMsgLen, @@ -74,7 +75,8 @@ func (ws *WServer) readMsg(conn *UserConn) { log.NewInfo("", "this is a pingMessage") } if err != nil { - log.ErrorByKv("WS ReadMsg error", "", "userIP", conn.RemoteAddr().String(), "userUid", ws.getUserUid(conn), "error", err) + uid, platform := ws.getUserUid(conn) + log.ErrorByKv("WS ReadMsg error", "", "userIP", conn.RemoteAddr().String(), "userUid", uid, "platform", platform, "error", err.Error()) ws.delUserConn(conn) return } else { @@ -94,34 +96,43 @@ func (ws *WServer) writeMsg(conn *UserConn, a int, msg []byte) error { func (ws *WServer) MultiTerminalLoginChecker(uid string, platformID int32, newConn *UserConn, token string) { switch config.Config.MultiLoginPolicy { case constant.AllLoginButSameTermKick: - if oldConn, ok := ws.wsUserToConn[genMapKey(uid, platformID)]; ok { - log.NewDebug("", uid, platformID, "kick old conn") - ws.sendKickMsg(oldConn, newConn) - m, err := db.DB.GetTokenMapByUidPid(uid, constant.PlatformIDToName(platformID)) - if err != nil { - log.NewError("", "get token from redis err", err.Error()) - return - } - if m == nil { - log.NewError("", "get token from redis err", "m is nil") - return - } - for k, _ := range m { - if k != token { - m[k] = constant.KickedToken + if oldConnMap, ok := ws.wsUserToConn[uid]; ok { + if oldConn, ok := oldConnMap[constant.PlatformIDToName(platformID)]; ok { + log.NewDebug("", uid, platformID, "kick old conn") + ws.sendKickMsg(oldConn, newConn) + m, err := db.DB.GetTokenMapByUidPid(uid, constant.PlatformIDToName(platformID)) + if err != nil && err != redis.ErrNil { + log.NewError("", "get token from redis err", err.Error()) + return } + if m == nil { + log.NewError("", "get token from redis err", "m is nil") + return + } + for k, _ := range m { + if k != token { + m[k] = constant.KickedToken + } + } + log.NewDebug("get map is ", m) + err = db.DB.SetTokenMapByUidPid(uid, platformID, m) + if err != nil { + log.NewError("", "SetTokenMapByUidPid err", err.Error()) + return + } + err = oldConn.Close() + delete(oldConnMap, constant.PlatformIDToName(platformID)) + ws.wsUserToConn[uid] = oldConnMap + if len(oldConnMap) == 0 { + delete(ws.wsUserToConn, uid) + } + delete(ws.wsConnToUser, oldConn) + if err != nil { + log.NewError("", "conn close err", err.Error()) + } + } - log.NewDebug("get map is ", m) - err = db.DB.SetTokenMapByUidPid(uid, platformID, m) - if err != nil { - log.NewError("", "SetTokenMapByUidPid err", err.Error()) - return - } - err = oldConn.Close() - delete(ws.wsConnToUser, oldConn) - if err != nil { - log.NewError("", "conn close err", err.Error()) - } + } else { log.NewDebug("no other conn", ws.wsUserToConn) } @@ -149,53 +160,97 @@ func (ws *WServer) sendKickMsg(oldConn, newConn *UserConn) { } } func (ws *WServer) addUserConn(uid string, platformID int32, conn *UserConn, token string) { - key := genMapKey(uid, platformID) rwLock.Lock() defer rwLock.Unlock() ws.MultiTerminalLoginChecker(uid, platformID, conn, token) - ws.wsConnToUser[conn] = key - ws.wsUserToConn[key] = conn - log.WarnByKv("WS Add operation", "", "wsUser added", ws.wsUserToConn, "uid", uid, "online_num", len(ws.wsUserToConn)) + if oldConnMap, ok := ws.wsUserToConn[uid]; ok { + oldConnMap[constant.PlatformIDToName(platformID)] = conn + ws.wsUserToConn[uid] = oldConnMap + } else { + i := make(map[string]*UserConn) + i[constant.PlatformIDToName(platformID)] = conn + ws.wsUserToConn[uid] = i + } + if oldStringMap, ok := ws.wsConnToUser[conn]; ok { + oldStringMap[constant.PlatformIDToName(platformID)] = uid + ws.wsConnToUser[conn] = oldStringMap + } else { + i := make(map[string]string) + i[constant.PlatformIDToName(platformID)] = uid + ws.wsConnToUser[conn] = i + } + count := 0 + for _, v := range ws.wsUserToConn { + count = count + len(v) + } + log.WarnByKv("WS Add operation", "", "wsUser added", ws.wsUserToConn, "uid", uid, "online_user_num", len(ws.wsUserToConn), "online_conn_num", count) } func (ws *WServer) delUserConn(conn *UserConn) { rwLock.Lock() defer rwLock.Unlock() - var uidPlatform string - if uid, ok := ws.wsConnToUser[conn]; ok { - uidPlatform = uid - if _, ok = ws.wsUserToConn[uid]; ok { - delete(ws.wsUserToConn, uid) - log.WarnByKv("WS delete operation", "", "wsUser deleted", ws.wsUserToConn, "uid", uid, "online_num", len(ws.wsUserToConn)) + var platform, uid string + if oldStringMap, ok := ws.wsConnToUser[conn]; ok { + for k, v := range oldStringMap { + platform = k + uid = v + } + if oldConnMap, ok := ws.wsUserToConn[uid]; ok { + delete(oldConnMap, platform) + ws.wsUserToConn[uid] = oldConnMap + if len(oldConnMap) == 0 { + delete(ws.wsUserToConn, uid) + } + count := 0 + for _, v := range ws.wsUserToConn { + count = count + len(v) + } + log.WarnByKv("WS delete operation", "", "wsUser deleted", ws.wsUserToConn, "uid", uid, "online_user_num", len(ws.wsUserToConn), "online_conn_num", count) } else { - log.WarnByKv("uid not exist", "", "wsUser deleted", ws.wsUserToConn, "uid", uid, "online_num", len(ws.wsUserToConn)) + log.WarnByKv("WS delete operation", "", "wsUser deleted", ws.wsUserToConn, "uid", uid, "online_user_num", len(ws.wsUserToConn)) } delete(ws.wsConnToUser, conn) + } err := conn.Close() if err != nil { - log.ErrorByKv("close err", "", "uid", uidPlatform) + log.ErrorByKv("close err", "", "uid", uid, "platform", platform) + } } -func (ws *WServer) getUserConn(uid string) *UserConn { +func (ws *WServer) getUserConn(uid string, platform string) *UserConn { rwLock.RLock() defer rwLock.RUnlock() - if conn, ok := ws.wsUserToConn[uid]; ok { - return conn + if connMap, ok := ws.wsUserToConn[uid]; ok { + if conn, flag := connMap[platform]; flag { + return conn + } } return nil } -func (ws *WServer) getUserUid(conn *UserConn) string { +func (ws *WServer) getSingleUserAllConn(uid string) map[string]*UserConn { + rwLock.RLock() + defer rwLock.RUnlock() + if connMap, ok := ws.wsUserToConn[uid]; ok { + return connMap + } + return nil +} +func (ws *WServer) getUserUid(conn *UserConn) (uid, platform string) { rwLock.RLock() defer rwLock.RUnlock() - if uid, ok := ws.wsConnToUser[conn]; ok { - return uid + if stringMap, ok := ws.wsConnToUser[conn]; ok { + for k, v := range stringMap { + platform = k + uid = v + } + return uid, platform } - return "" + return "", "" } func (ws *WServer) headerCheck(w http.ResponseWriter, r *http.Request) bool { status := http.StatusUnauthorized diff --git a/internal/msg_transfer/logic/db.go b/internal/msg_transfer/logic/db.go index 3d6e0e3f6..bd1972386 100644 --- a/internal/msg_transfer/logic/db.go +++ b/internal/msg_transfer/logic/db.go @@ -8,16 +8,18 @@ import ( "Open_IM/pkg/utils" ) -func saveUserChat(uid string, pbMsg *pbMsg.MsgSvrToPushSvrChatMsg) error { +func saveUserChat(uid string, msg *pbMsg.MsgDataToMQ) error { time := utils.GetCurrentTimestampByMill() seq, err := db.DB.IncrUserSeq(uid) if err != nil { - log.NewError(pbMsg.OperationID, "data insert to redis err", err.Error(), pbMsg.String()) + log.NewError(msg.OperationID, "data insert to redis err", err.Error(), msg.String()) return err } - pbMsg.RecvSeq = seq - log.NewInfo(pbMsg.OperationID, "IncrUserSeq cost time", utils.GetCurrentTimestampByMill()-time) - return db.DB.SaveUserChat(uid, pbMsg.SendTime, pbMsg) + msg.MsgData.Seq = seq + pbSaveData := pbMsg.MsgDataToDB{} + pbSaveData.MsgData = msg.MsgData + log.NewInfo(msg.OperationID, "IncrUserSeq cost time", utils.GetCurrentTimestampByMill()-time) + return db.DB.SaveUserChat(uid, pbSaveData.MsgData.SendTime, &pbSaveData) } func getGroupList(groupID string) ([]string, error) { diff --git a/internal/msg_transfer/logic/history_msg_handler.go b/internal/msg_transfer/logic/history_msg_handler.go index 4b25bd9bc..01677cdb0 100644 --- a/internal/msg_transfer/logic/history_msg_handler.go +++ b/internal/msg_transfer/logic/history_msg_handler.go @@ -32,80 +32,60 @@ func (mc *HistoryConsumerHandler) Init() { } func (mc *HistoryConsumerHandler) handleChatWs2Mongo(msg []byte, msgKey string) { - log.InfoByKv("chat come mongo!!!", "", "chat", string(msg)) + log.InfoByKv("msg come mongo!!!", "", "msg", string(msg)) time := utils.GetCurrentTimestampByNano() - pbData := pbMsg.WSToMsgSvrChatMsg{} - err := proto.Unmarshal(msg, &pbData) + msgFromMQ := pbMsg.MsgDataToMQ{} + err := proto.Unmarshal(msg, &msgFromMQ) if err != nil { - log.ErrorByKv("msg_transfer Unmarshal chat err", "", "chat", string(msg), "err", err.Error()) + log.ErrorByKv("msg_transfer Unmarshal msg err", "", "msg", string(msg), "err", err.Error()) return } - pbSaveData := pbMsg.MsgSvrToPushSvrChatMsg{} - pbSaveData.SendID = pbData.SendID - pbSaveData.SenderNickName = pbData.SenderNickName - pbSaveData.SenderFaceURL = pbData.SenderFaceURL - pbSaveData.ClientMsgID = pbData.ClientMsgID - pbSaveData.SendTime = pbData.SendTime - pbSaveData.Content = pbData.Content - pbSaveData.MsgFrom = pbData.MsgFrom - pbSaveData.ContentType = pbData.ContentType - pbSaveData.SessionType = pbData.SessionType - pbSaveData.MsgID = pbData.MsgID - pbSaveData.OperationID = pbData.OperationID - pbSaveData.RecvID = pbData.RecvID - pbSaveData.PlatformID = pbData.PlatformID - options := utils.JsonStringToMap(pbData.Options) + operationID := msgFromMQ.OperationID //Control whether to store offline messages (mongo) - isHistory := utils.GetSwitchFromOptions(options, "history") + isHistory := utils.GetSwitchFromOptions(msgFromMQ.MsgData.Options, constant.IsHistory) //Control whether to store history messages (mysql) - isPersist := utils.GetSwitchFromOptions(options, "persistent") - switch pbData.SessionType { + isPersist := utils.GetSwitchFromOptions(msgFromMQ.MsgData.Options, constant.IsPersistent) + switch msgFromMQ.MsgData.SessionType { case constant.SingleChatType: - log.NewDebug(pbSaveData.OperationID, "msg_transfer chat type = SingleChatType", isHistory, isPersist) + log.NewDebug(msgFromMQ.OperationID, "msg_transfer msg type = SingleChatType", isHistory, isPersist) if isHistory { - if msgKey == pbSaveData.RecvID { - err := saveUserChat(pbData.RecvID, &pbSaveData) + if msgKey == msgFromMQ.MsgData.RecvID { + err := saveUserChat(msgFromMQ.MsgData.RecvID, &msgFromMQ) if err != nil { - log.NewError(pbSaveData.OperationID, "single data insert to mongo err", err.Error(), pbSaveData.String()) + log.NewError(operationID, "single data insert to mongo err", err.Error(), msgFromMQ.String()) return } - } else if msgKey == pbSaveData.SendID { - err := saveUserChat(pbData.SendID, &pbSaveData) + } else if msgKey == msgFromMQ.MsgData.SendID { + err := saveUserChat(msgFromMQ.MsgData.SendID, &msgFromMQ) if err != nil { - log.NewError(pbSaveData.OperationID, "single data insert to mongo err", err.Error(), pbSaveData.String()) + log.NewError(operationID, "single data insert to mongo err", err.Error(), msgFromMQ.String()) return } - } - log.NewDebug(pbSaveData.OperationID, "saveUserChat cost time ", utils.GetCurrentTimestampByNano()-time) + log.NewDebug(operationID, "saveUserChat cost time ", utils.GetCurrentTimestampByNano()-time) } - if msgKey == pbSaveData.RecvID { - pbSaveData.Options = pbData.Options - pbSaveData.OfflineInfo = pbData.OfflineInfo - go sendMessageToPush(&pbSaveData) - log.NewDebug(pbSaveData.OperationID, "sendMessageToPush cost time ", utils.GetCurrentTimestampByNano()-time) + if msgKey == msgFromMQ.MsgData.RecvID { + go sendMessageToPush(&msgFromMQ) + log.NewDebug(msgFromMQ.OperationID, "sendMessageToPush cost time ", utils.GetCurrentTimestampByNano()-time) } case constant.GroupChatType: - log.NewDebug(pbSaveData.OperationID, "msg_transfer chat type = GroupChatType", isHistory, isPersist) + log.NewDebug(msgFromMQ.OperationID, "msg_transfer msg type = GroupChatType", isHistory, isPersist) if isHistory { - uidAndGroupID := strings.Split(pbData.RecvID, " ") - err := saveUserChat(uidAndGroupID[0], &pbSaveData) + err := saveUserChat(msgFromMQ.MsgData.RecvID, &msgFromMQ) if err != nil { - log.NewError(pbSaveData.OperationID, "group data insert to mongo err", pbSaveData.String(), uidAndGroupID[0], err.Error()) + log.NewError(operationID, "group data insert to mongo err", msgFromMQ.String(), msgFromMQ.MsgData.RecvID, err.Error()) return } } - pbSaveData.Options = pbData.Options - pbSaveData.OfflineInfo = pbData.OfflineInfo - go sendMessageToPush(&pbSaveData) + go sendMessageToPush(&msgFromMQ) default: - log.NewError(pbSaveData.OperationID, "SessionType error", pbSaveData.String()) + log.NewError(msgFromMQ.OperationID, "SessionType error", msgFromMQ.String()) return } - log.NewDebug(pbSaveData.OperationID, "msg_transfer handle topic data to database success...", pbSaveData.String()) + log.NewDebug(msgFromMQ.OperationID, "msg_transfer handle topic data to database success...", msgFromMQ.String()) } func (HistoryConsumerHandler) Setup(_ sarama.ConsumerGroupSession) error { return nil } @@ -113,50 +93,35 @@ func (HistoryConsumerHandler) Cleanup(_ sarama.ConsumerGroupSession) error { ret func (mc *HistoryConsumerHandler) ConsumeClaim(sess sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error { for msg := range claim.Messages() { - log.InfoByKv("kafka get info to mongo", "", "msgTopic", msg.Topic, "msgPartition", msg.Partition, "chat", string(msg.Value)) + log.InfoByKv("kafka get info to mongo", "", "msgTopic", msg.Topic, "msgPartition", msg.Partition, "msg", string(msg.Value)) mc.msgHandle[msg.Topic](msg.Value, string(msg.Key)) sess.MarkMessage(msg, "") } return nil } -func sendMessageToPush(message *pbMsg.MsgSvrToPushSvrChatMsg) { +func sendMessageToPush(message *pbMsg.MsgDataToMQ) { log.InfoByKv("msg_transfer send message to push", message.OperationID, "message", message.String()) - msg := pbPush.PushMsgReq{} - msg.OperationID = message.OperationID - msg.PlatformID = message.PlatformID - msg.Content = message.Content - msg.ContentType = message.ContentType - msg.SessionType = message.SessionType - msg.RecvID = message.RecvID - msg.SendID = message.SendID - msg.SenderNickName = message.SenderNickName - msg.SenderFaceURL = message.SenderFaceURL - msg.ClientMsgID = message.ClientMsgID - msg.MsgFrom = message.MsgFrom - msg.Options = message.Options - msg.RecvSeq = message.RecvSeq - msg.SendTime = message.SendTime - msg.MsgID = message.MsgID - msg.OfflineInfo = message.OfflineInfo + rpcPushMsg := pbPush.PushMsgReq{OperationID: message.OperationID, MsgData: message.MsgData} + mqPushMsg := pbMsg.PushMsgDataToMQ{OperationID: message.OperationID, MsgData: message.MsgData} grpcConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImPushName) if grpcConn == nil { - log.ErrorByKv("rpc dial failed", msg.OperationID, "push data", msg.String()) - pid, offset, err := producer.SendMessage(message) + log.ErrorByKv("rpc dial failed", rpcPushMsg.OperationID, "push data", rpcPushMsg.String()) + pid, offset, err := producer.SendMessage(&mqPushMsg) if err != nil { - log.ErrorByKv("kafka send failed", msg.OperationID, "send data", message.String(), "pid", pid, "offset", offset, "err", err.Error()) + log.ErrorByKv("kafka send failed", mqPushMsg.OperationID, "send data", message.String(), "pid", pid, "offset", offset, "err", err.Error()) } return } msgClient := pbPush.NewPushMsgServiceClient(grpcConn) - _, err := msgClient.PushMsg(context.Background(), &msg) + _, err := msgClient.PushMsg(context.Background(), &rpcPushMsg) if err != nil { - log.ErrorByKv("rpc send failed", msg.OperationID, "push data", msg.String(), "err", err.Error()) - pid, offset, err := producer.SendMessage(message) + log.ErrorByKv("rpc send failed", rpcPushMsg.OperationID, "push data", rpcPushMsg.String(), "err", err.Error()) + pid, offset, err := producer.SendMessage(&mqPushMsg) if err != nil { - log.ErrorByKv("kafka send failed", msg.OperationID, "send data", message.String(), "pid", pid, "offset", offset, "err", err.Error()) + log.ErrorByKv("kafka send failed", mqPushMsg.OperationID, "send data", mqPushMsg.String(), "pid", pid, "offset", offset, "err", err.Error()) } } else { - log.InfoByKv("rpc send success", msg.OperationID, "push data", msg.String()) + log.InfoByKv("rpc send success", rpcPushMsg.OperationID, "push data", rpcPushMsg.String()) } } diff --git a/internal/msg_transfer/logic/persistent_msg_handler.go b/internal/msg_transfer/logic/persistent_msg_handler.go index 2a13bb4a2..c90901212 100644 --- a/internal/msg_transfer/logic/persistent_msg_handler.go +++ b/internal/msg_transfer/logic/persistent_msg_handler.go @@ -16,7 +16,6 @@ import ( "Open_IM/pkg/utils" "github.com/Shopify/sarama" "github.com/golang/protobuf/proto" - "strings" ) type PersistentConsumerHandler struct { @@ -32,30 +31,29 @@ func (pc *PersistentConsumerHandler) Init() { config.Config.Kafka.Ws2mschat.Addr, config.Config.Kafka.ConsumerGroupID.MsgToMySql) } + func (pc *PersistentConsumerHandler) handleChatWs2Mysql(msg []byte, msgKey string) { - log.InfoByKv("chat come here mysql!!!", "", "chat", string(msg)) - pbData := pbMsg.WSToMsgSvrChatMsg{} - err := proto.Unmarshal(msg, &pbData) + log.InfoByKv("msg come here mysql!!!", "", "msg", string(msg)) + msgFromMQ := pbMsg.MsgDataToMQ{} + err := proto.Unmarshal(msg, &msgFromMQ) if err != nil { - log.ErrorByKv("msg_transfer Unmarshal chat err", "", "chat", string(msg), "err", err.Error()) + log.ErrorByKv("msg_transfer Unmarshal msg err", "", "msg", string(msg), "err", err.Error()) return } - options := utils.JsonStringToMap(pbData.Options) //Control whether to store history messages (mysql) - isPersist := utils.GetSwitchFromOptions(options, "persistent") + isPersist := utils.GetSwitchFromOptions(msgFromMQ.MsgData.Options, constant.IsPersistent) //Only process receiver data if isPersist { - if msgKey == pbData.RecvID && pbData.SessionType == constant.SingleChatType { - log.InfoByKv("msg_transfer chat persisting", pbData.OperationID) - if err = im_mysql_msg_model.InsertMessageToChatLog(pbData); err != nil { - log.ErrorByKv("Message insert failed", pbData.OperationID, "err", err.Error(), "chat", pbData.String()) + if msgKey == msgFromMQ.MsgData.RecvID && msgFromMQ.MsgData.SessionType == constant.SingleChatType { + log.InfoByKv("msg_transfer msg persisting", msgFromMQ.OperationID) + if err = im_mysql_msg_model.InsertMessageToChatLog(msgFromMQ); err != nil { + log.ErrorByKv("Message insert failed", msgFromMQ.OperationID, "err", err.Error(), "msg", msgFromMQ.String()) return } - } else if pbData.SessionType == constant.GroupChatType && msgKey == "0" { - pbData.RecvID = strings.Split(pbData.RecvID, " ")[1] - log.InfoByKv("msg_transfer chat persisting", pbData.OperationID) - if err = im_mysql_msg_model.InsertMessageToChatLog(pbData); err != nil { - log.ErrorByKv("Message insert failed", pbData.OperationID, "err", err.Error(), "chat", pbData.String()) + } else if msgFromMQ.MsgData.SessionType == constant.GroupChatType && msgKey == msgFromMQ.MsgData.SendID { + log.InfoByKv("msg_transfer msg persisting", msgFromMQ.OperationID) + if err = im_mysql_msg_model.InsertMessageToChatLog(msgFromMQ); err != nil { + log.ErrorByKv("Message insert failed", msgFromMQ.OperationID, "err", err.Error(), "msg", msgFromMQ.String()) return } } @@ -67,7 +65,7 @@ func (PersistentConsumerHandler) Cleanup(_ sarama.ConsumerGroupSession) error { func (pc *PersistentConsumerHandler) ConsumeClaim(sess sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error { for msg := range claim.Messages() { - log.InfoByKv("kafka get info to mysql", "", "msgTopic", msg.Topic, "msgPartition", msg.Partition, "chat", string(msg.Value)) + log.InfoByKv("kafka get info to mysql", "", "msgTopic", msg.Topic, "msgPartition", msg.Partition, "msg", string(msg.Value)) pc.msgHandle[msg.Topic](msg.Value, string(msg.Key)) sess.MarkMessage(msg, "") } diff --git a/internal/push/logic/push_handler.go b/internal/push/logic/push_handler.go index 5058ce26d..294c48f15 100644 --- a/internal/push/logic/push_handler.go +++ b/internal/push/logic/push_handler.go @@ -11,8 +11,7 @@ import ( kfk "Open_IM/pkg/common/kafka" "Open_IM/pkg/common/log" pbChat "Open_IM/pkg/proto/chat" - pbRelay "Open_IM/pkg/proto/relay" - "Open_IM/pkg/utils" + pbPush "Open_IM/pkg/proto/push" "github.com/Shopify/sarama" "github.com/golang/protobuf/proto" ) @@ -33,28 +32,13 @@ func (ms *PushConsumerHandler) Init() { } func (ms *PushConsumerHandler) handleMs2PsChat(msg []byte) { log.InfoByKv("msg come from kafka And push!!!", "", "msg", string(msg)) - pbData := pbChat.MsgSvrToPushSvrChatMsg{} - if err := proto.Unmarshal(msg, &pbData); err != nil { + msgFromMQ := pbChat.PushMsgDataToMQ{} + if err := proto.Unmarshal(msg, &msgFromMQ); err != nil { log.ErrorByKv("push Unmarshal msg err", "", "msg", string(msg), "err", err.Error()) return } - sendPbData := pbRelay.MsgToUserReq{} - sendPbData.SendTime = pbData.SendTime - sendPbData.OperationID = pbData.OperationID - sendPbData.ServerMsgID = pbData.MsgID - sendPbData.MsgFrom = pbData.MsgFrom - sendPbData.ContentType = pbData.ContentType - sendPbData.SessionType = pbData.SessionType - sendPbData.RecvID = pbData.RecvID - sendPbData.Content = pbData.Content - sendPbData.SendID = pbData.SendID - sendPbData.SenderNickName = pbData.SenderNickName - sendPbData.SenderFaceURL = pbData.SenderFaceURL - sendPbData.ClientMsgID = pbData.ClientMsgID - sendPbData.PlatformID = pbData.PlatformID - sendPbData.RecvSeq = pbData.RecvSeq //Call push module to send message to the user - MsgToUser(&sendPbData, pbData.OfflineInfo, utils.JsonStringToMap(pbData.Options)) + MsgToUser((*pbPush.PushMsgReq)(&msgFromMQ)) } func (PushConsumerHandler) Setup(_ sarama.ConsumerGroupSession) error { return nil } func (PushConsumerHandler) Cleanup(_ sarama.ConsumerGroupSession) error { return nil } diff --git a/internal/push/logic/push_rpc_server.go b/internal/push/logic/push_rpc_server.go index 570f5c28b..b622ba721 100644 --- a/internal/push/logic/push_rpc_server.go +++ b/internal/push/logic/push_rpc_server.go @@ -5,7 +5,6 @@ import ( "Open_IM/pkg/common/log" "Open_IM/pkg/grpc-etcdv3/getcdv3" "Open_IM/pkg/proto/push" - pbRelay "Open_IM/pkg/proto/relay" "Open_IM/pkg/utils" "context" "google.golang.org/grpc" @@ -49,23 +48,8 @@ func (r *RPCServer) run() { } } func (r *RPCServer) PushMsg(_ context.Context, pbData *pbPush.PushMsgReq) (*pbPush.PushMsgResp, error) { - sendPbData := pbRelay.MsgToUserReq{} - sendPbData.SendTime = pbData.SendTime - sendPbData.OperationID = pbData.OperationID - sendPbData.ServerMsgID = pbData.MsgID - sendPbData.MsgFrom = pbData.MsgFrom - sendPbData.ContentType = pbData.ContentType - sendPbData.SenderNickName = pbData.SenderNickName - sendPbData.SenderFaceURL = pbData.SenderFaceURL - sendPbData.ClientMsgID = pbData.ClientMsgID - sendPbData.SessionType = pbData.SessionType - sendPbData.RecvID = pbData.RecvID - sendPbData.Content = pbData.Content - sendPbData.SendID = pbData.SendID - sendPbData.PlatformID = pbData.PlatformID - sendPbData.RecvSeq = pbData.RecvSeq //Call push module to send message to the user - MsgToUser(&sendPbData, pbData.OfflineInfo, utils.JsonStringToMap(pbData.Options)) + MsgToUser(pbData) return &pbPush.PushMsgResp{ ResultCode: 0, }, nil diff --git a/internal/push/logic/push_to_client.go b/internal/push/logic/push_to_client.go index b7c8c94af..e7cbf20e0 100644 --- a/internal/push/logic/push_to_client.go +++ b/internal/push/logic/push_to_client.go @@ -8,13 +8,11 @@ package logic import ( push "Open_IM/internal/push/jpush" - rpcChat "Open_IM/internal/rpc/chat" "Open_IM/pkg/common/config" "Open_IM/pkg/common/constant" "Open_IM/pkg/common/log" "Open_IM/pkg/grpc-etcdv3/getcdv3" - pbChat "Open_IM/pkg/proto/chat" - pbGroup "Open_IM/pkg/proto/group" + pbPush "Open_IM/pkg/proto/push" pbRelay "Open_IM/pkg/proto/relay" "Open_IM/pkg/utils" "context" @@ -34,122 +32,119 @@ type AtContent struct { IsAtSelf bool `json:"isAtSelf"` } -func MsgToUser(sendPbData *pbRelay.MsgToUserReq, OfflineInfo string, Options map[string]int32) { +func MsgToUser(pushMsg *pbPush.PushMsgReq) { var wsResult []*pbRelay.SingleMsgToUser - isOfflinePush := utils.GetSwitchFromOptions(Options, "offlinePush") - log.InfoByKv("Get chat from msg_transfer And push chat", sendPbData.OperationID, "PushData", sendPbData, Options, isOfflinePush) + isOfflinePush := utils.GetSwitchFromOptions(pushMsg.MsgData.Options, constant.IsOfflinePush) + log.InfoByKv("Get msg from msg_transfer And push msg", pushMsg.OperationID, "PushData", pushMsg.String()) grpcCons := getcdv3.GetConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOnlineMessageRelayName) //Online push message - log.InfoByKv("test", sendPbData.OperationID, "len grpc", len(grpcCons), "data", sendPbData) + log.InfoByKv("test", pushMsg.OperationID, "len grpc", len(grpcCons), "data", pushMsg.String()) for _, v := range grpcCons { msgClient := pbRelay.NewOnlineMessageRelayServiceClient(v) - reply, err := msgClient.MsgToUser(context.Background(), sendPbData) + reply, err := msgClient.OnlinePushMsg(context.Background(), &pbRelay.OnlinePushMsgReq{OperationID: pushMsg.OperationID, MsgData: pushMsg.MsgData}) if err != nil { - log.InfoByKv("push data to client rpc err", sendPbData.OperationID, "err", err) + log.InfoByKv("push data to client rpc err", pushMsg.OperationID, "err", err) continue } if reply != nil && reply.Resp != nil { wsResult = append(wsResult, reply.Resp...) } } - log.InfoByKv("push_result", sendPbData.OperationID, "result", wsResult, "sendData", sendPbData) - if sendPbData.ContentType != constant.Typing && sendPbData.ContentType != constant.HasReadReceipt { - if isOfflinePush { - for _, v := range wsResult { - if v.ResultCode == 0 { - continue - } - //supported terminal - for _, t := range pushTerminal { - if v.RecvPlatFormID == t { - //Use offline push messaging - var UIDList []string - UIDList = append(UIDList, v.RecvID) - customContent := OpenIMContent{ - SessionType: int(sendPbData.SessionType), - From: sendPbData.SendID, - To: sendPbData.RecvID, - Seq: sendPbData.RecvSeq, - } - bCustomContent, _ := json.Marshal(customContent) - jsonCustomContent := string(bCustomContent) - var content string - switch sendPbData.ContentType { - case constant.Text: - content = constant.ContentType2PushContent[constant.Text] - case constant.Picture: - content = constant.ContentType2PushContent[constant.Picture] - case constant.Voice: - content = constant.ContentType2PushContent[constant.Voice] - case constant.Video: - content = constant.ContentType2PushContent[constant.Video] - case constant.File: - content = constant.ContentType2PushContent[constant.File] - case constant.AtText: - a := AtContent{} - _ = utils.JsonStringToStruct(sendPbData.Content, &a) - if utils.IsContain(v.RecvID, a.AtUserList) { - content = constant.ContentType2PushContent[constant.AtText] + constant.ContentType2PushContent[constant.Common] - } else { - content = constant.ContentType2PushContent[constant.GroupMsg] - } - default: - content = constant.ContentType2PushContent[constant.Common] - } - pushResult, err := push.JGAccountListPush(UIDList, content, jsonCustomContent, constant.PlatformIDToName(t)) - if err != nil { - log.NewError(sendPbData.OperationID, "offline push error", sendPbData.String(), err.Error(), constant.PlatformIDToName(t)) - } else { - log.NewDebug(sendPbData.OperationID, "offline push return result is ", string(pushResult), sendPbData, constant.PlatformIDToName(t)) - } - + log.InfoByKv("push_result", pushMsg.OperationID, "result", wsResult, "sendData", pushMsg.MsgData) + if isOfflinePush { + for _, v := range wsResult { + if v.ResultCode == 0 { + continue + } + //supported terminal + for _, t := range pushTerminal { + if v.RecvPlatFormID == t { + //Use offline push messaging + var UIDList []string + UIDList = append(UIDList, v.RecvID) + customContent := OpenIMContent{ + SessionType: int(pushMsg.MsgData.SessionType), + From: pushMsg.MsgData.SendID, + To: pushMsg.MsgData.RecvID, + Seq: pushMsg.MsgData.Seq, } + bCustomContent, _ := json.Marshal(customContent) + jsonCustomContent := string(bCustomContent) + var content string + switch pushMsg.MsgData.ContentType { + case constant.Text: + content = constant.ContentType2PushContent[constant.Text] + case constant.Picture: + content = constant.ContentType2PushContent[constant.Picture] + case constant.Voice: + content = constant.ContentType2PushContent[constant.Voice] + case constant.Video: + content = constant.ContentType2PushContent[constant.Video] + case constant.File: + content = constant.ContentType2PushContent[constant.File] + case constant.AtText: + a := AtContent{} + _ = utils.JsonStringToStruct(string(pushMsg.MsgData.Content), &a) + if utils.IsContain(v.RecvID, a.AtUserList) { + content = constant.ContentType2PushContent[constant.AtText] + constant.ContentType2PushContent[constant.Common] + } else { + content = constant.ContentType2PushContent[constant.GroupMsg] + } + default: + content = constant.ContentType2PushContent[constant.Common] + } + pushResult, err := push.JGAccountListPush(UIDList, content, jsonCustomContent, constant.PlatformIDToName(t)) + if err != nil { + log.NewError(pushMsg.OperationID, "offline push error", pushMsg.String(), err.Error(), constant.PlatformIDToName(t)) + } else { + log.NewDebug(pushMsg.OperationID, "offline push return result is ", string(pushResult), pushMsg.MsgData, constant.PlatformIDToName(t)) + } + } } - } - } - -} - -func SendMsgByWS(m *pbChat.WSToMsgSvrChatMsg) { - m.MsgID = rpcChat.GetMsgID(m.SendID) - m.ClientMsgID = m.MsgID - switch m.SessionType { - case constant.SingleChatType: - sendMsgToKafka(m, m.SendID, "msgKey--sendID") - sendMsgToKafka(m, m.RecvID, "msgKey--recvID") - case constant.GroupChatType: - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) - client := pbGroup.NewGroupClient(etcdConn) - req := &pbGroup.GetGroupAllMemberReq{ - GroupID: m.RecvID, - Token: config.Config.Secret, - OperationID: m.OperationID, - } - reply, err := client.GetGroupAllMember(context.Background(), req) - if err != nil { - log.Error(m.Token, m.OperationID, "rpc getGroupInfo failed, err = %s", err.Error()) - return - } - if reply.ErrorCode != 0 { - log.Error(m.Token, m.OperationID, "rpc getGroupInfo failed, err = %s", reply.ErrorMsg) - return - } - groupID := m.RecvID - for i, v := range reply.MemberList { - m.RecvID = v.UserId + " " + groupID - sendMsgToKafka(m, utils.IntToString(i), "msgKey--recvID+\" \"+groupID") - } - default: } } -func sendMsgToKafka(m *pbChat.WSToMsgSvrChatMsg, key string, flag string) { - pid, offset, err := producer.SendMessage(m, key) - if err != nil { - log.ErrorByKv("kafka send failed", m.OperationID, "send data", m.String(), "pid", pid, "offset", offset, "err", err.Error(), flag, key) - } - -} +//func SendMsgByWS(m *pbChat.WSToMsgSvrChatMsg) { +// m.MsgID = rpcChat.GetMsgID(m.SendID) +// m.ClientMsgID = m.MsgID +// switch m.SessionType { +// case constant.SingleChatType: +// sendMsgToKafka(m, m.SendID, "msgKey--sendID") +// sendMsgToKafka(m, m.RecvID, "msgKey--recvID") +// case constant.GroupChatType: +// etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) +// client := pbGroup.NewGroupClient(etcdConn) +// req := &pbGroup.GetGroupAllMemberReq{ +// GroupID: m.RecvID, +// Token: config.Config.Secret, +// OperationID: m.OperationID, +// } +// reply, err := client.GetGroupAllMember(context.Background(), req) +// if err != nil { +// log.Error(m.Token, m.OperationID, "rpc getGroupInfo failed, err = %s", err.Error()) +// return +// } +// if reply.ErrorCode != 0 { +// log.Error(m.Token, m.OperationID, "rpc getGroupInfo failed, err = %s", reply.ErrorMsg) +// return +// } +// groupID := m.RecvID +// for i, v := range reply.MemberList { +// m.RecvID = v.UserId + " " + groupID +// sendMsgToKafka(m, utils.IntToString(i), "msgKey--recvID+\" \"+groupID") +// } +// default: +// +// } +//} +// +//func sendMsgToKafka(m *pbChat.WSToMsgSvrChatMsg, key string, flag string) { +// pid, offset, err := producer.SendMessage(m, key) +// if err != nil { +// log.ErrorByKv("kafka send failed", m.OperationID, "send data", m.String(), "pid", pid, "offset", offset, "err", err.Error(), flag, key) +// } +// +//} diff --git a/internal/rpc/chat/pull_message.go b/internal/rpc/msg/pull_message.go similarity index 81% rename from internal/rpc/chat/pull_message.go rename to internal/rpc/msg/pull_message.go index 725725037..dab729984 100644 --- a/internal/rpc/chat/pull_message.go +++ b/internal/rpc/msg/pull_message.go @@ -1,4 +1,4 @@ -package chat +package msg import ( "context" @@ -6,7 +6,7 @@ import ( commonDB "Open_IM/pkg/common/db" "Open_IM/pkg/common/log" - + "Open_IM/pkg/proto/sdk_ws" "sort" "strings" @@ -44,8 +44,8 @@ func (rpc *rpcChat) GetMaxAndMinSeq(_ context.Context, in *pbMsg.GetMaxAndMinSeq func (rpc *rpcChat) PullMessage(_ context.Context, in *pbMsg.PullMessageReq) (*pbMsg.PullMessageResp, error) { log.InfoByKv("rpc pullMessage is arriving", in.OperationID, "args", in.String()) resp := new(pbMsg.PullMessageResp) - var respSingleMsgFormat []*pbMsg.GatherFormat - var respGroupMsgFormat []*pbMsg.GatherFormat + var respSingleMsgFormat []*open_im_sdk.GatherFormat + var respGroupMsgFormat []*open_im_sdk.GatherFormat SingleMsgFormat, GroupMsgFormat, MaxSeq, MinSeq, err := commonDB.DB.GetMsgBySeqRange(in.UserID, in.SeqBegin, in.SeqEnd) if err != nil { log.ErrorByKv("pullMsg data error", in.OperationID, in.String()) @@ -60,15 +60,15 @@ func (rpc *rpcChat) PullMessage(_ context.Context, in *pbMsg.PullMessageReq) (*p ErrMsg: "", MaxSeq: MaxSeq, MinSeq: MinSeq, - SingleUserMsg: respSingleMsgFormat, + SingleUserMsg: []*pbMsg.GatherFormat(respSingleMsgFormat), GroupUserMsg: respGroupMsgFormat, }, nil } -func (rpc *rpcChat) PullMessageBySeqList(_ context.Context, in *pbMsg.PullMessageBySeqListReq) (*pbMsg.PullMessageResp, error) { +func (rpc *rpcChat) PullMessageBySeqList(_ context.Context, in *open_im_sdk.PullMessageBySeqListReq) (*open_im_sdk.PullMessageBySeqListResp, error) { log.NewInfo(in.OperationID, "rpc PullMessageBySeqList is arriving", in.String()) - resp := new(pbMsg.PullMessageResp) - var respSingleMsgFormat []*pbMsg.GatherFormat - var respGroupMsgFormat []*pbMsg.GatherFormat + resp := new(open_im_sdk.PullMessageBySeqListResp) + var respSingleMsgFormat []*open_im_sdk.GatherFormat + var respGroupMsgFormat []*open_im_sdk.GatherFormat SingleMsgFormat, GroupMsgFormat, MaxSeq, MinSeq, err := commonDB.DB.GetMsgBySeqList(in.UserID, in.SeqList) if err != nil { log.ErrorByKv("PullMessageBySeqList data error", in.OperationID, in.String()) @@ -78,7 +78,7 @@ func (rpc *rpcChat) PullMessageBySeqList(_ context.Context, in *pbMsg.PullMessag } respSingleMsgFormat = singleMsgHandleByUser(SingleMsgFormat, in.UserID) respGroupMsgFormat = groupMsgHandleByUser(GroupMsgFormat) - return &pbMsg.PullMessageResp{ + return &open_im_sdk.PullMessageBySeqListResp{ ErrCode: 0, ErrMsg: "", MaxSeq: MaxSeq, @@ -87,9 +87,9 @@ func (rpc *rpcChat) PullMessageBySeqList(_ context.Context, in *pbMsg.PullMessag GroupUserMsg: respGroupMsgFormat, }, nil } -func singleMsgHandleByUser(allMsg []*pbMsg.MsgFormat, ownerId string) []*pbMsg.GatherFormat { +func singleMsgHandleByUser(allMsg []*open_im_sdk.MsgData, ownerId string) []*open_im_sdk.GatherFormat { var userid string - var respMsgFormat []*pbMsg.GatherFormat + var respMsgFormat []*open_im_sdk.GatherFormat m := make(map[string]MsgFormats) //Gather messages in the dimension of users for _, v := range allMsg { @@ -107,7 +107,7 @@ func singleMsgHandleByUser(allMsg []*pbMsg.MsgFormat, ownerId string) []*pbMsg.G } //Return in pb format for user, msg := range m { - tempUserMsg := new(pbMsg.GatherFormat) + tempUserMsg := new(open_im_sdk.GatherFormat) tempUserMsg.ID = user tempUserMsg.List = msg sort.Sort(msg) @@ -115,8 +115,8 @@ func singleMsgHandleByUser(allMsg []*pbMsg.MsgFormat, ownerId string) []*pbMsg.G } return respMsgFormat } -func groupMsgHandleByUser(allMsg []*pbMsg.MsgFormat) []*pbMsg.GatherFormat { - var respMsgFormat []*pbMsg.GatherFormat +func groupMsgHandleByUser(allMsg []*open_im_sdk.MsgData) []*open_im_sdk.GatherFormat { + var respMsgFormat []*open_im_sdk.GatherFormat m := make(map[string]MsgFormats) //Gather messages in the dimension of users for _, v := range allMsg { @@ -132,7 +132,7 @@ func groupMsgHandleByUser(allMsg []*pbMsg.MsgFormat) []*pbMsg.GatherFormat { } //Return in pb format for groupID, msg := range m { - tempUserMsg := new(pbMsg.GatherFormat) + tempUserMsg := new(open_im_sdk.GatherFormat) tempUserMsg.ID = groupID tempUserMsg.List = msg sort.Sort(msg) @@ -141,7 +141,7 @@ func groupMsgHandleByUser(allMsg []*pbMsg.MsgFormat) []*pbMsg.GatherFormat { return respMsgFormat } -type MsgFormats []*pbMsg.MsgFormat +type MsgFormats []*open_im_sdk.MsgData // Implement the sort.Interface interface to get the number of elements method func (s MsgFormats) Len() int { diff --git a/internal/rpc/chat/rpcChat.go b/internal/rpc/msg/rpcChat.go similarity index 99% rename from internal/rpc/chat/rpcChat.go rename to internal/rpc/msg/rpcChat.go index e3d2460dd..43113ae51 100644 --- a/internal/rpc/chat/rpcChat.go +++ b/internal/rpc/msg/rpcChat.go @@ -1,4 +1,4 @@ -package chat +package msg import ( "Open_IM/pkg/common/config" diff --git a/pkg/common/db/mongoModel.go b/pkg/common/db/mongoModel.go index 4137616ea..99da02b0b 100644 --- a/pkg/common/db/mongoModel.go +++ b/pkg/common/db/mongoModel.go @@ -5,6 +5,7 @@ import ( "Open_IM/pkg/common/constant" "Open_IM/pkg/common/log" pbMsg "Open_IM/pkg/proto/chat" + "Open_IM/pkg/proto/sdk_ws" "errors" "github.com/garyburd/redigo/redis" "github.com/golang/protobuf/proto" @@ -13,7 +14,7 @@ import ( "time" ) -const cChat = "chat" +const cChat = "msg" const cGroup = "group" const singleGocMsgNum = 5000 @@ -32,7 +33,7 @@ type GroupMember struct { UIDList []string } -func (d *DataBases) GetMsgBySeqRange(uid string, seqBegin, seqEnd int64) (SingleMsg []*pbMsg.MsgFormat, GroupMsg []*pbMsg.MsgFormat, MaxSeq int64, MinSeq int64, err error) { +func (d *DataBases) GetMsgBySeqRange(uid string, seqBegin, seqEnd int64) (SingleMsg []*open_im_sdk.MsgData, GroupMsg []*open_im_sdk.MsgData, MaxSeq int64, MinSeq int64, err error) { var count int64 session := d.mgoSession.Clone() if session == nil { @@ -46,38 +47,25 @@ func (d *DataBases) GetMsgBySeqRange(uid string, seqBegin, seqEnd int64) (Single if err = c.Find(bson.M{"uid": uid}).One(&sChat); err != nil { return nil, nil, MaxSeq, MinSeq, err } - pChat := pbMsg.MsgSvrToPushSvrChatMsg{} for i := 0; i < len(sChat.Msg); i++ { - temp := new(pbMsg.MsgFormat) - if err = proto.Unmarshal(sChat.Msg[i].Msg, &pChat); err != nil { + msg := new(open_im_sdk.MsgData) + if err = proto.Unmarshal(sChat.Msg[i].Msg, msg); err != nil { return nil, nil, MaxSeq, MinSeq, err } - if pChat.RecvSeq >= seqBegin && pChat.RecvSeq <= seqEnd { - temp.SendID = pChat.SendID - temp.RecvID = pChat.RecvID - temp.MsgFrom = pChat.MsgFrom - temp.Seq = pChat.RecvSeq - temp.ServerMsgID = pChat.MsgID - temp.SendTime = pChat.SendTime - temp.Content = pChat.Content - temp.ContentType = pChat.ContentType - temp.SenderPlatformID = pChat.PlatformID - temp.ClientMsgID = pChat.ClientMsgID - temp.SenderFaceURL = pChat.SenderFaceURL - temp.SenderNickName = pChat.SenderNickName - if pChat.RecvSeq > MaxSeq { - MaxSeq = pChat.RecvSeq + if msg.Seq >= seqBegin && msg.Seq <= seqEnd { + if msg.Seq > MaxSeq { + MaxSeq = msg.Seq } if count == 0 { - MinSeq = pChat.RecvSeq + MinSeq = msg.Seq } - if pChat.RecvSeq < MinSeq { - MinSeq = pChat.RecvSeq + if msg.Seq < MinSeq { + MinSeq = msg.Seq } - if pChat.SessionType == constant.SingleChatType { - SingleMsg = append(SingleMsg, temp) + if msg.SessionType == constant.SingleChatType { + SingleMsg = append(SingleMsg, msg) } else { - GroupMsg = append(GroupMsg, temp) + GroupMsg = append(GroupMsg, msg) } count++ if count == (seqEnd - seqBegin + 1) { @@ -116,7 +104,7 @@ func (d *DataBases) GetMinSeqFromMongo(uid string) (MinSeq int64, err error) { } return MinSeq, nil } -func (d *DataBases) GetMsgBySeqList(uid string, seqList []int64) (SingleMsg []*pbMsg.MsgFormat, GroupMsg []*pbMsg.MsgFormat, MaxSeq int64, MinSeq int64, err error) { +func (d *DataBases) GetMsgBySeqList(uid string, seqList []int64) (SingleMsg []*open_im_sdk.MsgData, GroupMsg []*open_im_sdk.MsgData, MaxSeq int64, MinSeq int64, err error) { allCount := 0 singleCount := 0 session := d.mgoSession.Clone() @@ -140,7 +128,6 @@ func (d *DataBases) GetMsgBySeqList(uid string, seqList []int64) (SingleMsg []*p return t }(uid, seqList) sChat := UserChat{} - pChat := pbMsg.MsgSvrToPushSvrChatMsg{} for seqUid, value := range m { if err = c.Find(bson.M{"uid": seqUid}).One(&sChat); err != nil { log.NewError("", "not find seqUid", seqUid, value, uid, seqList) @@ -148,37 +135,25 @@ func (d *DataBases) GetMsgBySeqList(uid string, seqList []int64) (SingleMsg []*p } singleCount = 0 for i := 0; i < len(sChat.Msg); i++ { - temp := new(pbMsg.MsgFormat) - if err = proto.Unmarshal(sChat.Msg[i].Msg, &pChat); err != nil { + msg := new(open_im_sdk.MsgData) + if err = proto.Unmarshal(sChat.Msg[i].Msg, msg); err != nil { log.NewError("", "not find seqUid", seqUid, value, uid, seqList) return nil, nil, MaxSeq, MinSeq, err } - if isContainInt64(pChat.RecvSeq, value) { - temp.SendID = pChat.SendID - temp.RecvID = pChat.RecvID - temp.MsgFrom = pChat.MsgFrom - temp.Seq = pChat.RecvSeq - temp.ServerMsgID = pChat.MsgID - temp.SendTime = pChat.SendTime - temp.Content = pChat.Content - temp.ContentType = pChat.ContentType - temp.SenderPlatformID = pChat.PlatformID - temp.ClientMsgID = pChat.ClientMsgID - temp.SenderFaceURL = pChat.SenderFaceURL - temp.SenderNickName = pChat.SenderNickName - if pChat.RecvSeq > MaxSeq { - MaxSeq = pChat.RecvSeq + if isContainInt64(msg.Seq, value) { + if msg.Seq > MaxSeq { + MaxSeq = msg.Seq } if allCount == 0 { - MinSeq = pChat.RecvSeq + MinSeq = msg.Seq } - if pChat.RecvSeq < MinSeq { - MinSeq = pChat.RecvSeq + if msg.Seq < MinSeq { + MinSeq = msg.Seq } - if pChat.SessionType == constant.SingleChatType { - SingleMsg = append(SingleMsg, temp) + if msg.SessionType == constant.SingleChatType { + SingleMsg = append(SingleMsg, msg) } else { - GroupMsg = append(GroupMsg, temp) + GroupMsg = append(GroupMsg, msg) } allCount++ singleCount++ @@ -190,7 +165,7 @@ func (d *DataBases) GetMsgBySeqList(uid string, seqList []int64) (SingleMsg []*p } return SingleMsg, GroupMsg, MaxSeq, MinSeq, nil } -func (d *DataBases) SaveUserChat(uid string, sendTime int64, m *pbMsg.MsgSvrToPushSvrChatMsg) error { +func (d *DataBases) SaveUserChat(uid string, sendTime int64, m *pbMsg.MsgDataToDB) error { var seqUid string newTime := getCurrentTimestampByMill() session := d.mgoSession.Clone() @@ -200,7 +175,7 @@ func (d *DataBases) SaveUserChat(uid string, sendTime int64, m *pbMsg.MsgSvrToPu defer session.Close() log.NewDebug("", "get mgoSession cost time", getCurrentTimestampByMill()-newTime) c := session.DB(config.Config.Mongo.DBDatabase).C(cChat) - seqUid = getSeqUid(uid, m.RecvSeq) + seqUid = getSeqUid(uid, m.MsgData.Seq) n, err := c.Find(bson.M{"uid": seqUid}).Count() if err != nil { return err diff --git a/pkg/common/db/mysql_model/im_mysql_msg_model/chat_log_model.go b/pkg/common/db/mysql_model/im_mysql_msg_model/chat_log_model.go index 73defd89d..5a80e6bb2 100644 --- a/pkg/common/db/mysql_model/im_mysql_msg_model/chat_log_model.go +++ b/pkg/common/db/mysql_model/im_mysql_msg_model/chat_log_model.go @@ -7,6 +7,7 @@ package im_mysql_msg_model import ( + "Open_IM/pkg/common/constant" "Open_IM/pkg/common/db" pbMsg "Open_IM/pkg/proto/chat" "Open_IM/pkg/utils" @@ -28,21 +29,27 @@ type ChatLog struct { Remark sql.NullString `gorm:"column:remark"` // remark } -func InsertMessageToChatLog(msgData pbMsg.WSToMsgSvrChatMsg) error { +func InsertMessageToChatLog(msg pbMsg.MsgDataToMQ) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return err } chatLog := ChatLog{ - MsgId: msgData.MsgID, - SendID: msgData.SendID, - RecvID: msgData.RecvID, - SendTime: utils.UnixNanoSecondToTime(msgData.SendTime), - SessionType: msgData.SessionType, - ContentType: msgData.ContentType, - MsgFrom: msgData.MsgFrom, - Content: msgData.Content, - SenderPlatformID: msgData.PlatformID, + MsgId: msg.MsgData.ServerMsgID, + SendID: msg.MsgData.SendID, + SendTime: utils.UnixNanoSecondToTime(msg.MsgData.SendTime), + SessionType: msg.MsgData.SessionType, + ContentType: msg.MsgData.ContentType, + MsgFrom: msg.MsgData.MsgFrom, + Content: string(msg.MsgData.Content), + SenderPlatformID: msg.MsgData.SenderPlatformID, } + switch msg.MsgData.SessionType { + case constant.GroupChatType: + chatLog.RecvID = msg.MsgData.GroupID + case constant.SingleChatType: + chatLog.RecvID = msg.MsgData.RecvID + } + return dbConn.Table("chat_log").Create(chatLog).Error } diff --git a/pkg/proto/chat/chat.proto b/pkg/proto/chat/chat.proto index aec58df7d..6a969ac20 100644 --- a/pkg/proto/chat/chat.proto +++ b/pkg/proto/chat/chat.proto @@ -12,6 +12,7 @@ message MsgDataToMQ{ message MsgDataToDB { open_im_sdk.MsgData msgData = 1; + string operationID = 2; } message PushMsgDataToMQ{ @@ -19,26 +20,26 @@ message PushMsgDataToMQ{ open_im_sdk.MsgData msgData = 2; } -message PullMessageReq { - string UserID = 1; - int64 SeqBegin = 2; - int64 SeqEnd = 3; - string OperationID = 4; -} - -message PullMessageResp { - int32 ErrCode = 1; - string ErrMsg = 2; - int64 MaxSeq = 3; - int64 MinSeq = 4; - repeated GatherFormat SingleUserMsg = 5; - repeated GatherFormat GroupUserMsg = 6; -} -message PullMessageBySeqListReq{ - string UserID = 1; - string OperationID = 2; - repeated int64 seqList =3; -} +//message PullMessageReq { +// string UserID = 1; +// int64 SeqBegin = 2; +// int64 SeqEnd = 3; +// string OperationID = 4; +//} +// +//message PullMessageResp { +// int32 ErrCode = 1; +// string ErrMsg = 2; +// int64 MaxSeq = 3; +// int64 MinSeq = 4; +// repeated GatherFormat SingleUserMsg = 5; +// repeated GatherFormat GroupUserMsg = 6; +//} +//message PullMessageBySeqListReq{ +// string UserID = 1; +// string OperationID = 2; +// repeated int64 seqList =3; +//} message GetMaxAndMinSeqReq { string UserID = 1; string OperationID = 2; @@ -49,38 +50,38 @@ message GetMaxAndMinSeqResp { int64 MaxSeq = 3; int64 MinSeq = 4; } -message GatherFormat{ - // @inject_tag: json:"id" - string ID = 1; - // @inject_tag: json:"list" - repeated MsgFormat List = 2;//detail msg -} -message MsgFormat{ - // @inject_tag: json:"sendID" - string SendID = 1; - // @inject_tag: json:"recvID" - string RecvID = 2; - // @inject_tag: json:"msgFrom" - int32 MsgFrom = 3; - // @inject_tag: json:"contentType" - int32 ContentType = 4; - // @inject_tag: json:"serverMsgID" - string ServerMsgID = 5; - // @inject_tag: json:"content" - string Content = 6; - // @inject_tag: json:"seq" - int64 Seq = 7; - // @inject_tag: json:"sendTime" - int64 SendTime = 8; - // @inject_tag: json:"senderPlatformID" - int32 SenderPlatformID = 9; - // @inject_tag: json:"senderNickName" - string SenderNickName = 10; - // @inject_tag: json:"senderFaceUrl" - string SenderFaceURL = 11; - // @inject_tag: json:"clientMsgID" - string ClientMsgID = 12; -} +//message GatherFormat{ +// // @inject_tag: json:"id" +// string ID = 1; +// // @inject_tag: json:"list" +// repeated MsgFormat List = 2;//detail msg +//} +//message MsgFormat{ +// // @inject_tag: json:"sendID" +// string SendID = 1; +// // @inject_tag: json:"recvID" +// string RecvID = 2; +// // @inject_tag: json:"msgFrom" +// int32 MsgFrom = 3; +// // @inject_tag: json:"contentType" +// int32 ContentType = 4; +// // @inject_tag: json:"serverMsgID" +// string ServerMsgID = 5; +// // @inject_tag: json:"content" +// string Content = 6; +// // @inject_tag: json:"seq" +// int64 Seq = 7; +// // @inject_tag: json:"sendTime" +// int64 SendTime = 8; +// // @inject_tag: json:"senderPlatformID" +// int32 SenderPlatformID = 9; +// // @inject_tag: json:"senderNickName" +// string SenderNickName = 10; +// // @inject_tag: json:"senderFaceUrl" +// string SenderFaceURL = 11; +// // @inject_tag: json:"clientMsgID" +// string ClientMsgID = 12; +//} message SendMsgReq { @@ -92,17 +93,16 @@ open_im_sdk.MsgData msgData = 3; } message SendMsgResp { - int32 ErrCode = 1; - string ErrMsg = 2; - int32 ReqIdentifier = 3; - string ServerMsgID = 4; - string ClientMsgID = 5; + int32 errCode = 1; + string errMsg = 2; + string serverMsgID = 4; + string clientMsgID = 5; int64 sendTime = 6; } service Chat { rpc GetMaxAndMinSeq(GetMaxAndMinSeqReq) returns(GetMaxAndMinSeqResp); - rpc PullMessage(PullMessageReq) returns(PullMessageResp); - rpc PullMessageBySeqList(PullMessageBySeqListReq) returns(PullMessageResp); + rpc PullMessage(open_im_sdk.PullMessageReq) returns(open_im_sdk.PullMessageResp); + rpc PullMessageBySeqList(open_im_sdk.PullMessageBySeqListReq) returns(open_im_sdk.PullMessageBySeqListResp); rpc SendMsg(SendMsgReq) returns(SendMsgResp); } diff --git a/pkg/proto/sdk_ws/ws.pb.go b/pkg/proto/sdk_ws/ws.pb.go index 1ce815b28..48480cfa1 100644 --- a/pkg/proto/sdk_ws/ws.pb.go +++ b/pkg/proto/sdk_ws/ws.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: sdk_ws/ws.proto -package open_im_sdk // import "./sdk_ws" +package open_im_sdk import proto "github.com/golang/protobuf/proto" import fmt "fmt" @@ -19,10 +19,12 @@ var _ = math.Inf const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type PullMessageBySeqListResp struct { - MaxSeq int64 `protobuf:"varint,1,opt,name=MaxSeq" json:"MaxSeq,omitempty"` - MinSeq int64 `protobuf:"varint,2,opt,name=MinSeq" json:"MinSeq,omitempty"` - SingleUserMsg []*GatherFormat `protobuf:"bytes,3,rep,name=SingleUserMsg" json:"SingleUserMsg,omitempty"` - GroupUserMsg []*GatherFormat `protobuf:"bytes,4,rep,name=GroupUserMsg" json:"GroupUserMsg,omitempty"` + ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` + MaxSeq int64 `protobuf:"varint,3,opt,name=maxSeq" json:"maxSeq,omitempty"` + MinSeq int64 `protobuf:"varint,4,opt,name=minSeq" json:"minSeq,omitempty"` + SingleUserMsg []*GatherFormat `protobuf:"bytes,5,rep,name=singleUserMsg" json:"singleUserMsg,omitempty"` + GroupUserMsg []*GatherFormat `protobuf:"bytes,6,rep,name=groupUserMsg" json:"groupUserMsg,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -32,7 +34,7 @@ func (m *PullMessageBySeqListResp) Reset() { *m = PullMessageBySeqListRe func (m *PullMessageBySeqListResp) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListResp) ProtoMessage() {} func (*PullMessageBySeqListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{0} + return fileDescriptor_ws_9a4768ae4ab79d99, []int{0} } func (m *PullMessageBySeqListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListResp.Unmarshal(m, b) @@ -52,6 +54,20 @@ func (m *PullMessageBySeqListResp) XXX_DiscardUnknown() { var xxx_messageInfo_PullMessageBySeqListResp proto.InternalMessageInfo +func (m *PullMessageBySeqListResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *PullMessageBySeqListResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + func (m *PullMessageBySeqListResp) GetMaxSeq() int64 { if m != nil { return m.MaxSeq @@ -81,7 +97,9 @@ func (m *PullMessageBySeqListResp) GetGroupUserMsg() []*GatherFormat { } type PullMessageBySeqListReq struct { - SeqList []int64 `protobuf:"varint,1,rep,packed,name=seqList" json:"seqList,omitempty"` + UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` + OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` + SeqList []int64 `protobuf:"varint,3,rep,packed,name=seqList" json:"seqList,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -91,7 +109,7 @@ func (m *PullMessageBySeqListReq) Reset() { *m = PullMessageBySeqListReq func (m *PullMessageBySeqListReq) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListReq) ProtoMessage() {} func (*PullMessageBySeqListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{1} + return fileDescriptor_ws_9a4768ae4ab79d99, []int{1} } func (m *PullMessageBySeqListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListReq.Unmarshal(m, b) @@ -111,6 +129,20 @@ func (m *PullMessageBySeqListReq) XXX_DiscardUnknown() { var xxx_messageInfo_PullMessageBySeqListReq proto.InternalMessageInfo +func (m *PullMessageBySeqListReq) GetUserID() string { + if m != nil { + return m.UserID + } + return "" +} + +func (m *PullMessageBySeqListReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + func (m *PullMessageBySeqListReq) GetSeqList() []int64 { if m != nil { return m.SeqList @@ -128,7 +160,7 @@ func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} } func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqReq) ProtoMessage() {} func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{2} + return fileDescriptor_ws_9a4768ae4ab79d99, []int{2} } func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) @@ -160,7 +192,7 @@ func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} } func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqResp) ProtoMessage() {} func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{3} + return fileDescriptor_ws_9a4768ae4ab79d99, []int{3} } func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) @@ -198,17 +230,17 @@ type GatherFormat struct { // @inject_tag: json:"id" ID string `protobuf:"bytes,1,opt,name=ID" json:"id"` // @inject_tag: json:"list" - List []*MsgFormat `protobuf:"bytes,2,rep,name=List" json:"list"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + List []*MsgData `protobuf:"bytes,2,rep,name=List" json:"list"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GatherFormat) Reset() { *m = GatherFormat{} } func (m *GatherFormat) String() string { return proto.CompactTextString(m) } func (*GatherFormat) ProtoMessage() {} func (*GatherFormat) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{4} + return fileDescriptor_ws_9a4768ae4ab79d99, []int{4} } func (m *GatherFormat) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GatherFormat.Unmarshal(m, b) @@ -235,269 +267,13 @@ func (m *GatherFormat) GetID() string { return "" } -func (m *GatherFormat) GetList() []*MsgFormat { +func (m *GatherFormat) GetList() []*MsgData { if m != nil { return m.List } return nil } -type MsgFormat struct { - // @inject_tag: json:"sendID" - SendID string `protobuf:"bytes,1,opt,name=SendID" json:"sendID"` - // @inject_tag: json:"recvID" - RecvID string `protobuf:"bytes,2,opt,name=RecvID" json:"recvID"` - // @inject_tag: json:"msgFrom" - MsgFrom int32 `protobuf:"varint,3,opt,name=MsgFrom" json:"msgFrom"` - // @inject_tag: json:"contentType" - ContentType int32 `protobuf:"varint,4,opt,name=ContentType" json:"contentType"` - // @inject_tag: json:"serverMsgID" - ServerMsgID string `protobuf:"bytes,5,opt,name=ServerMsgID" json:"serverMsgID"` - // @inject_tag: json:"content" - Content string `protobuf:"bytes,6,opt,name=Content" json:"content"` - // @inject_tag: json:"seq" - Seq int64 `protobuf:"varint,7,opt,name=Seq" json:"seq"` - // @inject_tag: json:"sendTime" - SendTime int64 `protobuf:"varint,8,opt,name=SendTime" json:"sendTime"` - // @inject_tag: json:"senderPlatformID" - SenderPlatformID int32 `protobuf:"varint,9,opt,name=SenderPlatformID" json:"senderPlatformID"` - // @inject_tag: json:"senderNickName" - SenderNickName string `protobuf:"bytes,10,opt,name=SenderNickName" json:"senderNickName"` - // @inject_tag: json:"senderFaceUrl" - SenderFaceURL string `protobuf:"bytes,11,opt,name=SenderFaceURL" json:"senderFaceUrl"` - // @inject_tag: json:"clientMsgID" - ClientMsgID string `protobuf:"bytes,12,opt,name=ClientMsgID" json:"clientMsgID"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MsgFormat) Reset() { *m = MsgFormat{} } -func (m *MsgFormat) String() string { return proto.CompactTextString(m) } -func (*MsgFormat) ProtoMessage() {} -func (*MsgFormat) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{5} -} -func (m *MsgFormat) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_MsgFormat.Unmarshal(m, b) -} -func (m *MsgFormat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_MsgFormat.Marshal(b, m, deterministic) -} -func (dst *MsgFormat) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgFormat.Merge(dst, src) -} -func (m *MsgFormat) XXX_Size() int { - return xxx_messageInfo_MsgFormat.Size(m) -} -func (m *MsgFormat) XXX_DiscardUnknown() { - xxx_messageInfo_MsgFormat.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgFormat proto.InternalMessageInfo - -func (m *MsgFormat) GetSendID() string { - if m != nil { - return m.SendID - } - return "" -} - -func (m *MsgFormat) GetRecvID() string { - if m != nil { - return m.RecvID - } - return "" -} - -func (m *MsgFormat) GetMsgFrom() int32 { - if m != nil { - return m.MsgFrom - } - return 0 -} - -func (m *MsgFormat) GetContentType() int32 { - if m != nil { - return m.ContentType - } - return 0 -} - -func (m *MsgFormat) GetServerMsgID() string { - if m != nil { - return m.ServerMsgID - } - return "" -} - -func (m *MsgFormat) GetContent() string { - if m != nil { - return m.Content - } - return "" -} - -func (m *MsgFormat) GetSeq() int64 { - if m != nil { - return m.Seq - } - return 0 -} - -func (m *MsgFormat) GetSendTime() int64 { - if m != nil { - return m.SendTime - } - return 0 -} - -func (m *MsgFormat) GetSenderPlatformID() int32 { - if m != nil { - return m.SenderPlatformID - } - return 0 -} - -func (m *MsgFormat) GetSenderNickName() string { - if m != nil { - return m.SenderNickName - } - return "" -} - -func (m *MsgFormat) GetSenderFaceURL() string { - if m != nil { - return m.SenderFaceURL - } - return "" -} - -func (m *MsgFormat) GetClientMsgID() string { - if m != nil { - return m.ClientMsgID - } - return "" -} - -type UserSendMsgReq struct { - Options map[string]int32 `protobuf:"bytes,1,rep,name=Options" json:"Options,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - SenderNickName string `protobuf:"bytes,2,opt,name=SenderNickName" json:"SenderNickName,omitempty"` - SenderFaceURL string `protobuf:"bytes,3,opt,name=SenderFaceURL" json:"SenderFaceURL,omitempty"` - PlatformID int32 `protobuf:"varint,4,opt,name=PlatformID" json:"PlatformID,omitempty"` - SessionType int32 `protobuf:"varint,5,opt,name=SessionType" json:"SessionType,omitempty"` - MsgFrom int32 `protobuf:"varint,6,opt,name=MsgFrom" json:"MsgFrom,omitempty"` - ContentType int32 `protobuf:"varint,7,opt,name=ContentType" json:"ContentType,omitempty"` - RecvID string `protobuf:"bytes,8,opt,name=RecvID" json:"RecvID,omitempty"` - ForceList []string `protobuf:"bytes,9,rep,name=ForceList" json:"ForceList,omitempty"` - Content string `protobuf:"bytes,10,opt,name=Content" json:"Content,omitempty"` - ClientMsgID string `protobuf:"bytes,11,opt,name=ClientMsgID" json:"ClientMsgID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *UserSendMsgReq) Reset() { *m = UserSendMsgReq{} } -func (m *UserSendMsgReq) String() string { return proto.CompactTextString(m) } -func (*UserSendMsgReq) ProtoMessage() {} -func (*UserSendMsgReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{6} -} -func (m *UserSendMsgReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UserSendMsgReq.Unmarshal(m, b) -} -func (m *UserSendMsgReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UserSendMsgReq.Marshal(b, m, deterministic) -} -func (dst *UserSendMsgReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_UserSendMsgReq.Merge(dst, src) -} -func (m *UserSendMsgReq) XXX_Size() int { - return xxx_messageInfo_UserSendMsgReq.Size(m) -} -func (m *UserSendMsgReq) XXX_DiscardUnknown() { - xxx_messageInfo_UserSendMsgReq.DiscardUnknown(m) -} - -var xxx_messageInfo_UserSendMsgReq proto.InternalMessageInfo - -func (m *UserSendMsgReq) GetOptions() map[string]int32 { - if m != nil { - return m.Options - } - return nil -} - -func (m *UserSendMsgReq) GetSenderNickName() string { - if m != nil { - return m.SenderNickName - } - return "" -} - -func (m *UserSendMsgReq) GetSenderFaceURL() string { - if m != nil { - return m.SenderFaceURL - } - return "" -} - -func (m *UserSendMsgReq) GetPlatformID() int32 { - if m != nil { - return m.PlatformID - } - return 0 -} - -func (m *UserSendMsgReq) GetSessionType() int32 { - if m != nil { - return m.SessionType - } - return 0 -} - -func (m *UserSendMsgReq) GetMsgFrom() int32 { - if m != nil { - return m.MsgFrom - } - return 0 -} - -func (m *UserSendMsgReq) GetContentType() int32 { - if m != nil { - return m.ContentType - } - return 0 -} - -func (m *UserSendMsgReq) GetRecvID() string { - if m != nil { - return m.RecvID - } - return "" -} - -func (m *UserSendMsgReq) GetForceList() []string { - if m != nil { - return m.ForceList - } - return nil -} - -func (m *UserSendMsgReq) GetContent() string { - if m != nil { - return m.Content - } - return "" -} - -func (m *UserSendMsgReq) GetClientMsgID() string { - if m != nil { - return m.ClientMsgID - } - return "" -} - type UserSendMsgResp struct { ServerMsgID string `protobuf:"bytes,1,opt,name=ServerMsgID" json:"ServerMsgID,omitempty"` ClientMsgID string `protobuf:"bytes,2,opt,name=ClientMsgID" json:"ClientMsgID,omitempty"` @@ -511,7 +287,7 @@ func (m *UserSendMsgResp) Reset() { *m = UserSendMsgResp{} } func (m *UserSendMsgResp) String() string { return proto.CompactTextString(m) } func (*UserSendMsgResp) ProtoMessage() {} func (*UserSendMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{7} + return fileDescriptor_ws_9a4768ae4ab79d99, []int{5} } func (m *UserSendMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserSendMsgResp.Unmarshal(m, b) @@ -580,7 +356,7 @@ func (m *MsgData) Reset() { *m = MsgData{} } func (m *MsgData) String() string { return proto.CompactTextString(m) } func (*MsgData) ProtoMessage() {} func (*MsgData) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{8} + return fileDescriptor_ws_9a4768ae4ab79d99, []int{6} } func (m *MsgData) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgData.Unmarshal(m, b) @@ -741,7 +517,7 @@ func (m *OfflinePushInfo) Reset() { *m = OfflinePushInfo{} } func (m *OfflinePushInfo) String() string { return proto.CompactTextString(m) } func (*OfflinePushInfo) ProtoMessage() {} func (*OfflinePushInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{9} + return fileDescriptor_ws_9a4768ae4ab79d99, []int{7} } func (m *OfflinePushInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OfflinePushInfo.Unmarshal(m, b) @@ -815,7 +591,7 @@ func (m *GroupInfo) Reset() { *m = GroupInfo{} } func (m *GroupInfo) String() string { return proto.CompactTextString(m) } func (*GroupInfo) ProtoMessage() {} func (*GroupInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{10} + return fileDescriptor_ws_9a4768ae4ab79d99, []int{8} } func (m *GroupInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfo.Unmarshal(m, b) @@ -909,7 +685,7 @@ func (m *GroupMemberFullInfo) Reset() { *m = GroupMemberFullInfo{} } func (m *GroupMemberFullInfo) String() string { return proto.CompactTextString(m) } func (*GroupMemberFullInfo) ProtoMessage() {} func (*GroupMemberFullInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{11} + return fileDescriptor_ws_9a4768ae4ab79d99, []int{9} } func (m *GroupMemberFullInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupMemberFullInfo.Unmarshal(m, b) @@ -996,7 +772,7 @@ func (m *UserInfo) Reset() { *m = UserInfo{} } func (m *UserInfo) String() string { return proto.CompactTextString(m) } func (*UserInfo) ProtoMessage() {} func (*UserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{12} + return fileDescriptor_ws_9a4768ae4ab79d99, []int{10} } func (m *UserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserInfo.Unmarshal(m, b) @@ -1080,7 +856,7 @@ func (m *PublicUserInfo) Reset() { *m = PublicUserInfo{} } func (m *PublicUserInfo) String() string { return proto.CompactTextString(m) } func (*PublicUserInfo) ProtoMessage() {} func (*PublicUserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{13} + return fileDescriptor_ws_9a4768ae4ab79d99, []int{11} } func (m *PublicUserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PublicUserInfo.Unmarshal(m, b) @@ -1140,7 +916,7 @@ func (m *TipsComm) Reset() { *m = TipsComm{} } func (m *TipsComm) String() string { return proto.CompactTextString(m) } func (*TipsComm) ProtoMessage() {} func (*TipsComm) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{14} + return fileDescriptor_ws_9a4768ae4ab79d99, []int{12} } func (m *TipsComm) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TipsComm.Unmarshal(m, b) @@ -1189,7 +965,7 @@ func (m *MemberEnterTips) Reset() { *m = MemberEnterTips{} } func (m *MemberEnterTips) String() string { return proto.CompactTextString(m) } func (*MemberEnterTips) ProtoMessage() {} func (*MemberEnterTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{15} + return fileDescriptor_ws_9a4768ae4ab79d99, []int{13} } func (m *MemberEnterTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberEnterTips.Unmarshal(m, b) @@ -1244,7 +1020,7 @@ func (m *MemberLeaveTips) Reset() { *m = MemberLeaveTips{} } func (m *MemberLeaveTips) String() string { return proto.CompactTextString(m) } func (*MemberLeaveTips) ProtoMessage() {} func (*MemberLeaveTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{16} + return fileDescriptor_ws_9a4768ae4ab79d99, []int{14} } func (m *MemberLeaveTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberLeaveTips.Unmarshal(m, b) @@ -1299,7 +1075,7 @@ func (m *MemberInvitedTips) Reset() { *m = MemberInvitedTips{} } func (m *MemberInvitedTips) String() string { return proto.CompactTextString(m) } func (*MemberInvitedTips) ProtoMessage() {} func (*MemberInvitedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{17} + return fileDescriptor_ws_9a4768ae4ab79d99, []int{15} } func (m *MemberInvitedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInvitedTips.Unmarshal(m, b) @@ -1361,7 +1137,7 @@ func (m *MemberKickedTips) Reset() { *m = MemberKickedTips{} } func (m *MemberKickedTips) String() string { return proto.CompactTextString(m) } func (*MemberKickedTips) ProtoMessage() {} func (*MemberKickedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{18} + return fileDescriptor_ws_9a4768ae4ab79d99, []int{16} } func (m *MemberKickedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberKickedTips.Unmarshal(m, b) @@ -1424,7 +1200,7 @@ func (m *MemberInfoChangedTips) Reset() { *m = MemberInfoChangedTips{} } func (m *MemberInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*MemberInfoChangedTips) ProtoMessage() {} func (*MemberInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{19} + return fileDescriptor_ws_9a4768ae4ab79d99, []int{17} } func (m *MemberInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInfoChangedTips.Unmarshal(m, b) @@ -1493,7 +1269,7 @@ func (m *GroupCreatedTips) Reset() { *m = GroupCreatedTips{} } func (m *GroupCreatedTips) String() string { return proto.CompactTextString(m) } func (*GroupCreatedTips) ProtoMessage() {} func (*GroupCreatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{20} + return fileDescriptor_ws_9a4768ae4ab79d99, []int{18} } func (m *GroupCreatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupCreatedTips.Unmarshal(m, b) @@ -1554,7 +1330,7 @@ func (m *GroupInfoChangedTips) Reset() { *m = GroupInfoChangedTips{} } func (m *GroupInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*GroupInfoChangedTips) ProtoMessage() {} func (*GroupInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{21} + return fileDescriptor_ws_9a4768ae4ab79d99, []int{19} } func (m *GroupInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfoChangedTips.Unmarshal(m, b) @@ -1608,7 +1384,7 @@ func (m *ReceiveJoinApplicationTips) Reset() { *m = ReceiveJoinApplicati func (m *ReceiveJoinApplicationTips) String() string { return proto.CompactTextString(m) } func (*ReceiveJoinApplicationTips) ProtoMessage() {} func (*ReceiveJoinApplicationTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{22} + return fileDescriptor_ws_9a4768ae4ab79d99, []int{20} } func (m *ReceiveJoinApplicationTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ReceiveJoinApplicationTips.Unmarshal(m, b) @@ -1663,7 +1439,7 @@ func (m *ApplicationProcessedTips) Reset() { *m = ApplicationProcessedTi func (m *ApplicationProcessedTips) String() string { return proto.CompactTextString(m) } func (*ApplicationProcessedTips) ProtoMessage() {} func (*ApplicationProcessedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{23} + return fileDescriptor_ws_9a4768ae4ab79d99, []int{21} } func (m *ApplicationProcessedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ApplicationProcessedTips.Unmarshal(m, b) @@ -1726,7 +1502,7 @@ func (m *FriendInfo) Reset() { *m = FriendInfo{} } func (m *FriendInfo) String() string { return proto.CompactTextString(m) } func (*FriendInfo) ProtoMessage() {} func (*FriendInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{24} + return fileDescriptor_ws_9a4768ae4ab79d99, []int{22} } func (m *FriendInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfo.Unmarshal(m, b) @@ -1787,7 +1563,7 @@ func (m *FriendApplication) Reset() { *m = FriendApplication{} } func (m *FriendApplication) String() string { return proto.CompactTextString(m) } func (*FriendApplication) ProtoMessage() {} func (*FriendApplication) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{25} + return fileDescriptor_ws_9a4768ae4ab79d99, []int{23} } func (m *FriendApplication) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplication.Unmarshal(m, b) @@ -1843,7 +1619,7 @@ func (m *FriendApplicationAddedTips) Reset() { *m = FriendApplicationAdd func (m *FriendApplicationAddedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationAddedTips) ProtoMessage() {} func (*FriendApplicationAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{26} + return fileDescriptor_ws_9a4768ae4ab79d99, []int{24} } func (m *FriendApplicationAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationAddedTips.Unmarshal(m, b) @@ -1906,7 +1682,7 @@ func (m *FriendApplicationProcessedTips) Reset() { *m = FriendApplicatio func (m *FriendApplicationProcessedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationProcessedTips) ProtoMessage() {} func (*FriendApplicationProcessedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{27} + return fileDescriptor_ws_9a4768ae4ab79d99, []int{25} } func (m *FriendApplicationProcessedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationProcessedTips.Unmarshal(m, b) @@ -1966,7 +1742,7 @@ func (m *FriendAddedTips) Reset() { *m = FriendAddedTips{} } func (m *FriendAddedTips) String() string { return proto.CompactTextString(m) } func (*FriendAddedTips) ProtoMessage() {} func (*FriendAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{28} + return fileDescriptor_ws_9a4768ae4ab79d99, []int{26} } func (m *FriendAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendAddedTips.Unmarshal(m, b) @@ -2012,7 +1788,7 @@ func (m *FriendDeletedTips) Reset() { *m = FriendDeletedTips{} } func (m *FriendDeletedTips) String() string { return proto.CompactTextString(m) } func (*FriendDeletedTips) ProtoMessage() {} func (*FriendDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{29} + return fileDescriptor_ws_9a4768ae4ab79d99, []int{27} } func (m *FriendDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendDeletedTips.Unmarshal(m, b) @@ -2059,7 +1835,7 @@ func (m *BlackInfo) Reset() { *m = BlackInfo{} } func (m *BlackInfo) String() string { return proto.CompactTextString(m) } func (*BlackInfo) ProtoMessage() {} func (*BlackInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{30} + return fileDescriptor_ws_9a4768ae4ab79d99, []int{28} } func (m *BlackInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackInfo.Unmarshal(m, b) @@ -2112,7 +1888,7 @@ func (m *BlackAddedTips) Reset() { *m = BlackAddedTips{} } func (m *BlackAddedTips) String() string { return proto.CompactTextString(m) } func (*BlackAddedTips) ProtoMessage() {} func (*BlackAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{31} + return fileDescriptor_ws_9a4768ae4ab79d99, []int{29} } func (m *BlackAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackAddedTips.Unmarshal(m, b) @@ -2158,7 +1934,7 @@ func (m *BlackDeletedTips) Reset() { *m = BlackDeletedTips{} } func (m *BlackDeletedTips) String() string { return proto.CompactTextString(m) } func (*BlackDeletedTips) ProtoMessage() {} func (*BlackDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{32} + return fileDescriptor_ws_9a4768ae4ab79d99, []int{30} } func (m *BlackDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackDeletedTips.Unmarshal(m, b) @@ -2205,7 +1981,7 @@ func (m *FriendInfoChangedTips) Reset() { *m = FriendInfoChangedTips{} } func (m *FriendInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*FriendInfoChangedTips) ProtoMessage() {} func (*FriendInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{33} + return fileDescriptor_ws_9a4768ae4ab79d99, []int{31} } func (m *FriendInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfoChangedTips.Unmarshal(m, b) @@ -2260,7 +2036,7 @@ func (m *SelfInfoUpdatedTips) Reset() { *m = SelfInfoUpdatedTips{} } func (m *SelfInfoUpdatedTips) String() string { return proto.CompactTextString(m) } func (*SelfInfoUpdatedTips) ProtoMessage() {} func (*SelfInfoUpdatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a9634e8f434358ba, []int{34} + return fileDescriptor_ws_9a4768ae4ab79d99, []int{32} } func (m *SelfInfoUpdatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SelfInfoUpdatedTips.Unmarshal(m, b) @@ -2307,9 +2083,6 @@ func init() { proto.RegisterType((*GetMaxAndMinSeqReq)(nil), "open_im_sdk.GetMaxAndMinSeqReq") proto.RegisterType((*GetMaxAndMinSeqResp)(nil), "open_im_sdk.GetMaxAndMinSeqResp") proto.RegisterType((*GatherFormat)(nil), "open_im_sdk.GatherFormat") - proto.RegisterType((*MsgFormat)(nil), "open_im_sdk.MsgFormat") - proto.RegisterType((*UserSendMsgReq)(nil), "open_im_sdk.UserSendMsgReq") - proto.RegisterMapType((map[string]int32)(nil), "open_im_sdk.UserSendMsgReq.OptionsEntry") proto.RegisterType((*UserSendMsgResp)(nil), "open_im_sdk.UserSendMsgResp") proto.RegisterType((*MsgData)(nil), "open_im_sdk.MsgData") proto.RegisterMapType((map[string]bool)(nil), "open_im_sdk.MsgData.OptionsEntry") @@ -2341,124 +2114,114 @@ func init() { proto.RegisterType((*SelfInfoUpdatedTips)(nil), "open_im_sdk.SelfInfoUpdatedTips") } -func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_a9634e8f434358ba) } +func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_9a4768ae4ab79d99) } -var fileDescriptor_ws_a9634e8f434358ba = []byte{ - // 1855 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x59, 0x5f, 0x6f, 0xdc, 0x5a, - 0x11, 0x97, 0xf7, 0x5f, 0xb2, 0xb3, 0x69, 0x92, 0xba, 0x6d, 0xae, 0x29, 0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 0x9b, 0x6e, 0x02, 0x1a, 0x00, 0x00, +var fileDescriptor_ws_9a4768ae4ab79d99 = []byte{ + // 1690 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x5b, 0x6f, 0x1b, 0x45, + 0x14, 0xd6, 0xfa, 0x96, 0xf8, 0xd8, 0xb9, 0x74, 0x9b, 0xa6, 0x4b, 0xa8, 0x2a, 0xb3, 0x42, 0xc8, + 0x42, 0x55, 0x2a, 0x12, 0x21, 0x9a, 0x22, 0xa0, 0x49, 0x9c, 0x04, 0x43, 0x5c, 0x47, 0xeb, 0x44, + 0x3c, 0x56, 0x1b, 0xef, 0xd8, 0x59, 0xbc, 0x17, 0x67, 0x66, 0xed, 0x36, 0xbf, 0x04, 0x09, 0x09, + 0x09, 0xc4, 0x03, 0x42, 0xbc, 0x20, 0x84, 0xf8, 0x15, 0xfc, 0x0a, 0x04, 0x8f, 0xbc, 0xf0, 0x0a, + 0x0f, 0x68, 0xce, 0xcc, 0xee, 0xce, 0xc6, 0x21, 0x71, 0x82, 0xda, 0xb7, 0x3d, 0x9f, 0xcf, 0x99, + 0xf3, 0x9d, 0xeb, 0xce, 0x1a, 0x16, 0x98, 0x33, 0x78, 0xf6, 0x9c, 0x3d, 0x7c, 0xce, 0x56, 0x87, + 0x34, 0x8c, 0x42, 0xbd, 0x12, 0x0e, 0x49, 0xf0, 0xcc, 0xf5, 0x9f, 0x31, 0x67, 0x60, 0xfe, 0xa3, + 0x81, 0x71, 0x30, 0xf2, 0xbc, 0x16, 0x61, 0xcc, 0xee, 0x93, 0xad, 0xb3, 0x0e, 0x39, 0xdd, 0x77, + 0x59, 0x64, 0x11, 0x36, 0xd4, 0x0d, 0x98, 0x21, 0x94, 0x6e, 0x87, 0x0e, 0x31, 0xb4, 0x9a, 0x56, + 0x2f, 0x5a, 0xb1, 0xa8, 0x2f, 0x43, 0x89, 0x50, 0xda,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0x16, 0x6a, + 0x98, 0xa7, 0xb0, 0xc0, 0x13, 0xd4, 0x21, 0x81, 0xd3, 0x62, 0x7d, 0x24, 0x53, 0x83, 0x4a, 0x87, + 0xd0, 0x31, 0x66, 0x2d, 0x39, 0x55, 0x85, 0xb8, 0xc6, 0xb6, 0xe7, 0x92, 0x20, 0x12, 0x1a, 0x32, + 0x2f, 0x0a, 0xa4, 0xaf, 0xc0, 0x2c, 0x23, 0x81, 0x73, 0xe8, 0xfa, 0x44, 0xb6, 0x47, 0x22, 0x9b, + 0xbf, 0x14, 0x61, 0x46, 0x92, 0xe0, 0x01, 0x72, 0x3c, 0xcd, 0xbc, 0x90, 0x38, 0x4e, 0x49, 0x77, + 0x9c, 0x1c, 0x2e, 0x25, 0x9e, 0x6f, 0x2c, 0x6a, 0xb3, 0x81, 0xc7, 0x96, 0xad, 0x58, 0xe4, 0x9c, + 0xba, 0x0a, 0xa7, 0x82, 0xe0, 0xa4, 0x40, 0x5c, 0x83, 0x29, 0x71, 0x15, 0x85, 0x86, 0x02, 0xe9, + 0x6f, 0xc3, 0x22, 0xf7, 0x4f, 0xe8, 0x81, 0x67, 0x47, 0xbd, 0x90, 0xfa, 0xcd, 0x86, 0x51, 0xc2, + 0x69, 0x98, 0xc0, 0xf5, 0xb7, 0x60, 0x5e, 0x60, 0x4f, 0xdd, 0xee, 0xe0, 0xa9, 0xed, 0x13, 0x63, + 0x06, 0x0f, 0x3c, 0x87, 0xea, 0x6f, 0xc2, 0x9c, 0x40, 0x76, 0xed, 0x2e, 0x39, 0xb2, 0xf6, 0x8d, + 0x59, 0x54, 0xcb, 0x82, 0x82, 0x1b, 0x63, 0x6e, 0x18, 0x1c, 0x9e, 0x0d, 0x89, 0x51, 0x46, 0xa7, + 0x2a, 0xc4, 0x23, 0xf7, 0x59, 0x7f, 0x97, 0x86, 0xbe, 0x01, 0x62, 0x40, 0xa5, 0x88, 0x91, 0x87, + 0x41, 0x44, 0x82, 0x08, 0x6d, 0x2b, 0xc2, 0x56, 0x81, 0xb8, 0xad, 0x14, 0x8d, 0x6a, 0x4d, 0xab, + 0x57, 0xad, 0x58, 0xd4, 0xef, 0x41, 0xb9, 0x17, 0xd2, 0x2e, 0xc1, 0x6e, 0x99, 0xab, 0xe5, 0xeb, + 0x65, 0x2b, 0x05, 0xf4, 0x45, 0xc8, 0x33, 0x72, 0x6a, 0xcc, 0x63, 0x01, 0xf9, 0x63, 0xa6, 0xae, + 0x0b, 0xd9, 0xba, 0xea, 0xf7, 0x01, 0xba, 0x94, 0xd8, 0x11, 0xc1, 0x5f, 0x17, 0xf1, 0x57, 0x05, + 0xd1, 0xdf, 0x87, 0x99, 0xf6, 0x90, 0xcf, 0x0d, 0x33, 0x6e, 0x61, 0x5f, 0xbe, 0x71, 0x51, 0x5f, + 0xae, 0x4a, 0x9d, 0x9d, 0x20, 0xa2, 0x67, 0x56, 0x6c, 0xa1, 0xef, 0xc2, 0x42, 0xd8, 0xeb, 0x79, + 0x6e, 0x40, 0x0e, 0x46, 0xec, 0xa4, 0x19, 0xf4, 0x42, 0x43, 0xaf, 0x69, 0xf5, 0xca, 0xda, 0xbd, + 0xcc, 0x21, 0xed, 0xac, 0x8e, 0x75, 0xde, 0x68, 0xe5, 0x31, 0x54, 0x55, 0x07, 0x3c, 0xc4, 0x01, + 0x39, 0x93, 0xdd, 0xc7, 0x1f, 0xf5, 0x25, 0x28, 0x8e, 0x6d, 0x6f, 0x44, 0xb0, 0xf3, 0x66, 0x2d, + 0x21, 0x3c, 0xce, 0x3d, 0xd2, 0xcc, 0x2f, 0x34, 0x58, 0x38, 0xe7, 0x80, 0x6b, 0x1f, 0xba, 0x91, + 0x47, 0xe4, 0x09, 0x42, 0xd0, 0x75, 0x28, 0x34, 0x08, 0xeb, 0xca, 0xe6, 0xc5, 0x67, 0xee, 0x69, + 0xe7, 0x45, 0x24, 0xdb, 0x96, 0x3f, 0xea, 0x26, 0x54, 0xdd, 0x76, 0x87, 0x1f, 0xd5, 0x09, 0x47, +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, + 0x25, 0x5e, 0x3f, 0xb7, 0xe0, 0xa7, 0x1a, 0x9f, 0xe9, 0xee, 0xde, 0x3f, 0x68, 0x70, 0xbb, 0x43, + 0xbc, 0x1e, 0x37, 0x3d, 0x1a, 0x3a, 0xc9, 0x9d, 0x65, 0x03, 0xaa, 0x1c, 0x8e, 0x4f, 0xbd, 0x7c, + 0xbb, 0x67, 0x54, 0x5f, 0x22, 0xdb, 0xe3, 0x12, 0xfe, 0xe1, 0xbd, 0xfe, 0x6f, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x86, 0x83, 0x68, 0xe9, 0x03, 0x17, 0x00, 0x00, } diff --git a/pkg/proto/sdk_ws/ws.proto b/pkg/proto/sdk_ws/ws.proto index 8d6713f75..8ee089fb6 100644 --- a/pkg/proto/sdk_ws/ws.proto +++ b/pkg/proto/sdk_ws/ws.proto @@ -1,16 +1,34 @@ syntax = "proto3"; package open_im_sdk;//The package name to which the proto file belongs -option go_package = "./sdk_ws;open_im_sdk";//The generated go pb file is in the current directory, and the package name is open_im_sdk +//option go_package = "./sdk_ws;open_im_sdk";//The generated go pb file is in the current directory, and the package name is open_im_sdk message PullMessageBySeqListResp { - int64 MaxSeq = 1; - int64 MinSeq = 2; - repeated GatherFormat SingleUserMsg = 3; - repeated GatherFormat GroupUserMsg = 4; + int32 errCode = 1; + string errMsg = 2; + int64 maxSeq = 3; + int64 minSeq = 4; + repeated GatherFormat singleUserMsg = 5; + repeated GatherFormat groupUserMsg = 6; } message PullMessageBySeqListReq{ - repeated int64 seqList =1; + string userID = 1; + string operationID = 2; + repeated int64 seqList =3; +} +message PullMessageReq { + string userID = 1; + int64 seqBegin = 2; + int64 seqEnd = 3; + string operationID = 4; +} +message PullMessageResp { + int32 errCode = 1; + string errMsg = 2; + int64 maxSeq = 3; + int64 minSeq = 4; + repeated GatherFormat singleUserMsg = 5; + repeated GatherFormat groupUserMsg = 6; } message GetMaxAndMinSeqReq { } @@ -20,50 +38,37 @@ message GetMaxAndMinSeqResp { } message GatherFormat{ // @inject_tag: json:"id" - string ID = 1; + string id = 1; // @inject_tag: json:"list" - repeated MsgFormat List = 2;//detail msg -} -message MsgFormat{ - // @inject_tag: json:"sendID" - string SendID = 1; - // @inject_tag: json:"recvID" - string RecvID = 2; - // @inject_tag: json:"msgFrom" - int32 MsgFrom = 3; - // @inject_tag: json:"contentType" - int32 ContentType = 4; - // @inject_tag: json:"serverMsgID" - string ServerMsgID = 5; - // @inject_tag: json:"content" - string Content = 6; - // @inject_tag: json:"seq" - int64 Seq = 7; - // @inject_tag: json:"sendTime" - int64 SendTime = 8; - // @inject_tag: json:"senderPlatformID" - int32 SenderPlatformID = 9; - // @inject_tag: json:"senderNickName" - string SenderNickName = 10; - // @inject_tag: json:"senderFaceUrl" - string SenderFaceURL = 11; - // @inject_tag: json:"clientMsgID" - string ClientMsgID = 12; + repeated MsgData list = 2;//detail msg } +//message MsgFormat{ +// // @inject_tag: json:"sendID" +// string SendID = 1; +// // @inject_tag: json:"recvID" +// string RecvID = 2; +// // @inject_tag: json:"msgFrom" +// int32 MsgFrom = 3; +// // @inject_tag: json:"contentType" +// int32 ContentType = 4; +// // @inject_tag: json:"serverMsgID" +// string ServerMsgID = 5; +// // @inject_tag: json:"content" +// string Content = 6; +// // @inject_tag: json:"seq" +// int64 Seq = 7; +// // @inject_tag: json:"sendTime" +// int64 SendTime = 8; +// // @inject_tag: json:"senderPlatformID" +// int32 SenderPlatformID = 9; +// // @inject_tag: json:"senderNickName" +// string SenderNickName = 10; +// // @inject_tag: json:"senderFaceUrl" +// string SenderFaceURL = 11; +// // @inject_tag: json:"clientMsgID" +// string ClientMsgID = 12; +//} -message UserSendMsgReq { - map Options= 1; - string SenderNickName = 2; - string SenderFaceURL = 3; - int32 PlatformID = 4; - int32 SessionType = 5; - int32 MsgFrom = 6; - int32 ContentType = 7; - string RecvID = 8; - repeated string ForceList = 9; - string Content = 10; - string ClientMsgID = 11; -} message UserSendMsgResp { string ServerMsgID = 1; diff --git a/pkg/utils/map.go b/pkg/utils/map.go index 4b8f9fa8d..05712fe64 100644 --- a/pkg/utils/map.go +++ b/pkg/utils/map.go @@ -115,12 +115,12 @@ func JsonStringToMap(str string) (tempMap map[string]int32) { _ = json.Unmarshal([]byte(str), &tempMap) return tempMap } -func GetSwitchFromOptions(Options map[string]int32, key string) (result bool) { - if flag, ok := Options[key]; !ok || flag == 1 { +func GetSwitchFromOptions(Options map[string]bool, key string) (result bool) { + if flag, ok := Options[key]; !ok || flag { return true } return false } -func SetSwitchFromOptions(Options map[string]int32, key string, value int32) { +func SetSwitchFromOptions(Options map[string]bool, key string, value bool) { Options[key] = value } From 743715fa7387931d0f9aeeb5ebf1735c9f30577a Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 23 Dec 2021 17:35:07 +0800 Subject: [PATCH 020/337] send msg file modify --- pkg/proto/chat/chat.pb.go | 154 +++++++++++++++++++------------------- 1 file changed, 77 insertions(+), 77 deletions(-) diff --git a/pkg/proto/chat/chat.pb.go b/pkg/proto/chat/chat.pb.go index 63c35ae18..59bf6cefd 100644 --- a/pkg/proto/chat/chat.pb.go +++ b/pkg/proto/chat/chat.pb.go @@ -37,7 +37,7 @@ func (m *MsgDataToMQ) Reset() { *m = MsgDataToMQ{} } func (m *MsgDataToMQ) String() string { return proto.CompactTextString(m) } func (*MsgDataToMQ) ProtoMessage() {} func (*MsgDataToMQ) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_e46047b47969b559, []int{0} + return fileDescriptor_chat_d22d2bd62db4e275, []int{0} } func (m *MsgDataToMQ) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgDataToMQ.Unmarshal(m, b) @@ -80,6 +80,7 @@ func (m *MsgDataToMQ) GetMsgData() *sdk_ws.MsgData { type MsgDataToDB struct { MsgData *sdk_ws.MsgData `protobuf:"bytes,1,opt,name=msgData" json:"msgData,omitempty"` + OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -89,7 +90,7 @@ func (m *MsgDataToDB) Reset() { *m = MsgDataToDB{} } func (m *MsgDataToDB) String() string { return proto.CompactTextString(m) } func (*MsgDataToDB) ProtoMessage() {} func (*MsgDataToDB) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_e46047b47969b559, []int{1} + return fileDescriptor_chat_d22d2bd62db4e275, []int{1} } func (m *MsgDataToDB) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgDataToDB.Unmarshal(m, b) @@ -116,6 +117,13 @@ func (m *MsgDataToDB) GetMsgData() *sdk_ws.MsgData { return nil } +func (m *MsgDataToDB) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + type PushMsgDataToMQ struct { OperationID string `protobuf:"bytes,1,opt,name=OperationID" json:"OperationID,omitempty"` MsgData *sdk_ws.MsgData `protobuf:"bytes,2,opt,name=msgData" json:"msgData,omitempty"` @@ -128,7 +136,7 @@ func (m *PushMsgDataToMQ) Reset() { *m = PushMsgDataToMQ{} } func (m *PushMsgDataToMQ) String() string { return proto.CompactTextString(m) } func (*PushMsgDataToMQ) ProtoMessage() {} func (*PushMsgDataToMQ) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_e46047b47969b559, []int{2} + return fileDescriptor_chat_d22d2bd62db4e275, []int{2} } func (m *PushMsgDataToMQ) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PushMsgDataToMQ.Unmarshal(m, b) @@ -176,7 +184,7 @@ func (m *PullMessageReq) Reset() { *m = PullMessageReq{} } func (m *PullMessageReq) String() string { return proto.CompactTextString(m) } func (*PullMessageReq) ProtoMessage() {} func (*PullMessageReq) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_e46047b47969b559, []int{3} + return fileDescriptor_chat_d22d2bd62db4e275, []int{3} } func (m *PullMessageReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageReq.Unmarshal(m, b) @@ -240,7 +248,7 @@ func (m *PullMessageResp) Reset() { *m = PullMessageResp{} } func (m *PullMessageResp) String() string { return proto.CompactTextString(m) } func (*PullMessageResp) ProtoMessage() {} func (*PullMessageResp) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_e46047b47969b559, []int{4} + return fileDescriptor_chat_d22d2bd62db4e275, []int{4} } func (m *PullMessageResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageResp.Unmarshal(m, b) @@ -315,7 +323,7 @@ func (m *PullMessageBySeqListReq) Reset() { *m = PullMessageBySeqListReq func (m *PullMessageBySeqListReq) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListReq) ProtoMessage() {} func (*PullMessageBySeqListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_e46047b47969b559, []int{5} + return fileDescriptor_chat_d22d2bd62db4e275, []int{5} } func (m *PullMessageBySeqListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListReq.Unmarshal(m, b) @@ -368,7 +376,7 @@ func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} } func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqReq) ProtoMessage() {} func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_e46047b47969b559, []int{6} + return fileDescriptor_chat_d22d2bd62db4e275, []int{6} } func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) @@ -416,7 +424,7 @@ func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} } func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqResp) ProtoMessage() {} func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_e46047b47969b559, []int{7} + return fileDescriptor_chat_d22d2bd62db4e275, []int{7} } func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) @@ -478,7 +486,7 @@ func (m *GatherFormat) Reset() { *m = GatherFormat{} } func (m *GatherFormat) String() string { return proto.CompactTextString(m) } func (*GatherFormat) ProtoMessage() {} func (*GatherFormat) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_e46047b47969b559, []int{8} + return fileDescriptor_chat_d22d2bd62db4e275, []int{8} } func (m *GatherFormat) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GatherFormat.Unmarshal(m, b) @@ -546,7 +554,7 @@ func (m *MsgFormat) Reset() { *m = MsgFormat{} } func (m *MsgFormat) String() string { return proto.CompactTextString(m) } func (*MsgFormat) ProtoMessage() {} func (*MsgFormat) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_e46047b47969b559, []int{9} + return fileDescriptor_chat_d22d2bd62db4e275, []int{9} } func (m *MsgFormat) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgFormat.Unmarshal(m, b) @@ -663,7 +671,7 @@ func (m *SendMsgReq) Reset() { *m = SendMsgReq{} } func (m *SendMsgReq) String() string { return proto.CompactTextString(m) } func (*SendMsgReq) ProtoMessage() {} func (*SendMsgReq) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_e46047b47969b559, []int{10} + return fileDescriptor_chat_d22d2bd62db4e275, []int{10} } func (m *SendMsgReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SendMsgReq.Unmarshal(m, b) @@ -707,7 +715,6 @@ func (m *SendMsgReq) GetMsgData() *sdk_ws.MsgData { type SendMsgResp struct { ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` - ReqIdentifier int32 `protobuf:"varint,3,opt,name=ReqIdentifier" json:"ReqIdentifier,omitempty"` ServerMsgID string `protobuf:"bytes,4,opt,name=ServerMsgID" json:"ServerMsgID,omitempty"` ClientMsgID string `protobuf:"bytes,5,opt,name=ClientMsgID" json:"ClientMsgID,omitempty"` SendTime int64 `protobuf:"varint,6,opt,name=sendTime" json:"sendTime,omitempty"` @@ -720,7 +727,7 @@ func (m *SendMsgResp) Reset() { *m = SendMsgResp{} } func (m *SendMsgResp) String() string { return proto.CompactTextString(m) } func (*SendMsgResp) ProtoMessage() {} func (*SendMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_e46047b47969b559, []int{11} + return fileDescriptor_chat_d22d2bd62db4e275, []int{11} } func (m *SendMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SendMsgResp.Unmarshal(m, b) @@ -754,13 +761,6 @@ func (m *SendMsgResp) GetErrMsg() string { return "" } -func (m *SendMsgResp) GetReqIdentifier() int32 { - if m != nil { - return m.ReqIdentifier - } - return 0 -} - func (m *SendMsgResp) GetServerMsgID() string { if m != nil { return m.ServerMsgID @@ -810,7 +810,7 @@ const _ = grpc.SupportPackageIsVersion4 type ChatClient interface { GetMaxAndMinSeq(ctx context.Context, in *GetMaxAndMinSeqReq, opts ...grpc.CallOption) (*GetMaxAndMinSeqResp, error) PullMessage(ctx context.Context, in *PullMessageReq, opts ...grpc.CallOption) (*PullMessageResp, error) - PullMessageBySeqList(ctx context.Context, in *PullMessageBySeqListReq, opts ...grpc.CallOption) (*PullMessageResp, error) + PullMessageBySeqList(ctx context.Context, in *sdk_ws.PullMessageBySeqListReq, opts ...grpc.CallOption) (*sdk_ws.PullMessageBySeqListResp, error) SendMsg(ctx context.Context, in *SendMsgReq, opts ...grpc.CallOption) (*SendMsgResp, error) } @@ -840,8 +840,8 @@ func (c *chatClient) PullMessage(ctx context.Context, in *PullMessageReq, opts . return out, nil } -func (c *chatClient) PullMessageBySeqList(ctx context.Context, in *PullMessageBySeqListReq, opts ...grpc.CallOption) (*PullMessageResp, error) { - out := new(PullMessageResp) +func (c *chatClient) PullMessageBySeqList(ctx context.Context, in *sdk_ws.PullMessageBySeqListReq, opts ...grpc.CallOption) (*sdk_ws.PullMessageBySeqListResp, error) { + out := new(sdk_ws.PullMessageBySeqListResp) err := grpc.Invoke(ctx, "/pbChat.Chat/PullMessageBySeqList", in, out, c.cc, opts...) if err != nil { return nil, err @@ -863,7 +863,7 @@ func (c *chatClient) SendMsg(ctx context.Context, in *SendMsgReq, opts ...grpc.C type ChatServer interface { GetMaxAndMinSeq(context.Context, *GetMaxAndMinSeqReq) (*GetMaxAndMinSeqResp, error) PullMessage(context.Context, *PullMessageReq) (*PullMessageResp, error) - PullMessageBySeqList(context.Context, *PullMessageBySeqListReq) (*PullMessageResp, error) + PullMessageBySeqList(context.Context, *sdk_ws.PullMessageBySeqListReq) (*sdk_ws.PullMessageBySeqListResp, error) SendMsg(context.Context, *SendMsgReq) (*SendMsgResp, error) } @@ -908,7 +908,7 @@ func _Chat_PullMessage_Handler(srv interface{}, ctx context.Context, dec func(in } func _Chat_PullMessageBySeqList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PullMessageBySeqListReq) + in := new(sdk_ws.PullMessageBySeqListReq) if err := dec(in); err != nil { return nil, err } @@ -920,7 +920,7 @@ func _Chat_PullMessageBySeqList_Handler(srv interface{}, ctx context.Context, de FullMethod: "/pbChat.Chat/PullMessageBySeqList", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ChatServer).PullMessageBySeqList(ctx, req.(*PullMessageBySeqListReq)) + return srv.(ChatServer).PullMessageBySeqList(ctx, req.(*sdk_ws.PullMessageBySeqListReq)) } return interceptor(ctx, in, info, handler) } @@ -968,56 +968,56 @@ var _Chat_serviceDesc = grpc.ServiceDesc{ Metadata: "chat/chat.proto", } -func init() { proto.RegisterFile("chat/chat.proto", fileDescriptor_chat_e46047b47969b559) } +func init() { proto.RegisterFile("chat/chat.proto", fileDescriptor_chat_d22d2bd62db4e275) } -var fileDescriptor_chat_e46047b47969b559 = []byte{ - // 766 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcd, 0x4e, 0xdb, 0x4a, - 0x14, 0x56, 0xec, 0x38, 0x81, 0x13, 0x42, 0xb8, 0x03, 0x02, 0x2b, 0x77, 0x71, 0x73, 0x2d, 0xee, - 0x15, 0xea, 0x22, 0x91, 0xe8, 0xa6, 0x6a, 0xd5, 0x4a, 0x0d, 0x09, 0x28, 0x15, 0x86, 0xd4, 0x81, - 0x4d, 0x37, 0xc8, 0xc4, 0x83, 0x63, 0x25, 0xfe, 0xc9, 0xcc, 0x84, 0x9f, 0x4d, 0x9f, 0xa3, 0x2f, - 0xd4, 0x87, 0xe9, 0x43, 0x54, 0xaa, 0x66, 0xc6, 0x0e, 0x93, 0x18, 0x10, 0x6a, 0x25, 0x36, 0x28, - 0xdf, 0x37, 0xe7, 0xf7, 0x3b, 0x67, 0xc6, 0x40, 0x6d, 0x38, 0x72, 0x59, 0x8b, 0xff, 0x69, 0x26, - 0x24, 0x66, 0x31, 0x2a, 0x25, 0x97, 0x07, 0x23, 0x97, 0xd5, 0xff, 0x3d, 0x4d, 0x70, 0x74, 0xd1, - 0xb3, 0x5b, 0xc9, 0xd8, 0x6f, 0x89, 0xa3, 0x16, 0xf5, 0xc6, 0x17, 0x37, 0xb4, 0x75, 0x43, 0xa5, - 0xa9, 0x35, 0x83, 0x8a, 0x4d, 0xfd, 0x8e, 0xcb, 0xdc, 0xb3, 0xd8, 0xfe, 0x8c, 0xb6, 0xc0, 0x60, - 0xf1, 0x18, 0x47, 0x66, 0xa1, 0x51, 0xd8, 0x5b, 0x75, 0x24, 0x40, 0x0d, 0xa8, 0xc4, 0x09, 0x26, - 0x2e, 0x0b, 0xe2, 0xa8, 0xd7, 0x31, 0x35, 0x71, 0xa6, 0x52, 0xa8, 0x09, 0xe5, 0x50, 0x86, 0x31, - 0xf5, 0x46, 0x61, 0xaf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, 0x99, 0xcd, 0xfd, 0xd6, 0xd4, 0x37, 0x73, 0x1c, 0x4d, - 0xda, 0xb5, 0x2f, 0xd5, 0xa6, 0xf8, 0xcf, 0xe0, 0x9d, 0x3c, 0xbc, 0x2c, 0x89, 0xcf, 0xfe, 0xeb, - 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x48, 0x7f, 0xf6, 0xd7, 0x34, 0x08, 0x00, 0x00, +var fileDescriptor_chat_d22d2bd62db4e275 = []byte{ + // 754 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcb, 0x4e, 0xdb, 0x40, + 0x14, 0x55, 0xec, 0x3c, 0xe0, 0x06, 0x08, 0x1d, 0x10, 0x58, 0xee, 0x26, 0xb5, 0xa0, 0x42, 0x5d, + 0x24, 0x12, 0xdd, 0x54, 0xad, 0x54, 0xa9, 0x21, 0x01, 0xa5, 0xc2, 0x40, 0x1d, 0xd8, 0x74, 0x13, + 0x99, 0x78, 0xea, 0x58, 0x89, 0x1f, 0x99, 0x99, 0xf0, 0xd8, 0xf4, 0x57, 0xfa, 0x01, 0xfd, 0xb2, + 0x7e, 0x44, 0xa5, 0x6a, 0x66, 0xec, 0x30, 0x89, 0x81, 0xa2, 0x56, 0x62, 0x13, 0xe5, 0x9c, 0xb9, + 0xcf, 0x73, 0xef, 0x8c, 0x0c, 0xb5, 0xc1, 0xd0, 0x65, 0x4d, 0xfe, 0xd3, 0x48, 0x48, 0xcc, 0x62, + 0x54, 0x4e, 0x2e, 0x0f, 0x86, 0x2e, 0x33, 0x5f, 0x9d, 0x26, 0x38, 0xea, 0x77, 0xed, 0x66, 0x32, + 0xf2, 0x9b, 0xe2, 0xa8, 0x49, 0xbd, 0x51, 0xff, 0x9a, 0x36, 0xaf, 0xa9, 0x34, 0xb5, 0xa6, 0x50, + 0xb5, 0xa9, 0xdf, 0x76, 0x99, 0x7b, 0x1e, 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d, 0xed, 0x7b, + 0x79, 0x9a, 0xa0, 0x01, 0x6c, 0xde, 0xf7, 0x56, 0xa1, 0x9d, 0x39, 0xb5, 0x1f, 0x78, 0xce, 0xcc, + 0xdd, 0x27, 0x58, 0xd1, 0x04, 0xed, 0x43, 0x25, 0x1d, 0x0d, 0x42, 0x59, 0x21, 0x77, 0x2b, 0x62, + 0x6e, 0xe4, 0x38, 0x9a, 0xb4, 0x6a, 0x5f, 0x57, 0x1b, 0xe2, 0x43, 0xe1, 0x83, 0x3c, 0xbc, 0x2c, + 0x8b, 0xaf, 0x80, 0xb7, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xcb, 0x2c, 0x3b, 0x8f, 0x43, 0x08, + 0x00, 0x00, } From 1be993801f73933c34b3ba5dd2220f4c1083dc6e Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 23 Dec 2021 17:48:06 +0800 Subject: [PATCH 021/337] send msg file modify --- internal/msg_gateway/gate/logic.go | 49 +- internal/rpc/msg/pull_message.go | 12 +- pkg/proto/chat/chat.pb.go | 523 +++---------------- pkg/proto/sdk_ws/ws.pb.go | 773 +++++++++++++---------------- 4 files changed, 468 insertions(+), 889 deletions(-) diff --git a/internal/msg_gateway/gate/logic.go b/internal/msg_gateway/gate/logic.go index 9838d0808..fce7448bd 100644 --- a/internal/msg_gateway/gate/logic.go +++ b/internal/msg_gateway/gate/logic.go @@ -102,10 +102,10 @@ func (ws *WServer) getSeqResp(conn *UserConn, m *Req, pb *pbChat.GetMaxAndMinSeq } func (ws *WServer) pullMsgReq(conn *UserConn, m *Req) { log.NewInfo(m.OperationID, "Ws call success to pullMsgReq", m.ReqIdentifier, m.MsgIncr, m.SendID) - nReply := new(pbChat.PullMessageResp) + nReply := new(sdk_ws.PullMessageResp) isPass, errCode, errMsg, data := ws.argsValidate(m, constant.WSPullMsg) if isPass { - pbData := pbChat.PullMessageReq{} + pbData := sdk_ws.PullMessageReq{} pbData.UserID = m.SendID pbData.OperationID = m.OperationID pbData.SeqBegin = data.(SeqData).SeqBegin @@ -129,7 +129,7 @@ func (ws *WServer) pullMsgReq(conn *UserConn, m *Req) { ws.pullMsgResp(conn, m, nReply) } } -func (ws *WServer) pullMsgResp(conn *UserConn, m *Req, pb *pbChat.PullMessageResp) { +func (ws *WServer) pullMsgResp(conn *UserConn, m *Req, pb *sdk_ws.PullMessageResp) { log.NewInfo(m.OperationID, "pullMsgResp come here ", pb.String()) var mReplyData sdk_ws.PullMessageBySeqListResp a, err := json.Marshal(pb.SingleUserMsg) @@ -168,11 +168,11 @@ func (ws *WServer) pullMsgResp(conn *UserConn, m *Req, pb *pbChat.PullMessageRes } func (ws *WServer) pullMsgBySeqListReq(conn *UserConn, m *Req) { log.NewInfo(m.OperationID, "Ws call success to pullMsgBySeqListReq start", m.SendID, m.ReqIdentifier, m.MsgIncr) - nReply := new(pbChat.PullMessageResp) + nReply := new(sdk_ws.PullMessageResp) isPass, errCode, errMsg, data := ws.argsValidate(m, constant.WSPullMsgBySeqList) log.NewInfo(m.OperationID, "Ws call success to pullMsgBySeqListReq middle", m.SendID, m.ReqIdentifier, m.MsgIncr, data.(sdk_ws.PullMessageBySeqListReq).SeqList) if isPass { - pbData := pbChat.PullMessageBySeqListReq{} + pbData := sdk_ws.PullMessageBySeqListReq{} pbData.SeqList = data.(sdk_ws.PullMessageBySeqListReq).SeqList pbData.UserID = m.SendID pbData.OperationID = m.OperationID @@ -186,7 +186,7 @@ func (ws *WServer) pullMsgBySeqListReq(conn *UserConn, m *Req) { ws.pullMsgResp(conn, m, nReply) } else { log.NewInfo(pbData.OperationID, "rpc call success to pullMsgBySeqListReq", reply.String(), reply.GetMaxSeq(), reply.GetMinSeq(), len(reply.GetSingleUserMsg()), len(reply.GetGroupUserMsg())) - ws.pullMsgResp(conn, m, reply) + ws.pullMsgBySeqListResp(conn, m, reply) } } else { nReply.ErrCode = errCode @@ -194,6 +194,43 @@ func (ws *WServer) pullMsgBySeqListReq(conn *UserConn, m *Req) { ws.pullMsgResp(conn, m, nReply) } } +func (ws *WServer) pullMsgBySeqListResp(conn *UserConn, m *Req, pb *sdk_ws.PullMessageBySeqListResp) { + log.NewInfo(m.OperationID, "pullMsgResp come here ", pb.String()) + var mReplyData sdk_ws.PullMessageBySeqListResp + a, err := json.Marshal(pb.SingleUserMsg) + if err != nil { + log.NewError(m.OperationID, "GetSingleUserMsg,json marshal,err", err.Error()) + } + log.NewInfo(m.OperationID, "pullMsgResp json is ", len(pb.SingleUserMsg)) + err = json.Unmarshal(a, &mReplyData.SingleUserMsg) + if err != nil { + log.NewError(m.OperationID, "SingleUserMsg,json Unmarshal,err", err.Error()) + } + b, err := json.Marshal(pb.GroupUserMsg) + if err != nil { + log.NewError(m.OperationID, "mReplyData,json marshal,err", err.Error()) + } + err = json.Unmarshal(b, &mReplyData.GroupUserMsg) + if err != nil { + log.NewError(m.OperationID, "test SingleUserMsg,json Unmarshal,err", err.Error()) + } + c, err := proto.Marshal(&mReplyData) + log.NewInfo(m.OperationID, "test info is ", len(mReplyData.SingleUserMsg), mReplyData.SingleUserMsg) + + mReply := Resp{ + ReqIdentifier: m.ReqIdentifier, + MsgIncr: m.MsgIncr, + ErrCode: pb.GetErrCode(), + ErrMsg: pb.GetErrMsg(), + OperationID: m.OperationID, + Data: c, + } + log.NewInfo(m.OperationID, "pullMsgResp all data is ", mReply.ReqIdentifier, mReply.MsgIncr, mReply.ErrCode, mReply.ErrMsg, + len(mReply.Data)) + + ws.sendMsg(conn, mReply) + +} func (ws *WServer) sendMsgReq(conn *UserConn, m *Req, sendTime int64) { log.NewInfo(m.OperationID, "Ws call success to sendMsgReq start", m.MsgIncr, m.ReqIdentifier, m.SendID, sendTime) nReply := new(pbChat.SendMsgResp) diff --git a/internal/rpc/msg/pull_message.go b/internal/rpc/msg/pull_message.go index dab729984..46d0ad78a 100644 --- a/internal/rpc/msg/pull_message.go +++ b/internal/rpc/msg/pull_message.go @@ -41,9 +41,9 @@ func (rpc *rpcChat) GetMaxAndMinSeq(_ context.Context, in *pbMsg.GetMaxAndMinSeq } return resp, nil } -func (rpc *rpcChat) PullMessage(_ context.Context, in *pbMsg.PullMessageReq) (*pbMsg.PullMessageResp, error) { +func (rpc *rpcChat) PullMessage(_ context.Context, in *open_im_sdk.PullMessageReq) (*open_im_sdk.PullMessageResp, error) { log.InfoByKv("rpc pullMessage is arriving", in.OperationID, "args", in.String()) - resp := new(pbMsg.PullMessageResp) + resp := new(open_im_sdk.PullMessageResp) var respSingleMsgFormat []*open_im_sdk.GatherFormat var respGroupMsgFormat []*open_im_sdk.GatherFormat SingleMsgFormat, GroupMsgFormat, MaxSeq, MinSeq, err := commonDB.DB.GetMsgBySeqRange(in.UserID, in.SeqBegin, in.SeqEnd) @@ -55,12 +55,12 @@ func (rpc *rpcChat) PullMessage(_ context.Context, in *pbMsg.PullMessageReq) (*p } respSingleMsgFormat = singleMsgHandleByUser(SingleMsgFormat, in.UserID) respGroupMsgFormat = groupMsgHandleByUser(GroupMsgFormat) - return &pbMsg.PullMessageResp{ + return &open_im_sdk.PullMessageResp{ ErrCode: 0, ErrMsg: "", MaxSeq: MaxSeq, MinSeq: MinSeq, - SingleUserMsg: []*pbMsg.GatherFormat(respSingleMsgFormat), + SingleUserMsg: respSingleMsgFormat, GroupUserMsg: respGroupMsgFormat, }, nil } @@ -108,7 +108,7 @@ func singleMsgHandleByUser(allMsg []*open_im_sdk.MsgData, ownerId string) []*ope //Return in pb format for user, msg := range m { tempUserMsg := new(open_im_sdk.GatherFormat) - tempUserMsg.ID = user + tempUserMsg.Id = user tempUserMsg.List = msg sort.Sort(msg) respMsgFormat = append(respMsgFormat, tempUserMsg) @@ -133,7 +133,7 @@ func groupMsgHandleByUser(allMsg []*open_im_sdk.MsgData) []*open_im_sdk.GatherFo //Return in pb format for groupID, msg := range m { tempUserMsg := new(open_im_sdk.GatherFormat) - tempUserMsg.ID = groupID + tempUserMsg.Id = groupID tempUserMsg.List = msg sort.Sort(msg) respMsgFormat = append(respMsgFormat, tempUserMsg) diff --git a/pkg/proto/chat/chat.pb.go b/pkg/proto/chat/chat.pb.go index 59bf6cefd..f404d783d 100644 --- a/pkg/proto/chat/chat.pb.go +++ b/pkg/proto/chat/chat.pb.go @@ -37,7 +37,7 @@ func (m *MsgDataToMQ) Reset() { *m = MsgDataToMQ{} } func (m *MsgDataToMQ) String() string { return proto.CompactTextString(m) } func (*MsgDataToMQ) ProtoMessage() {} func (*MsgDataToMQ) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_d22d2bd62db4e275, []int{0} + return fileDescriptor_chat_6e4ec29226096c3a, []int{0} } func (m *MsgDataToMQ) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgDataToMQ.Unmarshal(m, b) @@ -90,7 +90,7 @@ func (m *MsgDataToDB) Reset() { *m = MsgDataToDB{} } func (m *MsgDataToDB) String() string { return proto.CompactTextString(m) } func (*MsgDataToDB) ProtoMessage() {} func (*MsgDataToDB) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_d22d2bd62db4e275, []int{1} + return fileDescriptor_chat_6e4ec29226096c3a, []int{1} } func (m *MsgDataToDB) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgDataToDB.Unmarshal(m, b) @@ -136,7 +136,7 @@ func (m *PushMsgDataToMQ) Reset() { *m = PushMsgDataToMQ{} } func (m *PushMsgDataToMQ) String() string { return proto.CompactTextString(m) } func (*PushMsgDataToMQ) ProtoMessage() {} func (*PushMsgDataToMQ) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_d22d2bd62db4e275, []int{2} + return fileDescriptor_chat_6e4ec29226096c3a, []int{2} } func (m *PushMsgDataToMQ) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PushMsgDataToMQ.Unmarshal(m, b) @@ -170,200 +170,26 @@ func (m *PushMsgDataToMQ) GetMsgData() *sdk_ws.MsgData { return nil } -type PullMessageReq struct { - UserID string `protobuf:"bytes,1,opt,name=UserID" json:"UserID,omitempty"` - SeqBegin int64 `protobuf:"varint,2,opt,name=SeqBegin" json:"SeqBegin,omitempty"` - SeqEnd int64 `protobuf:"varint,3,opt,name=SeqEnd" json:"SeqEnd,omitempty"` - OperationID string `protobuf:"bytes,4,opt,name=OperationID" json:"OperationID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PullMessageReq) Reset() { *m = PullMessageReq{} } -func (m *PullMessageReq) String() string { return proto.CompactTextString(m) } -func (*PullMessageReq) ProtoMessage() {} -func (*PullMessageReq) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_d22d2bd62db4e275, []int{3} -} -func (m *PullMessageReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PullMessageReq.Unmarshal(m, b) -} -func (m *PullMessageReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PullMessageReq.Marshal(b, m, deterministic) -} -func (dst *PullMessageReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_PullMessageReq.Merge(dst, src) -} -func (m *PullMessageReq) XXX_Size() int { - return xxx_messageInfo_PullMessageReq.Size(m) -} -func (m *PullMessageReq) XXX_DiscardUnknown() { - xxx_messageInfo_PullMessageReq.DiscardUnknown(m) -} - -var xxx_messageInfo_PullMessageReq proto.InternalMessageInfo - -func (m *PullMessageReq) GetUserID() string { - if m != nil { - return m.UserID - } - return "" -} - -func (m *PullMessageReq) GetSeqBegin() int64 { - if m != nil { - return m.SeqBegin - } - return 0 -} - -func (m *PullMessageReq) GetSeqEnd() int64 { - if m != nil { - return m.SeqEnd - } - return 0 -} - -func (m *PullMessageReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - -type PullMessageResp struct { - ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` - ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` - MaxSeq int64 `protobuf:"varint,3,opt,name=MaxSeq" json:"MaxSeq,omitempty"` - MinSeq int64 `protobuf:"varint,4,opt,name=MinSeq" json:"MinSeq,omitempty"` - SingleUserMsg []*GatherFormat `protobuf:"bytes,5,rep,name=SingleUserMsg" json:"SingleUserMsg,omitempty"` - GroupUserMsg []*GatherFormat `protobuf:"bytes,6,rep,name=GroupUserMsg" json:"GroupUserMsg,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PullMessageResp) Reset() { *m = PullMessageResp{} } -func (m *PullMessageResp) String() string { return proto.CompactTextString(m) } -func (*PullMessageResp) ProtoMessage() {} -func (*PullMessageResp) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_d22d2bd62db4e275, []int{4} -} -func (m *PullMessageResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PullMessageResp.Unmarshal(m, b) -} -func (m *PullMessageResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PullMessageResp.Marshal(b, m, deterministic) -} -func (dst *PullMessageResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_PullMessageResp.Merge(dst, src) -} -func (m *PullMessageResp) XXX_Size() int { - return xxx_messageInfo_PullMessageResp.Size(m) -} -func (m *PullMessageResp) XXX_DiscardUnknown() { - xxx_messageInfo_PullMessageResp.DiscardUnknown(m) -} - -var xxx_messageInfo_PullMessageResp proto.InternalMessageInfo - -func (m *PullMessageResp) GetErrCode() int32 { - if m != nil { - return m.ErrCode - } - return 0 -} - -func (m *PullMessageResp) GetErrMsg() string { - if m != nil { - return m.ErrMsg - } - return "" -} - -func (m *PullMessageResp) GetMaxSeq() int64 { - if m != nil { - return m.MaxSeq - } - return 0 -} - -func (m *PullMessageResp) GetMinSeq() int64 { - if m != nil { - return m.MinSeq - } - return 0 -} - -func (m *PullMessageResp) GetSingleUserMsg() []*GatherFormat { - if m != nil { - return m.SingleUserMsg - } - return nil -} - -func (m *PullMessageResp) GetGroupUserMsg() []*GatherFormat { - if m != nil { - return m.GroupUserMsg - } - return nil -} - -type PullMessageBySeqListReq struct { - UserID string `protobuf:"bytes,1,opt,name=UserID" json:"UserID,omitempty"` - OperationID string `protobuf:"bytes,2,opt,name=OperationID" json:"OperationID,omitempty"` - SeqList []int64 `protobuf:"varint,3,rep,packed,name=seqList" json:"seqList,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PullMessageBySeqListReq) Reset() { *m = PullMessageBySeqListReq{} } -func (m *PullMessageBySeqListReq) String() string { return proto.CompactTextString(m) } -func (*PullMessageBySeqListReq) ProtoMessage() {} -func (*PullMessageBySeqListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_d22d2bd62db4e275, []int{5} -} -func (m *PullMessageBySeqListReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PullMessageBySeqListReq.Unmarshal(m, b) -} -func (m *PullMessageBySeqListReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PullMessageBySeqListReq.Marshal(b, m, deterministic) -} -func (dst *PullMessageBySeqListReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_PullMessageBySeqListReq.Merge(dst, src) -} -func (m *PullMessageBySeqListReq) XXX_Size() int { - return xxx_messageInfo_PullMessageBySeqListReq.Size(m) -} -func (m *PullMessageBySeqListReq) XXX_DiscardUnknown() { - xxx_messageInfo_PullMessageBySeqListReq.DiscardUnknown(m) -} - -var xxx_messageInfo_PullMessageBySeqListReq proto.InternalMessageInfo - -func (m *PullMessageBySeqListReq) GetUserID() string { - if m != nil { - return m.UserID - } - return "" -} - -func (m *PullMessageBySeqListReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - -func (m *PullMessageBySeqListReq) GetSeqList() []int64 { - if m != nil { - return m.SeqList - } - return nil -} - +// message PullMessageReq { +// string UserID = 1; +// int64 SeqBegin = 2; +// int64 SeqEnd = 3; +// string OperationID = 4; +// } +// +// message PullMessageResp { +// int32 ErrCode = 1; +// string ErrMsg = 2; +// int64 MaxSeq = 3; +// int64 MinSeq = 4; +// repeated GatherFormat SingleUserMsg = 5; +// repeated GatherFormat GroupUserMsg = 6; +// } +// message PullMessageBySeqListReq{ +// string UserID = 1; +// string OperationID = 2; +// repeated int64 seqList =3; +// } type GetMaxAndMinSeqReq struct { UserID string `protobuf:"bytes,1,opt,name=UserID" json:"UserID,omitempty"` OperationID string `protobuf:"bytes,2,opt,name=OperationID" json:"OperationID,omitempty"` @@ -376,7 +202,7 @@ func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} } func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqReq) ProtoMessage() {} func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_d22d2bd62db4e275, []int{6} + return fileDescriptor_chat_6e4ec29226096c3a, []int{3} } func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) @@ -424,7 +250,7 @@ func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} } func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqResp) ProtoMessage() {} func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_d22d2bd62db4e275, []int{7} + return fileDescriptor_chat_6e4ec29226096c3a, []int{4} } func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) @@ -472,192 +298,6 @@ func (m *GetMaxAndMinSeqResp) GetMinSeq() int64 { return 0 } -type GatherFormat struct { - // @inject_tag: json:"id" - ID string `protobuf:"bytes,1,opt,name=ID" json:"id"` - // @inject_tag: json:"list" - List []*MsgFormat `protobuf:"bytes,2,rep,name=List" json:"list"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GatherFormat) Reset() { *m = GatherFormat{} } -func (m *GatherFormat) String() string { return proto.CompactTextString(m) } -func (*GatherFormat) ProtoMessage() {} -func (*GatherFormat) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_d22d2bd62db4e275, []int{8} -} -func (m *GatherFormat) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GatherFormat.Unmarshal(m, b) -} -func (m *GatherFormat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GatherFormat.Marshal(b, m, deterministic) -} -func (dst *GatherFormat) XXX_Merge(src proto.Message) { - xxx_messageInfo_GatherFormat.Merge(dst, src) -} -func (m *GatherFormat) XXX_Size() int { - return xxx_messageInfo_GatherFormat.Size(m) -} -func (m *GatherFormat) XXX_DiscardUnknown() { - xxx_messageInfo_GatherFormat.DiscardUnknown(m) -} - -var xxx_messageInfo_GatherFormat proto.InternalMessageInfo - -func (m *GatherFormat) GetID() string { - if m != nil { - return m.ID - } - return "" -} - -func (m *GatherFormat) GetList() []*MsgFormat { - if m != nil { - return m.List - } - return nil -} - -type MsgFormat struct { - // @inject_tag: json:"sendID" - SendID string `protobuf:"bytes,1,opt,name=SendID" json:"sendID"` - // @inject_tag: json:"recvID" - RecvID string `protobuf:"bytes,2,opt,name=RecvID" json:"recvID"` - // @inject_tag: json:"msgFrom" - MsgFrom int32 `protobuf:"varint,3,opt,name=MsgFrom" json:"msgFrom"` - // @inject_tag: json:"contentType" - ContentType int32 `protobuf:"varint,4,opt,name=ContentType" json:"contentType"` - // @inject_tag: json:"serverMsgID" - ServerMsgID string `protobuf:"bytes,5,opt,name=ServerMsgID" json:"serverMsgID"` - // @inject_tag: json:"content" - Content string `protobuf:"bytes,6,opt,name=Content" json:"content"` - // @inject_tag: json:"seq" - Seq int64 `protobuf:"varint,7,opt,name=Seq" json:"seq"` - // @inject_tag: json:"sendTime" - SendTime int64 `protobuf:"varint,8,opt,name=SendTime" json:"sendTime"` - // @inject_tag: json:"senderPlatformID" - SenderPlatformID int32 `protobuf:"varint,9,opt,name=SenderPlatformID" json:"senderPlatformID"` - // @inject_tag: json:"senderNickName" - SenderNickName string `protobuf:"bytes,10,opt,name=SenderNickName" json:"senderNickName"` - // @inject_tag: json:"senderFaceUrl" - SenderFaceURL string `protobuf:"bytes,11,opt,name=SenderFaceURL" json:"senderFaceUrl"` - // @inject_tag: json:"clientMsgID" - ClientMsgID string `protobuf:"bytes,12,opt,name=ClientMsgID" json:"clientMsgID"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MsgFormat) Reset() { *m = MsgFormat{} } -func (m *MsgFormat) String() string { return proto.CompactTextString(m) } -func (*MsgFormat) ProtoMessage() {} -func (*MsgFormat) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_d22d2bd62db4e275, []int{9} -} -func (m *MsgFormat) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_MsgFormat.Unmarshal(m, b) -} -func (m *MsgFormat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_MsgFormat.Marshal(b, m, deterministic) -} -func (dst *MsgFormat) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgFormat.Merge(dst, src) -} -func (m *MsgFormat) XXX_Size() int { - return xxx_messageInfo_MsgFormat.Size(m) -} -func (m *MsgFormat) XXX_DiscardUnknown() { - xxx_messageInfo_MsgFormat.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgFormat proto.InternalMessageInfo - -func (m *MsgFormat) GetSendID() string { - if m != nil { - return m.SendID - } - return "" -} - -func (m *MsgFormat) GetRecvID() string { - if m != nil { - return m.RecvID - } - return "" -} - -func (m *MsgFormat) GetMsgFrom() int32 { - if m != nil { - return m.MsgFrom - } - return 0 -} - -func (m *MsgFormat) GetContentType() int32 { - if m != nil { - return m.ContentType - } - return 0 -} - -func (m *MsgFormat) GetServerMsgID() string { - if m != nil { - return m.ServerMsgID - } - return "" -} - -func (m *MsgFormat) GetContent() string { - if m != nil { - return m.Content - } - return "" -} - -func (m *MsgFormat) GetSeq() int64 { - if m != nil { - return m.Seq - } - return 0 -} - -func (m *MsgFormat) GetSendTime() int64 { - if m != nil { - return m.SendTime - } - return 0 -} - -func (m *MsgFormat) GetSenderPlatformID() int32 { - if m != nil { - return m.SenderPlatformID - } - return 0 -} - -func (m *MsgFormat) GetSenderNickName() string { - if m != nil { - return m.SenderNickName - } - return "" -} - -func (m *MsgFormat) GetSenderFaceURL() string { - if m != nil { - return m.SenderFaceURL - } - return "" -} - -func (m *MsgFormat) GetClientMsgID() string { - if m != nil { - return m.ClientMsgID - } - return "" -} - type SendMsgReq struct { Token string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"` OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` @@ -671,7 +311,7 @@ func (m *SendMsgReq) Reset() { *m = SendMsgReq{} } func (m *SendMsgReq) String() string { return proto.CompactTextString(m) } func (*SendMsgReq) ProtoMessage() {} func (*SendMsgReq) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_d22d2bd62db4e275, []int{10} + return fileDescriptor_chat_6e4ec29226096c3a, []int{5} } func (m *SendMsgReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SendMsgReq.Unmarshal(m, b) @@ -713,10 +353,10 @@ func (m *SendMsgReq) GetMsgData() *sdk_ws.MsgData { } type SendMsgResp struct { - ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` - ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` - ServerMsgID string `protobuf:"bytes,4,opt,name=ServerMsgID" json:"ServerMsgID,omitempty"` - ClientMsgID string `protobuf:"bytes,5,opt,name=ClientMsgID" json:"ClientMsgID,omitempty"` + ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` + ServerMsgID string `protobuf:"bytes,4,opt,name=serverMsgID" json:"serverMsgID,omitempty"` + ClientMsgID string `protobuf:"bytes,5,opt,name=clientMsgID" json:"clientMsgID,omitempty"` SendTime int64 `protobuf:"varint,6,opt,name=sendTime" json:"sendTime,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -727,7 +367,7 @@ func (m *SendMsgResp) Reset() { *m = SendMsgResp{} } func (m *SendMsgResp) String() string { return proto.CompactTextString(m) } func (*SendMsgResp) ProtoMessage() {} func (*SendMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_d22d2bd62db4e275, []int{11} + return fileDescriptor_chat_6e4ec29226096c3a, []int{6} } func (m *SendMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SendMsgResp.Unmarshal(m, b) @@ -786,13 +426,8 @@ func init() { proto.RegisterType((*MsgDataToMQ)(nil), "pbChat.MsgDataToMQ") proto.RegisterType((*MsgDataToDB)(nil), "pbChat.MsgDataToDB") proto.RegisterType((*PushMsgDataToMQ)(nil), "pbChat.PushMsgDataToMQ") - proto.RegisterType((*PullMessageReq)(nil), "pbChat.PullMessageReq") - proto.RegisterType((*PullMessageResp)(nil), "pbChat.PullMessageResp") - proto.RegisterType((*PullMessageBySeqListReq)(nil), "pbChat.PullMessageBySeqListReq") proto.RegisterType((*GetMaxAndMinSeqReq)(nil), "pbChat.GetMaxAndMinSeqReq") proto.RegisterType((*GetMaxAndMinSeqResp)(nil), "pbChat.GetMaxAndMinSeqResp") - proto.RegisterType((*GatherFormat)(nil), "pbChat.GatherFormat") - proto.RegisterType((*MsgFormat)(nil), "pbChat.MsgFormat") proto.RegisterType((*SendMsgReq)(nil), "pbChat.SendMsgReq") proto.RegisterType((*SendMsgResp)(nil), "pbChat.SendMsgResp") } @@ -809,7 +444,7 @@ const _ = grpc.SupportPackageIsVersion4 type ChatClient interface { GetMaxAndMinSeq(ctx context.Context, in *GetMaxAndMinSeqReq, opts ...grpc.CallOption) (*GetMaxAndMinSeqResp, error) - PullMessage(ctx context.Context, in *PullMessageReq, opts ...grpc.CallOption) (*PullMessageResp, error) + PullMessage(ctx context.Context, in *sdk_ws.PullMessageReq, opts ...grpc.CallOption) (*sdk_ws.PullMessageResp, error) PullMessageBySeqList(ctx context.Context, in *sdk_ws.PullMessageBySeqListReq, opts ...grpc.CallOption) (*sdk_ws.PullMessageBySeqListResp, error) SendMsg(ctx context.Context, in *SendMsgReq, opts ...grpc.CallOption) (*SendMsgResp, error) } @@ -831,8 +466,8 @@ func (c *chatClient) GetMaxAndMinSeq(ctx context.Context, in *GetMaxAndMinSeqReq return out, nil } -func (c *chatClient) PullMessage(ctx context.Context, in *PullMessageReq, opts ...grpc.CallOption) (*PullMessageResp, error) { - out := new(PullMessageResp) +func (c *chatClient) PullMessage(ctx context.Context, in *sdk_ws.PullMessageReq, opts ...grpc.CallOption) (*sdk_ws.PullMessageResp, error) { + out := new(sdk_ws.PullMessageResp) err := grpc.Invoke(ctx, "/pbChat.Chat/PullMessage", in, out, c.cc, opts...) if err != nil { return nil, err @@ -862,7 +497,7 @@ func (c *chatClient) SendMsg(ctx context.Context, in *SendMsgReq, opts ...grpc.C type ChatServer interface { GetMaxAndMinSeq(context.Context, *GetMaxAndMinSeqReq) (*GetMaxAndMinSeqResp, error) - PullMessage(context.Context, *PullMessageReq) (*PullMessageResp, error) + PullMessage(context.Context, *sdk_ws.PullMessageReq) (*sdk_ws.PullMessageResp, error) PullMessageBySeqList(context.Context, *sdk_ws.PullMessageBySeqListReq) (*sdk_ws.PullMessageBySeqListResp, error) SendMsg(context.Context, *SendMsgReq) (*SendMsgResp, error) } @@ -890,7 +525,7 @@ func _Chat_GetMaxAndMinSeq_Handler(srv interface{}, ctx context.Context, dec fun } func _Chat_PullMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PullMessageReq) + in := new(sdk_ws.PullMessageReq) if err := dec(in); err != nil { return nil, err } @@ -902,7 +537,7 @@ func _Chat_PullMessage_Handler(srv interface{}, ctx context.Context, dec func(in FullMethod: "/pbChat.Chat/PullMessage", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ChatServer).PullMessage(ctx, req.(*PullMessageReq)) + return srv.(ChatServer).PullMessage(ctx, req.(*sdk_ws.PullMessageReq)) } return interceptor(ctx, in, info, handler) } @@ -968,56 +603,38 @@ var _Chat_serviceDesc = grpc.ServiceDesc{ Metadata: "chat/chat.proto", } -func init() { proto.RegisterFile("chat/chat.proto", fileDescriptor_chat_d22d2bd62db4e275) } +func init() { proto.RegisterFile("chat/chat.proto", fileDescriptor_chat_6e4ec29226096c3a) } -var fileDescriptor_chat_d22d2bd62db4e275 = []byte{ - // 754 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcb, 0x4e, 0xdb, 0x40, - 0x14, 0x55, 0xec, 0x3c, 0xe0, 0x06, 0x08, 0x1d, 0x10, 0x58, 0xee, 0x26, 0xb5, 0xa0, 0x42, 0x5d, - 0x24, 0x12, 0xdd, 0x54, 0xad, 0x54, 0xa9, 0x21, 0x01, 0xa5, 0xc2, 0x40, 0x1d, 0xd8, 0x74, 0x13, - 0x99, 0x78, 0xea, 0x58, 0x89, 0x1f, 0x99, 0x99, 0xf0, 0xd8, 0xf4, 0x57, 0xfa, 0x01, 0xfd, 0xb2, - 0x7e, 0x44, 0xa5, 0x6a, 0x66, 0xec, 0x30, 0x89, 0x81, 0xa2, 0x56, 0x62, 0x13, 0xe5, 0x9c, 0xb9, - 0xcf, 0x73, 0xef, 0x8c, 0x0c, 0xb5, 0xc1, 0xd0, 0x65, 0x4d, 0xfe, 0xd3, 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d1, 0x6c, 0x66, 0x65, 0x39, 0xb3, 0x0c, 0xef, 0xff, 0xd4, 0xa0, 0xc8, 0x17, 0x16, - 0x7d, 0x86, 0xda, 0xc2, 0x05, 0x43, 0xe6, 0xec, 0x59, 0xc9, 0xdd, 0x64, 0xf3, 0xe5, 0x83, 0x67, - 0x34, 0x41, 0x1f, 0xa1, 0xaa, 0xbc, 0x35, 0x68, 0x2b, 0xb3, 0x9d, 0x7f, 0xec, 0xcd, 0xed, 0x7b, - 0x79, 0x9a, 0xa0, 0x01, 0x6c, 0xde, 0xf7, 0x56, 0xa1, 0x9d, 0x39, 0xb5, 0x1f, 0x78, 0xce, 0xcc, - 0xdd, 0x27, 0x58, 0xd1, 0x04, 0xed, 0x43, 0x25, 0x1d, 0x0d, 0x42, 0x59, 0x21, 0x77, 0x2b, 0x62, - 0x6e, 0xe4, 0x38, 0x9a, 0xb4, 0x6a, 0x5f, 0x57, 0x1b, 0xe2, 0x43, 0xe1, 0x83, 0x3c, 0xbc, 0x2c, - 0x8b, 0xaf, 0x80, 0xb7, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xcb, 0x2c, 0x3b, 0x8f, 0x43, 0x08, - 0x00, 0x00, +var fileDescriptor_chat_6e4ec29226096c3a = []byte{ + // 477 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0x4d, 0x6f, 0xda, 0x40, + 0x10, 0x15, 0x24, 0x40, 0x33, 0x56, 0x85, 0xb4, 0x41, 0x95, 0xe5, 0xf4, 0x40, 0xad, 0x56, 0xca, + 0xc9, 0x96, 0xe8, 0xb1, 0xa7, 0x12, 0xa2, 0x96, 0xaa, 0xdb, 0xa4, 0x26, 0xbd, 0xf4, 0x82, 0x1c, + 0x3c, 0x32, 0x16, 0x60, 0x2f, 0x9e, 0xa5, 0xa4, 0xbf, 0xa6, 0xbf, 0xa2, 0xff, 0xaf, 0xda, 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f6, 0xbb, 0x23, 0xba, 0x48, + 0xb0, 0x1e, 0xb4, 0xaa, 0x4d, 0x62, 0x6c, 0x13, 0xeb, 0xf1, 0xb0, 0x78, 0xe7, 0x7b, 0x1c, 0x89, + 0x7e, 0xfb, 0xe7, 0xcb, 0x40, 0x3f, 0x48, 0x1f, 0x4c, 0xf1, 0xbe, 0xa9, 0x5f, 0x9b, 0xf7, 0xff, + 0x02, 0x00, 0x00, 0xff, 0xff, 0xb3, 0x57, 0x8f, 0x13, 0xab, 0x04, 0x00, 0x00, } diff --git a/pkg/proto/sdk_ws/ws.pb.go b/pkg/proto/sdk_ws/ws.pb.go index 4e7bd82bc..b65f2980c 100644 --- a/pkg/proto/sdk_ws/ws.pb.go +++ b/pkg/proto/sdk_ws/ws.pb.go @@ -19,10 +19,12 @@ var _ = math.Inf const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type PullMessageBySeqListResp struct { - MaxSeq int64 `protobuf:"varint,1,opt,name=MaxSeq" json:"MaxSeq,omitempty"` - MinSeq int64 `protobuf:"varint,2,opt,name=MinSeq" json:"MinSeq,omitempty"` - SingleUserMsg []*GatherFormat `protobuf:"bytes,3,rep,name=SingleUserMsg" json:"SingleUserMsg,omitempty"` - GroupUserMsg []*GatherFormat `protobuf:"bytes,4,rep,name=GroupUserMsg" json:"GroupUserMsg,omitempty"` + ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` + MaxSeq int64 `protobuf:"varint,3,opt,name=maxSeq" json:"maxSeq,omitempty"` + MinSeq int64 `protobuf:"varint,4,opt,name=minSeq" json:"minSeq,omitempty"` + SingleUserMsg []*GatherFormat `protobuf:"bytes,5,rep,name=singleUserMsg" json:"singleUserMsg,omitempty"` + GroupUserMsg []*GatherFormat `protobuf:"bytes,6,rep,name=groupUserMsg" json:"groupUserMsg,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -32,7 +34,7 @@ func (m *PullMessageBySeqListResp) Reset() { *m = PullMessageBySeqListRe func (m *PullMessageBySeqListResp) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListResp) ProtoMessage() {} func (*PullMessageBySeqListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_ca4877c90b77c1e9, []int{0} + return fileDescriptor_ws_9a3c519aa1c52df5, []int{0} } func (m *PullMessageBySeqListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListResp.Unmarshal(m, b) @@ -52,6 +54,20 @@ func (m *PullMessageBySeqListResp) XXX_DiscardUnknown() { var xxx_messageInfo_PullMessageBySeqListResp proto.InternalMessageInfo +func (m *PullMessageBySeqListResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *PullMessageBySeqListResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + func (m *PullMessageBySeqListResp) GetMaxSeq() int64 { if m != nil { return m.MaxSeq @@ -81,7 +97,9 @@ func (m *PullMessageBySeqListResp) GetGroupUserMsg() []*GatherFormat { } type PullMessageBySeqListReq struct { - SeqList []int64 `protobuf:"varint,1,rep,packed,name=seqList" json:"seqList,omitempty"` + UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` + OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` + SeqList []int64 `protobuf:"varint,3,rep,packed,name=seqList" json:"seqList,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -91,7 +109,7 @@ func (m *PullMessageBySeqListReq) Reset() { *m = PullMessageBySeqListReq func (m *PullMessageBySeqListReq) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListReq) ProtoMessage() {} func (*PullMessageBySeqListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_ca4877c90b77c1e9, []int{1} + return fileDescriptor_ws_9a3c519aa1c52df5, []int{1} } func (m *PullMessageBySeqListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListReq.Unmarshal(m, b) @@ -111,6 +129,20 @@ func (m *PullMessageBySeqListReq) XXX_DiscardUnknown() { var xxx_messageInfo_PullMessageBySeqListReq proto.InternalMessageInfo +func (m *PullMessageBySeqListReq) GetUserID() string { + if m != nil { + return m.UserID + } + return "" +} + +func (m *PullMessageBySeqListReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + func (m *PullMessageBySeqListReq) GetSeqList() []int64 { if m != nil { return m.SeqList @@ -118,6 +150,146 @@ func (m *PullMessageBySeqListReq) GetSeqList() []int64 { return nil } +type PullMessageReq struct { + UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` + SeqBegin int64 `protobuf:"varint,2,opt,name=seqBegin" json:"seqBegin,omitempty"` + SeqEnd int64 `protobuf:"varint,3,opt,name=seqEnd" json:"seqEnd,omitempty"` + OperationID string `protobuf:"bytes,4,opt,name=operationID" json:"operationID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PullMessageReq) Reset() { *m = PullMessageReq{} } +func (m *PullMessageReq) String() string { return proto.CompactTextString(m) } +func (*PullMessageReq) ProtoMessage() {} +func (*PullMessageReq) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_9a3c519aa1c52df5, []int{2} +} +func (m *PullMessageReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PullMessageReq.Unmarshal(m, b) +} +func (m *PullMessageReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PullMessageReq.Marshal(b, m, deterministic) +} +func (dst *PullMessageReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_PullMessageReq.Merge(dst, src) +} +func (m *PullMessageReq) XXX_Size() int { + return xxx_messageInfo_PullMessageReq.Size(m) +} +func (m *PullMessageReq) XXX_DiscardUnknown() { + xxx_messageInfo_PullMessageReq.DiscardUnknown(m) +} + +var xxx_messageInfo_PullMessageReq proto.InternalMessageInfo + +func (m *PullMessageReq) GetUserID() string { + if m != nil { + return m.UserID + } + return "" +} + +func (m *PullMessageReq) GetSeqBegin() int64 { + if m != nil { + return m.SeqBegin + } + return 0 +} + +func (m *PullMessageReq) GetSeqEnd() int64 { + if m != nil { + return m.SeqEnd + } + return 0 +} + +func (m *PullMessageReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +type PullMessageResp struct { + ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` + MaxSeq int64 `protobuf:"varint,3,opt,name=maxSeq" json:"maxSeq,omitempty"` + MinSeq int64 `protobuf:"varint,4,opt,name=minSeq" json:"minSeq,omitempty"` + SingleUserMsg []*GatherFormat `protobuf:"bytes,5,rep,name=singleUserMsg" json:"singleUserMsg,omitempty"` + GroupUserMsg []*GatherFormat `protobuf:"bytes,6,rep,name=groupUserMsg" json:"groupUserMsg,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PullMessageResp) Reset() { *m = PullMessageResp{} } +func (m *PullMessageResp) String() string { return proto.CompactTextString(m) } +func (*PullMessageResp) ProtoMessage() {} +func (*PullMessageResp) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_9a3c519aa1c52df5, []int{3} +} +func (m *PullMessageResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PullMessageResp.Unmarshal(m, b) +} +func (m *PullMessageResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PullMessageResp.Marshal(b, m, deterministic) +} +func (dst *PullMessageResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_PullMessageResp.Merge(dst, src) +} +func (m *PullMessageResp) XXX_Size() int { + return xxx_messageInfo_PullMessageResp.Size(m) +} +func (m *PullMessageResp) XXX_DiscardUnknown() { + xxx_messageInfo_PullMessageResp.DiscardUnknown(m) +} + +var xxx_messageInfo_PullMessageResp proto.InternalMessageInfo + +func (m *PullMessageResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *PullMessageResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + +func (m *PullMessageResp) GetMaxSeq() int64 { + if m != nil { + return m.MaxSeq + } + return 0 +} + +func (m *PullMessageResp) GetMinSeq() int64 { + if m != nil { + return m.MinSeq + } + return 0 +} + +func (m *PullMessageResp) GetSingleUserMsg() []*GatherFormat { + if m != nil { + return m.SingleUserMsg + } + return nil +} + +func (m *PullMessageResp) GetGroupUserMsg() []*GatherFormat { + if m != nil { + return m.GroupUserMsg + } + return nil +} + type GetMaxAndMinSeqReq struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -128,7 +300,7 @@ func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} } func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqReq) ProtoMessage() {} func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_ca4877c90b77c1e9, []int{2} + return fileDescriptor_ws_9a3c519aa1c52df5, []int{4} } func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) @@ -160,7 +332,7 @@ func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} } func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqResp) ProtoMessage() {} func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_ca4877c90b77c1e9, []int{3} + return fileDescriptor_ws_9a3c519aa1c52df5, []int{5} } func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) @@ -196,19 +368,19 @@ func (m *GetMaxAndMinSeqResp) GetMinSeq() int64 { type GatherFormat struct { // @inject_tag: json:"id" - ID string `protobuf:"bytes,1,opt,name=ID" json:"id"` + Id string `protobuf:"bytes,1,opt,name=id" json:"id"` // @inject_tag: json:"list" - List []*MsgFormat `protobuf:"bytes,2,rep,name=List" json:"list"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + List []*MsgData `protobuf:"bytes,2,rep,name=list" json:"list"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GatherFormat) Reset() { *m = GatherFormat{} } func (m *GatherFormat) String() string { return proto.CompactTextString(m) } func (*GatherFormat) ProtoMessage() {} func (*GatherFormat) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_ca4877c90b77c1e9, []int{4} + return fileDescriptor_ws_9a3c519aa1c52df5, []int{6} } func (m *GatherFormat) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GatherFormat.Unmarshal(m, b) @@ -228,276 +400,20 @@ func (m *GatherFormat) XXX_DiscardUnknown() { var xxx_messageInfo_GatherFormat proto.InternalMessageInfo -func (m *GatherFormat) GetID() string { +func (m *GatherFormat) GetId() string { if m != nil { - return m.ID + return m.Id } return "" } -func (m *GatherFormat) GetList() []*MsgFormat { +func (m *GatherFormat) GetList() []*MsgData { if m != nil { return m.List } return nil } -type MsgFormat struct { - // @inject_tag: json:"sendID" - SendID string `protobuf:"bytes,1,opt,name=SendID" json:"sendID"` - // @inject_tag: json:"recvID" - RecvID string `protobuf:"bytes,2,opt,name=RecvID" json:"recvID"` - // @inject_tag: json:"msgFrom" - MsgFrom int32 `protobuf:"varint,3,opt,name=MsgFrom" json:"msgFrom"` - // @inject_tag: json:"contentType" - ContentType int32 `protobuf:"varint,4,opt,name=ContentType" json:"contentType"` - // @inject_tag: json:"serverMsgID" - ServerMsgID string `protobuf:"bytes,5,opt,name=ServerMsgID" json:"serverMsgID"` - // @inject_tag: json:"content" - Content string `protobuf:"bytes,6,opt,name=Content" json:"content"` - // @inject_tag: json:"seq" - Seq int64 `protobuf:"varint,7,opt,name=Seq" json:"seq"` - // @inject_tag: json:"sendTime" - SendTime int64 `protobuf:"varint,8,opt,name=SendTime" json:"sendTime"` - // @inject_tag: json:"senderPlatformID" - SenderPlatformID int32 `protobuf:"varint,9,opt,name=SenderPlatformID" json:"senderPlatformID"` - // @inject_tag: json:"senderNickName" - SenderNickName string `protobuf:"bytes,10,opt,name=SenderNickName" json:"senderNickName"` - // @inject_tag: json:"senderFaceUrl" - SenderFaceURL string `protobuf:"bytes,11,opt,name=SenderFaceURL" json:"senderFaceUrl"` - // @inject_tag: json:"clientMsgID" - ClientMsgID string `protobuf:"bytes,12,opt,name=ClientMsgID" json:"clientMsgID"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MsgFormat) Reset() { *m = MsgFormat{} } -func (m *MsgFormat) String() string { return proto.CompactTextString(m) } -func (*MsgFormat) ProtoMessage() {} -func (*MsgFormat) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_ca4877c90b77c1e9, []int{5} -} -func (m *MsgFormat) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_MsgFormat.Unmarshal(m, b) -} -func (m *MsgFormat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_MsgFormat.Marshal(b, m, deterministic) -} -func (dst *MsgFormat) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgFormat.Merge(dst, src) -} -func (m *MsgFormat) XXX_Size() int { - return xxx_messageInfo_MsgFormat.Size(m) -} -func (m *MsgFormat) XXX_DiscardUnknown() { - xxx_messageInfo_MsgFormat.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgFormat proto.InternalMessageInfo - -func (m *MsgFormat) GetSendID() string { - if m != nil { - return m.SendID - } - return "" -} - -func (m *MsgFormat) GetRecvID() string { - if m != nil { - return m.RecvID - } - return "" -} - -func (m *MsgFormat) GetMsgFrom() int32 { - if m != nil { - return m.MsgFrom - } - return 0 -} - -func (m *MsgFormat) GetContentType() int32 { - if m != nil { - return m.ContentType - } - return 0 -} - -func (m *MsgFormat) GetServerMsgID() string { - if m != nil { - return m.ServerMsgID - } - return "" -} - -func (m *MsgFormat) GetContent() string { - if m != nil { - return m.Content - } - return "" -} - -func (m *MsgFormat) GetSeq() int64 { - if m != nil { - return m.Seq - } - return 0 -} - -func (m *MsgFormat) GetSendTime() int64 { - if m != nil { - return m.SendTime - } - return 0 -} - -func (m *MsgFormat) GetSenderPlatformID() int32 { - if m != nil { - return m.SenderPlatformID - } - return 0 -} - -func (m *MsgFormat) GetSenderNickName() string { - if m != nil { - return m.SenderNickName - } - return "" -} - -func (m *MsgFormat) GetSenderFaceURL() string { - if m != nil { - return m.SenderFaceURL - } - return "" -} - -func (m *MsgFormat) GetClientMsgID() string { - if m != nil { - return m.ClientMsgID - } - return "" -} - -type UserSendMsgReq struct { - Options map[string]int32 `protobuf:"bytes,1,rep,name=Options" json:"Options,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - SenderNickName string `protobuf:"bytes,2,opt,name=SenderNickName" json:"SenderNickName,omitempty"` - SenderFaceURL string `protobuf:"bytes,3,opt,name=SenderFaceURL" json:"SenderFaceURL,omitempty"` - PlatformID int32 `protobuf:"varint,4,opt,name=PlatformID" json:"PlatformID,omitempty"` - SessionType int32 `protobuf:"varint,5,opt,name=SessionType" json:"SessionType,omitempty"` - MsgFrom int32 `protobuf:"varint,6,opt,name=MsgFrom" json:"MsgFrom,omitempty"` - ContentType int32 `protobuf:"varint,7,opt,name=ContentType" json:"ContentType,omitempty"` - RecvID string `protobuf:"bytes,8,opt,name=RecvID" json:"RecvID,omitempty"` - ForceList []string `protobuf:"bytes,9,rep,name=ForceList" json:"ForceList,omitempty"` - Content string `protobuf:"bytes,10,opt,name=Content" json:"Content,omitempty"` - ClientMsgID string `protobuf:"bytes,11,opt,name=ClientMsgID" json:"ClientMsgID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *UserSendMsgReq) Reset() { *m = UserSendMsgReq{} } -func (m *UserSendMsgReq) String() string { return proto.CompactTextString(m) } -func (*UserSendMsgReq) ProtoMessage() {} -func (*UserSendMsgReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_ca4877c90b77c1e9, []int{6} -} -func (m *UserSendMsgReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UserSendMsgReq.Unmarshal(m, b) -} -func (m *UserSendMsgReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UserSendMsgReq.Marshal(b, m, deterministic) -} -func (dst *UserSendMsgReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_UserSendMsgReq.Merge(dst, src) -} -func (m *UserSendMsgReq) XXX_Size() int { - return xxx_messageInfo_UserSendMsgReq.Size(m) -} -func (m *UserSendMsgReq) XXX_DiscardUnknown() { - xxx_messageInfo_UserSendMsgReq.DiscardUnknown(m) -} - -var xxx_messageInfo_UserSendMsgReq proto.InternalMessageInfo - -func (m *UserSendMsgReq) GetOptions() map[string]int32 { - if m != nil { - return m.Options - } - return nil -} - -func (m *UserSendMsgReq) GetSenderNickName() string { - if m != nil { - return m.SenderNickName - } - return "" -} - -func (m *UserSendMsgReq) GetSenderFaceURL() string { - if m != nil { - return m.SenderFaceURL - } - return "" -} - -func (m *UserSendMsgReq) GetPlatformID() int32 { - if m != nil { - return m.PlatformID - } - return 0 -} - -func (m *UserSendMsgReq) GetSessionType() int32 { - if m != nil { - return m.SessionType - } - return 0 -} - -func (m *UserSendMsgReq) GetMsgFrom() int32 { - if m != nil { - return m.MsgFrom - } - return 0 -} - -func (m *UserSendMsgReq) GetContentType() int32 { - if m != nil { - return m.ContentType - } - return 0 -} - -func (m *UserSendMsgReq) GetRecvID() string { - if m != nil { - return m.RecvID - } - return "" -} - -func (m *UserSendMsgReq) GetForceList() []string { - if m != nil { - return m.ForceList - } - return nil -} - -func (m *UserSendMsgReq) GetContent() string { - if m != nil { - return m.Content - } - return "" -} - -func (m *UserSendMsgReq) GetClientMsgID() string { - if m != nil { - return m.ClientMsgID - } - return "" -} - type UserSendMsgResp struct { ServerMsgID string `protobuf:"bytes,1,opt,name=ServerMsgID" json:"ServerMsgID,omitempty"` ClientMsgID string `protobuf:"bytes,2,opt,name=ClientMsgID" json:"ClientMsgID,omitempty"` @@ -511,7 +427,7 @@ func (m *UserSendMsgResp) Reset() { *m = UserSendMsgResp{} } func (m *UserSendMsgResp) String() string { return proto.CompactTextString(m) } func (*UserSendMsgResp) ProtoMessage() {} func (*UserSendMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_ca4877c90b77c1e9, []int{7} + return fileDescriptor_ws_9a3c519aa1c52df5, []int{7} } func (m *UserSendMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserSendMsgResp.Unmarshal(m, b) @@ -580,7 +496,7 @@ func (m *MsgData) Reset() { *m = MsgData{} } func (m *MsgData) String() string { return proto.CompactTextString(m) } func (*MsgData) ProtoMessage() {} func (*MsgData) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_ca4877c90b77c1e9, []int{8} + return fileDescriptor_ws_9a3c519aa1c52df5, []int{8} } func (m *MsgData) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgData.Unmarshal(m, b) @@ -741,7 +657,7 @@ func (m *OfflinePushInfo) Reset() { *m = OfflinePushInfo{} } func (m *OfflinePushInfo) String() string { return proto.CompactTextString(m) } func (*OfflinePushInfo) ProtoMessage() {} func (*OfflinePushInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_ca4877c90b77c1e9, []int{9} + return fileDescriptor_ws_9a3c519aa1c52df5, []int{9} } func (m *OfflinePushInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OfflinePushInfo.Unmarshal(m, b) @@ -806,6 +722,7 @@ type GroupInfo struct { Owner *PublicUserInfo `protobuf:"bytes,6,opt,name=Owner" json:"Owner,omitempty"` CreateTime uint64 `protobuf:"varint,7,opt,name=CreateTime" json:"CreateTime,omitempty"` MemberCount uint32 `protobuf:"varint,8,opt,name=MemberCount" json:"MemberCount,omitempty"` + Ext string `protobuf:"bytes,9,opt,name=Ext" json:"Ext,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -815,7 +732,7 @@ func (m *GroupInfo) Reset() { *m = GroupInfo{} } func (m *GroupInfo) String() string { return proto.CompactTextString(m) } func (*GroupInfo) ProtoMessage() {} func (*GroupInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_ca4877c90b77c1e9, []int{10} + return fileDescriptor_ws_9a3c519aa1c52df5, []int{10} } func (m *GroupInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfo.Unmarshal(m, b) @@ -891,6 +808,13 @@ func (m *GroupInfo) GetMemberCount() uint32 { return 0 } +func (m *GroupInfo) GetExt() string { + if m != nil { + return m.Ext + } + return "" +} + // private, Group members have permission to view type GroupMemberFullInfo struct { GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` @@ -909,7 +833,7 @@ func (m *GroupMemberFullInfo) Reset() { *m = GroupMemberFullInfo{} } func (m *GroupMemberFullInfo) String() string { return proto.CompactTextString(m) } func (*GroupMemberFullInfo) ProtoMessage() {} func (*GroupMemberFullInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_ca4877c90b77c1e9, []int{11} + return fileDescriptor_ws_9a3c519aa1c52df5, []int{11} } func (m *GroupMemberFullInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupMemberFullInfo.Unmarshal(m, b) @@ -987,6 +911,7 @@ type UserInfo struct { Mobile string `protobuf:"bytes,5,opt,name=Mobile" json:"Mobile,omitempty"` Birth string `protobuf:"bytes,6,opt,name=Birth" json:"Birth,omitempty"` Email string `protobuf:"bytes,7,opt,name=Email" json:"Email,omitempty"` + Ext string `protobuf:"bytes,8,opt,name=Ext" json:"Ext,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -996,7 +921,7 @@ func (m *UserInfo) Reset() { *m = UserInfo{} } func (m *UserInfo) String() string { return proto.CompactTextString(m) } func (*UserInfo) ProtoMessage() {} func (*UserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_ca4877c90b77c1e9, []int{12} + return fileDescriptor_ws_9a3c519aa1c52df5, []int{12} } func (m *UserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserInfo.Unmarshal(m, b) @@ -1065,6 +990,13 @@ func (m *UserInfo) GetEmail() string { return "" } +func (m *UserInfo) GetExt() string { + if m != nil { + return m.Ext + } + return "" +} + // No permissions required type PublicUserInfo struct { UserID string `protobuf:"bytes,1,opt,name=UserID" json:"UserID,omitempty"` @@ -1080,7 +1012,7 @@ func (m *PublicUserInfo) Reset() { *m = PublicUserInfo{} } func (m *PublicUserInfo) String() string { return proto.CompactTextString(m) } func (*PublicUserInfo) ProtoMessage() {} func (*PublicUserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_ca4877c90b77c1e9, []int{13} + return fileDescriptor_ws_9a3c519aa1c52df5, []int{13} } func (m *PublicUserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PublicUserInfo.Unmarshal(m, b) @@ -1140,7 +1072,7 @@ func (m *TipsComm) Reset() { *m = TipsComm{} } func (m *TipsComm) String() string { return proto.CompactTextString(m) } func (*TipsComm) ProtoMessage() {} func (*TipsComm) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_ca4877c90b77c1e9, []int{14} + return fileDescriptor_ws_9a3c519aa1c52df5, []int{14} } func (m *TipsComm) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TipsComm.Unmarshal(m, b) @@ -1189,7 +1121,7 @@ func (m *MemberEnterTips) Reset() { *m = MemberEnterTips{} } func (m *MemberEnterTips) String() string { return proto.CompactTextString(m) } func (*MemberEnterTips) ProtoMessage() {} func (*MemberEnterTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_ca4877c90b77c1e9, []int{15} + return fileDescriptor_ws_9a3c519aa1c52df5, []int{15} } func (m *MemberEnterTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberEnterTips.Unmarshal(m, b) @@ -1244,7 +1176,7 @@ func (m *MemberLeaveTips) Reset() { *m = MemberLeaveTips{} } func (m *MemberLeaveTips) String() string { return proto.CompactTextString(m) } func (*MemberLeaveTips) ProtoMessage() {} func (*MemberLeaveTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_ca4877c90b77c1e9, []int{16} + return fileDescriptor_ws_9a3c519aa1c52df5, []int{16} } func (m *MemberLeaveTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberLeaveTips.Unmarshal(m, b) @@ -1299,7 +1231,7 @@ func (m *MemberInvitedTips) Reset() { *m = MemberInvitedTips{} } func (m *MemberInvitedTips) String() string { return proto.CompactTextString(m) } func (*MemberInvitedTips) ProtoMessage() {} func (*MemberInvitedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_ca4877c90b77c1e9, []int{17} + return fileDescriptor_ws_9a3c519aa1c52df5, []int{17} } func (m *MemberInvitedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInvitedTips.Unmarshal(m, b) @@ -1361,7 +1293,7 @@ func (m *MemberKickedTips) Reset() { *m = MemberKickedTips{} } func (m *MemberKickedTips) String() string { return proto.CompactTextString(m) } func (*MemberKickedTips) ProtoMessage() {} func (*MemberKickedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_ca4877c90b77c1e9, []int{18} + return fileDescriptor_ws_9a3c519aa1c52df5, []int{18} } func (m *MemberKickedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberKickedTips.Unmarshal(m, b) @@ -1424,7 +1356,7 @@ func (m *MemberInfoChangedTips) Reset() { *m = MemberInfoChangedTips{} } func (m *MemberInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*MemberInfoChangedTips) ProtoMessage() {} func (*MemberInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_ca4877c90b77c1e9, []int{19} + return fileDescriptor_ws_9a3c519aa1c52df5, []int{19} } func (m *MemberInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInfoChangedTips.Unmarshal(m, b) @@ -1493,7 +1425,7 @@ func (m *GroupCreatedTips) Reset() { *m = GroupCreatedTips{} } func (m *GroupCreatedTips) String() string { return proto.CompactTextString(m) } func (*GroupCreatedTips) ProtoMessage() {} func (*GroupCreatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_ca4877c90b77c1e9, []int{20} + return fileDescriptor_ws_9a3c519aa1c52df5, []int{20} } func (m *GroupCreatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupCreatedTips.Unmarshal(m, b) @@ -1554,7 +1486,7 @@ func (m *GroupInfoChangedTips) Reset() { *m = GroupInfoChangedTips{} } func (m *GroupInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*GroupInfoChangedTips) ProtoMessage() {} func (*GroupInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_ca4877c90b77c1e9, []int{21} + return fileDescriptor_ws_9a3c519aa1c52df5, []int{21} } func (m *GroupInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfoChangedTips.Unmarshal(m, b) @@ -1608,7 +1540,7 @@ func (m *ReceiveJoinApplicationTips) Reset() { *m = ReceiveJoinApplicati func (m *ReceiveJoinApplicationTips) String() string { return proto.CompactTextString(m) } func (*ReceiveJoinApplicationTips) ProtoMessage() {} func (*ReceiveJoinApplicationTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_ca4877c90b77c1e9, []int{22} + return fileDescriptor_ws_9a3c519aa1c52df5, []int{22} } func (m *ReceiveJoinApplicationTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ReceiveJoinApplicationTips.Unmarshal(m, b) @@ -1663,7 +1595,7 @@ func (m *ApplicationProcessedTips) Reset() { *m = ApplicationProcessedTi func (m *ApplicationProcessedTips) String() string { return proto.CompactTextString(m) } func (*ApplicationProcessedTips) ProtoMessage() {} func (*ApplicationProcessedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_ca4877c90b77c1e9, []int{23} + return fileDescriptor_ws_9a3c519aa1c52df5, []int{23} } func (m *ApplicationProcessedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ApplicationProcessedTips.Unmarshal(m, b) @@ -1726,7 +1658,7 @@ func (m *FriendInfo) Reset() { *m = FriendInfo{} } func (m *FriendInfo) String() string { return proto.CompactTextString(m) } func (*FriendInfo) ProtoMessage() {} func (*FriendInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_ca4877c90b77c1e9, []int{24} + return fileDescriptor_ws_9a3c519aa1c52df5, []int{24} } func (m *FriendInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfo.Unmarshal(m, b) @@ -1787,7 +1719,7 @@ func (m *FriendApplication) Reset() { *m = FriendApplication{} } func (m *FriendApplication) String() string { return proto.CompactTextString(m) } func (*FriendApplication) ProtoMessage() {} func (*FriendApplication) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_ca4877c90b77c1e9, []int{25} + return fileDescriptor_ws_9a3c519aa1c52df5, []int{25} } func (m *FriendApplication) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplication.Unmarshal(m, b) @@ -1843,7 +1775,7 @@ func (m *FriendApplicationAddedTips) Reset() { *m = FriendApplicationAdd func (m *FriendApplicationAddedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationAddedTips) ProtoMessage() {} func (*FriendApplicationAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_ca4877c90b77c1e9, []int{26} + return fileDescriptor_ws_9a3c519aa1c52df5, []int{26} } func (m *FriendApplicationAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationAddedTips.Unmarshal(m, b) @@ -1906,7 +1838,7 @@ func (m *FriendApplicationProcessedTips) Reset() { *m = FriendApplicatio func (m *FriendApplicationProcessedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationProcessedTips) ProtoMessage() {} func (*FriendApplicationProcessedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_ca4877c90b77c1e9, []int{27} + return fileDescriptor_ws_9a3c519aa1c52df5, []int{27} } func (m *FriendApplicationProcessedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationProcessedTips.Unmarshal(m, b) @@ -1966,7 +1898,7 @@ func (m *FriendAddedTips) Reset() { *m = FriendAddedTips{} } func (m *FriendAddedTips) String() string { return proto.CompactTextString(m) } func (*FriendAddedTips) ProtoMessage() {} func (*FriendAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_ca4877c90b77c1e9, []int{28} + return fileDescriptor_ws_9a3c519aa1c52df5, []int{28} } func (m *FriendAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendAddedTips.Unmarshal(m, b) @@ -2012,7 +1944,7 @@ func (m *FriendDeletedTips) Reset() { *m = FriendDeletedTips{} } func (m *FriendDeletedTips) String() string { return proto.CompactTextString(m) } func (*FriendDeletedTips) ProtoMessage() {} func (*FriendDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_ca4877c90b77c1e9, []int{29} + return fileDescriptor_ws_9a3c519aa1c52df5, []int{29} } func (m *FriendDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendDeletedTips.Unmarshal(m, b) @@ -2059,7 +1991,7 @@ func (m *BlackInfo) Reset() { *m = BlackInfo{} } func (m *BlackInfo) String() string { return proto.CompactTextString(m) } func (*BlackInfo) ProtoMessage() {} func (*BlackInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_ca4877c90b77c1e9, []int{30} + return fileDescriptor_ws_9a3c519aa1c52df5, []int{30} } func (m *BlackInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackInfo.Unmarshal(m, b) @@ -2112,7 +2044,7 @@ func (m *BlackAddedTips) Reset() { *m = BlackAddedTips{} } func (m *BlackAddedTips) String() string { return proto.CompactTextString(m) } func (*BlackAddedTips) ProtoMessage() {} func (*BlackAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_ca4877c90b77c1e9, []int{31} + return fileDescriptor_ws_9a3c519aa1c52df5, []int{31} } func (m *BlackAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackAddedTips.Unmarshal(m, b) @@ -2158,7 +2090,7 @@ func (m *BlackDeletedTips) Reset() { *m = BlackDeletedTips{} } func (m *BlackDeletedTips) String() string { return proto.CompactTextString(m) } func (*BlackDeletedTips) ProtoMessage() {} func (*BlackDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_ca4877c90b77c1e9, []int{32} + return fileDescriptor_ws_9a3c519aa1c52df5, []int{32} } func (m *BlackDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackDeletedTips.Unmarshal(m, b) @@ -2205,7 +2137,7 @@ func (m *FriendInfoChangedTips) Reset() { *m = FriendInfoChangedTips{} } func (m *FriendInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*FriendInfoChangedTips) ProtoMessage() {} func (*FriendInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_ca4877c90b77c1e9, []int{33} + return fileDescriptor_ws_9a3c519aa1c52df5, []int{33} } func (m *FriendInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfoChangedTips.Unmarshal(m, b) @@ -2260,7 +2192,7 @@ func (m *SelfInfoUpdatedTips) Reset() { *m = SelfInfoUpdatedTips{} } func (m *SelfInfoUpdatedTips) String() string { return proto.CompactTextString(m) } func (*SelfInfoUpdatedTips) ProtoMessage() {} func (*SelfInfoUpdatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_ca4877c90b77c1e9, []int{34} + return fileDescriptor_ws_9a3c519aa1c52df5, []int{34} } func (m *SelfInfoUpdatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SelfInfoUpdatedTips.Unmarshal(m, b) @@ -2304,12 +2236,11 @@ func (m *SelfInfoUpdatedTips) GetOperationTime() uint64 { func init() { proto.RegisterType((*PullMessageBySeqListResp)(nil), "open_im_sdk.PullMessageBySeqListResp") proto.RegisterType((*PullMessageBySeqListReq)(nil), "open_im_sdk.PullMessageBySeqListReq") + proto.RegisterType((*PullMessageReq)(nil), "open_im_sdk.PullMessageReq") + proto.RegisterType((*PullMessageResp)(nil), "open_im_sdk.PullMessageResp") proto.RegisterType((*GetMaxAndMinSeqReq)(nil), "open_im_sdk.GetMaxAndMinSeqReq") proto.RegisterType((*GetMaxAndMinSeqResp)(nil), "open_im_sdk.GetMaxAndMinSeqResp") proto.RegisterType((*GatherFormat)(nil), "open_im_sdk.GatherFormat") - proto.RegisterType((*MsgFormat)(nil), "open_im_sdk.MsgFormat") - proto.RegisterType((*UserSendMsgReq)(nil), "open_im_sdk.UserSendMsgReq") - proto.RegisterMapType((map[string]int32)(nil), "open_im_sdk.UserSendMsgReq.OptionsEntry") proto.RegisterType((*UserSendMsgResp)(nil), "open_im_sdk.UserSendMsgResp") proto.RegisterType((*MsgData)(nil), "open_im_sdk.MsgData") proto.RegisterMapType((map[string]bool)(nil), "open_im_sdk.MsgData.OptionsEntry") @@ -2341,124 +2272,118 @@ func init() { proto.RegisterType((*SelfInfoUpdatedTips)(nil), "open_im_sdk.SelfInfoUpdatedTips") } -func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_ca4877c90b77c1e9) } +func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_9a3c519aa1c52df5) } -var fileDescriptor_ws_ca4877c90b77c1e9 = []byte{ - // 1841 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x59, 0xdd, 0x6f, 0xdc, 0x5a, - 0x11, 0x97, 0xf7, 0x2b, 0xd9, 0xd9, 0x34, 0x49, 0xdd, 0x8f, 0x6b, 0xca, 0x55, 0x15, 0x2c, 0x84, - 0xa2, 0xab, 0xab, 0x5c, 0x91, 0x08, 0x71, 0x5b, 0x04, 0xdc, 0x24, 0x9b, 0x44, 0x5b, 0x9a, 0x6e, - 0xe4, 0x6d, 0xc5, 0x63, 0xe5, 0xda, 0x67, 0x37, 0x66, 0xfd, 0xb1, 0xf1, 0xf1, 0x6e, 0xdb, 0xbf, - 0x04, 0x09, 0x09, 0x09, 0xc4, 0x03, 0x42, 0xbc, 0x20, 0x84, 0xf8, 0x23, 0x10, 0xe2, 0x8f, 0x40, - 0xf0, 0xc8, 0x0b, 0xaf, 0x08, 0x09, 0xcd, 0x9c, 0x63, 0xfb, 0x9c, 0xf5, 0x92, 0xec, 0xe6, 0xaa, - 0x7d, 0xf3, 0xfc, 0x3c, 0x73, 0xe6, 0xeb, 0x37, 0xe3, 0x93, 0x0d, 0x6c, 0x71, 0x7f, 0xfc, 0xfa, - 0x2d, 0xff, 0xe2, 0x2d, 0xdf, 0x9b, 0xa4, 0x49, 0x96, 0x98, 0x9d, 0x64, 0xc2, 0xe2, 0xd7, 0x41, - 0xf4, 0x9a, 0xfb, 0x63, 0xfb, 0x2f, 0x06, 0x58, 0x17, 0xd3, 0x30, 0x3c, 0x67, 0x9c, 0xbb, 0x23, - 0x76, 0xf4, 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x77, - 0xf7, 0xfe, 0xbd, 0x01, 0xf7, 0x06, 0x2c, 0x1c, 0xa2, 0xe9, 0xab, 0x89, 0x5f, 0xdc, 0x59, 0x9e, - 0xc0, 0x06, 0xc2, 0xf9, 0xa9, 0xd7, 0x6f, 0x77, 0x4d, 0xf5, 0x03, 0x46, 0xfb, 0xa6, 0x45, 0xff, - 0xd7, 0x39, 0xf8, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x4b, 0x94, 0x7a, 0xcf, 0xea, 0x19, 0x00, - 0x00, +var fileDescriptor_ws_9a3c519aa1c52df5 = []byte{ + // 1753 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x59, 0x4f, 0x6f, 0x23, 0x4b, + 0x11, 0xd7, 0xf8, 0x5f, 0xec, 0xb2, 0x37, 0xce, 0xce, 0xee, 0xe6, 0x0d, 0xe1, 0x69, 0x65, 0x46, + 0x08, 0x59, 0xe8, 0x29, 0x4f, 0x24, 0x42, 0xbc, 0x2c, 0x02, 0x36, 0x89, 0x93, 0x10, 0x88, 0xd7, + 0xd1, 0x38, 0x11, 0xc7, 0xd5, 0xc4, 0xd3, 0x76, 0x1a, 0x8f, 0x7b, 0x9c, 0xee, 0xb1, 0x77, 0x73, + 0xe1, 0x6b, 0x70, 0x42, 0x02, 0x71, 0x40, 0x08, 0x0e, 0x88, 0x03, 0x1f, 0x81, 0x13, 0x9f, 0x02, + 0xc1, 0x91, 0x0b, 0x1c, 0xe1, 0x80, 0xba, 0xba, 0x67, 0xa6, 0x27, 0x0e, 0x89, 0x13, 0xb4, 0x7b, + 0x79, 0xb7, 0xa9, 0x9f, 0xab, 0xba, 0x7e, 0xf5, 0xa7, 0x6b, 0x6a, 0x12, 0x68, 0x8a, 0x60, 0xfc, + 0xf6, 0x9d, 0xf8, 0xfc, 0x9d, 0xd8, 0x9c, 0xf2, 0x28, 0x8e, 0xec, 0x7a,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40, 0x55, 0x90, 0xab, 0x3d, 0x32, 0xa2, 0x0c, 0x5d, 0x14, 0xbd, 0x54, 0x96, 0x36, + 0x82, 0x5c, 0x1d, 0xb0, 0x20, 0x49, 0xb2, 0x92, 0x6e, 0x32, 0x2b, 0x2d, 0x30, 0x73, 0xff, 0x65, + 0x41, 0x33, 0x47, 0xe0, 0x4b, 0x51, 0xe4, 0xe7, 0x60, 0x1f, 0x91, 0xb8, 0xeb, 0xbf, 0xdf, 0x65, + 0x41, 0x17, 0x29, 0x79, 0xe4, 0xca, 0x3d, 0x80, 0x67, 0x0b, 0xa8, 0x98, 0x1a, 0xc1, 0x59, 0xff, + 0x23, 0xb8, 0x82, 0x19, 0x9c, 0xfb, 0x43, 0x68, 0x98, 0xae, 0xed, 0x55, 0x28, 0xd0, 0x40, 0x17, + 0xb3, 0x40, 0x03, 0xbb, 0x0d, 0xa5, 0x50, 0x76, 0x42, 0x01, 0x39, 0x3f, 0xcf, 0x71, 0xee, 0x8a, + 0x51, 0xc7, 0x8f, 0x7d, 0x0f, 0x35, 0xdc, 0x2b, 0x68, 0x4a, 0xc6, 0x7d, 0xc2, 0x82, 0xae, 0x18, + 0x21, 0x99, 0x16, 0xd4, 0xfb, 0x84, 0xcf, 0x31, 0x8c, 0xb4, 0x45, 0x4c, 0x48, 0x6a, 0xec, 0x87, + 0x94, 0xb0, 0x58, 0x69, 0xe8, 0x6e, 0x34, 0x20, 0xd5, 0x49, 0x2c, 0x38, 0xa3, 0x13, 0xa2, 0xeb, + 0x95, 0xca, 0xee, 0x9f, 0xca, 0xb0, 0xa2, 0x49, 0xa8, 0xae, 0x62, 0x41, 0xd6, 0x89, 0x4a, 0x92, + 0x38, 0x27, 0x83, 0x79, 0x7a, 0xb8, 0x96, 0x64, 0xdf, 0x60, 0x96, 0x8f, 0x3b, 0x78, 0x6c, 0xcd, + 0x4b, 0x44, 0xc9, 0x69, 0x60, 0x70, 0xd2, 0x7d, 0x68, 0x40, 0x52, 0x43, 0x18, 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, 0x7b, 0xef, 0x18, 0xe1, 0x78, + 0xab, 0xea, 0x5b, 0x5f, 0xcd, 0xd5, 0xee, 0x74, 0x76, 0x11, 0xd2, 0x81, 0x9c, 0x46, 0x58, 0x3a, + 0xa5, 0x29, 0xbb, 0x6a, 0x3f, 0xeb, 0x2a, 0x79, 0xc7, 0x4a, 0x9e, 0x81, 0xc8, 0xee, 0xef, 0x92, + 0xc9, 0x05, 0xe1, 0x2a, 0x3d, 0xf2, 0x76, 0x3d, 0xf1, 0x4c, 0x28, 0x49, 0x7c, 0x2d, 0x4d, 0xbc, + 0xfb, 0x0f, 0x0b, 0x9e, 0x61, 0xd8, 0x4a, 0xed, 0x70, 0x16, 0x86, 0xf7, 0x24, 0x6e, 0x1d, 0x2a, + 0xe7, 0xea, 0x8d, 0xa9, 0xe7, 0x91, 0x92, 0xec, 0x4d, 0xb0, 0x77, 0x83, 0x09, 0x65, 0x54, 0xc4, + 0xdc, 0x8f, 0x23, 0x7e, 0x42, 0xe6, 0x24, 0xc4, 0xc4, 0x95, 0xbd, 0x5b, 0x7e, 0x91, 0xf7, 0xe7, + 0x47, 0x11, 0x65, 0x18, 0x4b, 0x09, 0x63, 0x49, 0x65, 0xf9, 0x5b, 0x3a, 0x4b, 0x54, 0xde, 0x52, + 0xd9, 0x4c, 0x69, 0x25, 0x9f, 0x52, 0x17, 0x1a, 0x87, 0x9c, 0x12, 0x16, 0x78, 0x64, 0xe2, 0xf3, + 0xb1, 0x9e, 0x42, 0x39, 0xcc, 0xfd, 0xb3, 0x05, 0xd5, 0x24, 0xaf, 0x46, 0x28, 0x56, 0x2e, 0x14, + 0xed, 0x9e, 0x65, 0xad, 0x91, 0xca, 0xa6, 0xfb, 0x62, 0xde, 0xfd, 0x3a, 0x54, 0x8e, 0x70, 0x92, + 0x61, 0x38, 0x65, 0x4f, 0x4b, 0x12, 0xef, 0x46, 0x17, 0x34, 0x4c, 0x42, 0xd1, 0x92, 0xbc, 0x2f, + 0x7b, 0x94, 0xc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95, 0xb4, 0x64, 0x38, 0x97, 0xd0, 0xd4, 0xd1, 0xa4, 0x75, 0xfb, 0x1c, 0x2a, + 0x0a, 0xd2, 0xf4, 0x3f, 0xb9, 0x25, 0xfb, 0x8a, 0xba, 0x7a, 0x5e, 0xf4, 0x54, 0xb8, 0xcd, 0xd3, + 0x4f, 0x93, 0xd6, 0xec, 0x90, 0x90, 0xc4, 0x1f, 0xd6, 0xd7, 0xaf, 0x2c, 0xa8, 0xed, 0x85, 0xfe, + 0x60, 0x8c, 0x17, 0x77, 0x67, 0xf1, 0xe2, 0xde, 0x3d, 0xcf, 0xb2, 0xeb, 0x7b, 0xdf, 0x35, 0xdd, + 0xd1, 0x7e, 0x8c, 0x5b, 0x7a, 0xf7, 0xd1, 0xa9, 0xb6, 0x1b, 0xc0, 0x2a, 0x0a, 0x59, 0xe2, 0x3f, + 0x83, 0x32, 0x22, 0xb7, 0xce, 0xc1, 0x34, 0x1c, 0x4f, 0x29, 0x2d, 0x99, 0x89, 0x21, 0xac, 0xa1, + 0xba, 0x99, 0xf4, 0x0f, 0xe1, 0xe7, 0xd7, 0x16, 0xbc, 0xc8, 0xca, 0x65, 0xbe, 0x24, 0x1f, 0x5c, + 0xe2, 0xed, 0x1b, 0x03, 0x7e, 0xa9, 0xeb, 0xb3, 0xdc, 0xee, 0xfd, 0x3b, 0x0b, 0x9e, 0xf5, 0x49, + 0x38, 0x94, 0xa6, 0xe7, 0xd3, 0x20, 0xdd, 0x59, 0x76, 0xa0, 0x21, 0xe1, 0xe4, 0xd4, 0xbb, 0xa7, + 0x7b, 0x4e, 0xf5, 0x03, 0xb2, 0xbd, 0xa8, 0xe0, 0xbf, 0x22, 0xb6, 0xff, 0x1b, 0x00, 0x00, 0xff, + 0xff, 0x8b, 0x1e, 0x2f, 0xb4, 0x9d, 0x18, 0x00, 0x00, } From d40e1e47fdb882b25fcf3cc06c7fd7a750a3286f Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 23 Dec 2021 18:29:39 +0800 Subject: [PATCH 022/337] notification --- internal/rpc/group/group.go | 4 +- internal/rpc/msg/send_msg.go | 43 +++-- pkg/proto/group/group.pb.go | 265 +++++++++++++++--------------- pkg/proto/group/group.proto | 47 +++--- pkg/proto/sdk_ws/ws.pb.go | 303 ++++++++++++++++++----------------- pkg/proto/sdk_ws/ws.proto | 1 + 6 files changed, 342 insertions(+), 321 deletions(-) diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 6d85ccf83..6ac49ac72 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -1,7 +1,7 @@ package group import ( - "Open_IM/internal/rpc/chat" + chat "Open_IM/internal/rpc/msg" "Open_IM/pkg/common/config" "Open_IM/pkg/common/constant" "Open_IM/pkg/common/db" @@ -132,7 +132,7 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR resp.ErrMsg = constant.ErrCreateGroup.ErrMsg return resp, nil } - chat.GroupCreatedNotification(req) + chat.GroupCreatedNotification(req, groupId) utils.CopyStructFields(resp.GroupInfo, group) log.NewInfo(req.OperationID, "rpc CreateGroup return ", resp.String()) return resp, nil diff --git a/internal/rpc/msg/send_msg.go b/internal/rpc/msg/send_msg.go index de52d7022..26e49bfa8 100644 --- a/internal/rpc/msg/send_msg.go +++ b/internal/rpc/msg/send_msg.go @@ -4,9 +4,10 @@ import ( "Open_IM/pkg/common/config" "Open_IM/pkg/common/constant" "Open_IM/pkg/common/db" - immysql "Open_IM/pkg/common/db/mysql_model/im_mysql_model" + imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" http2 "Open_IM/pkg/common/http" "Open_IM/pkg/common/log" + "Open_IM/pkg/common/token_verify" "Open_IM/pkg/grpc-etcdv3/getcdv3" pbChat "Open_IM/pkg/proto/chat" pbGroup "Open_IM/pkg/proto/group" @@ -306,26 +307,50 @@ func Notification(n *NotificationMsg, onlineUserOnly bool) { // GroupMemberFullInfo Creator = 2; // repeated GroupMemberFullInfo MemberList = 3; // uint64 OperationTime = 4; -//} -func GroupCreatedNotification(operationID string, creator *immysql.User, group *immysql.Group, memberList []immysql.GroupMember) { +//} creator->group +func GroupCreatedNotification(req *pbGroup.CreateGroupReq, groupID string) { var n NotificationMsg - n.SendID = creator.UserID - n.RecvID = group.GroupID + n.SendID = req.OpUserID + n.RecvID = groupID n.ContentType = constant.CreateGroupTip n.SessionType = constant.GroupChatType n.MsgFrom = constant.SysMsgType - n.OperationID = operationID + n.OperationID = req.OperationID var groupCreated open_im_sdk.GroupCreatedTips groupCreated.Group = &open_im_sdk.GroupInfo{} + + if token_verify.IsMangerUserID(req.OpUserID) { + u, err := imdb.FindUserByUID(req.OpUserID) + if err != nil || u == nil { + return + } + utils.CopyStructFields(groupCreated.Creator, u) + groupCreated.Creator.AppMangerLevel = 1 + } else { + u, err := imdb.FindGroupMemberInfoByGroupIdAndUserId(groupID, req.OpUserID) + if err != nil || u == nil { + return + } + utils.CopyStructFields(groupCreated.Creator, u) + } + + group, err := imdb.FindGroupInfoByGroupId(groupID) + if err != nil || group == nil { + return + } utils.CopyStructFields(groupCreated.Group, group) groupCreated.Creator = &open_im_sdk.GroupMemberFullInfo{} - utils.CopyStructFields(groupCreated.Creator, creator) - for _, v := range memberList { + + for _, v := range req.InitMemberList { var groupMemberInfo open_im_sdk.GroupMemberFullInfo - utils.CopyStructFields(&groupMemberInfo, v) + member, err := imdb.GetMemberInfoById(groupID, v.UserID) + if err != nil { + utils.CopyStructFields(&groupMemberInfo, member) + } groupCreated.MemberList = append(groupCreated.MemberList, &groupMemberInfo) } + var tips open_im_sdk.TipsComm tips.Detail, _ = json.Marshal(groupCreated) tips.DefaultTips = config.Config.Notification.GroupCreated.DefaultTips.Tips diff --git a/pkg/proto/group/group.pb.go b/pkg/proto/group/group.pb.go index b18a09367..caa26e0e5 100644 --- a/pkg/proto/group/group.pb.go +++ b/pkg/proto/group/group.pb.go @@ -36,7 +36,7 @@ func (m *CommonResp) Reset() { *m = CommonResp{} } func (m *CommonResp) String() string { return proto.CompactTextString(m) } func (*CommonResp) ProtoMessage() {} func (*CommonResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_23d97c4cd172f0ff, []int{0} + return fileDescriptor_group_2ff972788727c811, []int{0} } func (m *CommonResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CommonResp.Unmarshal(m, b) @@ -82,7 +82,7 @@ func (m *GroupAddMemberInfo) Reset() { *m = GroupAddMemberInfo{} } func (m *GroupAddMemberInfo) String() string { return proto.CompactTextString(m) } func (*GroupAddMemberInfo) ProtoMessage() {} func (*GroupAddMemberInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_group_23d97c4cd172f0ff, []int{1} + return fileDescriptor_group_2ff972788727c811, []int{1} } func (m *GroupAddMemberInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupAddMemberInfo.Unmarshal(m, b) @@ -135,7 +135,7 @@ func (m *CreateGroupReq) Reset() { *m = CreateGroupReq{} } func (m *CreateGroupReq) String() string { return proto.CompactTextString(m) } func (*CreateGroupReq) ProtoMessage() {} func (*CreateGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_23d97c4cd172f0ff, []int{2} + return fileDescriptor_group_2ff972788727c811, []int{2} } func (m *CreateGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreateGroupReq.Unmarshal(m, b) @@ -231,7 +231,7 @@ func (m *CreateGroupResp) Reset() { *m = CreateGroupResp{} } func (m *CreateGroupResp) String() string { return proto.CompactTextString(m) } func (*CreateGroupResp) ProtoMessage() {} func (*CreateGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_23d97c4cd172f0ff, []int{3} + return fileDescriptor_group_2ff972788727c811, []int{3} } func (m *CreateGroupResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreateGroupResp.Unmarshal(m, b) @@ -285,7 +285,7 @@ func (m *GetGroupsInfoReq) Reset() { *m = GetGroupsInfoReq{} } func (m *GetGroupsInfoReq) String() string { return proto.CompactTextString(m) } func (*GetGroupsInfoReq) ProtoMessage() {} func (*GetGroupsInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_23d97c4cd172f0ff, []int{4} + return fileDescriptor_group_2ff972788727c811, []int{4} } func (m *GetGroupsInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupsInfoReq.Unmarshal(m, b) @@ -339,7 +339,7 @@ func (m *GetGroupsInfoResp) Reset() { *m = GetGroupsInfoResp{} } func (m *GetGroupsInfoResp) String() string { return proto.CompactTextString(m) } func (*GetGroupsInfoResp) ProtoMessage() {} func (*GetGroupsInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_23d97c4cd172f0ff, []int{5} + return fileDescriptor_group_2ff972788727c811, []int{5} } func (m *GetGroupsInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupsInfoResp.Unmarshal(m, b) @@ -394,7 +394,7 @@ func (m *SetGroupInfoReq) Reset() { *m = SetGroupInfoReq{} } func (m *SetGroupInfoReq) String() string { return proto.CompactTextString(m) } func (*SetGroupInfoReq) ProtoMessage() {} func (*SetGroupInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_23d97c4cd172f0ff, []int{6} + return fileDescriptor_group_2ff972788727c811, []int{6} } func (m *SetGroupInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetGroupInfoReq.Unmarshal(m, b) @@ -456,7 +456,7 @@ func (m *GetGroupApplicationListReq) Reset() { *m = GetGroupApplicationL func (m *GetGroupApplicationListReq) String() string { return proto.CompactTextString(m) } func (*GetGroupApplicationListReq) ProtoMessage() {} func (*GetGroupApplicationListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_23d97c4cd172f0ff, []int{7} + return fileDescriptor_group_2ff972788727c811, []int{7} } func (m *GetGroupApplicationListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupApplicationListReq.Unmarshal(m, b) @@ -523,7 +523,7 @@ func (m *GetGroupApplicationList_Data_User) Reset() { *m = GetGroupAppli func (m *GetGroupApplicationList_Data_User) String() string { return proto.CompactTextString(m) } func (*GetGroupApplicationList_Data_User) ProtoMessage() {} func (*GetGroupApplicationList_Data_User) Descriptor() ([]byte, []int) { - return fileDescriptor_group_23d97c4cd172f0ff, []int{8} + return fileDescriptor_group_2ff972788727c811, []int{8} } func (m *GetGroupApplicationList_Data_User) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupApplicationList_Data_User.Unmarshal(m, b) @@ -667,7 +667,7 @@ func (m *GetGroupApplicationListData) Reset() { *m = GetGroupApplication func (m *GetGroupApplicationListData) String() string { return proto.CompactTextString(m) } func (*GetGroupApplicationListData) ProtoMessage() {} func (*GetGroupApplicationListData) Descriptor() ([]byte, []int) { - return fileDescriptor_group_23d97c4cd172f0ff, []int{9} + return fileDescriptor_group_2ff972788727c811, []int{9} } func (m *GetGroupApplicationListData) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupApplicationListData.Unmarshal(m, b) @@ -714,7 +714,7 @@ func (m *GetGroupApplicationListResp) Reset() { *m = GetGroupApplication func (m *GetGroupApplicationListResp) String() string { return proto.CompactTextString(m) } func (*GetGroupApplicationListResp) ProtoMessage() {} func (*GetGroupApplicationListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_23d97c4cd172f0ff, []int{10} + return fileDescriptor_group_2ff972788727c811, []int{10} } func (m *GetGroupApplicationListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupApplicationListResp.Unmarshal(m, b) @@ -770,7 +770,7 @@ func (m *TransferGroupOwnerReq) Reset() { *m = TransferGroupOwnerReq{} } func (m *TransferGroupOwnerReq) String() string { return proto.CompactTextString(m) } func (*TransferGroupOwnerReq) ProtoMessage() {} func (*TransferGroupOwnerReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_23d97c4cd172f0ff, []int{11} + return fileDescriptor_group_2ff972788727c811, []int{11} } func (m *TransferGroupOwnerReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TransferGroupOwnerReq.Unmarshal(m, b) @@ -840,7 +840,7 @@ func (m *JoinGroupReq) Reset() { *m = JoinGroupReq{} } func (m *JoinGroupReq) String() string { return proto.CompactTextString(m) } func (*JoinGroupReq) ProtoMessage() {} func (*JoinGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_23d97c4cd172f0ff, []int{12} + return fileDescriptor_group_2ff972788727c811, []int{12} } func (m *JoinGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JoinGroupReq.Unmarshal(m, b) @@ -915,7 +915,7 @@ func (m *GroupApplicationResponseReq) Reset() { *m = GroupApplicationRes func (m *GroupApplicationResponseReq) String() string { return proto.CompactTextString(m) } func (*GroupApplicationResponseReq) ProtoMessage() {} func (*GroupApplicationResponseReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_23d97c4cd172f0ff, []int{13} + return fileDescriptor_group_2ff972788727c811, []int{13} } func (m *GroupApplicationResponseReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupApplicationResponseReq.Unmarshal(m, b) @@ -1006,7 +1006,7 @@ func (m *SetOwnerGroupNickNameReq) Reset() { *m = SetOwnerGroupNickNameR func (m *SetOwnerGroupNickNameReq) String() string { return proto.CompactTextString(m) } func (*SetOwnerGroupNickNameReq) ProtoMessage() {} func (*SetOwnerGroupNickNameReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_23d97c4cd172f0ff, []int{14} + return fileDescriptor_group_2ff972788727c811, []int{14} } func (m *SetOwnerGroupNickNameReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetOwnerGroupNickNameReq.Unmarshal(m, b) @@ -1075,7 +1075,7 @@ func (m *QuitGroupReq) Reset() { *m = QuitGroupReq{} } func (m *QuitGroupReq) String() string { return proto.CompactTextString(m) } func (*QuitGroupReq) ProtoMessage() {} func (*QuitGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_23d97c4cd172f0ff, []int{15} + return fileDescriptor_group_2ff972788727c811, []int{15} } func (m *QuitGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_QuitGroupReq.Unmarshal(m, b) @@ -1138,7 +1138,7 @@ func (m *GetGroupMemberListReq) Reset() { *m = GetGroupMemberListReq{} } func (m *GetGroupMemberListReq) String() string { return proto.CompactTextString(m) } func (*GetGroupMemberListReq) ProtoMessage() {} func (*GetGroupMemberListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_23d97c4cd172f0ff, []int{16} + return fileDescriptor_group_2ff972788727c811, []int{16} } func (m *GetGroupMemberListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMemberListReq.Unmarshal(m, b) @@ -1207,7 +1207,7 @@ func (m *GetGroupMemberListResp) Reset() { *m = GetGroupMemberListResp{} func (m *GetGroupMemberListResp) String() string { return proto.CompactTextString(m) } func (*GetGroupMemberListResp) ProtoMessage() {} func (*GetGroupMemberListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_23d97c4cd172f0ff, []int{17} + return fileDescriptor_group_2ff972788727c811, []int{17} } func (m *GetGroupMemberListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMemberListResp.Unmarshal(m, b) @@ -1269,7 +1269,7 @@ func (m *GetGroupMembersInfoReq) Reset() { *m = GetGroupMembersInfoReq{} func (m *GetGroupMembersInfoReq) String() string { return proto.CompactTextString(m) } func (*GetGroupMembersInfoReq) ProtoMessage() {} func (*GetGroupMembersInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_23d97c4cd172f0ff, []int{18} + return fileDescriptor_group_2ff972788727c811, []int{18} } func (m *GetGroupMembersInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMembersInfoReq.Unmarshal(m, b) @@ -1330,7 +1330,7 @@ func (m *GetGroupMembersInfoResp) Reset() { *m = GetGroupMembersInfoResp func (m *GetGroupMembersInfoResp) String() string { return proto.CompactTextString(m) } func (*GetGroupMembersInfoResp) ProtoMessage() {} func (*GetGroupMembersInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_23d97c4cd172f0ff, []int{19} + return fileDescriptor_group_2ff972788727c811, []int{19} } func (m *GetGroupMembersInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMembersInfoResp.Unmarshal(m, b) @@ -1386,7 +1386,7 @@ func (m *KickGroupMemberReq) Reset() { *m = KickGroupMemberReq{} } func (m *KickGroupMemberReq) String() string { return proto.CompactTextString(m) } func (*KickGroupMemberReq) ProtoMessage() {} func (*KickGroupMemberReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_23d97c4cd172f0ff, []int{20} + return fileDescriptor_group_2ff972788727c811, []int{20} } func (m *KickGroupMemberReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_KickGroupMemberReq.Unmarshal(m, b) @@ -1453,7 +1453,7 @@ func (m *Id2Result) Reset() { *m = Id2Result{} } func (m *Id2Result) String() string { return proto.CompactTextString(m) } func (*Id2Result) ProtoMessage() {} func (*Id2Result) Descriptor() ([]byte, []int) { - return fileDescriptor_group_23d97c4cd172f0ff, []int{21} + return fileDescriptor_group_2ff972788727c811, []int{21} } func (m *Id2Result) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Id2Result.Unmarshal(m, b) @@ -1500,7 +1500,7 @@ func (m *KickGroupMemberResp) Reset() { *m = KickGroupMemberResp{} } func (m *KickGroupMemberResp) String() string { return proto.CompactTextString(m) } func (*KickGroupMemberResp) ProtoMessage() {} func (*KickGroupMemberResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_23d97c4cd172f0ff, []int{22} + return fileDescriptor_group_2ff972788727c811, []int{22} } func (m *KickGroupMemberResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_KickGroupMemberResp.Unmarshal(m, b) @@ -1554,7 +1554,7 @@ func (m *GetJoinedGroupListReq) Reset() { *m = GetJoinedGroupListReq{} } func (m *GetJoinedGroupListReq) String() string { return proto.CompactTextString(m) } func (*GetJoinedGroupListReq) ProtoMessage() {} func (*GetJoinedGroupListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_23d97c4cd172f0ff, []int{23} + return fileDescriptor_group_2ff972788727c811, []int{23} } func (m *GetJoinedGroupListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetJoinedGroupListReq.Unmarshal(m, b) @@ -1608,7 +1608,7 @@ func (m *GetJoinedGroupListResp) Reset() { *m = GetJoinedGroupListResp{} func (m *GetJoinedGroupListResp) String() string { return proto.CompactTextString(m) } func (*GetJoinedGroupListResp) ProtoMessage() {} func (*GetJoinedGroupListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_23d97c4cd172f0ff, []int{24} + return fileDescriptor_group_2ff972788727c811, []int{24} } func (m *GetJoinedGroupListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetJoinedGroupListResp.Unmarshal(m, b) @@ -1664,7 +1664,7 @@ func (m *InviteUserToGroupReq) Reset() { *m = InviteUserToGroupReq{} } func (m *InviteUserToGroupReq) String() string { return proto.CompactTextString(m) } func (*InviteUserToGroupReq) ProtoMessage() {} func (*InviteUserToGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_23d97c4cd172f0ff, []int{25} + return fileDescriptor_group_2ff972788727c811, []int{25} } func (m *InviteUserToGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_InviteUserToGroupReq.Unmarshal(m, b) @@ -1732,7 +1732,7 @@ func (m *InviteUserToGroupResp) Reset() { *m = InviteUserToGroupResp{} } func (m *InviteUserToGroupResp) String() string { return proto.CompactTextString(m) } func (*InviteUserToGroupResp) ProtoMessage() {} func (*InviteUserToGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_23d97c4cd172f0ff, []int{26} + return fileDescriptor_group_2ff972788727c811, []int{26} } func (m *InviteUserToGroupResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_InviteUserToGroupResp.Unmarshal(m, b) @@ -1775,9 +1775,8 @@ func (m *InviteUserToGroupResp) GetId2ResultList() []*Id2Result { type GetGroupAllMemberReq struct { GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` - FromUserID string `protobuf:"bytes,2,opt,name=FromUserID" json:"FromUserID,omitempty"` + OpUserID string `protobuf:"bytes,2,opt,name=OpUserID" json:"OpUserID,omitempty"` OperationID string `protobuf:"bytes,3,opt,name=OperationID" json:"OperationID,omitempty"` - OpUserID string `protobuf:"bytes,4,opt,name=OpUserID" json:"OpUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1787,7 +1786,7 @@ func (m *GetGroupAllMemberReq) Reset() { *m = GetGroupAllMemberReq{} } func (m *GetGroupAllMemberReq) String() string { return proto.CompactTextString(m) } func (*GetGroupAllMemberReq) ProtoMessage() {} func (*GetGroupAllMemberReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_23d97c4cd172f0ff, []int{27} + return fileDescriptor_group_2ff972788727c811, []int{27} } func (m *GetGroupAllMemberReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupAllMemberReq.Unmarshal(m, b) @@ -1814,9 +1813,9 @@ func (m *GetGroupAllMemberReq) GetGroupID() string { return "" } -func (m *GetGroupAllMemberReq) GetFromUserID() string { +func (m *GetGroupAllMemberReq) GetOpUserID() string { if m != nil { - return m.FromUserID + return m.OpUserID } return "" } @@ -1828,13 +1827,6 @@ func (m *GetGroupAllMemberReq) GetOperationID() string { return "" } -func (m *GetGroupAllMemberReq) GetOpUserID() string { - if m != nil { - return m.OpUserID - } - return "" -} - type GetGroupAllMemberResp struct { ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` @@ -1848,7 +1840,7 @@ func (m *GetGroupAllMemberResp) Reset() { *m = GetGroupAllMemberResp{} } func (m *GetGroupAllMemberResp) String() string { return proto.CompactTextString(m) } func (*GetGroupAllMemberResp) ProtoMessage() {} func (*GetGroupAllMemberResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_23d97c4cd172f0ff, []int{28} + return fileDescriptor_group_2ff972788727c811, []int{28} } func (m *GetGroupAllMemberResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupAllMemberResp.Unmarshal(m, b) @@ -2424,102 +2416,101 @@ var _Group_serviceDesc = grpc.ServiceDesc{ Metadata: "group/group.proto", } -func init() { proto.RegisterFile("group/group.proto", fileDescriptor_group_23d97c4cd172f0ff) } +func init() { proto.RegisterFile("group/group.proto", fileDescriptor_group_2ff972788727c811) } -var fileDescriptor_group_23d97c4cd172f0ff = []byte{ - // 1492 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0xcb, 0x6f, 0x1c, 0x45, - 0x13, 0xd7, 0xec, 0xc3, 0xf1, 0x96, 0x1f, 0x6b, 0x77, 0x62, 0x67, 0xbe, 0x89, 0xbf, 0xc8, 0x19, - 0xa1, 0xc8, 0x8a, 0x90, 0x2d, 0x39, 0x08, 0x09, 0x25, 0x42, 0x71, 0xfc, 0x48, 0x16, 0xb0, 0xad, - 0x8c, 0x37, 0x17, 0x2e, 0x66, 0xb2, 0xd3, 0x59, 0x0d, 0x3b, 0x3b, 0x33, 0x3b, 0x3d, 0x8b, 0x13, - 0x2e, 0x80, 0x90, 0xe0, 0x80, 0x80, 0x5c, 0x39, 0x72, 0x80, 0x23, 0xe2, 0xc0, 0x9d, 0x03, 0xff, - 0x18, 0xea, 0xc7, 0xcc, 0xf6, 0xf4, 0x3c, 0x76, 0x65, 0x4b, 0xe4, 0xb2, 0xda, 0xae, 0xaa, 0xee, - 0x7a, 0x74, 0xd5, 0xaf, 0x6a, 0x1a, 0x56, 0xfb, 0x51, 0x30, 0x0e, 0x77, 0xd8, 0xef, 0x76, 0x18,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, 0xf4, 0x3f, 0x85, 0x46, 0x2e, 0x72, 0x16, 0xdb, 0xf1, 0x98, - 0xe8, 0x6d, 0xc6, 0xcb, 0xd0, 0x26, 0x32, 0x16, 0x26, 0x63, 0x2f, 0xd6, 0x57, 0x64, 0x19, 0x4e, - 0x33, 0x47, 0x70, 0xab, 0x24, 0x35, 0x68, 0x66, 0xa0, 0x1b, 0xd0, 0xdc, 0x0f, 0xc6, 0x7e, 0x2c, - 0x8a, 0x99, 0x2f, 0xd0, 0x43, 0x68, 0x30, 0x5b, 0x6b, 0xac, 0x52, 0xb7, 0x92, 0x96, 0x30, 0x2d, - 0xc5, 0x2c, 0xb6, 0xcb, 0xfc, 0x5e, 0x2b, 0xd5, 0x79, 0x49, 0x08, 0x79, 0x1f, 0x1a, 0x54, 0x89, - 0xc0, 0x4b, 0xb3, 0xda, 0x1e, 0x2a, 0x69, 0x31, 0x79, 0xf3, 0x6f, 0x0d, 0xd6, 0xba, 0x91, 0xed, - 0x93, 0x97, 0x38, 0x62, 0xa2, 0xa7, 0x17, 0x3e, 0x8e, 0x68, 0x41, 0x4a, 0xc9, 0xaf, 0x65, 0x93, - 0xff, 0x2e, 0x2c, 0x9f, 0x7a, 0x0e, 0x13, 0xcc, 0x80, 0x85, 0x42, 0xa5, 0x72, 0x27, 0xf8, 0x42, - 0x96, 0xe3, 0x85, 0xa2, 0x50, 0xa7, 0x43, 0x47, 0x06, 0x1c, 0x9a, 0x0a, 0x08, 0xff, 0xae, 0xc1, - 0xe2, 0x47, 0x81, 0xeb, 0xa7, 0x7d, 0xbb, 0xdc, 0x70, 0x5e, 0x65, 0xc7, 0x98, 0x10, 0xbb, 0x9f, - 0xf4, 0x63, 0x89, 0x72, 0x75, 0x8c, 0xab, 0x34, 0xf4, 0xe7, 0x1a, 0xdc, 0x52, 0x6f, 0x83, 0xde, - 0x76, 0xe0, 0x13, 0x2c, 0xba, 0x95, 0x7c, 0xba, 0x56, 0x7d, 0xba, 0x8a, 0xcf, 0x92,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 0x8e, 0x8a, 0x77, 0xa5, 0x37, 0x7b, 0xbb, 0x8a, 0x4d, 0x42, 0xf4, 0x14, 0xda, 0x83, 0x6c, 0xab, - 0x42, 0xc9, 0x0b, 0x65, 0xbe, 0x63, 0x1b, 0x46, 0x19, 0x2b, 0x75, 0x59, 0xc1, 0x7e, 0xd9, 0xe5, - 0x7c, 0x3b, 0x92, 0x5d, 0x2e, 0x6a, 0x1a, 0x27, 0xb0, 0xea, 0xaa, 0xa0, 0x88, 0x6e, 0x25, 0x38, - 0x56, 0x80, 0xf2, 0xc6, 0x46, 0x39, 0x93, 0x9f, 0xd7, 0x57, 0xf1, 0x24, 0x3d, 0xaf, 0x08, 0xfa, - 0x8c, 0x8d, 0x72, 0x26, 0x09, 0x1f, 0xb7, 0x3f, 0x5d, 0xda, 0xe6, 0x6f, 0xd6, 0x0f, 0xd8, 0xef, - 0x8b, 0x39, 0xf6, 0x20, 0x7d, 0xff, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xd5, 0x63, 0xdb, - 0xcf, 0x16, 0x00, 0x00, +var fileDescriptor_group_2ff972788727c811 = []byte{ + // 1480 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0xcd, 0x6f, 0xdc, 0x44, + 0x14, 0x97, 0xf7, 0x23, 0xcd, 0xbe, 0x7c, 0x6c, 0x32, 0x6d, 0x52, 0xe3, 0x86, 0x2a, 0xb5, 0x50, + 0x15, 0x55, 0x28, 0x91, 0x52, 0x84, 0x84, 0x5a, 0xa1, 0xa6, 0xf9, 0x68, 0x17, 0x48, 0xa2, 0x3a, + 0xdb, 0x0b, 0x97, 0xe0, 0xae, 0xa7, 0x2b, 0xb3, 0x5e, 0xdb, 0xeb, 0xf1, 0x92, 0x96, 0x0b, 0x20, + 0x24, 0x38, 0x20, 0x44, 0xaf, 0x1c, 0x39, 0xc0, 0x11, 0x71, 0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f7, 0x4b, 0x06, 0x67, 0x64, 0x66, 0xbe, 0xc6, 0x15, 0x4e, 0xd6, 0xc5, 0x47, + 0xa2, 0x7e, 0x6e, 0x36, 0x49, 0x2d, 0x2b, 0x1c, 0xad, 0x8c, 0x77, 0x2b, 0xb8, 0x24, 0x44, 0x5d, + 0xb8, 0xde, 0xcf, 0xb7, 0x6c, 0x54, 0xbc, 0x2b, 0xbd, 0xd9, 0xdb, 0x55, 0x6c, 0x12, 0xa2, 0xa7, + 0xd0, 0x1e, 0x64, 0x3b, 0x11, 0x4a, 0x3e, 0x40, 0xe6, 0x1b, 0xb2, 0x61, 0x94, 0xb1, 0x52, 0x97, + 0x15, 0x68, 0x97, 0x5d, 0xce, 0x77, 0x1b, 0xd9, 0xe5, 0xa2, 0x9e, 0x70, 0x02, 0xab, 0xae, 0x8a, + 0x79, 0xe8, 0x56, 0x02, 0x53, 0x05, 0x20, 0x6e, 0x6c, 0x94, 0x33, 0xf9, 0x79, 0x7d, 0x15, 0x4f, + 0xd2, 0xf3, 0x8a, 0xa0, 0xcd, 0xd8, 0x28, 0x67, 0x92, 0xf0, 0x71, 0xfb, 0xf3, 0xa5, 0x6d, 0xfe, + 0x49, 0xfa, 0x01, 0xfb, 0x7d, 0x31, 0xc7, 0xbe, 0x37, 0xdf, 0xff, 0x2f, 0x00, 0x00, 0xff, 0xff, + 0x77, 0xc5, 0xd1, 0xfe, 0xae, 0x16, 0x00, 0x00, } diff --git a/pkg/proto/group/group.proto b/pkg/proto/group/group.proto index f81b9da41..cf207d69a 100644 --- a/pkg/proto/group/group.proto +++ b/pkg/proto/group/group.proto @@ -21,7 +21,7 @@ message CreateGroupReq{ string FaceUrl = 5; string Ext = 6; string OperationID = 7; - string OpUserID = 8; + string OpUserID = 8; //app manager or group owner string FromUserID = 9; } @@ -34,7 +34,7 @@ message CreateGroupResp{ message GetGroupsInfoReq{ repeated string GroupIDList = 1; string OperationID = 2; - string OpUserID = 3; + string OpUserID = 3; //No verification permission } message GetGroupsInfoResp{ @@ -46,16 +46,15 @@ message GetGroupsInfoResp{ message SetGroupInfoReq{ open_im_sdk.GroupInfo GroupInfo = 1; - string OpUserID = 2; - string FromUserID = 3; - string OperationID = 4; + string OpUserID = 2; //app manager or group owner + string OperationID = 3; } -//owner or manager + message GetGroupApplicationListReq { - string OpUserID = 1; + string OpUserID = 1; //app manager or group owner(manager) string OperationID = 2; - string FromUserID = 3; //owner or manager + string FromUserID = 3; //owner or manager (Received) } message GetGroupApplicationList_Data_User { @@ -93,16 +92,15 @@ message TransferGroupOwnerReq { string OldOwnerUserID = 2; string NewOwnerUserID = 3; string OperationID = 4; - string OpUserID = 5; + string OpUserID = 5; //app manager or group owner } message JoinGroupReq{ string GroupID = 1; string ReqMessage = 2; - string FromUserID = 3; + string OpUserID = 3; string OperationID = 4; - string OpUserID = 5; } message GroupApplicationResponseReq{ @@ -110,12 +108,10 @@ message GroupApplicationResponseReq{ string OpUserID = 2; string GroupID = 3; string FromUserID = 4; //请求加群:请求者,邀请加群:邀请人 - string ToUserID = 7; //请求加群:0,邀请加群:被邀请人 - int64 AddTime = 10; - string HandledMsg = 12; - // int32 Type = 13; -// int32 HandleStatus = 14; - int32 HandleResult = 15; + string ToUserID = 5; //请求加群:0,邀请加群:被邀请人 + int64 AddTime = 6; + string HandledMsg = 7; + int32 HandleResult = 8; } @@ -126,22 +122,21 @@ message SetOwnerGroupNickNameReq{ string Nickname = 2; string OperationID = 3; string FromUserID = 4; - string OpUserID = 5; + string OpUserID = 5; //app manger or FromUserID } message QuitGroupReq{ string GroupID = 1; string OperationID = 2; - string FromUserID = 3; - string OpUserID = 4; + string OpUserID = 3; } message GetGroupMemberListReq { string GroupID = 1; - string OpUserID = 2; + string OpUserID = 2; //No verification permission string OperationID = 3; int32 Filter = 4; int32 NextSeq = 5; @@ -159,7 +154,7 @@ message GetGroupMemberListResp { message GetGroupMembersInfoReq { string GroupID = 1; repeated string memberList = 2; - string OpUserID = 3; + string OpUserID = 3; //No verification permission string OperationID = 4; } @@ -174,7 +169,7 @@ message KickGroupMemberReq { repeated string KickedUserIDList = 2; string Reason = 3; string OperationID = 5; - string OpUserID = 6; + string OpUserID = 6; //app manger or group manager } message Id2Result { @@ -192,7 +187,7 @@ message KickGroupMemberResp { message GetJoinedGroupListReq { string FromUserID = 1; string operationID = 2; - string OpUserID = 3; + string OpUserID = 3; //app manager or FromUserID } @@ -208,7 +203,7 @@ message InviteUserToGroupReq { string GroupID = 3; string Reason = 4; repeated string InvitedUserIDList = 5; - string OpUserID = 6; + string OpUserID = 6; //group member or app manager } message InviteUserToGroupResp { @@ -220,7 +215,7 @@ message InviteUserToGroupResp { message GetGroupAllMemberReq { string GroupID = 1; - string OpUserID = 2; + string OpUserID = 2; //No verification permission string OperationID = 3; } diff --git a/pkg/proto/sdk_ws/ws.pb.go b/pkg/proto/sdk_ws/ws.pb.go index b65f2980c..6809ce398 100644 --- a/pkg/proto/sdk_ws/ws.pb.go +++ b/pkg/proto/sdk_ws/ws.pb.go @@ -34,7 +34,7 @@ func (m *PullMessageBySeqListResp) Reset() { *m = PullMessageBySeqListRe func (m *PullMessageBySeqListResp) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListResp) ProtoMessage() {} func (*PullMessageBySeqListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_9a3c519aa1c52df5, []int{0} + return fileDescriptor_ws_3380b8a9bc5ee255, []int{0} } func (m *PullMessageBySeqListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListResp.Unmarshal(m, b) @@ -109,7 +109,7 @@ func (m *PullMessageBySeqListReq) Reset() { *m = PullMessageBySeqListReq func (m *PullMessageBySeqListReq) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListReq) ProtoMessage() {} func (*PullMessageBySeqListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_9a3c519aa1c52df5, []int{1} + return fileDescriptor_ws_3380b8a9bc5ee255, []int{1} } func (m *PullMessageBySeqListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListReq.Unmarshal(m, b) @@ -164,7 +164,7 @@ func (m *PullMessageReq) Reset() { *m = PullMessageReq{} } func (m *PullMessageReq) String() string { return proto.CompactTextString(m) } func (*PullMessageReq) ProtoMessage() {} func (*PullMessageReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_9a3c519aa1c52df5, []int{2} + return fileDescriptor_ws_3380b8a9bc5ee255, []int{2} } func (m *PullMessageReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageReq.Unmarshal(m, b) @@ -228,7 +228,7 @@ func (m *PullMessageResp) Reset() { *m = PullMessageResp{} } func (m *PullMessageResp) String() string { return proto.CompactTextString(m) } func (*PullMessageResp) ProtoMessage() {} func (*PullMessageResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_9a3c519aa1c52df5, []int{3} + return fileDescriptor_ws_3380b8a9bc5ee255, []int{3} } func (m *PullMessageResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageResp.Unmarshal(m, b) @@ -300,7 +300,7 @@ func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} } func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqReq) ProtoMessage() {} func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_9a3c519aa1c52df5, []int{4} + return fileDescriptor_ws_3380b8a9bc5ee255, []int{4} } func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) @@ -332,7 +332,7 @@ func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} } func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqResp) ProtoMessage() {} func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_9a3c519aa1c52df5, []int{5} + return fileDescriptor_ws_3380b8a9bc5ee255, []int{5} } func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) @@ -380,7 +380,7 @@ func (m *GatherFormat) Reset() { *m = GatherFormat{} } func (m *GatherFormat) String() string { return proto.CompactTextString(m) } func (*GatherFormat) ProtoMessage() {} func (*GatherFormat) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_9a3c519aa1c52df5, []int{6} + return fileDescriptor_ws_3380b8a9bc5ee255, []int{6} } func (m *GatherFormat) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GatherFormat.Unmarshal(m, b) @@ -427,7 +427,7 @@ func (m *UserSendMsgResp) Reset() { *m = UserSendMsgResp{} } func (m *UserSendMsgResp) String() string { return proto.CompactTextString(m) } func (*UserSendMsgResp) ProtoMessage() {} func (*UserSendMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_9a3c519aa1c52df5, []int{7} + return fileDescriptor_ws_3380b8a9bc5ee255, []int{7} } func (m *UserSendMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserSendMsgResp.Unmarshal(m, b) @@ -496,7 +496,7 @@ func (m *MsgData) Reset() { *m = MsgData{} } func (m *MsgData) String() string { return proto.CompactTextString(m) } func (*MsgData) ProtoMessage() {} func (*MsgData) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_9a3c519aa1c52df5, []int{8} + return fileDescriptor_ws_3380b8a9bc5ee255, []int{8} } func (m *MsgData) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgData.Unmarshal(m, b) @@ -657,7 +657,7 @@ func (m *OfflinePushInfo) Reset() { *m = OfflinePushInfo{} } func (m *OfflinePushInfo) String() string { return proto.CompactTextString(m) } func (*OfflinePushInfo) ProtoMessage() {} func (*OfflinePushInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_9a3c519aa1c52df5, []int{9} + return fileDescriptor_ws_3380b8a9bc5ee255, []int{9} } func (m *OfflinePushInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OfflinePushInfo.Unmarshal(m, b) @@ -732,7 +732,7 @@ func (m *GroupInfo) Reset() { *m = GroupInfo{} } func (m *GroupInfo) String() string { return proto.CompactTextString(m) } func (*GroupInfo) ProtoMessage() {} func (*GroupInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_9a3c519aa1c52df5, []int{10} + return fileDescriptor_ws_3380b8a9bc5ee255, []int{10} } func (m *GroupInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfo.Unmarshal(m, b) @@ -824,6 +824,7 @@ type GroupMemberFullInfo struct { NickName string `protobuf:"bytes,5,opt,name=NickName" json:"NickName,omitempty"` FaceUrl string `protobuf:"bytes,6,opt,name=FaceUrl" json:"FaceUrl,omitempty"` FriendRemark string `protobuf:"bytes,7,opt,name=FriendRemark" json:"FriendRemark,omitempty"` + AppMangerLevel int32 `protobuf:"varint,8,opt,name=AppMangerLevel" json:"AppMangerLevel,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -833,7 +834,7 @@ func (m *GroupMemberFullInfo) Reset() { *m = GroupMemberFullInfo{} } func (m *GroupMemberFullInfo) String() string { return proto.CompactTextString(m) } func (*GroupMemberFullInfo) ProtoMessage() {} func (*GroupMemberFullInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_9a3c519aa1c52df5, []int{11} + return fileDescriptor_ws_3380b8a9bc5ee255, []int{11} } func (m *GroupMemberFullInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupMemberFullInfo.Unmarshal(m, b) @@ -902,6 +903,13 @@ func (m *GroupMemberFullInfo) GetFriendRemark() string { return "" } +func (m *GroupMemberFullInfo) GetAppMangerLevel() int32 { + if m != nil { + return m.AppMangerLevel + } + return 0 +} + // private, Friends have permission to view type UserInfo struct { UserID string `protobuf:"bytes,1,opt,name=UserID" json:"UserID,omitempty"` @@ -921,7 +929,7 @@ func (m *UserInfo) Reset() { *m = UserInfo{} } func (m *UserInfo) String() string { return proto.CompactTextString(m) } func (*UserInfo) ProtoMessage() {} func (*UserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_9a3c519aa1c52df5, []int{12} + return fileDescriptor_ws_3380b8a9bc5ee255, []int{12} } func (m *UserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserInfo.Unmarshal(m, b) @@ -1012,7 +1020,7 @@ func (m *PublicUserInfo) Reset() { *m = PublicUserInfo{} } func (m *PublicUserInfo) String() string { return proto.CompactTextString(m) } func (*PublicUserInfo) ProtoMessage() {} func (*PublicUserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_9a3c519aa1c52df5, []int{13} + return fileDescriptor_ws_3380b8a9bc5ee255, []int{13} } func (m *PublicUserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PublicUserInfo.Unmarshal(m, b) @@ -1072,7 +1080,7 @@ func (m *TipsComm) Reset() { *m = TipsComm{} } func (m *TipsComm) String() string { return proto.CompactTextString(m) } func (*TipsComm) ProtoMessage() {} func (*TipsComm) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_9a3c519aa1c52df5, []int{14} + return fileDescriptor_ws_3380b8a9bc5ee255, []int{14} } func (m *TipsComm) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TipsComm.Unmarshal(m, b) @@ -1121,7 +1129,7 @@ func (m *MemberEnterTips) Reset() { *m = MemberEnterTips{} } func (m *MemberEnterTips) String() string { return proto.CompactTextString(m) } func (*MemberEnterTips) ProtoMessage() {} func (*MemberEnterTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_9a3c519aa1c52df5, []int{15} + return fileDescriptor_ws_3380b8a9bc5ee255, []int{15} } func (m *MemberEnterTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberEnterTips.Unmarshal(m, b) @@ -1176,7 +1184,7 @@ func (m *MemberLeaveTips) Reset() { *m = MemberLeaveTips{} } func (m *MemberLeaveTips) String() string { return proto.CompactTextString(m) } func (*MemberLeaveTips) ProtoMessage() {} func (*MemberLeaveTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_9a3c519aa1c52df5, []int{16} + return fileDescriptor_ws_3380b8a9bc5ee255, []int{16} } func (m *MemberLeaveTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberLeaveTips.Unmarshal(m, b) @@ -1231,7 +1239,7 @@ func (m *MemberInvitedTips) Reset() { *m = MemberInvitedTips{} } func (m *MemberInvitedTips) String() string { return proto.CompactTextString(m) } func (*MemberInvitedTips) ProtoMessage() {} func (*MemberInvitedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_9a3c519aa1c52df5, []int{17} + return fileDescriptor_ws_3380b8a9bc5ee255, []int{17} } func (m *MemberInvitedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInvitedTips.Unmarshal(m, b) @@ -1293,7 +1301,7 @@ func (m *MemberKickedTips) Reset() { *m = MemberKickedTips{} } func (m *MemberKickedTips) String() string { return proto.CompactTextString(m) } func (*MemberKickedTips) ProtoMessage() {} func (*MemberKickedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_9a3c519aa1c52df5, []int{18} + return fileDescriptor_ws_3380b8a9bc5ee255, []int{18} } func (m *MemberKickedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberKickedTips.Unmarshal(m, b) @@ -1356,7 +1364,7 @@ func (m *MemberInfoChangedTips) Reset() { *m = MemberInfoChangedTips{} } func (m *MemberInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*MemberInfoChangedTips) ProtoMessage() {} func (*MemberInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_9a3c519aa1c52df5, []int{19} + return fileDescriptor_ws_3380b8a9bc5ee255, []int{19} } func (m *MemberInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInfoChangedTips.Unmarshal(m, b) @@ -1425,7 +1433,7 @@ func (m *GroupCreatedTips) Reset() { *m = GroupCreatedTips{} } func (m *GroupCreatedTips) String() string { return proto.CompactTextString(m) } func (*GroupCreatedTips) ProtoMessage() {} func (*GroupCreatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_9a3c519aa1c52df5, []int{20} + return fileDescriptor_ws_3380b8a9bc5ee255, []int{20} } func (m *GroupCreatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupCreatedTips.Unmarshal(m, b) @@ -1486,7 +1494,7 @@ func (m *GroupInfoChangedTips) Reset() { *m = GroupInfoChangedTips{} } func (m *GroupInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*GroupInfoChangedTips) ProtoMessage() {} func (*GroupInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_9a3c519aa1c52df5, []int{21} + return fileDescriptor_ws_3380b8a9bc5ee255, []int{21} } func (m *GroupInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfoChangedTips.Unmarshal(m, b) @@ -1540,7 +1548,7 @@ func (m *ReceiveJoinApplicationTips) Reset() { *m = ReceiveJoinApplicati func (m *ReceiveJoinApplicationTips) String() string { return proto.CompactTextString(m) } func (*ReceiveJoinApplicationTips) ProtoMessage() {} func (*ReceiveJoinApplicationTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_9a3c519aa1c52df5, []int{22} + return fileDescriptor_ws_3380b8a9bc5ee255, []int{22} } func (m *ReceiveJoinApplicationTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ReceiveJoinApplicationTips.Unmarshal(m, b) @@ -1595,7 +1603,7 @@ func (m *ApplicationProcessedTips) Reset() { *m = ApplicationProcessedTi func (m *ApplicationProcessedTips) String() string { return proto.CompactTextString(m) } func (*ApplicationProcessedTips) ProtoMessage() {} func (*ApplicationProcessedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_9a3c519aa1c52df5, []int{23} + return fileDescriptor_ws_3380b8a9bc5ee255, []int{23} } func (m *ApplicationProcessedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ApplicationProcessedTips.Unmarshal(m, b) @@ -1658,7 +1666,7 @@ func (m *FriendInfo) Reset() { *m = FriendInfo{} } func (m *FriendInfo) String() string { return proto.CompactTextString(m) } func (*FriendInfo) ProtoMessage() {} func (*FriendInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_9a3c519aa1c52df5, []int{24} + return fileDescriptor_ws_3380b8a9bc5ee255, []int{24} } func (m *FriendInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfo.Unmarshal(m, b) @@ -1719,7 +1727,7 @@ func (m *FriendApplication) Reset() { *m = FriendApplication{} } func (m *FriendApplication) String() string { return proto.CompactTextString(m) } func (*FriendApplication) ProtoMessage() {} func (*FriendApplication) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_9a3c519aa1c52df5, []int{25} + return fileDescriptor_ws_3380b8a9bc5ee255, []int{25} } func (m *FriendApplication) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplication.Unmarshal(m, b) @@ -1775,7 +1783,7 @@ func (m *FriendApplicationAddedTips) Reset() { *m = FriendApplicationAdd func (m *FriendApplicationAddedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationAddedTips) ProtoMessage() {} func (*FriendApplicationAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_9a3c519aa1c52df5, []int{26} + return fileDescriptor_ws_3380b8a9bc5ee255, []int{26} } func (m *FriendApplicationAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationAddedTips.Unmarshal(m, b) @@ -1838,7 +1846,7 @@ func (m *FriendApplicationProcessedTips) Reset() { *m = FriendApplicatio func (m *FriendApplicationProcessedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationProcessedTips) ProtoMessage() {} func (*FriendApplicationProcessedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_9a3c519aa1c52df5, []int{27} + return fileDescriptor_ws_3380b8a9bc5ee255, []int{27} } func (m *FriendApplicationProcessedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationProcessedTips.Unmarshal(m, b) @@ -1898,7 +1906,7 @@ func (m *FriendAddedTips) Reset() { *m = FriendAddedTips{} } func (m *FriendAddedTips) String() string { return proto.CompactTextString(m) } func (*FriendAddedTips) ProtoMessage() {} func (*FriendAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_9a3c519aa1c52df5, []int{28} + return fileDescriptor_ws_3380b8a9bc5ee255, []int{28} } func (m *FriendAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendAddedTips.Unmarshal(m, b) @@ -1944,7 +1952,7 @@ func (m *FriendDeletedTips) Reset() { *m = FriendDeletedTips{} } func (m *FriendDeletedTips) String() string { return proto.CompactTextString(m) } func (*FriendDeletedTips) ProtoMessage() {} func (*FriendDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_9a3c519aa1c52df5, []int{29} + return fileDescriptor_ws_3380b8a9bc5ee255, []int{29} } func (m *FriendDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendDeletedTips.Unmarshal(m, b) @@ -1991,7 +1999,7 @@ func (m *BlackInfo) Reset() { *m = BlackInfo{} } func (m *BlackInfo) String() string { return proto.CompactTextString(m) } func (*BlackInfo) ProtoMessage() {} func (*BlackInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_9a3c519aa1c52df5, []int{30} + return fileDescriptor_ws_3380b8a9bc5ee255, []int{30} } func (m *BlackInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackInfo.Unmarshal(m, b) @@ -2044,7 +2052,7 @@ func (m *BlackAddedTips) Reset() { *m = BlackAddedTips{} } func (m *BlackAddedTips) String() string { return proto.CompactTextString(m) } func (*BlackAddedTips) ProtoMessage() {} func (*BlackAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_9a3c519aa1c52df5, []int{31} + return fileDescriptor_ws_3380b8a9bc5ee255, []int{31} } func (m *BlackAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackAddedTips.Unmarshal(m, b) @@ -2090,7 +2098,7 @@ func (m *BlackDeletedTips) Reset() { *m = BlackDeletedTips{} } func (m *BlackDeletedTips) String() string { return proto.CompactTextString(m) } func (*BlackDeletedTips) ProtoMessage() {} func (*BlackDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_9a3c519aa1c52df5, []int{32} + return fileDescriptor_ws_3380b8a9bc5ee255, []int{32} } func (m *BlackDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackDeletedTips.Unmarshal(m, b) @@ -2137,7 +2145,7 @@ func (m *FriendInfoChangedTips) Reset() { *m = FriendInfoChangedTips{} } func (m *FriendInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*FriendInfoChangedTips) ProtoMessage() {} func (*FriendInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_9a3c519aa1c52df5, []int{33} + return fileDescriptor_ws_3380b8a9bc5ee255, []int{33} } func (m *FriendInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfoChangedTips.Unmarshal(m, b) @@ -2192,7 +2200,7 @@ func (m *SelfInfoUpdatedTips) Reset() { *m = SelfInfoUpdatedTips{} } func (m *SelfInfoUpdatedTips) String() string { return proto.CompactTextString(m) } func (*SelfInfoUpdatedTips) ProtoMessage() {} func (*SelfInfoUpdatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_9a3c519aa1c52df5, []int{34} + return fileDescriptor_ws_3380b8a9bc5ee255, []int{34} } func (m *SelfInfoUpdatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SelfInfoUpdatedTips.Unmarshal(m, b) @@ -2272,118 +2280,119 @@ func init() { proto.RegisterType((*SelfInfoUpdatedTips)(nil), "open_im_sdk.SelfInfoUpdatedTips") } -func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_9a3c519aa1c52df5) } +func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_3380b8a9bc5ee255) } -var fileDescriptor_ws_9a3c519aa1c52df5 = []byte{ - // 1753 bytes of a gzipped FileDescriptorProto +var fileDescriptor_ws_3380b8a9bc5ee255 = []byte{ + // 1769 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x59, 0x4f, 0x6f, 0x23, 0x4b, - 0x11, 0xd7, 0xf8, 0x5f, 0xec, 0xb2, 0x37, 0xce, 0xce, 0xee, 0xe6, 0x0d, 0xe1, 0x69, 0x65, 0x46, - 0x08, 0x59, 0xe8, 0x29, 0x4f, 0x24, 0x42, 0xbc, 0x2c, 0x02, 0x36, 0x89, 0x93, 0x10, 0x88, 0xd7, - 0xd1, 0x38, 0x11, 0xc7, 0xd5, 0xc4, 0xd3, 0x76, 0x1a, 0x8f, 0x7b, 0x9c, 0xee, 0xb1, 0x77, 0x73, - 0xe1, 0x6b, 0x70, 0x42, 0x02, 0x71, 0x40, 0x08, 0x0e, 0x88, 0x03, 0x1f, 0x81, 0x13, 0x9f, 0x02, - 0xc1, 0x91, 0x0b, 0x1c, 0xe1, 0x80, 0xba, 0xba, 0x67, 0xa6, 0x27, 0x0e, 0x89, 0x13, 0xb4, 0x7b, - 0x79, 0xb7, 0xa9, 0x9f, 0xab, 0xba, 0x7e, 0xf5, 0xa7, 0x6b, 0x6a, 0x12, 0x68, 0x8a, 0x60, 0xfc, - 0xf6, 0x9d, 0xf8, 0xfc, 0x9d, 0xd8, 0x9c, 0xf2, 0x28, 0x8e, 0xec, 0x7a, 0x34, 0x25, 0xec, 0x2d, - 0x9d, 0xbc, 0x15, 0xc1, 0xd8, 0xfd, 0x8f, 0x05, 0xce, 0xe9, 0x2c, 0x0c, 0xbb, 0x44, 0x08, 0x7f, - 0x44, 0xf6, 0xae,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x2b, 0x2d, 0x30, 0x73, 0xff, 0x65, - 0x41, 0x33, 0x47, 0xe0, 0x4b, 0x51, 0xe4, 0xe7, 0x60, 0x1f, 0x91, 0xb8, 0xeb, 0xbf, 0xdf, 0x65, - 0x41, 0x17, 0x29, 0x79, 0xe4, 0xca, 0x3d, 0x80, 0x67, 0x0b, 0xa8, 0x98, 0x1a, 0xc1, 0x59, 0xff, - 0x23, 0xb8, 0x82, 0x19, 0x9c, 0xfb, 0x43, 0x68, 0x98, 0xae, 0xed, 0x55, 0x28, 0xd0, 0x40, 0x17, - 0xb3, 0x40, 0x03, 0xbb, 0x0d, 0xa5, 0x50, 0x76, 0x42, 0x01, 0x39, 0x3f, 0xcf, 0x71, 0xee, 0x8a, - 0x51, 0xc7, 0x8f, 0x7d, 0x0f, 0x35, 0xdc, 0x2b, 0x68, 0x4a, 0xc6, 0x7d, 0xc2, 0x82, 0xae, 0x18, - 0x21, 0x99, 0x16, 0xd4, 0xfb, 0x84, 0xcf, 0x31, 0x8c, 0xb4, 0x45, 0x4c, 0x48, 0x6a, 0xec, 0x87, - 0x94, 0xb0, 0x58, 0x69, 0xe8, 0x6e, 0x34, 0x20, 0xd5, 0x49, 0x2c, 0x38, 0xa3, 0x13, 0xa2, 0xeb, - 0x95, 0xca, 0xee, 0x9f, 0xca, 0xb0, 0xa2, 0x49, 0xa8, 0xae, 0x62, 0x41, 0xd6, 0x89, 0x4a, 0x92, - 0x38, 0x27, 0x83, 0x79, 0x7a, 0xb8, 0x96, 0x64, 0xdf, 0x60, 0x96, 0x8f, 0x3b, 0x78, 0x6c, 0xcd, - 0x4b, 0x44, 0xc9, 0x69, 0x60, 0x70, 0xd2, 0x7d, 0x68, 0x40, 0x52, 0x43, 0x18, 0x71, 0x95, 0x95, - 0x86, 0x01, 0xd9, 0xdf, 0x84, 0x35, 0xe9, 0x9f, 0xf0, 0xd3, 0xd0, 0x8f, 0x87, 0x11, 0x9f, 0x1c, - 0x77, 0x9c, 0x0a, 0xb6, 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a7, 0x94, 0x56, 0xcc, 0xc4, 0x08, 0x36, 0x50, + 0xdd, 0x4c, 0xfa, 0x87, 0xf0, 0xf3, 0x1b, 0x0b, 0x9e, 0x65, 0xe5, 0x32, 0x5f, 0x92, 0xf7, 0x2e, + 0xf1, 0xf6, 0xb5, 0x01, 0xbf, 0xd2, 0xf5, 0x59, 0x6d, 0xf7, 0xfe, 0xbd, 0x05, 0x4f, 0x06, 0x24, + 0x1c, 0x49, 0xd3, 0xb3, 0x59, 0x90, 0xee, 0x2c, 0x3b, 0xd0, 0x90, 0x70, 0x72, 0xea, 0xed, 0xd3, + 0x3d, 0xa7, 0xfa, 0x01, 0xd9, 0x9e, 0x57, 0xf0, 0x5f, 0x16, 0xdb, 0xff, 0x0d, 0x00, 0x00, 0xff, + 0xff, 0x73, 0x31, 0x8b, 0x68, 0xc5, 0x18, 0x00, 0x00, } diff --git a/pkg/proto/sdk_ws/ws.proto b/pkg/proto/sdk_ws/ws.proto index 05359cf21..3a20f1fcb 100644 --- a/pkg/proto/sdk_ws/ws.proto +++ b/pkg/proto/sdk_ws/ws.proto @@ -128,6 +128,7 @@ message GroupMemberFullInfo { string NickName = 5; string FaceUrl = 6; string FriendRemark = 7; + int32 AppMangerLevel = 8; // >0 } //private, Friends have permission to view From ba249d294eb8c6517bf30e86e53a15815cc952d7 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 23 Dec 2021 19:37:41 +0800 Subject: [PATCH 023/337] send msg file modify --- cmd/open_im_api/main.go | 8 +-- internal/api/chat/get_max_min_seq.go | 2 +- internal/api/chat/pull_msg.go | 17 +++--- internal/api/chat/send_msg.go | 78 ++++++++++++------------ internal/api/manage/management_chat.go | 83 ++++++++++++++++---------- internal/rpc/msg/send_msg.go | 9 ++- 6 files changed, 109 insertions(+), 88 deletions(-) diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index d199bcdbb..23a4c0ec0 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -77,10 +77,10 @@ func main() { //Message chatGroup := r.Group("/msg") { - chatGroup.POST("/newest_seq", apiChat.UserGetSeq) - chatGroup.POST("/pull_msg", apiChat.UserPullMsg) - chatGroup.POST("/send_msg", apiChat.UserSendMsg) - chatGroup.POST("/pull_msg_by_seq", apiChat.UserPullMsgBySeqList) + chatGroup.POST("/newest_seq", apiChat.GetSeq) + chatGroup.POST("/pull_msg", apiChat.PullMsg) + chatGroup.POST("/send_msg", apiChat.SendMsg) + chatGroup.POST("/pull_msg_by_seq", apiChat.PullMsgBySeqList) } //Manager managementGroup := r.Group("/manager") diff --git a/internal/api/chat/get_max_min_seq.go b/internal/api/chat/get_max_min_seq.go index 984497c18..95a4b1340 100644 --- a/internal/api/chat/get_max_min_seq.go +++ b/internal/api/chat/get_max_min_seq.go @@ -19,7 +19,7 @@ type paramsUserNewestSeq struct { MsgIncr int `json:"msgIncr" binding:"required"` } -func UserGetSeq(c *gin.Context) { +func GetSeq(c *gin.Context) { params := paramsUserNewestSeq{} if err := c.BindJSON(¶ms); err != nil { c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) diff --git a/internal/api/chat/pull_msg.go b/internal/api/chat/pull_msg.go index c0fa578e9..881612681 100644 --- a/internal/api/chat/pull_msg.go +++ b/internal/api/chat/pull_msg.go @@ -6,6 +6,7 @@ import ( "Open_IM/pkg/common/token_verify" "Open_IM/pkg/grpc-etcdv3/getcdv3" "Open_IM/pkg/proto/chat" + "Open_IM/pkg/proto/sdk_ws" "context" "github.com/gin-gonic/gin" "net/http" @@ -22,7 +23,7 @@ type paramsUserPullMsg struct { } } -func UserPullMsg(c *gin.Context) { +func PullMsg(c *gin.Context) { params := paramsUserPullMsg{} if err := c.BindJSON(¶ms); err != nil { c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) @@ -34,7 +35,7 @@ func UserPullMsg(c *gin.Context) { c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "token validate err" + err.Error()}) return } - pbData := pbChat.PullMessageReq{} + pbData := open_im_sdk.PullMessageReq{} pbData.UserID = params.SendID pbData.OperationID = params.OperationID pbData.SeqBegin = *params.Data.SeqBegin @@ -54,12 +55,12 @@ func UserPullMsg(c *gin.Context) { if v := reply.GetSingleUserMsg(); v != nil { msg["single"] = v } else { - msg["single"] = []pbChat.GatherFormat{} + msg["single"] = []open_im_sdk.GatherFormat{} } if v := reply.GetGroupUserMsg(); v != nil { msg["group"] = v } else { - msg["group"] = []pbChat.GatherFormat{} + msg["group"] = []open_im_sdk.GatherFormat{} } msg["maxSeq"] = reply.GetMaxSeq() msg["minSeq"] = reply.GetMinSeq() @@ -79,7 +80,7 @@ type paramsUserPullMsgBySeqList struct { SeqList []int64 `json:"seqList"` } -func UserPullMsgBySeqList(c *gin.Context) { +func PullMsgBySeqList(c *gin.Context) { params := paramsUserPullMsgBySeqList{} if err := c.BindJSON(¶ms); err != nil { c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) @@ -91,7 +92,7 @@ func UserPullMsgBySeqList(c *gin.Context) { c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "token validate err" + err.Error()}) return } - pbData := pbChat.PullMessageBySeqListReq{} + pbData := open_im_sdk.PullMessageBySeqListReq{} pbData.UserID = params.SendID pbData.OperationID = params.OperationID pbData.SeqList = params.SeqList @@ -110,12 +111,12 @@ func UserPullMsgBySeqList(c *gin.Context) { if v := reply.GetSingleUserMsg(); v != nil { msg["single"] = v } else { - msg["single"] = []pbChat.GatherFormat{} + msg["single"] = []open_im_sdk.GatherFormat{} } if v := reply.GetGroupUserMsg(); v != nil { msg["group"] = v } else { - msg["group"] = []pbChat.GatherFormat{} + msg["group"] = []open_im_sdk.GatherFormat{} } msg["maxSeq"] = reply.GetMaxSeq() msg["minSeq"] = reply.GetMinSeq() diff --git a/internal/api/chat/send_msg.go b/internal/api/chat/send_msg.go index 310be2ec2..8522ae228 100644 --- a/internal/api/chat/send_msg.go +++ b/internal/api/chat/send_msg.go @@ -4,7 +4,7 @@ import ( "Open_IM/pkg/common/config" "Open_IM/pkg/common/log" pbChat "Open_IM/pkg/proto/chat" - "Open_IM/pkg/utils" + "Open_IM/pkg/proto/sdk_ws" "context" "Open_IM/pkg/grpc-etcdv3/getcdv3" @@ -14,50 +14,51 @@ import ( ) type paramsUserSendMsg struct { - ReqIdentifier int32 `json:"reqIdentifier" binding:"required"` - PlatformID int32 `json:"platformID" binding:"required"` - SendID string `json:"sendID" binding:"required"` - SenderNickName string `json:"senderNickName"` - SenderFaceURL string `json:"senderFaceUrl"` - OperationID string `json:"operationID" binding:"required"` - Data struct { - SessionType int32 `json:"sessionType" binding:"required"` - MsgFrom int32 `json:"msgFrom" binding:"required"` - ContentType int32 `json:"contentType" binding:"required"` - RecvID string `json:"recvID" binding:"required"` - ForceList []string `json:"forceList"` - Content string `json:"content" binding:"required"` - Options map[string]int32 `json:"options" ` - ClientMsgID string `json:"clientMsgID" binding:"required"` - OffLineInfo map[string]interface{} `json:"offlineInfo" ` - Ex map[string]interface{} `json:"ext"` + SenderPlatformID int32 `json:"senderPlatformID" binding:"required"` + SendID string `json:"sendID" binding:"required"` + SenderNickName string `json:"senderNickName"` + SenderFaceURL string `json:"senderFaceUrl"` + OperationID string `json:"operationID" binding:"required"` + Data struct { + SessionType int32 `json:"sessionType" binding:"required"` + MsgFrom int32 `json:"msgFrom" binding:"required"` + ContentType int32 `json:"contentType" binding:"required"` + RecvID string `json:"recvID" ` + GroupID string `json:"groupID" ` + ForceList []string `json:"forceList"` + Content []byte `json:"content" binding:"required"` + Options map[string]bool `json:"options" ` + ClientMsgID string `json:"clientMsgID" binding:"required"` + CreateTime int64 `json:"createTime" binding:"required"` + OffLineInfo *open_im_sdk.OfflinePushInfo `json:"offlineInfo" ` } } func newUserSendMsgReq(token string, params *paramsUserSendMsg) *pbChat.SendMsgReq { pbData := pbChat.SendMsgReq{ - ReqIdentifier: params.ReqIdentifier, - Token: token, - SendID: params.SendID, - SenderNickName: params.SenderNickName, - SenderFaceURL: params.SenderFaceURL, - OperationID: params.OperationID, - PlatformID: params.PlatformID, - SessionType: params.Data.SessionType, - MsgFrom: params.Data.MsgFrom, - ContentType: params.Data.ContentType, - RecvID: params.Data.RecvID, - ForceList: params.Data.ForceList, - Content: params.Data.Content, - Options: utils.MapIntToJsonString(params.Data.Options), - ClientMsgID: params.Data.ClientMsgID, - OffLineInfo: utils.MapToJsonString(params.Data.OffLineInfo), - Ex: utils.MapToJsonString(params.Data.Ex), + Token: token, + OperationID: params.OperationID, + MsgData: &open_im_sdk.MsgData{ + SendID: params.SendID, + RecvID: params.Data.RecvID, + GroupID: params.Data.GroupID, + ClientMsgID: params.Data.ClientMsgID, + SenderPlatformID: params.SenderPlatformID, + SenderNickName: params.SenderNickName, + SenderFaceURL: params.SenderFaceURL, + SessionType: params.Data.SessionType, + MsgFrom: params.Data.MsgFrom, + ContentType: params.Data.ContentType, + Content: params.Data.Content, + CreateTime: params.Data.CreateTime, + Options: params.Data.Options, + OfflinePushInfo: params.Data.OffLineInfo, + }, } return &pbData } -func UserSendMsg(c *gin.Context) { +func SendMsg(c *gin.Context) { params := paramsUserSendMsg{} if err := c.BindJSON(¶ms); err != nil { c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) @@ -86,9 +87,8 @@ func UserSendMsg(c *gin.Context) { log.Info("", "", "api SendMsg call end..., [data: %s] [reply: %s]", pbData.String(), reply.String()) c.JSON(http.StatusOK, gin.H{ - "errCode": reply.ErrCode, - "errMsg": reply.ErrMsg, - "reqIdentifier": reply.ReqIdentifier, + "errCode": reply.ErrCode, + "errMsg": reply.ErrMsg, "data": gin.H{ "clientMsgID": reply.ClientMsgID, "serverMsgID": reply.ServerMsgID, diff --git a/internal/api/manage/management_chat.go b/internal/api/manage/management_chat.go index a72fb1c02..298b53836 100644 --- a/internal/api/manage/management_chat.go +++ b/internal/api/manage/management_chat.go @@ -13,6 +13,7 @@ import ( "Open_IM/pkg/common/token_verify" "Open_IM/pkg/grpc-etcdv3/getcdv3" pbChat "Open_IM/pkg/proto/chat" + "Open_IM/pkg/proto/sdk_ws" "Open_IM/pkg/utils" "context" "github.com/gin-gonic/gin" @@ -25,20 +26,22 @@ import ( var validate *validator.Validate type paramsManagementSendMsg struct { - OperationID string `json:"operationID" binding:"required"` - SendID string `json:"sendID" binding:"required"` - RecvID string `json:"recvID" binding:"required"` - SenderNickName string `json:"senderNickName" ` - SenderFaceURL string `json:"senderFaceURL" ` - SenderPlatformID int32 `json:"senderPlatformID"` - ForceList []string `json:"forceList" ` - Content map[string]interface{} `json:"content" binding:"required"` - ContentType int32 `json:"contentType" binding:"required"` - SessionType int32 `json:"sessionType" binding:"required"` - IsOnlineOnly bool `json:"isOnlineOnly"` + OperationID string `json:"operationID" binding:"required"` + SendID string `json:"sendID" binding:"required"` + RecvID string `json:"recvID" ` + GroupID string `json:"groupID" ` + SenderNickName string `json:"senderNickName" ` + SenderFaceURL string `json:"senderFaceURL" ` + SenderPlatformID int32 `json:"senderPlatformID"` + ForceList []string `json:"forceList" ` + Content map[string]interface{} `json:"content" binding:"required"` + ContentType int32 `json:"contentType" binding:"required"` + SessionType int32 `json:"sessionType" binding:"required"` + IsOnlineOnly bool `json:"isOnlineOnly"` + OfflinePushInfo *open_im_sdk.OfflinePushInfo `json:"offlinePushInfo"` } -func newUserSendMsgReq(params *paramsManagementSendMsg) *pbChat.UserSendMsgReq { +func newUserSendMsgReq(params *paramsManagementSendMsg) *pbChat.SendMsgReq { var newContent string switch params.ContentType { case constant.Text: @@ -53,26 +56,31 @@ func newUserSendMsgReq(params *paramsManagementSendMsg) *pbChat.UserSendMsgReq { newContent = utils.StructToJsonString(params.Content) default: } - options := make(map[string]int32, 2) + options := make(map[string]bool, 2) if params.IsOnlineOnly { - options["history"] = 0 - options["persistent"] = 0 + utils.SetSwitchFromOptions(options, constant.IsOfflinePush, false) + utils.SetSwitchFromOptions(options, constant.IsHistory, false) + utils.SetSwitchFromOptions(options, constant.IsPersistent, false) } - pbData := pbChat.UserSendMsgReq{ - ReqIdentifier: constant.WSSendMsg, - SendID: params.SendID, - SenderNickName: params.SenderNickName, - SenderFaceURL: params.SenderFaceURL, - OperationID: params.OperationID, - PlatformID: params.SenderPlatformID, - SessionType: params.SessionType, - MsgFrom: constant.UserMsgType, - ContentType: params.ContentType, - RecvID: params.RecvID, - ForceList: params.ForceList, - Content: newContent, - ClientMsgID: utils.GetMsgID(params.SendID), - Options: utils.MapIntToJsonString(options), + pbData := pbChat.SendMsgReq{ + OperationID: params.OperationID, + MsgData: &open_im_sdk.MsgData{ + SendID: params.SendID, + RecvID: params.RecvID, + GroupID: params.GroupID, + ClientMsgID: utils.GetMsgID(params.SendID), + SenderPlatformID: params.SenderPlatformID, + SenderNickName: params.SenderNickName, + SenderFaceURL: params.SenderFaceURL, + SessionType: params.SessionType, + MsgFrom: constant.SysMsgType, + ContentType: params.ContentType, + Content: []byte(newContent), + ForceList: params.ForceList, + CreateTime: utils.GetCurrentTimestampByNano(), + Options: options, + OfflinePushInfo: params.OfflinePushInfo, + }, } return &pbData } @@ -135,6 +143,19 @@ func ManagementSendMsg(c *gin.Context) { c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "not authorized", "sendTime": 0, "MsgID": ""}) return + } + switch params.SessionType { + case constant.SingleChatType: + if len(params.RecvID) == 0 { + log.NewError(params.OperationID, "recvID is a null string") + c.JSON(http.StatusBadRequest, gin.H{"errCode": 405, "errMsg": "recvID is a null string", "sendTime": 0, "MsgID": ""}) + } + case constant.GroupChatType: + if len(params.GroupID) == 0 { + log.NewError(params.OperationID, "groupID is a null string") + c.JSON(http.StatusBadRequest, gin.H{"errCode": 405, "errMsg": "groupID is a null string", "sendTime": 0, "MsgID": ""}) + } + } log.InfoByKv("Ws call success to ManagementSendMsgReq", params.OperationID, "Parameters", params) @@ -146,7 +167,7 @@ func ManagementSendMsg(c *gin.Context) { log.Info("", "", "api ManagementSendMsg call, api call rpc...") - reply, err := client.UserSendMsg(context.Background(), pbData) + reply, err := client.SendMsg(context.Background(), pbData) if err != nil { log.NewError(params.OperationID, "call delete UserSendMsg rpc server failed", err.Error()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call UserSendMsg rpc server failed"}) diff --git a/internal/rpc/msg/send_msg.go b/internal/rpc/msg/send_msg.go index 26e49bfa8..c81878f4b 100644 --- a/internal/rpc/msg/send_msg.go +++ b/internal/rpc/msg/send_msg.go @@ -155,7 +155,6 @@ func (rpc *rpcChat) SendMsg(_ context.Context, pb *pbChat.SendMsgReq) (*pbChat.S client := pbGroup.NewGroupClient(etcdConn) req := &pbGroup.GetGroupAllMemberReq{ GroupID: pb.MsgData.GroupID, - Token: pb.Token, OperationID: pb.OperationID, } reply, err := client.GetGroupAllMember(context.Background(), req) @@ -169,13 +168,13 @@ func (rpc *rpcChat) SendMsg(_ context.Context, pb *pbChat.SendMsgReq) (*pbChat.S } groupID := pb.MsgData.GroupID for _, v := range reply.MemberList { - pb.MsgData.RecvID = v.UserId - isSend := modifyMessageByUserMessageReceiveOpt(v.UserId, groupID, constant.GroupChatType, pb) + pb.MsgData.RecvID = v.UserID + isSend := modifyMessageByUserMessageReceiveOpt(v.UserID, groupID, constant.GroupChatType, pb) if isSend { msgToMQ.MsgData = pb.MsgData - err := rpc.sendMsgToKafka(&msgToMQ, v.UserId) + err := rpc.sendMsgToKafka(&msgToMQ, v.UserID) if err != nil { - log.NewError(msgToMQ.OperationID, "kafka send msg err:UserId", v.UserId, msgToMQ.String()) + log.NewError(msgToMQ.OperationID, "kafka send msg err:UserId", v.UserID, msgToMQ.String()) return returnMsg(&replay, pb, 201, "kafka send msg err", "", 0) } } From 33ae9dae0a57c24b0c19b7d16d00382a44124a40 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 23 Dec 2021 19:50:04 +0800 Subject: [PATCH 024/337] send msg file modify --- internal/push/jpush/push.go | 4 ++-- internal/push/logic/push_to_client.go | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/internal/push/jpush/push.go b/internal/push/jpush/push.go index 1258a80a7..f0843a3f0 100644 --- a/internal/push/jpush/push.go +++ b/internal/push/jpush/push.go @@ -13,14 +13,14 @@ import ( type JPushResp struct { } -func JGAccountListPush(accounts []string, content, detailContent, platform string) ([]byte, error) { +func JGAccountListPush(accounts []string, alert, detailContent, platform string) ([]byte, error) { var pf requestBody.Platform _ = pf.SetPlatform(platform) var au requestBody.Audience au.SetAlias(accounts) var no requestBody.Notification - no.SetAlert(content, platform) + no.SetAlert(alert, platform) var me requestBody.Message me.SetMsgContent(detailContent) var o requestBody.Options diff --git a/internal/push/logic/push_to_client.go b/internal/push/logic/push_to_client.go index e7cbf20e0..7d566a10a 100644 --- a/internal/push/logic/push_to_client.go +++ b/internal/push/logic/push_to_client.go @@ -93,6 +93,10 @@ func MsgToUser(pushMsg *pbPush.PushMsgReq) { default: content = constant.ContentType2PushContent[constant.Common] } + if pushMsg.MsgData.OfflinePushInfo != nil { + content = pushMsg.MsgData.OfflinePushInfo.Title + + } pushResult, err := push.JGAccountListPush(UIDList, content, jsonCustomContent, constant.PlatformIDToName(t)) if err != nil { log.NewError(pushMsg.OperationID, "offline push error", pushMsg.String(), err.Error(), constant.PlatformIDToName(t)) From e64bc40ca9932834aa33cf1eb199fa86e0fb8df5 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Fri, 24 Dec 2021 15:02:47 +0800 Subject: [PATCH 025/337] notification --- internal/rpc/friend/firend.go | 23 +- internal/rpc/group/group.go | 106 ++- internal/rpc/msg/send_msg.go | 487 +++++++++++-- internal/rpc/user/get_user_info.go | 9 +- internal/rpc/user/update_user_info.go | 5 +- pkg/common/constant/constant.go | 46 +- pkg/common/db/mysql.go | 12 - .../mysql_model/im_mysql_model/group_model.go | 2 +- pkg/proto/group/group.pb.go | 302 ++++---- pkg/proto/sdk_ws/ws.pb.go | 684 ++++++++---------- pkg/proto/sdk_ws/ws.proto | 62 +- 11 files changed, 967 insertions(+), 771 deletions(-) diff --git a/internal/rpc/friend/firend.go b/internal/rpc/friend/firend.go index 52f422083..7acd4f37a 100644 --- a/internal/rpc/friend/firend.go +++ b/internal/rpc/friend/firend.go @@ -1,7 +1,7 @@ package friend import ( - "Open_IM/internal/rpc/chat" + chat "Open_IM/internal/rpc/msg" "Open_IM/pkg/common/config" "Open_IM/pkg/common/constant" imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" @@ -124,7 +124,7 @@ func (s *friendServer) AddBlacklist(ctx context.Context, req *pbFriend.AddBlackl return &pbFriend.CommonResp{ErrCode: constant.ErrMysql.ErrCode, ErrMsg: constant.ErrMysql.ErrMsg}, nil } log.NewInfo(req.CommID.OperationID, "InsertInToUserBlackList ok ", req.CommID.FromUserID, req.CommID.ToUserID) - chat.BlackAddedNotification(req.CommID.OperationID, req.CommID.OpUserID, req.CommID.FromUserID, req.CommID.ToUserID) + chat.BlackAddedNotification(req) return &pbFriend.CommonResp{}, nil } @@ -148,7 +148,7 @@ func (s *friendServer) AddFriend(ctx context.Context, req *pbFriend.AddFriendReq return &pbFriend.CommonResp{ErrCode: constant.ErrAddFriend.ErrCode, ErrMsg: constant.ErrAddFriend.ErrMsg}, nil } - chat.FriendApplicationAddedNotification(req.CommID.OperationID, req.CommID.OpUserID, req.CommID.FromUserID, req.CommID.ToUserID, req.ReqMessage) + chat.FriendApplicationAddedNotification(req) return &pbFriend.CommonResp{}, nil } @@ -195,7 +195,10 @@ func (s *friendServer) ImportFriend(ctx context.Context, req *pbFriend.ImportFri c.ErrCode = 408 continue } - chat.FriendAddedNotification(req.OperationID, req.OpUserID, req.FromUserID, v) + for _, v := range req.FriendUserIDList { + chat.FriendAddedNotification(req.OperationID, req.OpUserID, req.FromUserID, v) + } + } } } @@ -204,10 +207,11 @@ func (s *friendServer) ImportFriend(ctx context.Context, req *pbFriend.ImportFri return &resp, nil } +//process Friend application func (s *friendServer) AddFriendResponse(ctx context.Context, req *pbFriend.AddFriendResponseReq) (*pbFriend.CommonResp, error) { log.NewInfo(req.CommID.OperationID, "AddFriendResponse args ", req.String()) - if !token_verify.CheckAccess(rreq.CommID.FromUserID, req.CommID.ToUserID) { + if !token_verify.CheckAccess(req.CommID.FromUserID, req.CommID.ToUserID) { log.NewError(req.CommID.OperationID, "CheckAccess failed ", req.CommID.FromUserID, req.CommID.ToUserID) return &pbFriend.CommonResp{ErrCode: constant.ErrAgreeToAddFriend.ErrCode, ErrMsg: constant.ErrAgreeToAddFriend.ErrMsg}, nil } @@ -253,7 +257,8 @@ func (s *friendServer) AddFriendResponse(ctx context.Context, req *pbFriend.AddF } } - chat.FriendApplicationProcessedNotification(req.CommID.OperationID, req.CommID.OpUserID, req.CommID.FromUserID, req.CommID.ToUserID, req.Flag) + chat.FriendApplicationProcessedNotification(req) + chat.FriendAddedNotification(req.CommID.OperationID, req.CommID.OpUserID, req.CommID.FromUserID, req.CommID.ToUserID) return &pbFriend.CommonResp{}, nil } @@ -271,7 +276,7 @@ func (s *friendServer) DeleteFriend(ctx context.Context, req *pbFriend.DeleteFri return &pbFriend.CommonResp{ErrCode: constant.ErrMysql.ErrCode, ErrMsg: constant.ErrMysql.ErrMsg}, nil } log.NewInfo(req.CommID.OperationID, "DeleteFriend rpc ok") - chat.FriendDeletedNotification(req.CommID.OperationID, req.CommID.OpUserID, req.CommID.FromUserID, req.CommID.ToUserID) + chat.FriendDeletedNotification(req) return &pbFriend.CommonResp{}, nil } @@ -322,7 +327,7 @@ func (s *friendServer) SetFriendComment(ctx context.Context, req *pbFriend.SetFr return &pbFriend.CommonResp{ErrCode: constant.ErrSetFriendComment.ErrCode, ErrMsg: constant.ErrSetFriendComment.ErrMsg}, nil } log.NewInfo(req.CommID.OperationID, "rpc SetFriendComment ok") - chat.FriendInfoChangedNotification(req.CommID.OperationID, req.CommID.OpUserID, req.CommID.FromUserID, req.CommID.ToUserID) + chat.FriendInfoChangedNotification(req) return &pbFriend.CommonResp{}, nil } @@ -339,7 +344,7 @@ func (s *friendServer) RemoveBlacklist(ctx context.Context, req *pbFriend.Remove return &pbFriend.CommonResp{ErrCode: constant.ErrMysql.ErrCode, ErrMsg: constant.ErrMysql.ErrMsg}, nil } log.NewInfo(req.CommID.OperationID, "rpc RemoveBlacklist ok") - chat.BlackDeletedNotification(req.CommID.OperationID, req.CommID.OpUserID, req.CommID.FromUserID, req.CommID.ToUserID) + chat.BlackDeletedNotification(req) return &pbFriend.CommonResp{}, nil } diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 6ac49ac72..1b3956c37 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -11,11 +11,9 @@ import ( "Open_IM/pkg/common/token_verify" "Open_IM/pkg/grpc-etcdv3/getcdv3" pbGroup "Open_IM/pkg/proto/group" - "Open_IM/pkg/proto/sdk_ws" + open_im_sdk "Open_IM/pkg/proto/sdk_ws" "Open_IM/pkg/utils" "context" - "encoding/json" - "fmt" "google.golang.org/grpc" "net" "strconv" @@ -39,6 +37,7 @@ func NewGroupServer(port int) *groupServer { etcdAddr: config.Config.Etcd.EtcdAddr, } } + func (s *groupServer) Run() { log.Info("", "", "rpc group init....") @@ -78,6 +77,7 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR } //Time stamp + MD5 to generate group chat id groupId := utils.Md5(strconv.FormatInt(time.Now().UnixNano(), 10)) + //to group err := im_mysql_model.InsertIntoGroup(groupId, req.GroupName, req.Introduction, req.Notification, req.FaceUrl, req.Ext) if err != nil { log.NewError(req.OperationID, "InsertIntoGroup failed, ", err.Error(), groupId, req.GroupName, req.Introduction, req.Notification, req.FaceUrl, req.Ext) @@ -90,7 +90,7 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR return &pbGroup.CreateGroupResp{ErrCode: constant.ErrCreateGroup.ErrCode, ErrMsg: constant.ErrCreateGroup.ErrMsg}, nil } - //Add the group owner to the group first, otherwise the group creation will fail + //to group member err = im_mysql_model.InsertIntoGroupMember(groupId, us.UserID, us.Nickname, us.FaceUrl, constant.GroupOwner) if err != nil { log.NewError(req.OperationID, "InsertIntoGroupMember failed ", err.Error()) @@ -103,7 +103,7 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR // return &pbGroup.CreateGroupResp{ErrCode: constant.ErrCreateGroup.ErrCode, ErrMsg: constant.ErrCreateGroup.ErrMsg}, nil } - //Binding group id and member id + //to group member for _, user := range req.InitMemberList { us, err := im_mysql_model.FindUserByUID(user.UserID) if err != nil { @@ -123,8 +123,8 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR log.NewError(req.OperationID, "add mongo group member failed, db.DB.AddGroupMember failed ", err.Error()) } } - resp := &pbGroup.CreateGroupResp{} + resp := &pbGroup.CreateGroupResp{} group, err := im_mysql_model.FindGroupInfoByGroupId(groupId) if err != nil { log.NewError(req.OperationID, "FindGroupInfoByGroupId failed ", err.Error(), groupId) @@ -145,6 +145,7 @@ func (s *groupServer) GetJoinedGroupList(ctx context.Context, req *pbGroup.GetJo return &pbGroup.GetJoinedGroupListResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil } + //group list joinedGroupList, err := imdb.GetJoinedGroupIdListByMemberId(req.FromUserID) if err != nil { log.NewError(req.OperationID, "GetJoinedGroupIdListByMemberId failed ", err.Error(), req.FromUserID) @@ -152,7 +153,6 @@ func (s *groupServer) GetJoinedGroupList(ctx context.Context, req *pbGroup.GetJo } var resp pbGroup.GetJoinedGroupListResp - for _, v := range joinedGroupList { var groupNode open_im_sdk.GroupInfo num := imdb.GetGroupMemberNumByGroupId(v.GroupID) @@ -160,6 +160,7 @@ func (s *groupServer) GetJoinedGroupList(ctx context.Context, req *pbGroup.GetJo group, err := imdb.FindGroupInfoByGroupId(v.GroupID) if num > 0 && owner != nil && err2 == nil && group != nil && err == nil { utils.CopyStructFields(&groupNode, group) + groupNode.CreateTime = group.CreateTime utils.CopyStructFields(groupNode.Owner, owner) groupNode.MemberCount = uint32(num) resp.GroupList = append(resp.GroupList, &groupNode) @@ -177,7 +178,7 @@ func (s *groupServer) GetJoinedGroupList(ctx context.Context, req *pbGroup.GetJo func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.InviteUserToGroupReq) (*pbGroup.InviteUserToGroupResp, error) { log.NewInfo(req.OperationID, "InviteUserToGroup args ", req.String()) - if !imdb.IsExistGroupMember(req.GroupID, req.OpUserID) && !utils.IsContain(req.OpUserID, config.Config.Manager.AppManagerUid) { + if !imdb.IsExistGroupMember(req.GroupID, req.OpUserID) && !token_verify.IsMangerUserID(req.OpUserID) { log.NewError(req.OperationID, "no permission InviteUserToGroup ", req.GroupID, req.OpUserID) return &pbGroup.InviteUserToGroupResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } @@ -191,6 +192,7 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite //from User: invite: applicant //to user: invite: invited var resp pbGroup.InviteUserToGroupResp + var okUserIDList []string for _, v := range req.InvitedUserIDList { var resultNode pbGroup.Id2Result resultNode.UserID = v @@ -217,7 +219,7 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite resp.Id2ResultList = append(resp.Id2ResultList, &resultNode) continue } - chat.MemberInvitedNotification(req.OperationID, req.GroupID, req.OpUserID, v) + okUserIDList = append(okUserIDList, v) err = db.DB.AddGroupMember(req.GroupID, toUserInfo.UserID) if err != nil { log.NewError(req.OperationID, "AddGroupMember failed ", err.Error(), req.GroupID, toUserInfo.UserID) @@ -225,8 +227,9 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite resp.Id2ResultList = append(resp.Id2ResultList, &resultNode) } + chat.MemberInvitedNotification(req.OperationID, req.GroupID, req.OpUserID, req.Reason, okUserIDList) resp.ErrCode = 0 - log.NewInfo(req.OperationID, "InviteUserToGroup rpc return ", resp) + log.NewInfo(req.OperationID, "InviteUserToGroup rpc return ", resp.String()) return &resp, nil } @@ -308,6 +311,7 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou } } + //op is app manager if flag != 1 { if token_verify.IsMangerUserID(req.OpUserID) { flag = 1 @@ -332,6 +336,7 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou } } + var okUserIDList []string //remove var resp pbGroup.KickGroupMemberResp for _, v := range req.KickedUserIDList { @@ -347,19 +352,17 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou resp.Id2ResultList = append(resp.Id2ResultList, &pbGroup.Id2Result{UserID: v, Result: -1}) } else { resp.Id2ResultList = append(resp.Id2ResultList, &pbGroup.Id2Result{UserID: v, Result: 0}) + okUserIDList = append(okUserIDList, v) } + err = db.DB.DelGroupMember(req.GroupID, v) if err != nil { - log.NewError(req.OperationID, "DelGroupMember failed ", err.Error(), req.GroupID, v.UserId) + log.NewError(req.OperationID, "DelGroupMember failed ", err.Error(), req.GroupID, v) } } - - for _, v := range req.KickedUserIDList { - chat.MemberKickedNotification(req.OperationID, req.GroupID, req.OpUserID, v, req.Reason) - } - + chat.MemberKickedNotification(req, okUserIDList) resp.ErrCode = 0 - log.NewInfo(req.OperationID, "GetGroupMemberList rpc return ", resp) + log.NewInfo(req.OperationID, "GetGroupMemberList rpc return ", resp.String()) return &resp, nil } @@ -377,11 +380,12 @@ func (s *groupServer) GetGroupMembersInfo(ctx context.Context, req *pbGroup.GetG continue } else { utils.CopyStructFields(&memberNode, memberInfo) + memberNode.JoinTime = memberInfo.JoinTime resp.MemberList = append(resp.MemberList, &memberNode) } } resp.ErrCode = 0 - log.NewInfo(req.OperationID, "GetGroupMembersInfo rpc return ", resp) + log.NewInfo(req.OperationID, "GetGroupMembersInfo rpc return ", resp.String()) return &resp, nil } @@ -407,6 +411,7 @@ func (s *groupServer) GetGroupsInfo(ctx context.Context, req *pbGroup.GetGroupsI } var groupInfo open_im_sdk.GroupInfo utils.CopyStructFields(&groupInfo, groupInfoFromMysql) + groupInfo.CreateTime = groupInfoFromMysql.CreateTime groupsInfoList = append(groupsInfoList, &groupInfo) } @@ -437,24 +442,24 @@ func (s *groupServer) GroupApplicationResponse(_ context.Context, req *pbGroup.G } } if req.ToUserID == "0" { - group, err := imdb.FindGroupInfoByGroupId(req.GroupID) - if err != nil { - log.NewError(req.OperationID, "FindGroupInfoByGroupId failed ", req.GroupID) - return reply, nil - } - member, err := imdb.FindGroupMemberInfoByGroupIdAndUserId(req.GroupID, req.OpUserID) - if err != nil { - log.NewError(req.OperationID, "FindGroupMemberInfoByGroupIdAndUserId failed ", req.GroupID, req.OpUserID) - return reply, nil - } - chat.ApplicationProcessedNotification(req.OperationID, req.FromUserID, *group, *member, req.HandleResult, req.HandledMsg) + //group, err := imdb.FindGroupInfoByGroupId(req.GroupID) + //if err != nil { + // log.NewError(req.OperationID, "FindGroupInfoByGroupId failed ", req.GroupID) + // return reply, nil + //} + //member, err := imdb.FindGroupMemberInfoByGroupIdAndUserId(req.GroupID, req.OpUserID) + //if err != nil { + // log.NewError(req.OperationID, "FindGroupMemberInfoByGroupIdAndUserId failed ", req.GroupID, req.OpUserID) + // return reply, nil + //} + chat.ApplicationProcessedNotification(req) if req.HandleResult == 1 { - entrantUser, err := imdb.FindGroupMemberInfoByGroupIdAndUserId(req.GroupID, req.FromUserID) - if err != nil { - log.NewError(req.OperationID, "FindGroupMemberInfoByGroupIdAndUserId failed ", err.Error(), req.GroupID, req.FromUserID) - return reply, nil - } - chat.MemberEnterNotification(req.OperationID, req.GroupID, entrantUser) + // entrantUser, err := imdb.FindGroupMemberInfoByGroupIdAndUserId(req.GroupID, req.FromUserID) + // if err != nil { + // log.NewError(req.OperationID, "FindGroupMemberInfoByGroupIdAndUserId failed ", err.Error(), req.GroupID, req.FromUserID) + // return reply, nil + // } + chat.MemberEnterNotification(req) } } else { log.NewError(req.OperationID, "args failed ", req.String()) @@ -466,25 +471,20 @@ func (s *groupServer) GroupApplicationResponse(_ context.Context, req *pbGroup.G func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq) (*pbGroup.CommonResp, error) { log.NewInfo(req.OperationID, "JoinGroup args ", req.String()) - //Parse token, to find current user information - //claims, err := token_verify.ParseToken(req.Token) - //if err != nil { - // log.NewError(req.OperationID, "ParseToken failed", err.Error(), req.String()) - // return &pbGroup.CommonResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil - //} - applicationUserInfo, err := im_mysql_model.FindUserByUID(req.FromUserID) + + applicationUserInfo, err := im_mysql_model.FindUserByUID(req.OpUserID) if err != nil { - log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), req.FromUserID) + log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), req.OpUserID) return &pbGroup.CommonResp{ErrCode: constant.ErrSearchUserInfo.ErrCode, ErrMsg: constant.ErrSearchUserInfo.ErrMsg}, nil } - _, err = im_mysql_model.FindGroupRequestUserInfoByGroupIDAndUid(req.GroupID, req.FromUserID) + _, err = im_mysql_model.FindGroupRequestUserInfoByGroupIDAndUid(req.GroupID, req.OpUserID) if err == nil { - err = im_mysql_model.DelGroupRequest(req.GroupID, req.FromUserID, "0") + err = im_mysql_model.DelGroupRequest(req.GroupID, req.OpUserID, "0") } - if err = im_mysql_model.InsertIntoGroupRequest(req.GroupID, req.FromUserID, "0", req.ReqMessage, applicationUserInfo.Nickname, applicationUserInfo.FaceUrl); err != nil { - log.NewError(req.OperationID, "InsertIntoGroupRequest ", err.Error(), req.GroupID, req.FromUserID, "0", req.ReqMessage, applicationUserInfo.Nickname, applicationUserInfo.FaceUrl) + if err = im_mysql_model.InsertIntoGroupRequest(req.GroupID, req.OpUserID, "0", req.ReqMessage, applicationUserInfo.Nickname, applicationUserInfo.FaceUrl); err != nil { + log.NewError(req.OperationID, "InsertIntoGroupRequest ", err.Error(), req.GroupID, req.OpUserID, "0", req.ReqMessage, applicationUserInfo.Nickname, applicationUserInfo.FaceUrl) return &pbGroup.CommonResp{ErrCode: constant.ErrJoinGroupApplication.ErrCode, ErrMsg: constant.ErrJoinGroupApplication.ErrMsg}, nil } @@ -493,12 +493,8 @@ func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq) log.NewError(req.OperationID, "FindGroupMemberListByGroupIdAndFilterInfo failed ", req.GroupID, constant.GroupOwner, err) return &pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""}, nil } - group, err := im_mysql_model.FindGroupInfoByGroupId(req.GroupID) - if err != nil { - log.NewError(req.OperationID, "FindGroupInfoByGroupId failed ", req.GroupID) - return &pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""}, nil - } - chat.ReceiveJoinApplicationNotification(req.OperationID, memberList[0].UserID, applicationUserInfo, group) + + chat.ReceiveJoinApplicationNotification(req) log.NewInfo(req.OperationID, "ReceiveJoinApplicationNotification rpc JoinGroup success return") return &pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""}, nil @@ -525,7 +521,7 @@ func (s *groupServer) QuitGroup(ctx context.Context, req *pbGroup.QuitGroupReq) // return &pbGroup.CommonResp{ErrorCode: constant.ErrQuitGroup.ErrCode, ErrorMsg: constant.ErrQuitGroup.ErrMsg}, nil } - chat.MemberLeaveNotification(req.OperationID, req.GroupID, req.OpUserID) + chat.MemberLeaveNotification(req) log.NewInfo(req.OperationID, "rpc quit group is success return") return &pbGroup.CommonResp{}, nil } @@ -578,7 +574,7 @@ func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInf } if changedType != 0 { - chat.GroupInfoChangedNotification(req.OperationID, changedType, req.GroupInfo.GroupID, req.OpUserID) + chat.GroupInfoChangedNotification(req) } return &pbGroup.CommonResp{}, nil diff --git a/internal/rpc/msg/send_msg.go b/internal/rpc/msg/send_msg.go index 26e49bfa8..f6162f278 100644 --- a/internal/rpc/msg/send_msg.go +++ b/internal/rpc/msg/send_msg.go @@ -10,6 +10,7 @@ import ( "Open_IM/pkg/common/token_verify" "Open_IM/pkg/grpc-etcdv3/getcdv3" pbChat "Open_IM/pkg/proto/chat" + pbFriend "Open_IM/pkg/proto/friend" pbGroup "Open_IM/pkg/proto/group" open_im_sdk "Open_IM/pkg/proto/sdk_ws" sdk_ws "Open_IM/pkg/proto/sdk_ws" @@ -308,51 +309,82 @@ func Notification(n *NotificationMsg, onlineUserOnly bool) { // repeated GroupMemberFullInfo MemberList = 3; // uint64 OperationTime = 4; //} creator->group -func GroupCreatedNotification(req *pbGroup.CreateGroupReq, groupID string) { - var n NotificationMsg - n.SendID = req.OpUserID - n.RecvID = groupID - n.ContentType = constant.CreateGroupTip - n.SessionType = constant.GroupChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = req.OperationID - var groupCreated open_im_sdk.GroupCreatedTips - groupCreated.Group = &open_im_sdk.GroupInfo{} - - if token_verify.IsMangerUserID(req.OpUserID) { - u, err := imdb.FindUserByUID(req.OpUserID) - if err != nil || u == nil { +func setOpUserInfo(operationID, opUserID, groupID string, groupMemberInfo *open_im_sdk.GroupMemberFullInfo) { + if token_verify.IsMangerUserID(opUserID) { + u, err := imdb.FindUserByUID(opUserID) + if err != nil { + log.NewError(operationID, "FindUserByUID failed ", err.Error(), opUserID) return } - utils.CopyStructFields(groupCreated.Creator, u) - groupCreated.Creator.AppMangerLevel = 1 + utils.CopyStructFields(groupMemberInfo, u) + groupMemberInfo.AppMangerLevel = 1 } else { - u, err := imdb.FindGroupMemberInfoByGroupIdAndUserId(groupID, req.OpUserID) - if err != nil || u == nil { + u, err := imdb.FindGroupMemberInfoByGroupIdAndUserId(groupID, opUserID) + if err != nil { + log.NewError(operationID, "FindGroupMemberInfoByGroupIdAndUserId failed ", err.Error(), groupID, opUserID) return } - utils.CopyStructFields(groupCreated.Creator, u) + utils.CopyStructFields(groupMemberInfo, u) } +} +func setGroupInfo(operationID, groupID string, groupInfo *open_im_sdk.GroupInfo, ownerUserID string) { group, err := imdb.FindGroupInfoByGroupId(groupID) - if err != nil || group == nil { + if err != nil { + log.NewError(operationID, "FindGroupInfoByGroupId failed ", err.Error(), groupID) return } - utils.CopyStructFields(groupCreated.Group, group) - groupCreated.Creator = &open_im_sdk.GroupMemberFullInfo{} + utils.CopyStructFields(groupInfo, group) - for _, v := range req.InitMemberList { + if ownerUserID != "" { + groupInfo.Owner = &open_im_sdk.PublicUserInfo{} + setGroupPublicUserInfo(operationID, groupID, ownerUserID, groupInfo.Owner) + } +} + +func setGroupMemberInfo(operationID, groupID, userID string, groupMemberInfo *open_im_sdk.GroupMemberFullInfo) { + group, err := imdb.FindGroupMemberInfoByGroupIdAndUserId(groupID, userID) + if err != nil { + log.NewError(operationID, "FindGroupMemberInfoByGroupIdAndUserId failed ", err.Error(), groupID, userID) + return + } + utils.CopyStructFields(groupMemberInfo, group) +} + +func setGroupPublicUserInfo(operationID, groupID, userID string, publicUserInfo *open_im_sdk.PublicUserInfo) { + group, err := imdb.FindGroupMemberInfoByGroupIdAndUserId(groupID, userID) + if err != nil { + log.NewError(operationID, "FindGroupMemberInfoByGroupIdAndUserId failed ", err.Error(), groupID, userID) + return + } + utils.CopyStructFields(publicUserInfo, group) +} + +//创建群后调用 +func GroupCreatedNotification(operationID, opUserID, OwnerUserID, groupID string, initMemberList []string) { + var n NotificationMsg + n.SendID = opUserID + n.RecvID = groupID + n.ContentType = constant.GroupCreatedNotification + n.SessionType = constant.GroupChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = operationID + + GroupCreatedTips := open_im_sdk.GroupCreatedTips{Group: &open_im_sdk.GroupInfo{}, + Creator: &open_im_sdk.GroupMemberFullInfo{}} + setOpUserInfo(operationID, GroupCreatedTips.Creator.UserID, groupID, GroupCreatedTips.Creator) + + setGroupInfo(operationID, groupID, GroupCreatedTips.Group, OwnerUserID) + + for _, v := range initMemberList { var groupMemberInfo open_im_sdk.GroupMemberFullInfo - member, err := imdb.GetMemberInfoById(groupID, v.UserID) - if err != nil { - utils.CopyStructFields(&groupMemberInfo, member) - } - groupCreated.MemberList = append(groupCreated.MemberList, &groupMemberInfo) + setGroupMemberInfo(operationID, groupID, v, &groupMemberInfo) + GroupCreatedTips.MemberList = append(GroupCreatedTips.MemberList, &groupMemberInfo) } var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(groupCreated) + tips.Detail, _ = json.Marshal(GroupCreatedTips) tips.DefaultTips = config.Config.Notification.GroupCreated.DefaultTips.Tips n.Content, _ = json.Marshal(tips) Notification(&n, false) @@ -362,27 +394,44 @@ func GroupCreatedNotification(req *pbGroup.CreateGroupReq, groupID string) { // GroupInfo Group = 1; // PublicUserInfo Applicant = 2; // string Reason = 3; -//} -func ReceiveJoinApplicationNotification(operationID, RecvID string, applicant *immysql.User, group *immysql.Group) { +//} apply->all managers GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` +// ReqMessage string `protobuf:"bytes,2,opt,name=ReqMessage" json:"ReqMessage,omitempty"` +// OpUserID string `protobuf:"bytes,3,opt,name=OpUserID" json:"OpUserID,omitempty"` +// OperationID string `protobuf:"bytes,4,opt,name=OperationID" json:"OperationID,omitempty"` +//申请进群后调用 +func JoinApplicationNotification(req *pbGroup.JoinGroupReq) { + managerList, err := imdb.GetOwnerManagerByGroupId(req.GroupID) + if err != nil { + log.NewError(req.OperationID, "GetOwnerManagerByGroupId failed ", err.Error(), req.GroupID) + return + } + var n NotificationMsg - n.SendID = applicant.UserID - n.RecvID = RecvID - n.ContentType = constant.ApplyJoinGroupTip + n.SendID = req.OpUserID + n.ContentType = constant.JoinApplicationNotification n.SessionType = constant.SingleChatType n.MsgFrom = constant.SysMsgType - n.OperationID = operationID + n.OperationID = req.OperationID - var joniGroup open_im_sdk.ReceiveJoinApplicationTips - joniGroup.Group = &open_im_sdk.GroupInfo{} - utils.CopyStructFields(joniGroup.Group, group) - joniGroup.Applicant = &open_im_sdk.PublicUserInfo{} - utils.CopyStructFields(joniGroup.Applicant, applicant) + JoinGroupApplicationTips := open_im_sdk.JoinGroupApplicationTips{Group: &open_im_sdk.GroupInfo{}, Applicant: &open_im_sdk.PublicUserInfo{}} + setGroupInfo(req.OperationID, req.GroupID, JoinGroupApplicationTips.Group, "") + + apply, err := imdb.FindUserByUID(req.OpUserID) + if err != nil { + log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), req.OpUserID) + return + } + utils.CopyStructFields(JoinGroupApplicationTips.Applicant, apply) + JoinGroupApplicationTips.Reason = req.ReqMessage var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(joniGroup) - tips.DefaultTips = config.Config.Notification.ApplyJoinGroup.DefaultTips.Tips + tips.Detail, _ = json.Marshal(JoinGroupApplicationTips) + tips.DefaultTips = "JoinGroupApplicationTips" n.Content, _ = json.Marshal(tips) - Notification(&n, false) + for _, v := range managerList { + n.RecvID = v.UserID + Notification(&n, true) + } } //message ApplicationProcessedTips{ @@ -391,8 +440,28 @@ func ReceiveJoinApplicationNotification(operationID, RecvID string, applicant *i // int32 Result = 3; // string Reason = 4; //} -func ApplicationProcessedNotification(operationID, RecvID string, group immysql.Group, opUser immysql.GroupMember, result int32, Reason string) { +//处理进群请求后调用 +func ApplicationProcessedNotification(req *pbGroup.GroupApplicationResponseReq) { + var n NotificationMsg + n.SendID = req.OpUserID + n.ContentType = constant.ApplicationProcessedNotification + n.SessionType = constant.SingleChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = req.OperationID + n.RecvID = req.ToUserID + ApplicationProcessedTips := open_im_sdk.ApplicationProcessedTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}} + setGroupInfo(req.OperationID, req.GroupID, ApplicationProcessedTips.Group, "") + setOpUserInfo(req.OperationID, req.OpUserID, req.GroupID, ApplicationProcessedTips.OpUser) + ApplicationProcessedTips.Reason = req.HandledMsg + ApplicationProcessedTips.Result = req.HandleResult + + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(ApplicationProcessedTips) + tips.DefaultTips = "ApplicationProcessedNotification" + n.Content, _ = json.Marshal(tips) + + Notification(&n, true) } //message MemberInvitedTips{ @@ -401,8 +470,29 @@ func ApplicationProcessedNotification(operationID, RecvID string, group immysql. // GroupMemberFullInfo InvitedUser = 3; // uint64 OperationTime = 4; //} -func MemberInvitedNotification(operationID string, group immysql.Group, opUser immysql.User, invitedUser immysql.GroupMember) { +//被邀请进群后调用 +func MemberInvitedNotification(operationID, groupID, opUserID, reason string, invitedUserIDList []string) { + var n NotificationMsg + n.SendID = opUserID + n.ContentType = constant.MemberInvitedNotification + n.SessionType = constant.GroupChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = operationID + ApplicationProcessedTips := open_im_sdk.MemberInvitedTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}} + setGroupInfo(operationID, groupID, ApplicationProcessedTips.Group, "") + setOpUserInfo(operationID, opUserID, groupID, ApplicationProcessedTips.OpUser) + for _, v := range invitedUserIDList { + var groupMemberInfo open_im_sdk.GroupMemberFullInfo + setGroupMemberInfo(operationID, groupID, v, &groupMemberInfo) + ApplicationProcessedTips.InvitedUserList = append(ApplicationProcessedTips.InvitedUserList, &groupMemberInfo) + } + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(ApplicationProcessedTips) + tips.DefaultTips = "MemberInvitedNotification" + n.Content, _ = json.Marshal(tips) + n.RecvID = groupID + Notification(&n, true) } //message MemberKickedTips{ @@ -411,12 +501,35 @@ func MemberInvitedNotification(operationID string, group immysql.Group, opUser i // GroupMemberFullInfo KickedUser = 3; // uint64 OperationTime = 4; //} +//被踢后调用 +func MemberKickedNotification(req *pbGroup.KickGroupMemberReq, kickedUserIDList []string) { + var n NotificationMsg + n.SendID = req.OpUserID + n.ContentType = constant.MemberKickedNotification + n.SessionType = constant.GroupChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = req.OperationID -func MemberKickedNotificationID(operationID, GroupID, opUserID, kickedUserID, reason string) { - -} -func MemberKickedNotification(operationID string, group immysql.Group, opUser immysql.GroupMember, KickedUser immysql.GroupMember) { + MemberKickedTips := open_im_sdk.MemberKickedTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}} + setGroupInfo(req.OperationID, req.GroupID, MemberKickedTips.Group, "") + setOpUserInfo(req.OperationID, req.OpUserID, req.GroupID, MemberKickedTips.OpUser) + for _, v := range kickedUserIDList { + var groupMemberInfo open_im_sdk.GroupMemberFullInfo + setGroupMemberInfo(req.OperationID, req.GroupID, v, &groupMemberInfo) + MemberKickedTips.KickedUserList = append(MemberKickedTips.KickedUserList, &groupMemberInfo) + } + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(MemberKickedTips) + tips.DefaultTips = "MemberKickedNotification" + n.Content, _ = json.Marshal(tips) + n.RecvID = req.GroupID + Notification(&n, true) + for _, v := range kickedUserIDList { + n.SessionType = constant.SingleChatType + n.RecvID = v + Notification(&n, true) + } } //message GroupInfoChangedTips{ @@ -424,8 +537,26 @@ func MemberKickedNotification(operationID string, group immysql.Group, opUser im // GroupInfo Group = 2; // GroupMemberFullInfo OpUser = 3; //} -func GroupInfoChangedNotification(operationID string, changedType int32, groupID string, opUserID string) { +//群信息改变后掉用 +func GroupInfoChangedNotification(req *pbGroup.SetGroupInfoReq) { + var n NotificationMsg + n.SendID = req.OpUserID + n.ContentType = constant.GroupInfoChangedNotification + n.SessionType = constant.GroupChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = req.OperationID + + GroupInfoChangedTips := open_im_sdk.GroupInfoChangedTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}} + setGroupInfo(req.OperationID, req.GroupInfo.GroupID, GroupInfoChangedTips.Group, "") + setOpUserInfo(req.OperationID, req.OpUserID, req.GroupInfo.GroupID, GroupInfoChangedTips.OpUser) + + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(GroupInfoChangedTips) + tips.DefaultTips = "GroupInfoChangedNotification" + n.Content, _ = json.Marshal(tips) + n.RecvID = req.GroupInfo.GroupID + Notification(&n, true) } /* @@ -458,8 +589,30 @@ func GroupInfoChangedNotification(operationID string, changedType int32, group * // GroupMemberFullInfo LeaverUser = 2; // uint64 OperationTime = 3; //} -func MemberLeaveNotification(operationID, groupID, leaverUserID string) { +//群成员退群后调用 +func MemberLeaveNotification(req *pbGroup.QuitGroupReq) { + var n NotificationMsg + n.SendID = req.OpUserID + n.ContentType = constant.MemberLeaveNotification + n.SessionType = constant.GroupChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = req.OperationID + + MemberLeaveTips := open_im_sdk.MemberLeaveTips{Group: &open_im_sdk.GroupInfo{}, LeaverUser: &open_im_sdk.GroupMemberFullInfo{}} + setGroupInfo(req.OperationID, req.GroupID, MemberLeaveTips.Group, "") + setOpUserInfo(req.OperationID, req.OpUserID, req.GroupID, MemberLeaveTips.LeaverUser) + + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(MemberLeaveTips) + tips.DefaultTips = "MemberLeaveNotification" + n.Content, _ = json.Marshal(tips) + n.RecvID = req.GroupID + Notification(&n, true) + + n.SessionType = constant.SingleChatType + n.RecvID = req.OpUserID + Notification(&n, true) } //message MemberEnterTips{ @@ -467,7 +620,25 @@ func MemberLeaveNotification(operationID, groupID, leaverUserID string) { // GroupMemberFullInfo EntrantUser = 2; // uint64 OperationTime = 3; //} -func MemberEnterNotification(operationID string, group *immysql.Group, entrantUser *immysql.GroupMember) { +//群成员主动申请进群,管理员同意后调用, +func MemberEnterNotification(req *pbGroup.GroupApplicationResponseReq) { + var n NotificationMsg + n.SendID = req.OpUserID + n.ContentType = constant.MemberEnterNotification + n.SessionType = constant.GroupChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = req.OperationID + + MemberLeaveTips := open_im_sdk.MemberEnterTips{Group: &open_im_sdk.GroupInfo{}, EntrantUser: &open_im_sdk.GroupMemberFullInfo{}} + setGroupInfo(req.OperationID, req.GroupID, MemberLeaveTips.Group, "") + setOpUserInfo(req.OperationID, req.OpUserID, req.GroupID, MemberLeaveTips.EntrantUser) + + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(MemberLeaveTips) + tips.DefaultTips = "MemberEnterNotification" + n.Content, _ = json.Marshal(tips) + n.RecvID = req.GroupID + Notification(&n, true) } @@ -478,47 +649,143 @@ func MemberEnterNotification(operationID string, group *immysql.Group, entrantUs // uint64 MuteTime = 4; // GroupInfo Group = 5; //} -func MemberInfoChangedNotification(operationID string, group *immysql.Group, opUser *immysql.GroupMember, userFinalInfo *immysql.GroupMember) { +//func MemberInfoChangedNotification(operationID string, group *immysql.Group, opUser *immysql.GroupMember, userFinalInfo *immysql.GroupMember) { -} +//} //message FriendApplicationAddedTips{ // PublicUserInfo OpUser = 1; //user1 // FriendApplication Application = 2; // PublicUserInfo OpedUser = 3; //user2 //} -func FriendApplicationAddedNotification(operationID string, opUser *immysql.User, opedUser *immysql.User, application *immysql.FriendRequest) { +func getFromToUserNickname(operationID, fromUserID, toUserID string) (string, string) { + from, err1 := imdb.FindUserByUID(fromUserID) + to, err2 := imdb.FindUserByUID(toUserID) + if err1 != nil || err2 != nil { + log.NewError("FindUserByUID failed ", err1, err2, fromUserID, toUserID) + } + fromNickname, toNickname := "", "" + if from != nil { + fromNickname = from.Nickname + } + if to != nil { + toNickname = to.Nickname + } + return fromNickname, toNickname } -//message FriendApplicationProcessedTips{ -// PublicUserInfo OpUser = 1; //user2 -// PublicUserInfo OpedUser = 2; //user1 -// int32 result = 3; //1: accept; -1: reject -//} -func FriendApplicationProcessedNotification(operationID string, opUser *immysql.User, OpedUser *immysql.User, result int32) { +func FriendApplicationAddedNotification(req *pbFriend.AddFriendReq) { + var n NotificationMsg + n.SendID = req.CommID.FromUserID + n.RecvID = req.CommID.ToUserID + n.ContentType = constant.FriendApplicationAddedNotification + n.SessionType = constant.SingleChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = req.CommID.OperationID + var FriendApplicationAddedTips open_im_sdk.FriendApplicationAddedTips + FriendApplicationAddedTips.FromToUserID.FromUserID = req.CommID.FromUserID + FriendApplicationAddedTips.FromToUserID.ToUserID = req.CommID.ToUserID + fromUserNickname, toUserNickname := getFromToUserNickname(req.CommID.OperationID, req.CommID.FromUserID, req.CommID.ToUserID) + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(FriendApplicationAddedTips) + tips.DefaultTips = fromUserNickname + " FriendApplicationAddedNotification " + toUserNickname + n.Content, _ = json.Marshal(tips) + Notification(&n, true) } -//message FriendAddedTips{ -// FriendInfo Friend = 1; -//} -//message FriendInfo{ -// UserInfo OwnerUser = 1; -// string Remark = 2; -// uint64 CreateTime = 3; -// UserInfo FriendUser = 4; -//} +func FriendApplicationProcessedNotification(req *pbFriend.AddFriendResponseReq) { + var n NotificationMsg + n.SendID = req.CommID.FromUserID + n.RecvID = req.CommID.ToUserID + n.ContentType = constant.FriendApplicationProcessedNotification + n.SessionType = constant.SingleChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = req.CommID.OperationID -func FriendAddedNotification(operationID string, opUser *immysql.User, friendUser *immysql.Friend) { + var FriendApplicationProcessedTips open_im_sdk.FriendApplicationProcessedTips + FriendApplicationProcessedTips.FromToUserID.FromUserID = req.CommID.FromUserID + FriendApplicationProcessedTips.FromToUserID.ToUserID = req.CommID.ToUserID + fromUserNickname, toUserNickname := getFromToUserNickname(req.CommID.OperationID, req.CommID.FromUserID, req.CommID.ToUserID) + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(FriendApplicationProcessedTips) + tips.DefaultTips = fromUserNickname + " FriendApplicationProcessedNotification " + toUserNickname + n.Content, _ = json.Marshal(tips) + Notification(&n, true) +} +func FriendAddedNotification(operationID, opUserID, fromUserID, toUserID string) { + var n NotificationMsg + n.SendID = fromUserID + n.RecvID = toUserID + n.ContentType = constant.FriendAddedNotification + n.SessionType = constant.SingleChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = operationID + + var FriendAddedTips open_im_sdk.FriendAddedTips + + user, err := imdb.FindUserByUID(opUserID) + if err != nil { + log.NewError(operationID, "FindUserByUID failed ", err.Error(), opUserID) + + } else { + utils.CopyStructFields(FriendAddedTips.OpUser, user) + } + + friend, err := imdb.FindFriendRelationshipFromFriend(fromUserID, toUserID) + if err != nil { + log.NewError(operationID, "FindUserByUID failed ", err.Error(), fromUserID, toUserID) + } else { + FriendAddedTips.Friend.Remark = friend.Remark + } + + from, err := imdb.FindUserByUID(fromUserID) + if err != nil { + log.NewError(operationID, "FindUserByUID failed ", err.Error(), fromUserID) + + } else { + utils.CopyStructFields(FriendAddedTips.Friend.OwnerUser, from) + } + + to, err := imdb.FindUserByUID(toUserID) + if err != nil { + log.NewError(operationID, "FindUserByUID failed ", err.Error(), toUserID) + + } else { + utils.CopyStructFields(FriendAddedTips.Friend.FriendUser, to) + } + + fromUserNickname, toUserNickname := FriendAddedTips.Friend.OwnerUser.Nickname, FriendAddedTips.Friend.FriendUser.Nickname + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(FriendAddedTips) + tips.DefaultTips = fromUserNickname + " FriendAddedNotification " + toUserNickname + n.Content, _ = json.Marshal(tips) + Notification(&n, true) } //message FriendDeletedTips{ // FriendInfo Friend = 1; //} -func FriendDeletedNotification(operationID string, opUser *immysql.User, friendUser *immysql.Friend) { +func FriendDeletedNotification(req *pbFriend.DeleteFriendReq) { + var n NotificationMsg + n.SendID = req.CommID.FromUserID + n.RecvID = req.CommID.ToUserID + n.ContentType = constant.FriendDeletedNotification + n.SessionType = constant.SingleChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = req.CommID.OperationID + var FriendDeletedTips open_im_sdk.FriendDeletedTips + FriendDeletedTips.FromToUserID.FromUserID = req.CommID.FromUserID + FriendDeletedTips.FromToUserID.ToUserID = req.CommID.ToUserID + fromUserNickname, toUserNickname := getFromToUserNickname(req.CommID.OperationID, req.CommID.FromUserID, req.CommID.ToUserID) + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(FriendDeletedTips) + tips.DefaultTips = fromUserNickname + " FriendDeletedNotification " + toUserNickname + n.Content, _ = json.Marshal(tips) + Notification(&n, true) } //message FriendInfoChangedTips{ @@ -526,8 +793,24 @@ func FriendDeletedNotification(operationID string, opUser *immysql.User, friendU // PublicUserInfo OpUser = 2; // uint64 OperationTime = 3; //} -func FriendInfoChangedNotification(operationID string, opUser *immysql.User, friendUser *immysql.Friend) { +func FriendInfoChangedNotification(req *pbFriend.SetFriendCommentReq) { + var n NotificationMsg + n.SendID = req.CommID.FromUserID + n.RecvID = req.CommID.ToUserID + n.ContentType = constant.FriendInfoChangedNotification + n.SessionType = constant.SingleChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = req.CommID.OperationID + var FriendInfoChangedTips open_im_sdk.FriendInfoChangedTips + FriendInfoChangedTips.FromToUserID.FromUserID = req.CommID.FromUserID + FriendInfoChangedTips.FromToUserID.ToUserID = req.CommID.ToUserID + fromUserNickname, toUserNickname := getFromToUserNickname(req.CommID.OperationID, req.CommID.FromUserID, req.CommID.ToUserID) + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(FriendInfoChangedTips) + tips.DefaultTips = fromUserNickname + " FriendDeletedNotification " + toUserNickname + n.Content, _ = json.Marshal(tips) + Notification(&n, true) } //message BlackAddedTips{ @@ -539,15 +822,47 @@ func FriendInfoChangedNotification(operationID string, opUser *immysql.User, fri // uint64 CreateTime = 3; // PublicUserInfo BlackUser = 4; //} -func BlackAddedNotification(operationID string, opUser *immysql.User, blackUser *immysql.User) { +func BlackAddedNotification(req *pbFriend.AddBlacklistReq) { + var n NotificationMsg + n.SendID = req.CommID.FromUserID + n.RecvID = req.CommID.ToUserID + n.ContentType = constant.BlackAddedNotification + n.SessionType = constant.SingleChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = req.CommID.OperationID + var BlackAddedTips open_im_sdk.BlackAddedTips + BlackAddedTips.FromToUserID.FromUserID = req.CommID.FromUserID + BlackAddedTips.FromToUserID.ToUserID = req.CommID.ToUserID + fromUserNickname, toUserNickname := getFromToUserNickname(req.CommID.OperationID, req.CommID.FromUserID, req.CommID.ToUserID) + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(BlackAddedTips) + tips.DefaultTips = fromUserNickname + " BlackAddedNotification " + toUserNickname + n.Content, _ = json.Marshal(tips) + Notification(&n, true) } //message BlackDeletedTips{ // BlackInfo Black = 1; //} -func BlackDeletedNotification(operationID string, opUser *immysql.User, blackUser *immysql.User) { +func BlackDeletedNotification(req *pbFriend.RemoveBlacklistReq) { + var n NotificationMsg + n.SendID = req.CommID.FromUserID + n.RecvID = req.CommID.ToUserID + n.ContentType = constant.BlackDeletedNotification + n.SessionType = constant.SingleChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = req.CommID.OperationID + var BlackDeletedTips open_im_sdk.BlackDeletedTips + BlackDeletedTips.FromToUserID.FromUserID = req.CommID.FromUserID + BlackDeletedTips.FromToUserID.ToUserID = req.CommID.ToUserID + fromUserNickname, toUserNickname := getFromToUserNickname(req.CommID.OperationID, req.CommID.FromUserID, req.CommID.ToUserID) + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(BlackDeletedTips) + tips.DefaultTips = fromUserNickname + " BlackDeletedNotification " + toUserNickname + n.Content, _ = json.Marshal(tips) + Notification(&n, true) } //message SelfInfoUpdatedTips{ @@ -555,6 +870,26 @@ func BlackDeletedNotification(operationID string, opUser *immysql.User, blackUse // PublicUserInfo OpUser = 2; // uint64 OperationTime = 3; //} -func SelfInfoUpdatedNotification(operationID string, opUser *immysql.User, selfUser *immysql.User) { +func SelfInfoUpdatedNotification(operationID, userID string) { + var n NotificationMsg + n.SendID = userID + n.RecvID = userID + n.ContentType = constant.SelfInfoUpdatedNotification + n.SessionType = constant.SingleChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = operationID + var SelfInfoUpdatedTips open_im_sdk.SelfInfoUpdatedTips + SelfInfoUpdatedTips.UserID = userID + + var tips open_im_sdk.TipsComm + u, err := imdb.FindUserByUID(userID) + if err != nil { + log.NewError(operationID, "FindUserByUID failed ", err.Error(), userID) + } + + tips.Detail, _ = json.Marshal(SelfInfoUpdatedTips) + tips.DefaultTips = u.Nickname + " SelfInfoUpdatedNotification " + n.Content, _ = json.Marshal(tips) + Notification(&n, true) } diff --git a/internal/rpc/user/get_user_info.go b/internal/rpc/user/get_user_info.go index 3f9cec00f..eca8afbd5 100644 --- a/internal/rpc/user/get_user_info.go +++ b/internal/rpc/user/get_user_info.go @@ -75,14 +75,7 @@ func (s *userServer) GetUserInfo(ctx context.Context, req *pbUser.GetUserInfoReq log.ErrorByKv("search userinfo failed", req.OperationID, "userID", userID, "err=%s", err.Error()) continue } - userInfo.Uid = user.UID - userInfo.Icon = user.Icon - userInfo.Name = user.Name - userInfo.Gender = user.Gender - userInfo.Mobile = user.Mobile - userInfo.Birth = user.Birth - userInfo.Email = user.Email - userInfo.Ex = user.Ex + utils.CopyStructFields(&userInfo, user) userInfoList = append(userInfoList, &userInfo) } } else { diff --git a/internal/rpc/user/update_user_info.go b/internal/rpc/user/update_user_info.go index 079cb1b44..f022542e4 100644 --- a/internal/rpc/user/update_user_info.go +++ b/internal/rpc/user/update_user_info.go @@ -2,6 +2,7 @@ package user import ( "Open_IM/internal/push/logic" + chat "Open_IM/internal/rpc/msg" "Open_IM/pkg/common/config" "Open_IM/pkg/common/constant" "Open_IM/pkg/common/db/mysql_model/im_mysql_model" @@ -49,7 +50,7 @@ func (s *userServer) UpdateUserInfo(ctx context.Context, req *pbUser.UpdateUserI log.ErrorByKv("get friend list rpc server failed", req.OperationID, "err", err.Error(), "req", req.String()) return &pbUser.CommonResp{}, nil } - if RpcResp.ErrorCode != 0 { + if RpcResp.ErrCode != 0 { log.ErrorByKv("get friend list rpc server failed", req.OperationID, "err", err.Error(), "req", req.String()) return &pbUser.CommonResp{}, nil } @@ -62,6 +63,8 @@ func (s *userServer) UpdateUserInfo(ctx context.Context, req *pbUser.UpdateUserI if self != nil { name, faceUrl = self.Name, self.Icon } + + chat.SelfInfoUpdatedNotification(req.OperationID, req.Uid) for _, v := range RpcResp.Data { logic.SendMsgByWS(&pbChat.WSToMsgSvrChatMsg{ SendID: ownerUid, diff --git a/pkg/common/constant/constant.go b/pkg/common/constant/constant.go index 0d2b5dae6..44216d1c8 100644 --- a/pkg/common/constant/constant.go +++ b/pkg/common/constant/constant.go @@ -45,22 +45,38 @@ const ( GroupMsg = 201 //SysRelated - AcceptFriendApplicationTip = 201 - AddFriendTip = 202 - RefuseFriendApplicationTip = 203 - SetSelfInfoTip = 204 + FriendApplicationAddedNotification = 201 + FriendApplicationProcessedNotification = 202 + FriendAddedNotification = 203 + FriendDeletedNotification = 204 + FriendInfoChangedNotification = 205 + BlackAddedNotification = 206 + BlackDeletedNotification = 207 + //AcceptFriendApplicationTip = 201 + //AddFriendTip = 202 + //RefuseFriendApplicationTip = 203 - TransferGroupOwnerTip = 501 - CreateGroupTip = 502 - GroupApplicationResponseTip = 503 - ApplyJoinGroupTip = 504 - QuitGroupTip = 505 - SetGroupInfoTip = 506 - AcceptGroupApplicationTip = 507 - RefuseGroupApplicationTip = 508 - KickGroupMemberTip = 509 - InviteUserToGroupTip = 510 - ChangeGroupInfoTip = 511 + SelfInfoUpdatedNotification = 301 + + GroupCreatedNotification = 501 + JoinApplicationNotification = 502 + ApplicationProcessedNotification = 503 + MemberInvitedNotification = 504 + MemberKickedNotification = 505 + GroupInfoChangedNotification = 506 + MemberLeaveNotification = 507 + MemberEnterNotification = 508 + //TransferGroupOwnerTip = 501 + //CreateGroupTip = 502 + //GroupApplicationResponseTip = 503 + //ApplyJoinGroupTip = 504 + //QuitGroupTip = 505 + //SetGroupInfoTip = 506 + //AcceptGroupApplicationTip = 507 + //RefuseGroupApplicationTip = 508 + //KickGroupMemberTip = 509 + //InviteUserToGroupTip = 510 + //ChangeGroupInfoTip = 511 //MsgFrom UserMsgType = 100 diff --git a/pkg/common/db/mysql.go b/pkg/common/db/mysql.go index 859620e36..152273f97 100644 --- a/pkg/common/db/mysql.go +++ b/pkg/common/db/mysql.go @@ -91,18 +91,6 @@ func initMysqlDB() { panic(err.Error()) } - sqlTable = "CREATE TABLE IF NOT EXISTS `black_list` (" + - " `uid` varchar(32) NOT NULL COMMENT 'uid'," + - " `begin_disable_time` datetime DEFAULT NULL," + - " `end_disable_time` datetime DEFAULT NULL," + - " `ex` varchar(1024) DEFAULT NULL," + - " PRIMARY KEY (`uid`) USING BTREE" + - " ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;" - err = db.Exec(sqlTable).Error - if err != nil { - panic(err.Error()) - } - sqlTable = "CREATE TABLE IF NOT EXISTS `user_black_list` (" + " `owner_id` varchar(64) NOT NULL," + " `block_id` varchar(64) NOT NULL," + diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_model.go index d9c69fdc0..db4e7f3c0 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_model.go @@ -15,7 +15,7 @@ func InsertIntoGroup(groupId, name, introduction, notification, faceUrl, ex stri } //Default group name if name == "" { - name = "groupChat" + name = "Group Chat" } toInsertInfo := Group{GroupID: groupId, GroupName: name, Introduction: introduction, Notification: notification, FaceUrl: faceUrl, CreateTime: time.Now(), Ex: ex} err = dbConn.Table("group").Create(toInsertInfo).Error diff --git a/pkg/proto/group/group.pb.go b/pkg/proto/group/group.pb.go index caa26e0e5..cbd93fb5e 100644 --- a/pkg/proto/group/group.pb.go +++ b/pkg/proto/group/group.pb.go @@ -36,7 +36,7 @@ func (m *CommonResp) Reset() { *m = CommonResp{} } func (m *CommonResp) String() string { return proto.CompactTextString(m) } func (*CommonResp) ProtoMessage() {} func (*CommonResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_2ff972788727c811, []int{0} + return fileDescriptor_group_95297d6a59bab850, []int{0} } func (m *CommonResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CommonResp.Unmarshal(m, b) @@ -82,7 +82,7 @@ func (m *GroupAddMemberInfo) Reset() { *m = GroupAddMemberInfo{} } func (m *GroupAddMemberInfo) String() string { return proto.CompactTextString(m) } func (*GroupAddMemberInfo) ProtoMessage() {} func (*GroupAddMemberInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_group_2ff972788727c811, []int{1} + return fileDescriptor_group_95297d6a59bab850, []int{1} } func (m *GroupAddMemberInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupAddMemberInfo.Unmarshal(m, b) @@ -135,7 +135,7 @@ func (m *CreateGroupReq) Reset() { *m = CreateGroupReq{} } func (m *CreateGroupReq) String() string { return proto.CompactTextString(m) } func (*CreateGroupReq) ProtoMessage() {} func (*CreateGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_2ff972788727c811, []int{2} + return fileDescriptor_group_95297d6a59bab850, []int{2} } func (m *CreateGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreateGroupReq.Unmarshal(m, b) @@ -231,7 +231,7 @@ func (m *CreateGroupResp) Reset() { *m = CreateGroupResp{} } func (m *CreateGroupResp) String() string { return proto.CompactTextString(m) } func (*CreateGroupResp) ProtoMessage() {} func (*CreateGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_2ff972788727c811, []int{3} + return fileDescriptor_group_95297d6a59bab850, []int{3} } func (m *CreateGroupResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreateGroupResp.Unmarshal(m, b) @@ -285,7 +285,7 @@ func (m *GetGroupsInfoReq) Reset() { *m = GetGroupsInfoReq{} } func (m *GetGroupsInfoReq) String() string { return proto.CompactTextString(m) } func (*GetGroupsInfoReq) ProtoMessage() {} func (*GetGroupsInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_2ff972788727c811, []int{4} + return fileDescriptor_group_95297d6a59bab850, []int{4} } func (m *GetGroupsInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupsInfoReq.Unmarshal(m, b) @@ -339,7 +339,7 @@ func (m *GetGroupsInfoResp) Reset() { *m = GetGroupsInfoResp{} } func (m *GetGroupsInfoResp) String() string { return proto.CompactTextString(m) } func (*GetGroupsInfoResp) ProtoMessage() {} func (*GetGroupsInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_2ff972788727c811, []int{5} + return fileDescriptor_group_95297d6a59bab850, []int{5} } func (m *GetGroupsInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupsInfoResp.Unmarshal(m, b) @@ -383,8 +383,7 @@ func (m *GetGroupsInfoResp) GetGroupInfoList() []*sdk_ws.GroupInfo { type SetGroupInfoReq struct { GroupInfo *sdk_ws.GroupInfo `protobuf:"bytes,1,opt,name=GroupInfo" json:"GroupInfo,omitempty"` OpUserID string `protobuf:"bytes,2,opt,name=OpUserID" json:"OpUserID,omitempty"` - FromUserID string `protobuf:"bytes,3,opt,name=FromUserID" json:"FromUserID,omitempty"` - OperationID string `protobuf:"bytes,4,opt,name=OperationID" json:"OperationID,omitempty"` + OperationID string `protobuf:"bytes,3,opt,name=OperationID" json:"OperationID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -394,7 +393,7 @@ func (m *SetGroupInfoReq) Reset() { *m = SetGroupInfoReq{} } func (m *SetGroupInfoReq) String() string { return proto.CompactTextString(m) } func (*SetGroupInfoReq) ProtoMessage() {} func (*SetGroupInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_2ff972788727c811, []int{6} + return fileDescriptor_group_95297d6a59bab850, []int{6} } func (m *SetGroupInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetGroupInfoReq.Unmarshal(m, b) @@ -428,13 +427,6 @@ func (m *SetGroupInfoReq) GetOpUserID() string { return "" } -func (m *SetGroupInfoReq) GetFromUserID() string { - if m != nil { - return m.FromUserID - } - return "" -} - func (m *SetGroupInfoReq) GetOperationID() string { if m != nil { return m.OperationID @@ -442,7 +434,6 @@ func (m *SetGroupInfoReq) GetOperationID() string { return "" } -// owner or manager type GetGroupApplicationListReq struct { OpUserID string `protobuf:"bytes,1,opt,name=OpUserID" json:"OpUserID,omitempty"` OperationID string `protobuf:"bytes,2,opt,name=OperationID" json:"OperationID,omitempty"` @@ -456,7 +447,7 @@ func (m *GetGroupApplicationListReq) Reset() { *m = GetGroupApplicationL func (m *GetGroupApplicationListReq) String() string { return proto.CompactTextString(m) } func (*GetGroupApplicationListReq) ProtoMessage() {} func (*GetGroupApplicationListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_2ff972788727c811, []int{7} + return fileDescriptor_group_95297d6a59bab850, []int{7} } func (m *GetGroupApplicationListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupApplicationListReq.Unmarshal(m, b) @@ -523,7 +514,7 @@ func (m *GetGroupApplicationList_Data_User) Reset() { *m = GetGroupAppli func (m *GetGroupApplicationList_Data_User) String() string { return proto.CompactTextString(m) } func (*GetGroupApplicationList_Data_User) ProtoMessage() {} func (*GetGroupApplicationList_Data_User) Descriptor() ([]byte, []int) { - return fileDescriptor_group_2ff972788727c811, []int{8} + return fileDescriptor_group_95297d6a59bab850, []int{8} } func (m *GetGroupApplicationList_Data_User) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupApplicationList_Data_User.Unmarshal(m, b) @@ -667,7 +658,7 @@ func (m *GetGroupApplicationListData) Reset() { *m = GetGroupApplication func (m *GetGroupApplicationListData) String() string { return proto.CompactTextString(m) } func (*GetGroupApplicationListData) ProtoMessage() {} func (*GetGroupApplicationListData) Descriptor() ([]byte, []int) { - return fileDescriptor_group_2ff972788727c811, []int{9} + return fileDescriptor_group_95297d6a59bab850, []int{9} } func (m *GetGroupApplicationListData) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupApplicationListData.Unmarshal(m, b) @@ -714,7 +705,7 @@ func (m *GetGroupApplicationListResp) Reset() { *m = GetGroupApplication func (m *GetGroupApplicationListResp) String() string { return proto.CompactTextString(m) } func (*GetGroupApplicationListResp) ProtoMessage() {} func (*GetGroupApplicationListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_2ff972788727c811, []int{10} + return fileDescriptor_group_95297d6a59bab850, []int{10} } func (m *GetGroupApplicationListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupApplicationListResp.Unmarshal(m, b) @@ -770,7 +761,7 @@ func (m *TransferGroupOwnerReq) Reset() { *m = TransferGroupOwnerReq{} } func (m *TransferGroupOwnerReq) String() string { return proto.CompactTextString(m) } func (*TransferGroupOwnerReq) ProtoMessage() {} func (*TransferGroupOwnerReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_2ff972788727c811, []int{11} + return fileDescriptor_group_95297d6a59bab850, []int{11} } func (m *TransferGroupOwnerReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TransferGroupOwnerReq.Unmarshal(m, b) @@ -828,9 +819,8 @@ func (m *TransferGroupOwnerReq) GetOpUserID() string { type JoinGroupReq struct { GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` ReqMessage string `protobuf:"bytes,2,opt,name=ReqMessage" json:"ReqMessage,omitempty"` - FromUserID string `protobuf:"bytes,3,opt,name=FromUserID" json:"FromUserID,omitempty"` + OpUserID string `protobuf:"bytes,3,opt,name=OpUserID" json:"OpUserID,omitempty"` OperationID string `protobuf:"bytes,4,opt,name=OperationID" json:"OperationID,omitempty"` - OpUserID string `protobuf:"bytes,5,opt,name=OpUserID" json:"OpUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -840,7 +830,7 @@ func (m *JoinGroupReq) Reset() { *m = JoinGroupReq{} } func (m *JoinGroupReq) String() string { return proto.CompactTextString(m) } func (*JoinGroupReq) ProtoMessage() {} func (*JoinGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_2ff972788727c811, []int{12} + return fileDescriptor_group_95297d6a59bab850, []int{12} } func (m *JoinGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JoinGroupReq.Unmarshal(m, b) @@ -874,9 +864,9 @@ func (m *JoinGroupReq) GetReqMessage() string { return "" } -func (m *JoinGroupReq) GetFromUserID() string { +func (m *JoinGroupReq) GetOpUserID() string { if m != nil { - return m.FromUserID + return m.OpUserID } return "" } @@ -888,24 +878,15 @@ func (m *JoinGroupReq) GetOperationID() string { return "" } -func (m *JoinGroupReq) GetOpUserID() string { - if m != nil { - return m.OpUserID - } - return "" -} - type GroupApplicationResponseReq struct { - OperationID string `protobuf:"bytes,1,opt,name=OperationID" json:"OperationID,omitempty"` - OpUserID string `protobuf:"bytes,2,opt,name=OpUserID" json:"OpUserID,omitempty"` - GroupID string `protobuf:"bytes,3,opt,name=GroupID" json:"GroupID,omitempty"` - FromUserID string `protobuf:"bytes,4,opt,name=FromUserID" json:"FromUserID,omitempty"` - ToUserID string `protobuf:"bytes,7,opt,name=ToUserID" json:"ToUserID,omitempty"` - AddTime int64 `protobuf:"varint,10,opt,name=AddTime" json:"AddTime,omitempty"` - HandledMsg string `protobuf:"bytes,12,opt,name=HandledMsg" json:"HandledMsg,omitempty"` - // int32 Type = 13; - // int32 HandleStatus = 14; - HandleResult int32 `protobuf:"varint,15,opt,name=HandleResult" json:"HandleResult,omitempty"` + OperationID string `protobuf:"bytes,1,opt,name=OperationID" json:"OperationID,omitempty"` + OpUserID string `protobuf:"bytes,2,opt,name=OpUserID" json:"OpUserID,omitempty"` + GroupID string `protobuf:"bytes,3,opt,name=GroupID" json:"GroupID,omitempty"` + FromUserID string `protobuf:"bytes,4,opt,name=FromUserID" json:"FromUserID,omitempty"` + ToUserID string `protobuf:"bytes,5,opt,name=ToUserID" json:"ToUserID,omitempty"` + AddTime int64 `protobuf:"varint,6,opt,name=AddTime" json:"AddTime,omitempty"` + HandledMsg string `protobuf:"bytes,7,opt,name=HandledMsg" json:"HandledMsg,omitempty"` + HandleResult int32 `protobuf:"varint,8,opt,name=HandleResult" json:"HandleResult,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -915,7 +896,7 @@ func (m *GroupApplicationResponseReq) Reset() { *m = GroupApplicationRes func (m *GroupApplicationResponseReq) String() string { return proto.CompactTextString(m) } func (*GroupApplicationResponseReq) ProtoMessage() {} func (*GroupApplicationResponseReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_2ff972788727c811, []int{13} + return fileDescriptor_group_95297d6a59bab850, []int{13} } func (m *GroupApplicationResponseReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupApplicationResponseReq.Unmarshal(m, b) @@ -1006,7 +987,7 @@ func (m *SetOwnerGroupNickNameReq) Reset() { *m = SetOwnerGroupNickNameR func (m *SetOwnerGroupNickNameReq) String() string { return proto.CompactTextString(m) } func (*SetOwnerGroupNickNameReq) ProtoMessage() {} func (*SetOwnerGroupNickNameReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_2ff972788727c811, []int{14} + return fileDescriptor_group_95297d6a59bab850, []int{14} } func (m *SetOwnerGroupNickNameReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetOwnerGroupNickNameReq.Unmarshal(m, b) @@ -1064,8 +1045,7 @@ func (m *SetOwnerGroupNickNameReq) GetOpUserID() string { type QuitGroupReq struct { GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` OperationID string `protobuf:"bytes,2,opt,name=OperationID" json:"OperationID,omitempty"` - FromUserID string `protobuf:"bytes,3,opt,name=FromUserID" json:"FromUserID,omitempty"` - OpUserID string `protobuf:"bytes,4,opt,name=OpUserID" json:"OpUserID,omitempty"` + OpUserID string `protobuf:"bytes,3,opt,name=OpUserID" json:"OpUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1075,7 +1055,7 @@ func (m *QuitGroupReq) Reset() { *m = QuitGroupReq{} } func (m *QuitGroupReq) String() string { return proto.CompactTextString(m) } func (*QuitGroupReq) ProtoMessage() {} func (*QuitGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_2ff972788727c811, []int{15} + return fileDescriptor_group_95297d6a59bab850, []int{15} } func (m *QuitGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_QuitGroupReq.Unmarshal(m, b) @@ -1109,13 +1089,6 @@ func (m *QuitGroupReq) GetOperationID() string { return "" } -func (m *QuitGroupReq) GetFromUserID() string { - if m != nil { - return m.FromUserID - } - return "" -} - func (m *QuitGroupReq) GetOpUserID() string { if m != nil { return m.OpUserID @@ -1138,7 +1111,7 @@ func (m *GetGroupMemberListReq) Reset() { *m = GetGroupMemberListReq{} } func (m *GetGroupMemberListReq) String() string { return proto.CompactTextString(m) } func (*GetGroupMemberListReq) ProtoMessage() {} func (*GetGroupMemberListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_2ff972788727c811, []int{16} + return fileDescriptor_group_95297d6a59bab850, []int{16} } func (m *GetGroupMemberListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMemberListReq.Unmarshal(m, b) @@ -1207,7 +1180,7 @@ func (m *GetGroupMemberListResp) Reset() { *m = GetGroupMemberListResp{} func (m *GetGroupMemberListResp) String() string { return proto.CompactTextString(m) } func (*GetGroupMemberListResp) ProtoMessage() {} func (*GetGroupMemberListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_2ff972788727c811, []int{17} + return fileDescriptor_group_95297d6a59bab850, []int{17} } func (m *GetGroupMemberListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMemberListResp.Unmarshal(m, b) @@ -1269,7 +1242,7 @@ func (m *GetGroupMembersInfoReq) Reset() { *m = GetGroupMembersInfoReq{} func (m *GetGroupMembersInfoReq) String() string { return proto.CompactTextString(m) } func (*GetGroupMembersInfoReq) ProtoMessage() {} func (*GetGroupMembersInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_2ff972788727c811, []int{18} + return fileDescriptor_group_95297d6a59bab850, []int{18} } func (m *GetGroupMembersInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMembersInfoReq.Unmarshal(m, b) @@ -1330,7 +1303,7 @@ func (m *GetGroupMembersInfoResp) Reset() { *m = GetGroupMembersInfoResp func (m *GetGroupMembersInfoResp) String() string { return proto.CompactTextString(m) } func (*GetGroupMembersInfoResp) ProtoMessage() {} func (*GetGroupMembersInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_2ff972788727c811, []int{19} + return fileDescriptor_group_95297d6a59bab850, []int{19} } func (m *GetGroupMembersInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMembersInfoResp.Unmarshal(m, b) @@ -1386,7 +1359,7 @@ func (m *KickGroupMemberReq) Reset() { *m = KickGroupMemberReq{} } func (m *KickGroupMemberReq) String() string { return proto.CompactTextString(m) } func (*KickGroupMemberReq) ProtoMessage() {} func (*KickGroupMemberReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_2ff972788727c811, []int{20} + return fileDescriptor_group_95297d6a59bab850, []int{20} } func (m *KickGroupMemberReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_KickGroupMemberReq.Unmarshal(m, b) @@ -1453,7 +1426,7 @@ func (m *Id2Result) Reset() { *m = Id2Result{} } func (m *Id2Result) String() string { return proto.CompactTextString(m) } func (*Id2Result) ProtoMessage() {} func (*Id2Result) Descriptor() ([]byte, []int) { - return fileDescriptor_group_2ff972788727c811, []int{21} + return fileDescriptor_group_95297d6a59bab850, []int{21} } func (m *Id2Result) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Id2Result.Unmarshal(m, b) @@ -1500,7 +1473,7 @@ func (m *KickGroupMemberResp) Reset() { *m = KickGroupMemberResp{} } func (m *KickGroupMemberResp) String() string { return proto.CompactTextString(m) } func (*KickGroupMemberResp) ProtoMessage() {} func (*KickGroupMemberResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_2ff972788727c811, []int{22} + return fileDescriptor_group_95297d6a59bab850, []int{22} } func (m *KickGroupMemberResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_KickGroupMemberResp.Unmarshal(m, b) @@ -1554,7 +1527,7 @@ func (m *GetJoinedGroupListReq) Reset() { *m = GetJoinedGroupListReq{} } func (m *GetJoinedGroupListReq) String() string { return proto.CompactTextString(m) } func (*GetJoinedGroupListReq) ProtoMessage() {} func (*GetJoinedGroupListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_2ff972788727c811, []int{23} + return fileDescriptor_group_95297d6a59bab850, []int{23} } func (m *GetJoinedGroupListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetJoinedGroupListReq.Unmarshal(m, b) @@ -1608,7 +1581,7 @@ func (m *GetJoinedGroupListResp) Reset() { *m = GetJoinedGroupListResp{} func (m *GetJoinedGroupListResp) String() string { return proto.CompactTextString(m) } func (*GetJoinedGroupListResp) ProtoMessage() {} func (*GetJoinedGroupListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_2ff972788727c811, []int{24} + return fileDescriptor_group_95297d6a59bab850, []int{24} } func (m *GetJoinedGroupListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetJoinedGroupListResp.Unmarshal(m, b) @@ -1664,7 +1637,7 @@ func (m *InviteUserToGroupReq) Reset() { *m = InviteUserToGroupReq{} } func (m *InviteUserToGroupReq) String() string { return proto.CompactTextString(m) } func (*InviteUserToGroupReq) ProtoMessage() {} func (*InviteUserToGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_2ff972788727c811, []int{25} + return fileDescriptor_group_95297d6a59bab850, []int{25} } func (m *InviteUserToGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_InviteUserToGroupReq.Unmarshal(m, b) @@ -1732,7 +1705,7 @@ func (m *InviteUserToGroupResp) Reset() { *m = InviteUserToGroupResp{} } func (m *InviteUserToGroupResp) String() string { return proto.CompactTextString(m) } func (*InviteUserToGroupResp) ProtoMessage() {} func (*InviteUserToGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_2ff972788727c811, []int{26} + return fileDescriptor_group_95297d6a59bab850, []int{26} } func (m *InviteUserToGroupResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_InviteUserToGroupResp.Unmarshal(m, b) @@ -1786,7 +1759,7 @@ func (m *GetGroupAllMemberReq) Reset() { *m = GetGroupAllMemberReq{} } func (m *GetGroupAllMemberReq) String() string { return proto.CompactTextString(m) } func (*GetGroupAllMemberReq) ProtoMessage() {} func (*GetGroupAllMemberReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_2ff972788727c811, []int{27} + return fileDescriptor_group_95297d6a59bab850, []int{27} } func (m *GetGroupAllMemberReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupAllMemberReq.Unmarshal(m, b) @@ -1840,7 +1813,7 @@ func (m *GetGroupAllMemberResp) Reset() { *m = GetGroupAllMemberResp{} } func (m *GetGroupAllMemberResp) String() string { return proto.CompactTextString(m) } func (*GetGroupAllMemberResp) ProtoMessage() {} func (*GetGroupAllMemberResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_2ff972788727c811, []int{28} + return fileDescriptor_group_95297d6a59bab850, []int{28} } func (m *GetGroupAllMemberResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupAllMemberResp.Unmarshal(m, b) @@ -2416,101 +2389,100 @@ var _Group_serviceDesc = grpc.ServiceDesc{ Metadata: "group/group.proto", } -func init() { proto.RegisterFile("group/group.proto", fileDescriptor_group_2ff972788727c811) } +func init() { proto.RegisterFile("group/group.proto", fileDescriptor_group_95297d6a59bab850) } -var fileDescriptor_group_2ff972788727c811 = []byte{ - // 1480 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0xcd, 0x6f, 0xdc, 0x44, - 0x14, 0x97, 0xf7, 0x23, 0xcd, 0xbe, 0x7c, 0x6c, 0x32, 0x6d, 0x52, 0xe3, 0x86, 0x2a, 0xb5, 0x50, - 0x15, 0x55, 0x28, 0x91, 0x52, 0x84, 0x84, 0x5a, 0xa1, 0xa6, 0xf9, 0x68, 0x17, 0x48, 0xa2, 0x3a, - 0xdb, 0x0b, 0x97, 0xe0, 0xae, 0xa7, 0x2b, 0xb3, 0x5e, 0xdb, 0xeb, 0xf1, 0x92, 0x96, 0x0b, 0x20, - 0x24, 0x38, 0x20, 0x44, 0xaf, 0x1c, 0x39, 0xc0, 0x11, 0x71, 0xe0, 0xce, 0x81, 0x7f, 0x0c, 0xcd, - 0x87, 0xbd, 0xe3, 0xf1, 0xc7, 0xae, 0x12, 0x89, 0x5e, 0x56, 0x3b, 0xef, 0xbd, 0x99, 0xf7, 0x31, - 0xef, 0xfd, 0xde, 0x1b, 0xc3, 0x6a, 0x3f, 0x0a, 0xc6, 0xe1, 0x0e, 0xfb, 0xdd, 0x0e, 0xa3, 0x20, - 0x0e, 0x50, 0x93, 0x2d, 0x8c, 0x3b, 0xa7, 0x21, 0xf6, 0xcf, 0x3b, 0xc7, 0x3b, 0xe1, 0xa0, 0xbf, - 0xc3, 0x38, 0x3b, 0xc4, 0x19, 0x9c, 0x5f, 0x90, 0x9d, 0x0b, 0xc2, 0x25, 0xcd, 0x8f, 0x01, 0xf6, - 0x83, 0xe1, 0x30, 0xf0, 0x2d, 0x4c, 0x42, 0xa4, 0xc3, 0xb5, 0xc3, 0x28, 0xda, 0x0f, 0x1c, 0xac, - 0x6b, 0x9b, 0xda, 0x56, 0xd3, 0x4a, 0x96, 0x68, 0x1d, 0xe6, 0x0e, 0xa3, 0xe8, 0x98, 0xf4, 0xf5, - 0x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0xf3, 0xa5, 0x6d, 0xfe, - 0x49, 0xfa, 0x01, 0xfb, 0x7d, 0x31, 0xc7, 0xbe, 0x37, 0xdf, 0xff, 0x2f, 0x00, 0x00, 0xff, 0xff, - 0x77, 0xc5, 0xd1, 0xfe, 0xae, 0x16, 0x00, 0x00, +var fileDescriptor_group_95297d6a59bab850 = []byte{ + // 1464 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0xcd, 0x6f, 0x1b, 0x45, + 0x14, 0xd7, 0xfa, 0x23, 0x8d, 0x5f, 0xbe, 0x9c, 0x69, 0x93, 0x2e, 0xdb, 0x50, 0xb9, 0x2b, 0x54, + 0x45, 0x15, 0x4a, 0xa4, 0x14, 0x21, 0xa1, 0x46, 0xa8, 0x69, 0x3e, 0x5a, 0x03, 0x71, 0xd4, 0x8d, + 0x7b, 0xe1, 0x12, 0xb6, 0xde, 0x89, 0xb5, 0x78, 0xbd, 0xbb, 0xde, 0x59, 0x93, 0x96, 0x0b, 0x20, + 0x04, 0x1c, 0x10, 0xa2, 0x57, 0x8e, 0x5c, 0x38, 0x22, 0x0e, 0xdc, 0x39, 0xf0, 0x8f, 0xa1, 0xf9, + 0xd8, 0xf5, 0xec, 0xa7, 0x2d, 0x47, 0xa2, 0x17, 0xcb, 0xf3, 0xde, 0x9b, 0x79, 0x1f, 0xf3, 0xde, + 0xef, 0xbd, 0x59, 0x58, 0xef, 0x07, 0xde, 0xd8, 0xdf, 0x65, 0xbf, 0x3b, 0x7e, 0xe0, 0x85, 0x1e, + 0xaa, 0xb3, 0x85, 0x76, 0xef, 0xcc, 0xc7, 0xee, 0x45, 0xfb, 0x74, 0xd7, 0x1f, 0xf4, 0x77, 0x19, + 0x67, 0x97, 0x58, 0x83, 0x8b, 0x2b, 0xb2, 0x7b, 0x45, 0xb8, 0xa4, 0xfe, 0x31, 0xc0, 0xa1, 0x37, + 0x1c, 0x7a, 0xae, 0x81, 0x89, 0x8f, 0x54, 0xb8, 0x71, 0x1c, 0x04, 0x87, 0x9e, 0x85, 0x55, 0xa5, + 0xa5, 0x6c, 0xd7, 0x8d, 0x68, 0x89, 0x36, 0x61, 0xe1, 0x38, 0x08, 0x4e, 0x49, 0x5f, 0xad, 0xb4, + 0x94, 0xed, 0x86, 0x21, 0x56, 0xfa, 0x63, 0x40, 0x4f, 0xa9, 0xae, 0x03, 0xcb, 0x3a, 0xc5, 0xc3, + 0x97, 0x38, 0x68, 0xbb, 0x97, 0x1e, 0x95, 0x7e, 0x41, 0x70, 0xd0, 0x3e, 0x62, 0xc7, 0x34, 0x0c, + 0xb1, 0x42, 0x08, 0x6a, 0x86, 0xe7, 0x60, 0x76, 0x46, 0xdd, 0x60, 0xff, 0xf5, 0x7f, 0x2b, 0xb0, + 0x7a, 0x18, 0x60, 0x33, 0xc4, 0xec, 0x20, 0x03, 0x8f, 0xd0, 0x01, 0xac, 0xb6, 0x5d, 0x3b, 0xe4, + 0x07, 0x7e, 0x66, 0x93, 0x50, 0x55, 0x5a, 0xd5, 0xed, 0xa5, 0xbd, 0x77, 0x76, 0xb8, 0x93, 0x59, + 0x8d, 0x46, 0x6a, 0x03, 0xda, 0x82, 0x06, 0x93, 0xea, 0x98, 0x43, 0x2c, 0x4c, 0x9e, 0x10, 0x90, + 0x0e, 0xcb, 0x6d, 0x37, 0x0c, 0x3c, 0x6b, 0xdc, 0x0b, 0x6d, 0xcf, 0x55, 0xab, 0x4c, 0x20, 0x41, + 0xa3, 0x32, 0x1d, 0x2f, 0xb4, 0x2f, 0xed, 0x9e, 0xc9, 0x64, 0x6a, 0x5c, 0x46, 0xa6, 0xd1, 0x78, + 0x9d, 0x98, 0x3d, 0xfc, 0x22, 0x70, 0xd4, 0x3a, 0x63, 0x47, 0x4b, 0xd4, 0x84, 0xea, 0xf1, 0xab, + 0x50, 0x5d, 0x60, 0x54, 0xfa, 0x17, 0xb5, 0x60, 0xe9, 0xcc, 0x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0x55, 0xa8, 0xc4, 0xda, 0x2b, 0xed, 0x23, 0x7a, 0x53, 0x22, 0x19, 0x84, 0xce, 0x68, + 0x39, 0x4d, 0x1f, 0xf5, 0xa6, 0xeb, 0x09, 0x2e, 0x2f, 0xc9, 0x78, 0x4d, 0xe1, 0xe5, 0xc4, 0x31, + 0xfb, 0xac, 0x16, 0xeb, 0x06, 0xfb, 0x4f, 0xcf, 0x33, 0xf0, 0x68, 0x8c, 0x49, 0x48, 0x6f, 0x9f, + 0xd7, 0xa3, 0x44, 0xa1, 0xfc, 0x67, 0xa6, 0x6b, 0x39, 0xd8, 0xa2, 0x7c, 0x5e, 0x95, 0x12, 0x85, + 0x5a, 0x7a, 0x60, 0x59, 0x5d, 0x7b, 0x88, 0x59, 0x4d, 0x56, 0x8d, 0x68, 0x89, 0x1e, 0x40, 0x33, + 0xb2, 0xab, 0x63, 0xf7, 0x06, 0x2e, 0x45, 0x1a, 0x5e, 0x98, 0x19, 0x3a, 0xba, 0x0f, 0xab, 0xdc, + 0xca, 0x58, 0x12, 0x98, 0x64, 0x8a, 0x8a, 0xb6, 0x61, 0x2d, 0xda, 0x1b, 0x01, 0xcb, 0x12, 0x13, + 0x4c, 0x93, 0xd1, 0x7b, 0xb0, 0xc2, 0xf7, 0x46, 0x72, 0xcb, 0x4c, 0x2e, 0x49, 0xa4, 0xf7, 0x2b, + 0x7c, 0xa1, 0x54, 0x75, 0x85, 0xdf, 0xaf, 0x44, 0xa2, 0x31, 0xeb, 0xbe, 0xf6, 0xb1, 0xba, 0xca, + 0x63, 0x46, 0xff, 0x53, 0xe8, 0xe3, 0x22, 0xe7, 0xa1, 0x19, 0x8e, 0x89, 0xba, 0xc6, 0x78, 0x09, + 0xda, 0x44, 0xc6, 0xc0, 0x64, 0xec, 0x84, 0x6a, 0x53, 0x96, 0xe1, 0x34, 0x7d, 0x04, 0x77, 0x0a, + 0x52, 0x83, 0x66, 0x06, 0xba, 0x05, 0xf5, 0x43, 0x6f, 0xec, 0x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0x89, + 0xcf, 0xcb, 0x83, 0x36, 0x6d, 0xab, 0x98, 0x49, 0xfc, 0x27, 0x6b, 0x9f, 0xaf, 0xec, 0xf0, 0x2f, + 0xc6, 0x8f, 0xd8, 0xef, 0xcb, 0x05, 0xf6, 0x39, 0xf8, 0xe1, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, + 0x22, 0xaf, 0xfb, 0xc7, 0x4d, 0x16, 0x00, 0x00, } diff --git a/pkg/proto/sdk_ws/ws.pb.go b/pkg/proto/sdk_ws/ws.pb.go index 6809ce398..979e03888 100644 --- a/pkg/proto/sdk_ws/ws.pb.go +++ b/pkg/proto/sdk_ws/ws.pb.go @@ -34,7 +34,7 @@ func (m *PullMessageBySeqListResp) Reset() { *m = PullMessageBySeqListRe func (m *PullMessageBySeqListResp) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListResp) ProtoMessage() {} func (*PullMessageBySeqListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_3380b8a9bc5ee255, []int{0} + return fileDescriptor_ws_1ed69884ac12b8b9, []int{0} } func (m *PullMessageBySeqListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListResp.Unmarshal(m, b) @@ -109,7 +109,7 @@ func (m *PullMessageBySeqListReq) Reset() { *m = PullMessageBySeqListReq func (m *PullMessageBySeqListReq) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListReq) ProtoMessage() {} func (*PullMessageBySeqListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_3380b8a9bc5ee255, []int{1} + return fileDescriptor_ws_1ed69884ac12b8b9, []int{1} } func (m *PullMessageBySeqListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListReq.Unmarshal(m, b) @@ -164,7 +164,7 @@ func (m *PullMessageReq) Reset() { *m = PullMessageReq{} } func (m *PullMessageReq) String() string { return proto.CompactTextString(m) } func (*PullMessageReq) ProtoMessage() {} func (*PullMessageReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_3380b8a9bc5ee255, []int{2} + return fileDescriptor_ws_1ed69884ac12b8b9, []int{2} } func (m *PullMessageReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageReq.Unmarshal(m, b) @@ -228,7 +228,7 @@ func (m *PullMessageResp) Reset() { *m = PullMessageResp{} } func (m *PullMessageResp) String() string { return proto.CompactTextString(m) } func (*PullMessageResp) ProtoMessage() {} func (*PullMessageResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_3380b8a9bc5ee255, []int{3} + return fileDescriptor_ws_1ed69884ac12b8b9, []int{3} } func (m *PullMessageResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageResp.Unmarshal(m, b) @@ -300,7 +300,7 @@ func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} } func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqReq) ProtoMessage() {} func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_3380b8a9bc5ee255, []int{4} + return fileDescriptor_ws_1ed69884ac12b8b9, []int{4} } func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) @@ -332,7 +332,7 @@ func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} } func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqResp) ProtoMessage() {} func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_3380b8a9bc5ee255, []int{5} + return fileDescriptor_ws_1ed69884ac12b8b9, []int{5} } func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) @@ -380,7 +380,7 @@ func (m *GatherFormat) Reset() { *m = GatherFormat{} } func (m *GatherFormat) String() string { return proto.CompactTextString(m) } func (*GatherFormat) ProtoMessage() {} func (*GatherFormat) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_3380b8a9bc5ee255, []int{6} + return fileDescriptor_ws_1ed69884ac12b8b9, []int{6} } func (m *GatherFormat) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GatherFormat.Unmarshal(m, b) @@ -427,7 +427,7 @@ func (m *UserSendMsgResp) Reset() { *m = UserSendMsgResp{} } func (m *UserSendMsgResp) String() string { return proto.CompactTextString(m) } func (*UserSendMsgResp) ProtoMessage() {} func (*UserSendMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_3380b8a9bc5ee255, []int{7} + return fileDescriptor_ws_1ed69884ac12b8b9, []int{7} } func (m *UserSendMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserSendMsgResp.Unmarshal(m, b) @@ -496,7 +496,7 @@ func (m *MsgData) Reset() { *m = MsgData{} } func (m *MsgData) String() string { return proto.CompactTextString(m) } func (*MsgData) ProtoMessage() {} func (*MsgData) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_3380b8a9bc5ee255, []int{8} + return fileDescriptor_ws_1ed69884ac12b8b9, []int{8} } func (m *MsgData) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgData.Unmarshal(m, b) @@ -657,7 +657,7 @@ func (m *OfflinePushInfo) Reset() { *m = OfflinePushInfo{} } func (m *OfflinePushInfo) String() string { return proto.CompactTextString(m) } func (*OfflinePushInfo) ProtoMessage() {} func (*OfflinePushInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_3380b8a9bc5ee255, []int{9} + return fileDescriptor_ws_1ed69884ac12b8b9, []int{9} } func (m *OfflinePushInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OfflinePushInfo.Unmarshal(m, b) @@ -732,7 +732,7 @@ func (m *GroupInfo) Reset() { *m = GroupInfo{} } func (m *GroupInfo) String() string { return proto.CompactTextString(m) } func (*GroupInfo) ProtoMessage() {} func (*GroupInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_3380b8a9bc5ee255, []int{10} + return fileDescriptor_ws_1ed69884ac12b8b9, []int{10} } func (m *GroupInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfo.Unmarshal(m, b) @@ -834,7 +834,7 @@ func (m *GroupMemberFullInfo) Reset() { *m = GroupMemberFullInfo{} } func (m *GroupMemberFullInfo) String() string { return proto.CompactTextString(m) } func (*GroupMemberFullInfo) ProtoMessage() {} func (*GroupMemberFullInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_3380b8a9bc5ee255, []int{11} + return fileDescriptor_ws_1ed69884ac12b8b9, []int{11} } func (m *GroupMemberFullInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupMemberFullInfo.Unmarshal(m, b) @@ -929,7 +929,7 @@ func (m *UserInfo) Reset() { *m = UserInfo{} } func (m *UserInfo) String() string { return proto.CompactTextString(m) } func (*UserInfo) ProtoMessage() {} func (*UserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_3380b8a9bc5ee255, []int{12} + return fileDescriptor_ws_1ed69884ac12b8b9, []int{12} } func (m *UserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserInfo.Unmarshal(m, b) @@ -1020,7 +1020,7 @@ func (m *PublicUserInfo) Reset() { *m = PublicUserInfo{} } func (m *PublicUserInfo) String() string { return proto.CompactTextString(m) } func (*PublicUserInfo) ProtoMessage() {} func (*PublicUserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_3380b8a9bc5ee255, []int{13} + return fileDescriptor_ws_1ed69884ac12b8b9, []int{13} } func (m *PublicUserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PublicUserInfo.Unmarshal(m, b) @@ -1080,7 +1080,7 @@ func (m *TipsComm) Reset() { *m = TipsComm{} } func (m *TipsComm) String() string { return proto.CompactTextString(m) } func (*TipsComm) ProtoMessage() {} func (*TipsComm) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_3380b8a9bc5ee255, []int{14} + return fileDescriptor_ws_1ed69884ac12b8b9, []int{14} } func (m *TipsComm) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TipsComm.Unmarshal(m, b) @@ -1129,7 +1129,7 @@ func (m *MemberEnterTips) Reset() { *m = MemberEnterTips{} } func (m *MemberEnterTips) String() string { return proto.CompactTextString(m) } func (*MemberEnterTips) ProtoMessage() {} func (*MemberEnterTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_3380b8a9bc5ee255, []int{15} + return fileDescriptor_ws_1ed69884ac12b8b9, []int{15} } func (m *MemberEnterTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberEnterTips.Unmarshal(m, b) @@ -1184,7 +1184,7 @@ func (m *MemberLeaveTips) Reset() { *m = MemberLeaveTips{} } func (m *MemberLeaveTips) String() string { return proto.CompactTextString(m) } func (*MemberLeaveTips) ProtoMessage() {} func (*MemberLeaveTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_3380b8a9bc5ee255, []int{16} + return fileDescriptor_ws_1ed69884ac12b8b9, []int{16} } func (m *MemberLeaveTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberLeaveTips.Unmarshal(m, b) @@ -1226,20 +1226,20 @@ func (m *MemberLeaveTips) GetOperationTime() uint64 { } type MemberInvitedTips struct { - Group *GroupInfo `protobuf:"bytes,1,opt,name=Group" json:"Group,omitempty"` - OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=OpUser" json:"OpUser,omitempty"` - InvitedUser *GroupMemberFullInfo `protobuf:"bytes,3,opt,name=InvitedUser" json:"InvitedUser,omitempty"` - OperationTime uint64 `protobuf:"varint,4,opt,name=OperationTime" json:"OperationTime,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Group *GroupInfo `protobuf:"bytes,1,opt,name=Group" json:"Group,omitempty"` + OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=OpUser" json:"OpUser,omitempty"` + InvitedUserList []*GroupMemberFullInfo `protobuf:"bytes,3,rep,name=InvitedUserList" json:"InvitedUserList,omitempty"` + OperationTime uint64 `protobuf:"varint,4,opt,name=OperationTime" json:"OperationTime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *MemberInvitedTips) Reset() { *m = MemberInvitedTips{} } func (m *MemberInvitedTips) String() string { return proto.CompactTextString(m) } func (*MemberInvitedTips) ProtoMessage() {} func (*MemberInvitedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_3380b8a9bc5ee255, []int{17} + return fileDescriptor_ws_1ed69884ac12b8b9, []int{17} } func (m *MemberInvitedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInvitedTips.Unmarshal(m, b) @@ -1273,9 +1273,9 @@ func (m *MemberInvitedTips) GetOpUser() *GroupMemberFullInfo { return nil } -func (m *MemberInvitedTips) GetInvitedUser() *GroupMemberFullInfo { +func (m *MemberInvitedTips) GetInvitedUserList() []*GroupMemberFullInfo { if m != nil { - return m.InvitedUser + return m.InvitedUserList } return nil } @@ -1288,20 +1288,20 @@ func (m *MemberInvitedTips) GetOperationTime() uint64 { } type MemberKickedTips struct { - Group *GroupInfo `protobuf:"bytes,1,opt,name=Group" json:"Group,omitempty"` - OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=OpUser" json:"OpUser,omitempty"` - KickedUser *GroupMemberFullInfo `protobuf:"bytes,3,opt,name=KickedUser" json:"KickedUser,omitempty"` - OperationTime uint64 `protobuf:"varint,4,opt,name=OperationTime" json:"OperationTime,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Group *GroupInfo `protobuf:"bytes,1,opt,name=Group" json:"Group,omitempty"` + OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=OpUser" json:"OpUser,omitempty"` + KickedUserList []*GroupMemberFullInfo `protobuf:"bytes,3,rep,name=KickedUserList" json:"KickedUserList,omitempty"` + OperationTime uint64 `protobuf:"varint,4,opt,name=OperationTime" json:"OperationTime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *MemberKickedTips) Reset() { *m = MemberKickedTips{} } func (m *MemberKickedTips) String() string { return proto.CompactTextString(m) } func (*MemberKickedTips) ProtoMessage() {} func (*MemberKickedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_3380b8a9bc5ee255, []int{18} + return fileDescriptor_ws_1ed69884ac12b8b9, []int{18} } func (m *MemberKickedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberKickedTips.Unmarshal(m, b) @@ -1335,9 +1335,9 @@ func (m *MemberKickedTips) GetOpUser() *GroupMemberFullInfo { return nil } -func (m *MemberKickedTips) GetKickedUser() *GroupMemberFullInfo { +func (m *MemberKickedTips) GetKickedUserList() []*GroupMemberFullInfo { if m != nil { - return m.KickedUser + return m.KickedUserList } return nil } @@ -1364,7 +1364,7 @@ func (m *MemberInfoChangedTips) Reset() { *m = MemberInfoChangedTips{} } func (m *MemberInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*MemberInfoChangedTips) ProtoMessage() {} func (*MemberInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_3380b8a9bc5ee255, []int{19} + return fileDescriptor_ws_1ed69884ac12b8b9, []int{19} } func (m *MemberInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInfoChangedTips.Unmarshal(m, b) @@ -1433,7 +1433,7 @@ func (m *GroupCreatedTips) Reset() { *m = GroupCreatedTips{} } func (m *GroupCreatedTips) String() string { return proto.CompactTextString(m) } func (*GroupCreatedTips) ProtoMessage() {} func (*GroupCreatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_3380b8a9bc5ee255, []int{20} + return fileDescriptor_ws_1ed69884ac12b8b9, []int{20} } func (m *GroupCreatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupCreatedTips.Unmarshal(m, b) @@ -1494,7 +1494,7 @@ func (m *GroupInfoChangedTips) Reset() { *m = GroupInfoChangedTips{} } func (m *GroupInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*GroupInfoChangedTips) ProtoMessage() {} func (*GroupInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_3380b8a9bc5ee255, []int{21} + return fileDescriptor_ws_1ed69884ac12b8b9, []int{21} } func (m *GroupInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfoChangedTips.Unmarshal(m, b) @@ -1535,7 +1535,7 @@ func (m *GroupInfoChangedTips) GetOpUser() *GroupMemberFullInfo { return nil } -type ReceiveJoinApplicationTips struct { +type JoinGroupApplicationTips struct { Group *GroupInfo `protobuf:"bytes,1,opt,name=Group" json:"Group,omitempty"` Applicant *PublicUserInfo `protobuf:"bytes,2,opt,name=Applicant" json:"Applicant,omitempty"` Reason string `protobuf:"bytes,3,opt,name=Reason" json:"Reason,omitempty"` @@ -1544,45 +1544,45 @@ type ReceiveJoinApplicationTips struct { XXX_sizecache int32 `json:"-"` } -func (m *ReceiveJoinApplicationTips) Reset() { *m = ReceiveJoinApplicationTips{} } -func (m *ReceiveJoinApplicationTips) String() string { return proto.CompactTextString(m) } -func (*ReceiveJoinApplicationTips) ProtoMessage() {} -func (*ReceiveJoinApplicationTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_3380b8a9bc5ee255, []int{22} +func (m *JoinGroupApplicationTips) Reset() { *m = JoinGroupApplicationTips{} } +func (m *JoinGroupApplicationTips) String() string { return proto.CompactTextString(m) } +func (*JoinGroupApplicationTips) ProtoMessage() {} +func (*JoinGroupApplicationTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_1ed69884ac12b8b9, []int{22} } -func (m *ReceiveJoinApplicationTips) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ReceiveJoinApplicationTips.Unmarshal(m, b) +func (m *JoinGroupApplicationTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_JoinGroupApplicationTips.Unmarshal(m, b) } -func (m *ReceiveJoinApplicationTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ReceiveJoinApplicationTips.Marshal(b, m, deterministic) +func (m *JoinGroupApplicationTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_JoinGroupApplicationTips.Marshal(b, m, deterministic) } -func (dst *ReceiveJoinApplicationTips) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReceiveJoinApplicationTips.Merge(dst, src) +func (dst *JoinGroupApplicationTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_JoinGroupApplicationTips.Merge(dst, src) } -func (m *ReceiveJoinApplicationTips) XXX_Size() int { - return xxx_messageInfo_ReceiveJoinApplicationTips.Size(m) +func (m *JoinGroupApplicationTips) XXX_Size() int { + return xxx_messageInfo_JoinGroupApplicationTips.Size(m) } -func (m *ReceiveJoinApplicationTips) XXX_DiscardUnknown() { - xxx_messageInfo_ReceiveJoinApplicationTips.DiscardUnknown(m) +func (m *JoinGroupApplicationTips) XXX_DiscardUnknown() { + xxx_messageInfo_JoinGroupApplicationTips.DiscardUnknown(m) } -var xxx_messageInfo_ReceiveJoinApplicationTips proto.InternalMessageInfo +var xxx_messageInfo_JoinGroupApplicationTips proto.InternalMessageInfo -func (m *ReceiveJoinApplicationTips) GetGroup() *GroupInfo { +func (m *JoinGroupApplicationTips) GetGroup() *GroupInfo { if m != nil { return m.Group } return nil } -func (m *ReceiveJoinApplicationTips) GetApplicant() *PublicUserInfo { +func (m *JoinGroupApplicationTips) GetApplicant() *PublicUserInfo { if m != nil { return m.Applicant } return nil } -func (m *ReceiveJoinApplicationTips) GetReason() string { +func (m *JoinGroupApplicationTips) GetReason() string { if m != nil { return m.Reason } @@ -1603,7 +1603,7 @@ func (m *ApplicationProcessedTips) Reset() { *m = ApplicationProcessedTi func (m *ApplicationProcessedTips) String() string { return proto.CompactTextString(m) } func (*ApplicationProcessedTips) ProtoMessage() {} func (*ApplicationProcessedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_3380b8a9bc5ee255, []int{23} + return fileDescriptor_ws_1ed69884ac12b8b9, []int{23} } func (m *ApplicationProcessedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ApplicationProcessedTips.Unmarshal(m, b) @@ -1666,7 +1666,7 @@ func (m *FriendInfo) Reset() { *m = FriendInfo{} } func (m *FriendInfo) String() string { return proto.CompactTextString(m) } func (*FriendInfo) ProtoMessage() {} func (*FriendInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_3380b8a9bc5ee255, []int{24} + return fileDescriptor_ws_1ed69884ac12b8b9, []int{24} } func (m *FriendInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfo.Unmarshal(m, b) @@ -1727,7 +1727,7 @@ func (m *FriendApplication) Reset() { *m = FriendApplication{} } func (m *FriendApplication) String() string { return proto.CompactTextString(m) } func (*FriendApplication) ProtoMessage() {} func (*FriendApplication) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_3380b8a9bc5ee255, []int{25} + return fileDescriptor_ws_1ed69884ac12b8b9, []int{25} } func (m *FriendApplication) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplication.Unmarshal(m, b) @@ -1768,22 +1768,65 @@ func (m *FriendApplication) GetAddWording() string { return "" } -// user1 add user2 +type FromToUserID struct { + FromUserID string `protobuf:"bytes,1,opt,name=FromUserID" json:"FromUserID,omitempty"` + ToUserID string `protobuf:"bytes,2,opt,name=ToUserID" json:"ToUserID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FromToUserID) Reset() { *m = FromToUserID{} } +func (m *FromToUserID) String() string { return proto.CompactTextString(m) } +func (*FromToUserID) ProtoMessage() {} +func (*FromToUserID) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_1ed69884ac12b8b9, []int{26} +} +func (m *FromToUserID) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FromToUserID.Unmarshal(m, b) +} +func (m *FromToUserID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FromToUserID.Marshal(b, m, deterministic) +} +func (dst *FromToUserID) XXX_Merge(src proto.Message) { + xxx_messageInfo_FromToUserID.Merge(dst, src) +} +func (m *FromToUserID) XXX_Size() int { + return xxx_messageInfo_FromToUserID.Size(m) +} +func (m *FromToUserID) XXX_DiscardUnknown() { + xxx_messageInfo_FromToUserID.DiscardUnknown(m) +} + +var xxx_messageInfo_FromToUserID proto.InternalMessageInfo + +func (m *FromToUserID) GetFromUserID() string { + if m != nil { + return m.FromUserID + } + return "" +} + +func (m *FromToUserID) GetToUserID() string { + if m != nil { + return m.ToUserID + } + return "" +} + +// FromUserID apply to add ToUserID type FriendApplicationAddedTips struct { - OpUser *PublicUserInfo `protobuf:"bytes,1,opt,name=OpUser" json:"OpUser,omitempty"` - Application *FriendApplication `protobuf:"bytes,2,opt,name=Application" json:"Application,omitempty"` - OpedUser *PublicUserInfo `protobuf:"bytes,3,opt,name=OpedUser" json:"OpedUser,omitempty"` - OperationTime uint64 `protobuf:"varint,4,opt,name=OperationTime" json:"OperationTime,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + FromToUserID *FromToUserID `protobuf:"bytes,1,opt,name=FromToUserID" json:"FromToUserID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *FriendApplicationAddedTips) Reset() { *m = FriendApplicationAddedTips{} } func (m *FriendApplicationAddedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationAddedTips) ProtoMessage() {} func (*FriendApplicationAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_3380b8a9bc5ee255, []int{26} + return fileDescriptor_ws_1ed69884ac12b8b9, []int{27} } func (m *FriendApplicationAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationAddedTips.Unmarshal(m, b) @@ -1803,50 +1846,26 @@ func (m *FriendApplicationAddedTips) XXX_DiscardUnknown() { var xxx_messageInfo_FriendApplicationAddedTips proto.InternalMessageInfo -func (m *FriendApplicationAddedTips) GetOpUser() *PublicUserInfo { +func (m *FriendApplicationAddedTips) GetFromToUserID() *FromToUserID { if m != nil { - return m.OpUser + return m.FromToUserID } return nil } -func (m *FriendApplicationAddedTips) GetApplication() *FriendApplication { - if m != nil { - return m.Application - } - return nil -} - -func (m *FriendApplicationAddedTips) GetOpedUser() *PublicUserInfo { - if m != nil { - return m.OpedUser - } - return nil -} - -func (m *FriendApplicationAddedTips) GetOperationTime() uint64 { - if m != nil { - return m.OperationTime - } - return 0 -} - -// user2 accept or reject +// FromUserID accept or reject ToUserID type FriendApplicationProcessedTips struct { - OpUser *PublicUserInfo `protobuf:"bytes,1,opt,name=OpUser" json:"OpUser,omitempty"` - OpedUser *PublicUserInfo `protobuf:"bytes,2,opt,name=OpedUser" json:"OpedUser,omitempty"` - Result int32 `protobuf:"varint,3,opt,name=result" json:"result,omitempty"` - OperationTime uint64 `protobuf:"varint,4,opt,name=OperationTime" json:"OperationTime,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + FromToUserID *FromToUserID `protobuf:"bytes,1,opt,name=FromToUserID" json:"FromToUserID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *FriendApplicationProcessedTips) Reset() { *m = FriendApplicationProcessedTips{} } func (m *FriendApplicationProcessedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationProcessedTips) ProtoMessage() {} func (*FriendApplicationProcessedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_3380b8a9bc5ee255, []int{27} + return fileDescriptor_ws_1ed69884ac12b8b9, []int{28} } func (m *FriendApplicationProcessedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationProcessedTips.Unmarshal(m, b) @@ -1866,47 +1885,28 @@ func (m *FriendApplicationProcessedTips) XXX_DiscardUnknown() { var xxx_messageInfo_FriendApplicationProcessedTips proto.InternalMessageInfo -func (m *FriendApplicationProcessedTips) GetOpUser() *PublicUserInfo { +func (m *FriendApplicationProcessedTips) GetFromToUserID() *FromToUserID { if m != nil { - return m.OpUser + return m.FromToUserID } return nil } -func (m *FriendApplicationProcessedTips) GetOpedUser() *PublicUserInfo { - if m != nil { - return m.OpedUser - } - return nil -} - -func (m *FriendApplicationProcessedTips) GetResult() int32 { - if m != nil { - return m.Result - } - return 0 -} - -func (m *FriendApplicationProcessedTips) GetOperationTime() uint64 { - if m != nil { - return m.OperationTime - } - return 0 -} - +// FromUserID Added a friend ToUserID type FriendAddedTips struct { - Friend *FriendInfo `protobuf:"bytes,1,opt,name=Friend" json:"Friend,omitempty"` - OperationTime uint64 `protobuf:"varint,2,opt,name=OperationTime" json:"OperationTime,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Friend *FriendInfo `protobuf:"bytes,1,opt,name=Friend" json:"Friend,omitempty"` + OperationTime uint64 `protobuf:"varint,2,opt,name=OperationTime" json:"OperationTime,omitempty"` + OpUser *PublicUserInfo `protobuf:"bytes,3,opt,name=OpUser" json:"OpUser,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *FriendAddedTips) Reset() { *m = FriendAddedTips{} } func (m *FriendAddedTips) String() string { return proto.CompactTextString(m) } func (*FriendAddedTips) ProtoMessage() {} func (*FriendAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_3380b8a9bc5ee255, []int{28} + return fileDescriptor_ws_1ed69884ac12b8b9, []int{29} } func (m *FriendAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendAddedTips.Unmarshal(m, b) @@ -1940,19 +1940,26 @@ func (m *FriendAddedTips) GetOperationTime() uint64 { return 0 } +func (m *FriendAddedTips) GetOpUser() *PublicUserInfo { + if m != nil { + return m.OpUser + } + return nil +} + +// FromUserID deleted a friend ToUserID type FriendDeletedTips struct { - Friend *FriendInfo `protobuf:"bytes,1,opt,name=Friend" json:"Friend,omitempty"` - OperationTime uint64 `protobuf:"varint,2,opt,name=OperationTime" json:"OperationTime,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + FromToUserID *FromToUserID `protobuf:"bytes,1,opt,name=FromToUserID" json:"FromToUserID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *FriendDeletedTips) Reset() { *m = FriendDeletedTips{} } func (m *FriendDeletedTips) String() string { return proto.CompactTextString(m) } func (*FriendDeletedTips) ProtoMessage() {} func (*FriendDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_3380b8a9bc5ee255, []int{29} + return fileDescriptor_ws_1ed69884ac12b8b9, []int{30} } func (m *FriendDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendDeletedTips.Unmarshal(m, b) @@ -1972,87 +1979,25 @@ func (m *FriendDeletedTips) XXX_DiscardUnknown() { var xxx_messageInfo_FriendDeletedTips proto.InternalMessageInfo -func (m *FriendDeletedTips) GetFriend() *FriendInfo { +func (m *FriendDeletedTips) GetFromToUserID() *FromToUserID { if m != nil { - return m.Friend - } - return nil -} - -func (m *FriendDeletedTips) GetOperationTime() uint64 { - if m != nil { - return m.OperationTime - } - return 0 -} - -type BlackInfo struct { - OwnerUser *PublicUserInfo `protobuf:"bytes,1,opt,name=OwnerUser" json:"OwnerUser,omitempty"` - CreateTime uint64 `protobuf:"varint,3,opt,name=CreateTime" json:"CreateTime,omitempty"` - BlackUser *PublicUserInfo `protobuf:"bytes,4,opt,name=BlackUser" json:"BlackUser,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *BlackInfo) Reset() { *m = BlackInfo{} } -func (m *BlackInfo) String() string { return proto.CompactTextString(m) } -func (*BlackInfo) ProtoMessage() {} -func (*BlackInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_3380b8a9bc5ee255, []int{30} -} -func (m *BlackInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BlackInfo.Unmarshal(m, b) -} -func (m *BlackInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BlackInfo.Marshal(b, m, deterministic) -} -func (dst *BlackInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlackInfo.Merge(dst, src) -} -func (m *BlackInfo) XXX_Size() int { - return xxx_messageInfo_BlackInfo.Size(m) -} -func (m *BlackInfo) XXX_DiscardUnknown() { - xxx_messageInfo_BlackInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_BlackInfo proto.InternalMessageInfo - -func (m *BlackInfo) GetOwnerUser() *PublicUserInfo { - if m != nil { - return m.OwnerUser - } - return nil -} - -func (m *BlackInfo) GetCreateTime() uint64 { - if m != nil { - return m.CreateTime - } - return 0 -} - -func (m *BlackInfo) GetBlackUser() *PublicUserInfo { - if m != nil { - return m.BlackUser + return m.FromToUserID } return nil } type BlackAddedTips struct { - Black *BlackInfo `protobuf:"bytes,1,opt,name=Black" json:"Black,omitempty"` - OperationTime uint64 `protobuf:"varint,2,opt,name=OperationTime" json:"OperationTime,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + FromToUserID *FromToUserID `protobuf:"bytes,1,opt,name=FromToUserID" json:"FromToUserID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *BlackAddedTips) Reset() { *m = BlackAddedTips{} } func (m *BlackAddedTips) String() string { return proto.CompactTextString(m) } func (*BlackAddedTips) ProtoMessage() {} func (*BlackAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_3380b8a9bc5ee255, []int{31} + return fileDescriptor_ws_1ed69884ac12b8b9, []int{31} } func (m *BlackAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackAddedTips.Unmarshal(m, b) @@ -2072,33 +2017,25 @@ func (m *BlackAddedTips) XXX_DiscardUnknown() { var xxx_messageInfo_BlackAddedTips proto.InternalMessageInfo -func (m *BlackAddedTips) GetBlack() *BlackInfo { +func (m *BlackAddedTips) GetFromToUserID() *FromToUserID { if m != nil { - return m.Black + return m.FromToUserID } return nil } -func (m *BlackAddedTips) GetOperationTime() uint64 { - if m != nil { - return m.OperationTime - } - return 0 -} - type BlackDeletedTips struct { - Black *BlackInfo `protobuf:"bytes,1,opt,name=Black" json:"Black,omitempty"` - OperationTime uint64 `protobuf:"varint,2,opt,name=OperationTime" json:"OperationTime,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + FromToUserID *FromToUserID `protobuf:"bytes,1,opt,name=FromToUserID" json:"FromToUserID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *BlackDeletedTips) Reset() { *m = BlackDeletedTips{} } func (m *BlackDeletedTips) String() string { return proto.CompactTextString(m) } func (*BlackDeletedTips) ProtoMessage() {} func (*BlackDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_3380b8a9bc5ee255, []int{32} + return fileDescriptor_ws_1ed69884ac12b8b9, []int{32} } func (m *BlackDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackDeletedTips.Unmarshal(m, b) @@ -2118,34 +2055,25 @@ func (m *BlackDeletedTips) XXX_DiscardUnknown() { var xxx_messageInfo_BlackDeletedTips proto.InternalMessageInfo -func (m *BlackDeletedTips) GetBlack() *BlackInfo { +func (m *BlackDeletedTips) GetFromToUserID() *FromToUserID { if m != nil { - return m.Black + return m.FromToUserID } return nil } -func (m *BlackDeletedTips) GetOperationTime() uint64 { - if m != nil { - return m.OperationTime - } - return 0 -} - type FriendInfoChangedTips struct { - Friend *FriendInfo `protobuf:"bytes,1,opt,name=Friend" json:"Friend,omitempty"` - OpUser *PublicUserInfo `protobuf:"bytes,2,opt,name=OpUser" json:"OpUser,omitempty"` - OperationTime uint64 `protobuf:"varint,3,opt,name=OperationTime" json:"OperationTime,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + FromToUserID *FromToUserID `protobuf:"bytes,1,opt,name=FromToUserID" json:"FromToUserID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *FriendInfoChangedTips) Reset() { *m = FriendInfoChangedTips{} } func (m *FriendInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*FriendInfoChangedTips) ProtoMessage() {} func (*FriendInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_3380b8a9bc5ee255, []int{33} + return fileDescriptor_ws_1ed69884ac12b8b9, []int{33} } func (m *FriendInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfoChangedTips.Unmarshal(m, b) @@ -2165,42 +2093,26 @@ func (m *FriendInfoChangedTips) XXX_DiscardUnknown() { var xxx_messageInfo_FriendInfoChangedTips proto.InternalMessageInfo -func (m *FriendInfoChangedTips) GetFriend() *FriendInfo { +func (m *FriendInfoChangedTips) GetFromToUserID() *FromToUserID { if m != nil { - return m.Friend + return m.FromToUserID } return nil } -func (m *FriendInfoChangedTips) GetOpUser() *PublicUserInfo { - if m != nil { - return m.OpUser - } - return nil -} - -func (m *FriendInfoChangedTips) GetOperationTime() uint64 { - if m != nil { - return m.OperationTime - } - return 0 -} - // ////////////////////user///////////////////// type SelfInfoUpdatedTips struct { - SelfUserInfo *UserInfo `protobuf:"bytes,1,opt,name=SelfUserInfo" json:"SelfUserInfo,omitempty"` - OpUser *PublicUserInfo `protobuf:"bytes,2,opt,name=OpUser" json:"OpUser,omitempty"` - OperationTime uint64 `protobuf:"varint,3,opt,name=OperationTime" json:"OperationTime,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + UserID string `protobuf:"bytes,1,opt,name=UserID" json:"UserID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *SelfInfoUpdatedTips) Reset() { *m = SelfInfoUpdatedTips{} } func (m *SelfInfoUpdatedTips) String() string { return proto.CompactTextString(m) } func (*SelfInfoUpdatedTips) ProtoMessage() {} func (*SelfInfoUpdatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_3380b8a9bc5ee255, []int{34} + return fileDescriptor_ws_1ed69884ac12b8b9, []int{34} } func (m *SelfInfoUpdatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SelfInfoUpdatedTips.Unmarshal(m, b) @@ -2220,25 +2132,11 @@ func (m *SelfInfoUpdatedTips) XXX_DiscardUnknown() { var xxx_messageInfo_SelfInfoUpdatedTips proto.InternalMessageInfo -func (m *SelfInfoUpdatedTips) GetSelfUserInfo() *UserInfo { +func (m *SelfInfoUpdatedTips) GetUserID() string { if m != nil { - return m.SelfUserInfo + return m.UserID } - return nil -} - -func (m *SelfInfoUpdatedTips) GetOpUser() *PublicUserInfo { - if m != nil { - return m.OpUser - } - return nil -} - -func (m *SelfInfoUpdatedTips) GetOperationTime() uint64 { - if m != nil { - return m.OperationTime - } - return 0 + return "" } func init() { @@ -2265,134 +2163,130 @@ func init() { proto.RegisterType((*MemberInfoChangedTips)(nil), "open_im_sdk.MemberInfoChangedTips") proto.RegisterType((*GroupCreatedTips)(nil), "open_im_sdk.GroupCreatedTips") proto.RegisterType((*GroupInfoChangedTips)(nil), "open_im_sdk.GroupInfoChangedTips") - proto.RegisterType((*ReceiveJoinApplicationTips)(nil), "open_im_sdk.ReceiveJoinApplicationTips") + proto.RegisterType((*JoinGroupApplicationTips)(nil), "open_im_sdk.JoinGroupApplicationTips") proto.RegisterType((*ApplicationProcessedTips)(nil), "open_im_sdk.ApplicationProcessedTips") proto.RegisterType((*FriendInfo)(nil), "open_im_sdk.FriendInfo") proto.RegisterType((*FriendApplication)(nil), "open_im_sdk.FriendApplication") + proto.RegisterType((*FromToUserID)(nil), "open_im_sdk.FromToUserID") proto.RegisterType((*FriendApplicationAddedTips)(nil), "open_im_sdk.FriendApplicationAddedTips") proto.RegisterType((*FriendApplicationProcessedTips)(nil), "open_im_sdk.FriendApplicationProcessedTips") proto.RegisterType((*FriendAddedTips)(nil), "open_im_sdk.FriendAddedTips") proto.RegisterType((*FriendDeletedTips)(nil), "open_im_sdk.FriendDeletedTips") - proto.RegisterType((*BlackInfo)(nil), "open_im_sdk.BlackInfo") proto.RegisterType((*BlackAddedTips)(nil), "open_im_sdk.BlackAddedTips") proto.RegisterType((*BlackDeletedTips)(nil), "open_im_sdk.BlackDeletedTips") proto.RegisterType((*FriendInfoChangedTips)(nil), "open_im_sdk.FriendInfoChangedTips") proto.RegisterType((*SelfInfoUpdatedTips)(nil), "open_im_sdk.SelfInfoUpdatedTips") } -func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_3380b8a9bc5ee255) } +func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_1ed69884ac12b8b9) } -var fileDescriptor_ws_3380b8a9bc5ee255 = []byte{ - // 1769 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x59, 0x4f, 0x6f, 0x23, 0x4b, - 0x11, 0xd7, 0xf8, 0x5f, 0xec, 0xb2, 0x37, 0xce, 0xce, 0xfe, 0x79, 0xc3, 0xf2, 0xb4, 0x32, 0x23, - 0x84, 0x2c, 0xf4, 0x94, 0x27, 0x12, 0x21, 0x5e, 0x16, 0x01, 0xeb, 0xc4, 0x49, 0x08, 0xc4, 0xeb, - 0x68, 0x9c, 0x88, 0xe3, 0x6a, 0xe2, 0x69, 0x3b, 0x8d, 0xc7, 0x3d, 0x4e, 0xf7, 0xd8, 0xbb, 0xb9, - 0xf0, 0x2d, 0x10, 0x27, 0x24, 0x10, 0x07, 0x84, 0xe0, 0x80, 0x38, 0xf0, 0x11, 0x38, 0xf1, 0x29, - 0x10, 0x7c, 0x01, 0x38, 0xc2, 0x01, 0x75, 0x75, 0xcf, 0x4c, 0x4f, 0x1c, 0x12, 0x27, 0x68, 0xf7, - 0xf2, 0x6e, 0x53, 0x3f, 0x57, 0x75, 0xfd, 0xea, 0x4f, 0xd7, 0xd4, 0x24, 0xd0, 0x14, 0xc1, 0xe4, - 0xed, 0x3b, 0xf1, 0xf9, 0x3b, 0xb1, 0x39, 0xe3, 0x51, 0x1c, 0xd9, 0xf5, 0x68, 0x46, 0xd8, 0x5b, - 0x3a, 0x7d, 0x2b, 0x82, 0x89, 0xfb, 0x1f, 0x0b, 0x9c, 0x93, 0x79, 0x18, 0xf6, 0x88, 0x10, 0xfe, - 0x98, 0xec, 0x5e, 0x0d, 0xc8, 0xe5, 0x31, 0x15, 0xb1, 0x47, 0xc4, 0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 0x68, 0xd2, 0xba, 0x7d, 0x0e, 0x15, - 0x05, 0x69, 0xfa, 0x9f, 0xdc, 0x90, 0x7d, 0x45, 0x5d, 0x3d, 0x2f, 0x7b, 0x2a, 0xdc, 0xe4, 0xe9, - 0xa7, 0x49, 0x6b, 0x76, 0x49, 0x48, 0xe2, 0x0f, 0xeb, 0xeb, 0xd7, 0x16, 0xd4, 0x76, 0x43, 0x7f, - 0x38, 0xc1, 0x8b, 0xbb, 0xb3, 0x7c, 0x71, 0x6f, 0x9f, 0x67, 0xd9, 0xf5, 0xbd, 0xeb, 0x9a, 0xee, - 0x68, 0x3f, 0xc6, 0x2d, 0xbd, 0xfd, 0xe8, 0x54, 0xdb, 0x0d, 0x60, 0x1d, 0x85, 0x2c, 0xf1, 0x9f, - 0x41, 0x19, 0x91, 0x1b, 0xe7, 0x60, 0x1a, 0x8e, 0xa7, 0x94, 0x56, 0xcc, 0xc4, 0x08, 0x36, 0x50, - 0xdd, 0x4c, 0xfa, 0x87, 0xf0, 0xf3, 0x1b, 0x0b, 0x9e, 0x65, 0xe5, 0x32, 0x5f, 0x92, 0xf7, 0x2e, - 0xf1, 0xf6, 0xb5, 0x01, 0xbf, 0xd2, 0xf5, 0x59, 0x6d, 0xf7, 0xfe, 0xbd, 0x05, 0x4f, 0x06, 0x24, - 0x1c, 0x49, 0xd3, 0xb3, 0x59, 0x90, 0xee, 0x2c, 0x3b, 0xd0, 0x90, 0x70, 0x72, 0xea, 0xed, 0xd3, - 0x3d, 0xa7, 0xfa, 0x01, 0xd9, 0x9e, 0x57, 0xf0, 0x5f, 0x16, 0xdb, 0xff, 0x0d, 0x00, 0x00, 0xff, - 0xff, 0x73, 0x31, 0x8b, 0x68, 0xc5, 0x18, 0x00, 0x00, +var fileDescriptor_ws_1ed69884ac12b8b9 = []byte{ + // 1703 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x58, 0x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x1f, 0x90, 0xe3, 0x2f, 0xe1, 0xd1, 0x22, 0xd1, 0xe6, 0xdc, + 0x7e, 0x4f, 0xbb, 0xdf, 0x87, 0x07, 0x43, 0x16, 0x8d, 0xd1, 0xea, 0xeb, 0x59, 0x90, 0x3f, 0x7c, + 0x5f, 0xb1, 0xea, 0x9f, 0xd6, 0xe8, 0x3f, 0xd1, 0xcf, 0xfe, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x45, + 0x62, 0x8c, 0xef, 0x9c, 0x16, 0x00, 0x00, } diff --git a/pkg/proto/sdk_ws/ws.proto b/pkg/proto/sdk_ws/ws.proto index 3a20f1fcb..7ef3d4d22 100644 --- a/pkg/proto/sdk_ws/ws.proto +++ b/pkg/proto/sdk_ws/ws.proto @@ -164,7 +164,6 @@ message MemberEnterTips{ uint64 OperationTime = 3; } - //Actively leave the group message MemberLeaveTips{ GroupInfo Group = 1; @@ -175,20 +174,19 @@ message MemberLeaveTips{ message MemberInvitedTips{ GroupInfo Group = 1; GroupMemberFullInfo OpUser = 2; - GroupMemberFullInfo InvitedUser = 3; + repeated GroupMemberFullInfo InvitedUserList = 3; uint64 OperationTime = 4; } message MemberKickedTips{ GroupInfo Group = 1; GroupMemberFullInfo OpUser = 2; - GroupMemberFullInfo KickedUser = 3; + repeated GroupMemberFullInfo KickedUserList = 3; uint64 OperationTime = 4; } - message MemberInfoChangedTips{ - int32 ChangeType = 1; //1:info changed; 2:mute + int32 ChangeType = 1; ///bitwise operators 0001:member info changed; 0010:mute ; GroupMemberFullInfo OpUser = 2; //who do this GroupMemberFullInfo FinalInfo = 3; // uint64 MuteTime = 4; @@ -203,12 +201,12 @@ message GroupCreatedTips{ } message GroupInfoChangedTips{ - int32 ChangedType = 1; //bitwise operators: 1:groupName; 10:Notification 100:Introduction; 1000:FaceUrl + int32 ChangedType = 1; //bitwise operators: 0001:groupName; 0010:Notification 0100:Introduction; 1000:FaceUrl GroupInfo Group = 2; GroupMemberFullInfo OpUser = 3; } -message ReceiveJoinApplicationTips{ +message JoinGroupApplicationTips{ GroupInfo Group = 1; PublicUserInfo Applicant = 2; string Reason = 3; @@ -235,56 +233,52 @@ message FriendApplication{ string AddWording = 3; } -//user1 add user2 +message FromToUserID{ + string FromUserID = 1; + string ToUserID = 2; +} + +//FromUserID apply to add ToUserID message FriendApplicationAddedTips{ - PublicUserInfo OpUser = 1; //user1 - FriendApplication Application = 2; - PublicUserInfo OpedUser = 3; //user2 - uint64 OperationTime = 4; + FromToUserID FromToUserID = 1; } -// user2 accept or reject +//FromUserID accept or reject ToUserID message FriendApplicationProcessedTips{ - PublicUserInfo OpUser = 1; //user2 - PublicUserInfo OpedUser = 2; //user1 - int32 result = 3; //1: accept; -1: reject - uint64 OperationTime = 4; + FromToUserID FromToUserID = 1; } +// FromUserID Added a friend ToUserID message FriendAddedTips{ FriendInfo Friend = 1; uint64 OperationTime = 2; + PublicUserInfo OpUser = 3; //who do this + } +// FromUserID deleted a friend ToUserID message FriendDeletedTips{ - FriendInfo Friend = 1; - uint64 OperationTime = 2; + FromToUserID FromToUserID = 1; } -message BlackInfo{ - PublicUserInfo OwnerUser = 1; - uint64 CreateTime = 3; - PublicUserInfo BlackUser = 4; -} +//message BlackInfo{ +// PublicUserInfo OwnerUser = 1; +// uint64 CreateTime = 3; +// PublicUserInfo BlackUser = 4; +//} message BlackAddedTips{ - BlackInfo Black = 1; - uint64 OperationTime = 2; + FromToUserID FromToUserID = 1; } message BlackDeletedTips{ - BlackInfo Black = 1; - uint64 OperationTime = 2; + FromToUserID FromToUserID = 1; } message FriendInfoChangedTips{ - FriendInfo Friend = 1; - PublicUserInfo OpUser = 2; - uint64 OperationTime = 3; + FromToUserID FromToUserID = 1; } //////////////////////user///////////////////// message SelfInfoUpdatedTips{ - UserInfo SelfUserInfo = 1; - PublicUserInfo OpUser = 2; - uint64 OperationTime = 3; + string UserID = 1; } From 04e064e86e992c0444e9556f6a865e06d1ddb43c Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Fri, 24 Dec 2021 15:39:26 +0800 Subject: [PATCH 026/337] notification --- pkg/common/constant/constant.go | 46 ++++++++++++--------------------- 1 file changed, 16 insertions(+), 30 deletions(-) diff --git a/pkg/common/constant/constant.go b/pkg/common/constant/constant.go index 44216d1c8..d8aa4a965 100644 --- a/pkg/common/constant/constant.go +++ b/pkg/common/constant/constant.go @@ -45,38 +45,24 @@ const ( GroupMsg = 201 //SysRelated - FriendApplicationAddedNotification = 201 - FriendApplicationProcessedNotification = 202 - FriendAddedNotification = 203 - FriendDeletedNotification = 204 - FriendInfoChangedNotification = 205 - BlackAddedNotification = 206 - BlackDeletedNotification = 207 - //AcceptFriendApplicationTip = 201 - //AddFriendTip = 202 - //RefuseFriendApplicationTip = 203 + FriendApplicationProcessedNotification = 1201 //AcceptFriendApplicationTip = 201 + FriendApplicationAddedNotification = 1202 //AddFriendTip = 202 + FriendAddedNotification = 1203 + FriendDeletedNotification = 1204 + FriendInfoChangedNotification = 1205 + BlackAddedNotification = 1206 + BlackDeletedNotification = 1207 - SelfInfoUpdatedNotification = 301 + SelfInfoUpdatedNotification = 1303 //SetSelfInfoTip = 204 - GroupCreatedNotification = 501 - JoinApplicationNotification = 502 - ApplicationProcessedNotification = 503 - MemberInvitedNotification = 504 - MemberKickedNotification = 505 - GroupInfoChangedNotification = 506 - MemberLeaveNotification = 507 - MemberEnterNotification = 508 - //TransferGroupOwnerTip = 501 - //CreateGroupTip = 502 - //GroupApplicationResponseTip = 503 - //ApplyJoinGroupTip = 504 - //QuitGroupTip = 505 - //SetGroupInfoTip = 506 - //AcceptGroupApplicationTip = 507 - //RefuseGroupApplicationTip = 508 - //KickGroupMemberTip = 509 - //InviteUserToGroupTip = 510 - //ChangeGroupInfoTip = 511 + GroupCreatedNotification = 1501 //CreateGroupTip = 502 + JoinApplicationNotification = 1502 //JoinGroupTip = 504 + ApplicationProcessedNotification = 1503 //AcceptGroupApplicationTip = 507 RefuseGroupApplicationTip = 508 + MemberInvitedNotification = 1504 //InviteUserToGroupTip = 510 + MemberKickedNotification = 1505 //KickGroupMemberTip = 509 + GroupInfoChangedNotification = 1506 //SetGroupInfoTip = 506 TransferGroupOwnerTip = 501 + MemberLeaveNotification = 1507 //QuitGroupTip = 505 + MemberEnterNotification = 1508 //MsgFrom UserMsgType = 100 From 30b9ca7f3722372c486a2a4ea732178e43dbb457 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Fri, 24 Dec 2021 16:02:21 +0800 Subject: [PATCH 027/337] notification --- internal/rpc/group/group.go | 35 +++++++++++++++++++---------------- internal/rpc/msg/send_msg.go | 16 ++++++++-------- 2 files changed, 27 insertions(+), 24 deletions(-) diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 1b3956c37..cd2ce23df 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -75,6 +75,7 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR log.NewError(req.OperationID, "CheckAccess false ", req.OpUserID, req.FromUserID) return &pbGroup.CreateGroupResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil } + var okUserIDList []string //Time stamp + MD5 to generate group chat id groupId := utils.Md5(strconv.FormatInt(time.Now().UnixNano(), 10)) //to group @@ -118,6 +119,7 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR if err != nil { log.NewError(req.OperationID, "InsertIntoGroupMember failed ", groupId, user.UserID, us.Nickname, us.FaceUrl, user.Role) } + okUserIDList = append(okUserIDList, user.UserID) err = db.DB.AddGroupMember(groupId, user.UserID) if err != nil { log.NewError(req.OperationID, "add mongo group member failed, db.DB.AddGroupMember failed ", err.Error()) @@ -132,7 +134,7 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR resp.ErrMsg = constant.ErrCreateGroup.ErrMsg return resp, nil } - chat.GroupCreatedNotification(req, groupId) + chat.GroupCreatedNotification(req.OperationID, req.OpUserID, req.FromUserID, groupId, okUserIDList) utils.CopyStructFields(resp.GroupInfo, group) log.NewInfo(req.OperationID, "rpc CreateGroup return ", resp.String()) return resp, nil @@ -290,7 +292,7 @@ func (s *groupServer) GetGroupMemberList(ctx context.Context, req *pbGroup.GetGr } resp.ErrCode = 0 - log.NewInfo(req.OperationID, "GetGroupMemberList rpc return ", resp) + log.NewInfo(req.OperationID, "GetGroupMemberList rpc return ", resp.String()) return &resp, nil } @@ -465,7 +467,7 @@ func (s *groupServer) GroupApplicationResponse(_ context.Context, req *pbGroup.G log.NewError(req.OperationID, "args failed ", req.String()) } - log.NewInfo(req.OperationID, "rpc GroupApplicationResponse ok ", reply) + log.NewInfo(req.OperationID, "rpc GroupApplicationResponse return ", reply) return reply, nil } @@ -494,9 +496,9 @@ func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq) return &pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""}, nil } - chat.ReceiveJoinApplicationNotification(req) + chat.JoinApplicationNotification(req) - log.NewInfo(req.OperationID, "ReceiveJoinApplicationNotification rpc JoinGroup success return") + log.NewInfo(req.OperationID, "ReceiveJoinApplicationNotification rpc return ") return &pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""}, nil } @@ -522,7 +524,7 @@ func (s *groupServer) QuitGroup(ctx context.Context, req *pbGroup.QuitGroupReq) } chat.MemberLeaveNotification(req) - log.NewInfo(req.OperationID, "rpc quit group is success return") + log.NewInfo(req.OperationID, "rpc QuitGroup return ") return &pbGroup.CommonResp{}, nil } @@ -554,7 +556,7 @@ func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInf return &pbGroup.CommonResp{ErrCode: constant.ErrSetGroupInfo.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } - ////bitwise operators: 1:groupName; 10:Notification 100:Introduction; 1000:FaceUrl + ////bitwise operators: 0001:groupName; 0010:Notification 0100:Introduction; 1000:FaceUrl; 10000:owner var changedType int32 if group.GroupName != req.GroupInfo.GroupName && req.GroupInfo.GroupName != "" { changedType = 1 @@ -574,21 +576,22 @@ func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInf } if changedType != 0 { - chat.GroupInfoChangedNotification(req) + chat.GroupInfoChangedNotification(req.OperationID, req.OpUserID, req.GroupInfo.GroupID, changedType) } - + log.NewInfo("SetGroupInfo rpc return ") return &pbGroup.CommonResp{}, nil } -func (s *groupServer) TransferGroupOwner(_ context.Context, pb *pbGroup.TransferGroupOwnerReq) (*pbGroup.CommonResp, error) { - log.Info("", "", "rpc TransferGroupOwner call start..., [pb: %s]", pb.String()) +func (s *groupServer) TransferGroupOwner(_ context.Context, req *pbGroup.TransferGroupOwnerReq) (*pbGroup.CommonResp, error) { + log.NewInfo(req.OperationID, "TransferGroupOwner ", req.String()) - reply, err := im_mysql_model.TransferGroupOwner(pb) + reply, err := im_mysql_model.TransferGroupOwner(req) if err != nil { - log.Error("", "", "rpc TransferGroupOwner call..., im_mysql_model.TransferGroupOwner fail [pb: %s] [err: %s]", pb.String(), err.Error()) - return nil, err + log.NewError("TransferGroupOwner ", req.String()) + return &pbGroup.CommonResp{ErrCode: constant.ErrDb.ErrCode, ErrMsg: constant.ErrDb.ErrMsg}, nil } - log.Info("", "", "rpc TransferGroupOwner call..., im_mysql_model.TransferGroupOwner") - + changedType := int32(1) << 4 + chat.GroupInfoChangedNotification(req.OperationID, req.OpUserID, req.GroupID, changedType) + log.NewInfo("TransferGroupOwner rpc return ", reply.String()) return reply, nil } diff --git a/internal/rpc/msg/send_msg.go b/internal/rpc/msg/send_msg.go index c97920445..293abe06b 100644 --- a/internal/rpc/msg/send_msg.go +++ b/internal/rpc/msg/send_msg.go @@ -538,24 +538,24 @@ func MemberKickedNotification(req *pbGroup.KickGroupMemberReq, kickedUserIDList //} //群信息改变后掉用 -func GroupInfoChangedNotification(req *pbGroup.SetGroupInfoReq) { +func GroupInfoChangedNotification(operationID, opUserID, groupID string, changedType int32) { var n NotificationMsg - n.SendID = req.OpUserID + n.SendID = opUserID n.ContentType = constant.GroupInfoChangedNotification n.SessionType = constant.GroupChatType n.MsgFrom = constant.SysMsgType - n.OperationID = req.OperationID + n.OperationID = operationID GroupInfoChangedTips := open_im_sdk.GroupInfoChangedTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}} - setGroupInfo(req.OperationID, req.GroupInfo.GroupID, GroupInfoChangedTips.Group, "") - setOpUserInfo(req.OperationID, req.OpUserID, req.GroupInfo.GroupID, GroupInfoChangedTips.OpUser) - + setGroupInfo(operationID, groupID, GroupInfoChangedTips.Group, opUserID) + setOpUserInfo(operationID, opUserID, groupID, GroupInfoChangedTips.OpUser) + GroupInfoChangedTips.ChangedType = changedType var tips open_im_sdk.TipsComm tips.Detail, _ = json.Marshal(GroupInfoChangedTips) tips.DefaultTips = "GroupInfoChangedNotification" n.Content, _ = json.Marshal(tips) - n.RecvID = req.GroupInfo.GroupID - Notification(&n, true) + n.RecvID = groupID + Notification(&n, false) } /* From 3d4e0a0479d9c31c1d43f88d1ac864f94b357c1c Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Sun, 26 Dec 2021 18:47:11 +0800 Subject: [PATCH 028/337] tidy code --- go.mod | 1 + go.sum | 10 +- internal/api/friend/friend.go | 374 ++-- internal/api/group/group.go | 825 +++------ internal/demo/register/login.go | 2 +- internal/demo/register/set_password.go | 2 +- internal/rpc/friend/firend.go | 270 ++- internal/rpc/group/group.go | 85 +- pkg/base_info/friend_api_struct.go | 155 ++ pkg/base_info/group_api_struct.go | 153 ++ pkg/base_info/public_struct.go | 95 + pkg/common/constant/error.go | 93 +- .../im_mysql_model/friend_model.go | 36 +- .../im_mysql_model/friend_request_model.go | 44 +- .../im_mysql_model/group_member_model.go | 194 +-- .../mysql_model/im_mysql_model/group_model.go | 15 +- .../im_mysql_model/model_struct.go | 119 +- pkg/proto/base/base.proto | 5 + pkg/proto/friend/friend.pb.go | 910 ++++++---- pkg/proto/friend/friend.proto | 105 +- pkg/proto/group/group.pb.go | 806 ++++----- pkg/proto/group/group.proto | 102 +- pkg/proto/sdk_ws/ws.pb.go | 1545 ++++++++++------- pkg/proto/sdk_ws/ws.proto | 214 ++- 24 files changed, 3260 insertions(+), 2900 deletions(-) create mode 100644 pkg/base_info/friend_api_struct.go create mode 100644 pkg/base_info/group_api_struct.go create mode 100644 pkg/base_info/public_struct.go create mode 100644 pkg/proto/base/base.proto diff --git a/go.mod b/go.mod index e86107f08..663b8e84c 100644 --- a/go.mod +++ b/go.mod @@ -47,6 +47,7 @@ require ( gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b + gorm.io/driver/mysql v1.2.2 sigs.k8s.io/yaml v1.2.0 // indirect ) diff --git a/go.sum b/go.sum index 7a4dc5ae5..3a6600edb 100644 --- a/go.sum +++ b/go.sum @@ -151,8 +151,9 @@ github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD87 github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE= github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= -github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= +github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -282,8 +283,9 @@ github.com/jinzhu/gorm v1.9.16 h1:+IyIjPEABKRpsu/F8OvDPy9fyQlgsg2luMV2ZIH5i5o= github.com/jinzhu/gorm v1.9.16/go.mod h1:G3LB3wezTOWM2ITLzPxEXgSkOXAntiLHS7UdBefADcs= github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= -github.com/jinzhu/now v1.0.1 h1:HjfetcXq097iXP0uoPCdnM4Efp5/9MsM0/M+XOTeR3M= github.com/jinzhu/now v1.0.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= +github.com/jinzhu/now v1.1.3 h1:PlHq1bSCSZL9K0wUhbm2pGLoTWs2GwVhsP6emvGV/ZI= +github.com/jinzhu/now v1.1.3/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= @@ -876,6 +878,10 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gorm.io/driver/mysql v1.2.2 h1:2qoqhOun1maoJOfLtnzJwq+bZlHkEF34rGntgySqp48= +gorm.io/driver/mysql v1.2.2/go.mod h1:qsiz+XcAyMrS6QY+X3M9R6b/lKM1imKmcuK9kac5LTo= +gorm.io/gorm v1.22.4 h1:8aPcyEJhY0MAt8aY6Dc524Pn+pO29K+ydu+e/cXSpQM= +gorm.io/gorm v1.22.4/go.mod h1:1aeVC+pe9ZmvKZban/gW4QPra7PRoTEssyc922qCAkk= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go index 1bd0fa6fa..2c9f44bf7 100644 --- a/internal/api/friend/friend.go +++ b/internal/api/friend/friend.go @@ -1,11 +1,12 @@ package friend import ( + api "Open_IM/pkg/base_info" "Open_IM/pkg/common/config" "Open_IM/pkg/common/log" "Open_IM/pkg/common/token_verify" "Open_IM/pkg/grpc-etcdv3/getcdv3" - pbFriend "Open_IM/pkg/proto/friend" + rpc "Open_IM/pkg/proto/friend" "Open_IM/pkg/utils" "context" "github.com/gin-gonic/gin" @@ -13,20 +14,14 @@ import ( "strings" ) -type paramsCommFriend struct { - OperationID string `json:"operationID" binding:"required"` - ToUserID string `json:"toUserID" binding:"required"` - FromUserID string `json:"fromUserID" binding:"required"` -} - func AddBlacklist(c *gin.Context) { - params := paramsCommFriend{} + params := api.AddBlacklistReq{} if err := c.BindJSON(¶ms); err != nil { c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) log.NewError("0", "BindJSON failed ", err.Error()) return } - req := &pbFriend.AddBlacklistReq{} + req := &rpc.AddBlacklistReq{} utils.CopyStructFields(req.CommID, params) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) @@ -38,36 +33,26 @@ func AddBlacklist(c *gin.Context) { log.NewInfo(params.OperationID, "AddBlacklist args ", req.String()) etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) - client := pbFriend.NewFriendClient(etcdConn) + client := rpc.NewFriendClient(etcdConn) RpcResp, err := client.AddBlacklist(context.Background(), req) if err != nil { log.NewError(req.CommID.OperationID, "AddBlacklist failed ", err.Error()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call add blacklist rpc server failed"}) return } - - resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg} + resp := api.AddBlacklistResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} c.JSON(http.StatusOK, resp) log.NewInfo(req.CommID.OperationID, "AddBlacklist api return ", resp) } -type paramsImportFriendReq struct { - FriendUserIDList []string `json:"friendUserIDList" binding:"required"` - OperationID string `json:"operationID" binding:"required"` - Token string `json:"token"` - FromUserID string `json:"fromUserID" binding:"required"` - OpUserID string `json:"opUserID" binding:"required"` -} - func ImportFriend(c *gin.Context) { - params := paramsImportFriendReq{} + params := api.ImportFriendReq{} if err := c.BindJSON(¶ms); err != nil { c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) log.NewError("0", "BindJSON failed ", err.Error()) return } - - req := &pbFriend.ImportFriendReq{} + req := &rpc.ImportFriendReq{} utils.CopyStructFields(req, params) var ok bool ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) @@ -76,10 +61,10 @@ func ImportFriend(c *gin.Context) { c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) return } - log.NewInfo(req.OperationID, "ImportFriend args ", req.String()) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) - client := pbFriend.NewFriendClient(etcdConn) + client := rpc.NewFriendClient(etcdConn) RpcResp, err := client.ImportFriend(context.Background(), req) if err != nil { log.NewError(req.OperationID, "ImportFriend failed", err.Error(), req.String()) @@ -87,28 +72,19 @@ func ImportFriend(c *gin.Context) { return } - failedUidList := make([]string, 0) - for _, v := range RpcResp.FailedUidList { - failedUidList = append(failedUidList, v) - } - resp := gin.H{"errCode": RpcResp.CommonResp.ErrCode, "errMsg": RpcResp.CommonResp.ErrMsg, "failedUidList": failedUidList} + resp := api.ImportFriendResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, Data: RpcResp.FailedFriendUserIDList} c.JSON(http.StatusOK, resp) - log.NewInfo(req.OperationID, "AddBlacklist api return ", resp) -} - -type paramsAddFriend struct { - paramsCommFriend - ReqMessage string `json:"reqMessage"` + log.NewInfo(req.OperationID, "ImportFriend api return ", resp) } func AddFriend(c *gin.Context) { - params := paramsAddFriend{} + params := api.AddFriendReq{} if err := c.BindJSON(¶ms); err != nil { log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &pbFriend.AddFriendReq{} + req := &rpc.AddFriendReq{} utils.CopyStructFields(req.CommID, params) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) @@ -117,11 +93,10 @@ func AddFriend(c *gin.Context) { c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) return } - req.ReqMessage = params.ReqMessage log.NewInfo("AddFriend args ", req.String()) etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) - client := pbFriend.NewFriendClient(etcdConn) + client := rpc.NewFriendClient(etcdConn) RpcResp, err := client.AddFriend(context.Background(), req) if err != nil { log.NewError(req.CommID.OperationID, "AddFriend failed ", err.Error(), req.String()) @@ -129,24 +104,19 @@ func AddFriend(c *gin.Context) { return } - resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg} + resp := api.AddFriendResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}} c.JSON(http.StatusOK, resp) log.NewInfo(req.CommID.OperationID, "AddFriend api return ", resp) } -type paramsAddFriendResponse struct { - paramsCommFriend - Flag int32 `json:"flag" binding:"required"` -} - func AddFriendResponse(c *gin.Context) { - params := paramsAddFriendResponse{} + params := api.AddFriendResponseReq{} if err := c.BindJSON(¶ms); err != nil { log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &pbFriend.AddFriendResponseReq{} + req := &rpc.AddFriendResponseReq{} utils.CopyStructFields(req.CommID, params) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) @@ -155,11 +125,11 @@ func AddFriendResponse(c *gin.Context) { c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) return } - req.Flag = params.Flag - + utils.CopyStructFields(&req, params) log.NewInfo(req.CommID.OperationID, "AddFriendResponse args ", req.String()) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) - client := pbFriend.NewFriendClient(etcdConn) + client := rpc.NewFriendClient(etcdConn) RpcResp, err := client.AddFriendResponse(context.Background(), req) if err != nil { log.NewError(req.CommID.OperationID, "AddFriendResponse failed ", err.Error(), req.String()) @@ -167,23 +137,19 @@ func AddFriendResponse(c *gin.Context) { return } - resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg} + resp := api.AddFriendResponseResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} c.JSON(http.StatusOK, resp) log.NewInfo(req.CommID.OperationID, "AddFriendResponse api return ", resp) } -type paramsDeleteFriend struct { - paramsCommFriend -} - func DeleteFriend(c *gin.Context) { - params := paramsDeleteFriend{} + params := api.DeleteFriendReq{} if err := c.BindJSON(¶ms); err != nil { log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &pbFriend.DeleteFriendReq{} + req := &rpc.DeleteFriendReq{} utils.CopyStructFields(req.CommID, params) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) @@ -195,7 +161,7 @@ func DeleteFriend(c *gin.Context) { log.NewInfo(req.CommID.OperationID, "DeleteFriend args ", req.String()) etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) - client := pbFriend.NewFriendClient(etcdConn) + client := rpc.NewFriendClient(etcdConn) RpcResp, err := client.DeleteFriend(context.Background(), req) if err != nil { log.NewError(req.CommID.OperationID, "DeleteFriend failed ", err, req.String()) @@ -203,34 +169,19 @@ func DeleteFriend(c *gin.Context) { return } - resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg} + resp := api.DeleteFriendResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} c.JSON(http.StatusOK, resp) - log.NewInfo(req.CommID.OperationID, "AddFriendResponse api return ", resp) -} - -type paramsGetBlackList struct { - paramsCommFriend -} - -type PublicUserInfo struct { - UserID string `json:"userID"` - Nickname string `json:"nickname"` - FaceUrl string `json:"faceUrl"` - Gender int32 `json:"gender"` -} - -type blackUserInfo struct { - PublicUserInfo + log.NewInfo(req.CommID.OperationID, "DeleteFriend api return ", resp) } func GetBlacklist(c *gin.Context) { - params := paramsGetBlackList{} + params := api.GetBlackListReq{} if err := c.BindJSON(¶ms); err != nil { log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &pbFriend.GetBlacklistReq{} + req := &rpc.GetBlacklistReq{} utils.CopyStructFields(req.CommID, params) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) @@ -239,10 +190,10 @@ func GetBlacklist(c *gin.Context) { c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) return } - log.NewInfo(req.CommID.OperationID, "GetBlacklist args ", req.String()) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) - client := pbFriend.NewFriendClient(etcdConn) + client := rpc.NewFriendClient(etcdConn) RpcResp, err := client.GetBlacklist(context.Background(), req) if err != nil { log.NewError(req.CommID.OperationID, "GetBlacklist failed ", err.Error(), req.String()) @@ -250,42 +201,22 @@ func GetBlacklist(c *gin.Context) { return } - if RpcResp.ErrCode == 0 { - userBlackList := make([]blackUserInfo, 0) - for _, friend := range RpcResp.Data { - var b blackUserInfo - utils.CopyStructFields(&b, friend) + resp := api.GetBlackListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}} + utils.CopyStructFields(&resp.BlackUserInfoList, RpcResp.BlackUserInfoList) + log.NewInfo(req.CommID.OperationID, "GetBlacklist api return ", resp) - userBlackList = append(userBlackList, b) - } - resp := gin.H{ - "errCode": RpcResp.ErrCode, - "errMsg": RpcResp.ErrMsg, - "data": userBlackList, - } - c.JSON(http.StatusOK, resp) - log.NewInfo(req.CommID.OperationID, "GetBlacklist api return ", resp) - } else { - resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg} - c.JSON(http.StatusOK, resp) - log.NewError(req.CommID.OperationID, "GetBlacklist api return ", resp) - } -} - -type paramsSetFriendComment struct { - paramsCommFriend - remark string `json:"remark" binding:"required"` } func SetFriendComment(c *gin.Context) { - params := paramsSetFriendComment{} + params := api.SetFriendCommentReq{} if err := c.BindJSON(¶ms); err != nil { log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &pbFriend.SetFriendCommentReq{} + req := &rpc.SetFriendCommentReq{} utils.CopyStructFields(req.CommID, params) + req.Remark = params.Remark var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { @@ -293,34 +224,29 @@ func SetFriendComment(c *gin.Context) { c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) return } - req.Remark = params.remark - log.NewInfo(req.CommID.OperationID, "SetFriendComment args ", req.String()) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) - client := pbFriend.NewFriendClient(etcdConn) + client := rpc.NewFriendClient(etcdConn) RpcResp, err := client.SetFriendComment(context.Background(), req) if err != nil { log.NewError(req.CommID.OperationID, "SetFriendComment failed ", err.Error(), req.String()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call set friend comment rpc server failed"}) return } - resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg} + resp := api.SetFriendCommentResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} c.JSON(http.StatusOK, resp) log.NewInfo(req.CommID.OperationID, "SetFriendComment api return ", resp) } -type paramsRemoveBlackList struct { - paramsCommFriend -} - func RemoveBlacklist(c *gin.Context) { - params := paramsRemoveBlackList{} + params := api.RemoveBlackListReq{} if err := c.BindJSON(¶ms); err != nil { log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &pbFriend.RemoveBlacklistReq{} + req := &rpc.RemoveBlacklistReq{} utils.CopyStructFields(req.CommID, params) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) @@ -332,31 +258,26 @@ func RemoveBlacklist(c *gin.Context) { log.NewInfo(req.CommID.OperationID, "RemoveBlacklist args ", req.String()) etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) - client := pbFriend.NewFriendClient(etcdConn) + client := rpc.NewFriendClient(etcdConn) RpcResp, err := client.RemoveBlacklist(context.Background(), req) if err != nil { log.NewError(req.CommID.OperationID, "RemoveBlacklist failed ", err.Error(), req.String()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call remove blacklist rpc server failed"}) return } - - resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg} + resp := api.RemoveBlackListResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} c.JSON(http.StatusOK, resp) - log.NewInfo(req.CommID.OperationID, "SetFriendComment api return ", resp) -} - -type paramsIsFriend struct { - paramsCommFriend + log.NewInfo(req.CommID.OperationID, "RemoveBlacklist api return ", resp) } func IsFriend(c *gin.Context) { - params := paramsIsFriend{} + params := api.IsFriendReq{} if err := c.BindJSON(¶ms); err != nil { log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &pbFriend.IsFriendReq{} + req := &rpc.IsFriendReq{} utils.CopyStructFields(req.CommID, params) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) @@ -368,96 +289,60 @@ func IsFriend(c *gin.Context) { log.NewInfo(req.CommID.OperationID, "IsFriend args ", req.String()) etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) - client := pbFriend.NewFriendClient(etcdConn) + client := rpc.NewFriendClient(etcdConn) RpcResp, err := client.IsFriend(context.Background(), req) if err != nil { log.NewError(req.CommID.OperationID, "IsFriend failed ", err.Error(), req.String()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call add friend rpc server failed"}) return } - resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg, "isFriend": RpcResp.ShipType} + resp := api.IsFriendResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, Response: RpcResp.Response} c.JSON(http.StatusOK, resp) log.NewInfo(req.CommID.OperationID, "IsFriend api return ", resp) } -type paramsSearchFriend struct { - paramsCommFriend -} - -func GetFriendsInfo(c *gin.Context) { - params := paramsSearchFriend{} - if err := c.BindJSON(¶ms); err != nil { - log.NewError("0", "BindJSON failed ", err.Error()) - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) - return - } - req := &pbFriend.GetFriendsInfoReq{} - utils.CopyStructFields(req.CommID, params) - var ok bool - ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) - if !ok { - log.NewError(req.CommID.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) - return - } - log.NewInfo(req.CommID.OperationID, "GetFriendsInfo args ", req.String()) - - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) - client := pbFriend.NewFriendClient(etcdConn) - RpcResp, err := client.GetFriendsInfo(context.Background(), req) - if err != nil { - log.NewError(req.CommID.OperationID, "GetFriendsInfo failed ", err.Error(), req.String()) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call search friend rpc server failed"}) - return - } - - if RpcResp.ErrCode == 0 { - var fi friendInfo - utils.CopyStructFields(&fi, RpcResp.Data.FriendUser) - utils.CopyStructFields(&fi, RpcResp.Data) - - resp := gin.H{ - "errCode": RpcResp.ErrCode, - "errMsg": RpcResp.ErrMsg, - "data": fi, - } - log.NewInfo(req.CommID.OperationID, "IsFriend api return ", resp) - c.JSON(http.StatusOK, resp) - } else { - resp := gin.H{ - "errCode": RpcResp.ErrCode, - "errMsg": RpcResp.ErrMsg, - } - log.NewInfo(req.CommID.OperationID, "IsFriend api return ", resp) - c.JSON(http.StatusOK, resp) - } -} - -type paramsGetFriendList struct { - paramsCommFriend -} - -type friendInfo struct { - UserID string `json:"userID"` - Nickname string `json:"nickname"` - FaceUrl string `json:"faceUrl"` - Gender int32 `json:"gender"` - Mobile string `json:"mobile"` - Birth string `json:"birth"` - Email string `json:"email"` - Ext string `json:"ext"` - Remark string `json:"remark"` - IsBlack int32 `json:"isBlack"` -} +// +//func GetFriendsInfo(c *gin.Context) { +// params := api.GetFriendsInfoReq{} +// if err := c.BindJSON(¶ms); err != nil { +// log.NewError("0", "BindJSON failed ", err.Error()) +// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) +// return +// } +// req := &rpc.GetFriendsInfoReq{} +// utils.CopyStructFields(req.CommID, params) +// var ok bool +// ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) +// if !ok { +// log.NewError(req.CommID.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) +// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) +// return +// } +// log.NewInfo(req.CommID.OperationID, "GetFriendsInfo args ", req.String()) +// +// etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) +// client := rpc.NewFriendClient(etcdConn) +// RpcResp, err := client.GetFriendsInfo(context.Background(), req) +// if err != nil { +// log.NewError(req.CommID.OperationID, "GetFriendsInfo failed ", err.Error(), req.String()) +// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call search friend rpc server failed"}) +// return +// } +// +// resp := api.GetFriendsInfoResp{CommResp:api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}} +// utils.CopyStructFields(&resp, RpcResp) +// c.JSON(http.StatusOK, resp) +// log.NewInfo(req.CommID.OperationID, "GetFriendsInfo api return ", resp) +//} func GetFriendList(c *gin.Context) { - params := paramsGetFriendList{} + params := api.GetFriendListReq{} if err := c.BindJSON(¶ms); err != nil { log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &pbFriend.GetFriendListReq{} + req := &rpc.GetFriendListReq{} utils.CopyStructFields(req.CommID, params) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) @@ -469,7 +354,7 @@ func GetFriendList(c *gin.Context) { log.NewInfo(req.CommID.OperationID, "GetFriendList args ", req.String()) etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) - client := pbFriend.NewFriendClient(etcdConn) + client := rpc.NewFriendClient(etcdConn) RpcResp, err := client.GetFriendList(context.Background(), req) if err != nil { log.NewError(req.CommID.OperationID, "GetFriendList failed ", err.Error(), req.String()) @@ -477,49 +362,19 @@ func GetFriendList(c *gin.Context) { return } - if RpcResp.ErrCode == 0 { - friendsInfo := make([]friendInfo, 0) - for _, friend := range RpcResp.Data { - - var fi friendInfo - utils.CopyStructFields(&fi, friend.FriendUser) - utils.CopyStructFields(&fi, RpcResp.Data) - friendsInfo = append(friendsInfo, fi) - } - resp := gin.H{ - "errCode": RpcResp.ErrCode, - "errMsg": RpcResp.ErrMsg, - "data": friendsInfo, - } - c.JSON(http.StatusOK, resp) - log.NewInfo(req.CommID.OperationID, "IsFriend api return ", resp) - } else { - resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg} - c.JSON(http.StatusOK, resp) - log.NewInfo(req.CommID.OperationID, "IsFriend api return ", resp) - } - -} - -type paramsGetApplyList struct { - paramsCommFriend -} - -type FriendApplicationUserInfo struct { - PublicUserInfo - ApplyTime int64 `json:"applyTime"` - ReqMessage string `json:"reqMessage` - Flag int32 `json:"flag"` + resp := api.GetFriendListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}} + utils.CopyStructFields(&resp, RpcResp) + log.NewInfo(req.CommID.OperationID, "GetFriendList api return ", resp) } func GetFriendApplyList(c *gin.Context) { - params := paramsGetApplyList{} + params := api.GetFriendApplyListReq{} if err := c.BindJSON(¶ms); err != nil { log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &pbFriend.GetFriendApplyReq{} + req := &rpc.GetFriendApplyListReq{} utils.CopyStructFields(req.CommID, params) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) @@ -531,7 +386,7 @@ func GetFriendApplyList(c *gin.Context) { log.NewInfo(req.CommID.OperationID, "GetFriendApplyList args ", req.String()) etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) - client := pbFriend.NewFriendClient(etcdConn) + client := rpc.NewFriendClient(etcdConn) RpcResp, err := client.GetFriendApplyList(context.Background(), req) if err != nil { @@ -540,32 +395,20 @@ func GetFriendApplyList(c *gin.Context) { return } - if RpcResp.ErrCode == 0 { - userInfoList := make([]FriendApplicationUserInfo, 0) - for _, applyUserinfo := range RpcResp.Data { - var un FriendApplicationUserInfo - utils.CopyStructFields(&un, applyUserinfo.UserInfo) - utils.CopyStructFields(&un, applyUserinfo) - userInfoList = append(userInfoList, un) - } - resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg, "data": userInfoList} - c.JSON(http.StatusOK, resp) - log.NewInfo(req.CommID.OperationID, "IsFriend api return ", resp) - } else { - resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg} - c.JSON(http.StatusOK, resp) - log.NewInfo(req.CommID.OperationID, "IsFriend api return ", resp) - } + resp := api.GetFriendApplyListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}} + utils.CopyStructFields(&resp, RpcResp) + log.NewInfo(req.CommID.OperationID, "GetFriendApplyList api return ", resp) + } func GetSelfApplyList(c *gin.Context) { - params := paramsGetApplyList{} + params := api.GetSelfApplyListReq{} if err := c.BindJSON(¶ms); err != nil { log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &pbFriend.GetFriendApplyReq{} + req := &rpc.GetSelfApplyListReq{} utils.CopyStructFields(req.CommID, params) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) @@ -577,7 +420,7 @@ func GetSelfApplyList(c *gin.Context) { log.NewInfo(req.CommID.OperationID, "GetSelfApplyList args ", req.String()) etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) - client := pbFriend.NewFriendClient(etcdConn) + client := rpc.NewFriendClient(etcdConn) RpcResp, err := client.GetSelfApplyList(context.Background(), req) if err != nil { log.NewError(req.CommID.OperationID, "GetSelfApplyList failed ", err.Error(), req.String()) @@ -585,20 +428,9 @@ func GetSelfApplyList(c *gin.Context) { return } - if RpcResp.ErrCode == 0 { - userInfoList := make([]FriendApplicationUserInfo, 0) - for _, applyUserinfo := range RpcResp.Data { - var un FriendApplicationUserInfo - utils.CopyStructFields(&un, applyUserinfo.UserInfo) - utils.CopyStructFields(&un, applyUserinfo) - userInfoList = append(userInfoList, un) - } - resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg, "data": userInfoList} - c.JSON(http.StatusOK, resp) - log.NewInfo(req.CommID.OperationID, "IsFriend api return ", resp) - } else { - resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg} - c.JSON(http.StatusOK, resp) - log.NewInfo(req.CommID.OperationID, "IsFriend api return ", resp) - } + resp := api.GetSelfApplyListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}} + utils.CopyStructFields(resp, RpcResp) + c.JSON(http.StatusOK, resp) + log.NewInfo(req.CommID.OperationID, "GetSelfApplyList api return ", resp) + } diff --git a/internal/api/group/group.go b/internal/api/group/group.go index 10ddf9ddd..860350173 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -1,791 +1,478 @@ package group import ( + api "Open_IM/pkg/base_info" "Open_IM/pkg/common/config" "Open_IM/pkg/common/log" "Open_IM/pkg/common/token_verify" "Open_IM/pkg/grpc-etcdv3/getcdv3" - pb "Open_IM/pkg/proto/group" + rpc "Open_IM/pkg/proto/group" + "Open_IM/pkg/utils" "context" - "fmt" "github.com/gin-gonic/gin" "net/http" "strings" ) -type InviteUserToGroupReq struct { - GroupID string `json:"groupID" binding:"required"` - UidList []string `json:"uidList" binding:"required"` - Reason string `json:"reason"` - OperationID string `json:"operationID" binding:"required"` -} - -type GetJoinedGroupListReq struct { - OperationID string `json:"operationID" binding:"required"` -} - -type KickGroupMemberReq struct { - GroupID string `json:"groupID"` - UidListInfo []*pb.GroupMemberFullInfo `json:"uidListInfo" binding:"required"` - Reason string `json:"reason"` - OperationID string `json:"operationID" binding:"required"` -} - func KickGroupMember(c *gin.Context) { - - params := KickGroupMemberReq{} + params := api.KickGroupMemberReq{} if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &pb.KickGroupMemberReq{ - OperationID: params.OperationID, - GroupID: params.GroupID, - Token: c.Request.Header.Get("token"), - - UidListInfo: params.UidListInfo, + req := &rpc.KickGroupMemberReq{} + utils.CopyStructFields(req, params) + var ok bool + ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + if !ok { + log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) + return } - log.Info(req.Token, req.OperationID, "recv req: ", req.String()) + + log.NewInfo(req.OperationID, "KickGroupMember args ", req.String()) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) - client := pb.NewGroupClient(etcdConn) + client := rpc.NewGroupClient(etcdConn) RpcResp, err := client.KickGroupMember(context.Background(), req) if err != nil { - log.Error(req.Token, req.OperationID, "GetGroupMemberList failed, err: ", err.Error()) + log.NewError(req.OperationID, "GetGroupMemberList failed ", err.Error()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) return } - type KickGroupMemberResp struct { - ErrorCode int32 `json:"errCode"` - ErrorMsg string `json:"errMsg"` - Data []Id2Result `json:"data"` - } - - var memberListResp KickGroupMemberResp - memberListResp.ErrorMsg = RpcResp.ErrorMsg - memberListResp.ErrorCode = RpcResp.ErrorCode - for _, v := range RpcResp.Id2Result { - memberListResp.Data = append(memberListResp.Data, - Id2Result{UId: v.UId, - Result: v.Result}) + var memberListResp api.KickGroupMemberResp + memberListResp.ErrMsg = RpcResp.ErrMsg + memberListResp.ErrCode = RpcResp.ErrCode + for _, v := range RpcResp.Id2ResultList { + memberListResp.Data = append(memberListResp.Data, &api.Id2Result{UserID: v.UserID, Result: v.Result}) } + log.NewInfo(req.OperationID, "KickGroupMember api return ", memberListResp) c.JSON(http.StatusOK, memberListResp) } -type GetGroupMembersInfoReq struct { - GroupID string `json:"groupID"` - MemberList []string `json:"memberList"` - OperationID string `json:"operationID"` -} -type GetGroupMembersInfoResp struct { - ErrorCode int32 `json:"errCode"` - ErrorMsg string `json:"errMsg"` - Data []MemberResult `json:"data"` -} - func GetGroupMembersInfo(c *gin.Context) { - log.Info("", "", "GetGroupMembersInfo start....") - - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) - client := pb.NewGroupClient(etcdConn) - - params := GetGroupMembersInfoReq{} + params := api.GetGroupMembersInfoReq{} if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - - req := &pb.GetGroupMembersInfoReq{ - OperationID: params.OperationID, - GroupID: params.GroupID, - MemberList: params.MemberList, - Token: c.Request.Header.Get("token"), + req := &rpc.GetGroupMembersInfoReq{} + utils.CopyStructFields(req, params) + var ok bool + ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + if !ok { + log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) + return } - log.Info(req.Token, req.OperationID, "recv req: ", len(params.MemberList)) + log.NewInfo(req.OperationID, "GetGroupMembersInfo args ", req.String()) + + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) + client := rpc.NewGroupClient(etcdConn) RpcResp, err := client.GetGroupMembersInfo(context.Background(), req) if err != nil { - log.Error(req.Token, req.OperationID, "GetGroupMemberList failed, err: ", err.Error()) + log.NewError(req.OperationID, "GetGroupMemberList failed ", err.Error(), req.String()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) return } - var memberListResp GetGroupMembersInfoResp - memberListResp.ErrorMsg = RpcResp.ErrorMsg - memberListResp.ErrorCode = RpcResp.ErrorCode - for _, v := range RpcResp.MemberList { - memberListResp.Data = append(memberListResp.Data, - MemberResult{GroupId: req.GroupID, - UserId: v.UserId, - Role: v.Role, - JoinTime: uint64(v.JoinTime), - Nickname: v.NickName, - FaceUrl: v.FaceUrl}) - } + memberListResp := api.GetGroupMembersInfoResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, Data: RpcResp.MemberList} + log.NewInfo(req.OperationID, "GetGroupMembersInfo api return ", memberListResp) c.JSON(http.StatusOK, memberListResp) } -type GetGroupMemberListReq struct { - GroupID string `json:"groupID"` - Filter int32 `json:"filter"` - NextSeq int32 `json:"nextSeq"` - OperationID string `json:"operationID"` -} -type getGroupAllMemberReq struct { - GroupID string `json:"groupID"` - OperationID string `json:"operationID"` -} - -type MemberResult struct { - GroupId string `json:"groupID"` - UserId string `json:"userId"` - Role int32 `json:"role"` - JoinTime uint64 `json:"joinTime"` - Nickname string `json:"nickName"` - FaceUrl string `json:"faceUrl"` -} - func GetGroupMemberList(c *gin.Context) { - log.Info("", "", "GetGroupMemberList start....") - - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) - client := pb.NewGroupClient(etcdConn) - - params := GetGroupMemberListReq{} + params := api.GetGroupMemberListReq{} if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &pb.GetGroupMemberListReq{ - OperationID: params.OperationID, - Filter: params.Filter, - NextSeq: params.NextSeq, - GroupID: params.GroupID, - Token: c.Request.Header.Get("token"), + req := &rpc.GetGroupMemberListReq{} + utils.CopyStructFields(req, params) + var ok bool + ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + if !ok { + log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) + return } - log.Info(req.Token, req.OperationID, "recv req: ", req.String()) + log.NewInfo(req.OperationID, "GetGroupMemberList args ", req.String()) + + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) + client := rpc.NewGroupClient(etcdConn) + RpcResp, err := client.GetGroupMemberList(context.Background(), req) if err != nil { - log.Error(req.Token, req.OperationID, "GetGroupMemberList failed, err: ", err.Error()) + log.NewError(req.OperationID, "GetGroupMemberList failed, ", err.Error(), req.String()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) return } - type GetGroupMemberListResp struct { - ErrorCode int32 `json:"errCode"` - ErrorMsg string `json:"errMsg"` - NextSeq int32 `json:"nextSeq"` - Data []MemberResult `json:"data"` - } - - var memberListResp GetGroupMemberListResp - memberListResp.ErrorMsg = RpcResp.ErrorMsg - memberListResp.ErrorCode = RpcResp.ErrorCode - memberListResp.NextSeq = RpcResp.NextSeq - for _, v := range RpcResp.MemberList { - memberListResp.Data = append(memberListResp.Data, - MemberResult{GroupId: req.GroupID, - UserId: v.UserId, - Role: v.Role, - JoinTime: uint64(v.JoinTime), - Nickname: v.NickName, - FaceUrl: v.FaceUrl}) - } + memberListResp := api.GetGroupMemberListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, Data: RpcResp.MemberList, NextSeq: RpcResp.NextSeq} c.JSON(http.StatusOK, memberListResp) - + log.NewInfo(req.OperationID, "GetGroupMemberList api return ", memberListResp) } func GetGroupAllMember(c *gin.Context) { - log.Info("", "", "GetGroupAllMember start....") - - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) - client := pb.NewGroupClient(etcdConn) - - params := getGroupAllMemberReq{} + params := api.GetGroupAllMemberReq{} if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &pb.GetGroupAllMemberReq{ - GroupID: params.GroupID, - OperationID: params.OperationID, - Token: c.Request.Header.Get("token"), + req := &rpc.GetGroupAllMemberReq{} + utils.CopyStructFields(req, params) + var ok bool + ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + if !ok { + log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) + return } - log.Info(req.Token, req.OperationID, "recv req: ", req.String()) + log.NewInfo(req.OperationID, "GetGroupAllMember args ", req.String()) + + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) + client := rpc.NewGroupClient(etcdConn) RpcResp, err := client.GetGroupAllMember(context.Background(), req) if err != nil { - log.Error(req.Token, req.OperationID, "GetGroupAllMember failed, err: ", err.Error()) + log.NewError(req.OperationID, "GetGroupAllMember failed ", err.Error(), req.String()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) return } - type GetGroupMemberListResp struct { - ErrorCode int32 `json:"errCode"` - ErrorMsg string `json:"errMsg"` - Data []MemberResult `json:"data"` - } - - var memberListResp GetGroupMemberListResp - memberListResp.ErrorMsg = RpcResp.ErrorMsg - memberListResp.ErrorCode = RpcResp.ErrorCode - for _, v := range RpcResp.MemberList { - memberListResp.Data = append(memberListResp.Data, - MemberResult{GroupId: req.GroupID, - UserId: v.UserId, - Role: v.Role, - JoinTime: uint64(v.JoinTime), - Nickname: v.NickName, - FaceUrl: v.FaceUrl}) - } + memberListResp := api.GetGroupAllMemberResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, Data: RpcResp.MemberList} c.JSON(http.StatusOK, memberListResp) -} - -type groupResult struct { - GroupId string `json:"groupId"` - GroupName string `json:"groupName"` - Notification string `json:"notification"` - Introduction string `json:"introduction"` - FaceUrl string `json:"faceUrl"` - OwnerId string `json:"ownerId"` - CreateTime uint64 `json:"createTime"` - MemberCount uint32 `json:"memberCount"` + log.NewInfo(req.OperationID, "GetGroupAllMember api return ", memberListResp) } func GetJoinedGroupList(c *gin.Context) { - log.Info("", "", "GetJoinedGroupList start....") - - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) - fmt.Println("config: ", etcdConn, config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) - client := pb.NewGroupClient(etcdConn) - - params := GetJoinedGroupListReq{} + params := api.GetJoinedGroupListReq{} if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &pb.GetJoinedGroupListReq{ - OperationID: params.OperationID, - Token: c.Request.Header.Get("token"), + req := &rpc.GetJoinedGroupListReq{} + utils.CopyStructFields(req, params) + var ok bool + ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + if !ok { + log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) + return } - log.Info(req.Token, req.OperationID, "recv req: ", req.String()) + log.NewInfo(req.OperationID, "GetJoinedGroupList args ", req.String()) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) + client := rpc.NewGroupClient(etcdConn) RpcResp, err := client.GetJoinedGroupList(context.Background(), req) if err != nil { - log.Error(req.Token, req.OperationID, "GetJoinedGroupList failed, err: ", err.Error()) + log.NewError(req.OperationID, "GetJoinedGroupList failed ", err.Error(), req.String()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) return } - log.Info(req.Token, req.OperationID, "GetJoinedGroupList: ", RpcResp) - type GetJoinedGroupListResp struct { - ErrorCode int32 `json:"errCode"` - ErrorMsg string `json:"errMsg"` - Data []groupResult `json:"data"` - } - - var GroupListResp GetJoinedGroupListResp - GroupListResp.ErrorCode = RpcResp.ErrorCode - GroupListResp.ErrorMsg = RpcResp.ErrorMsg - for _, v := range RpcResp.GroupList { - GroupListResp.Data = append(GroupListResp.Data, - groupResult{GroupId: v.GroupId, GroupName: v.GroupName, - Notification: v.Notification, - Introduction: v.Introduction, - FaceUrl: v.FaceUrl, - OwnerId: v.OwnerId, - CreateTime: v.CreateTime, - MemberCount: v.MemberCount}) - } + GroupListResp := api.GetJoinedGroupListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, Data: RpcResp.GroupList} c.JSON(http.StatusOK, GroupListResp) -} - -type Id2Result struct { - UId string `json:"uid"` - Result int32 `json:"result"` + log.NewInfo(req.OperationID, "GetJoinedGroupList api return ", GroupListResp) } func InviteUserToGroup(c *gin.Context) { - log.Info("", "", "InviteUserToGroup start....") - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) - client := pb.NewGroupClient(etcdConn) - - params := InviteUserToGroupReq{} + params := api.InviteUserToGroupReq{} if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &pb.InviteUserToGroupReq{ - OperationID: params.OperationID, - GroupID: params.GroupID, - Reason: params.Reason, - UidList: params.UidList, - Token: c.Request.Header.Get("token"), + req := &rpc.InviteUserToGroupReq{} + utils.CopyStructFields(req, params) + var ok bool + ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + if !ok { + log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) + return } - log.Info(req.Token, req.OperationID, "recv req: ", req.String()) + log.NewInfo(req.OperationID, "InviteUserToGroup args ", req.String()) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) + client := rpc.NewGroupClient(etcdConn) RpcResp, err := client.InviteUserToGroup(context.Background(), req) if err != nil { - log.Error(req.Token, req.OperationID, "InviteUserToGroup failed, err: ", err.Error()) + log.NewError(req.OperationID, "InviteUserToGroup failed ", err.Error(), req.String()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) return } - type InviteUserToGroupResp struct { - ErrorCode int32 `json:"errCode"` - ErrorMsg string `json:"errMsg"` - I2R []Id2Result `json:"data"` + Resp := api.InviteUserToGroupResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}} + for _, v := range RpcResp.Id2ResultList { + Resp.Data = append(Resp.Data, api.Id2Result{UserID: v.UserID, Result: v.Result}) } - - var iResp InviteUserToGroupResp - iResp.ErrorMsg = RpcResp.ErrorMsg - iResp.ErrorCode = RpcResp.ErrorCode - for _, v := range RpcResp.Id2Result { - iResp.I2R = append(iResp.I2R, Id2Result{UId: v.UId, Result: v.Result}) - } - - //resp := gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg, "data": RpcResp.Id2Result} - c.JSON(http.StatusOK, iResp) -} - -type paramsCreateGroupStruct struct { - MemberList []*pb.GroupAddMemberInfo `json:"memberList"` - GroupName string `json:"groupName"` - Introduction string `json:"introduction"` - Notification string `json:"notification"` - FaceUrl string `json:"faceUrl"` - OperationID string `json:"operationID" binding:"required"` - Ex string `json:"ex"` + c.JSON(http.StatusOK, Resp) + log.NewInfo(req.OperationID, "InviteUserToGroup api return ", Resp) } func CreateGroup(c *gin.Context) { - log.Info("", "", "api create group init ....") - - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) - client := pb.NewGroupClient(etcdConn) - //defer etcdConn.Close() - - params := paramsCreateGroupStruct{} + params := api.CreateGroupReq{} if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &pb.CreateGroupReq{ - MemberList: params.MemberList, - GroupName: params.GroupName, - Introduction: params.Introduction, - Notification: params.Notification, - FaceUrl: params.FaceUrl, - OperationID: params.OperationID, - Ex: params.Ex, - Token: c.Request.Header.Get("token"), + req := &rpc.CreateGroupReq{} + utils.CopyStructFields(req, params) + var ok bool + ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + if !ok { + log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) + return } - log.Info(req.Token, req.OperationID, "api create group is server,params=%s", req.String()) + log.NewInfo(req.OperationID, "CreateGroup args ", req.String()) + + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) + client := rpc.NewGroupClient(etcdConn) RpcResp, err := client.CreateGroup(context.Background(), req) if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,call create group rpc server failed", err.Error()) + log.NewError(req.OperationID, "CreateGroup failed", err.Error(), req.String()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) return } - log.InfoByArgs("call create group rpc server success,args=%s", RpcResp.String()) - if RpcResp.ErrorCode == 0 { - resp := gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg, "data": gin.H{"groupID": RpcResp.GroupID}} + + if RpcResp.ErrCode == 0 { + resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg, "data": gin.H{"groupInfo": RpcResp.GroupInfo}} c.JSON(http.StatusOK, resp) } else { - c.JSON(http.StatusOK, gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg}) + c.JSON(http.StatusOK, gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg}) } - log.InfoByArgs("api create group success return,get args=%s,return args=%s", req.String(), RpcResp.String()) -} - -type paramsGroupApplicationList struct { - OperationID string `json:"operationID" binding:"required"` -} - -func newUserRegisterReq(params *paramsGroupApplicationList) *group.GetGroupApplicationListReq { - pbData := group.GetGroupApplicationListReq{ - OperationID: params.OperationID, - } - return &pbData -} - -type paramsGroupApplicationListRet struct { - ID string `json:"id"` - GroupID string `json:"groupID"` - FromUserID string `json:"fromUserID"` - ToUserID string `json:"toUserID"` - Flag int32 `json:"flag"` - RequestMsg string `json:"reqMsg"` - HandledMsg string `json:"handledMsg"` - AddTime int64 `json:"createTime"` - FromUserNickname string `json:"fromUserNickName"` - ToUserNickname string `json:"toUserNickName"` - FromUserFaceUrl string `json:"fromUserFaceURL"` - ToUserFaceUrl string `json:"toUserFaceURL"` - HandledUser string `json:"handledUser"` - Type int32 `json:"type"` - HandleStatus int32 `json:"handleStatus"` - HandleResult int32 `json:"handleResult"` + log.NewInfo(req.OperationID, "InviteUserToGroup api return ", RpcResp) } +//my application 我发出去的 func GetGroupApplicationList(c *gin.Context) { - log.Info("", "", "api GetGroupApplicationList init ....") - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) - client := group.NewGroupClient(etcdConn) - //defer etcdConn.Close() - - params := paramsGroupApplicationList{} + params := api.GetGroupApplicationListReq{} if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - pbData := newUserRegisterReq(¶ms) - - token := c.Request.Header.Get("token") - if claims, err := token_verify.ParseToken(token); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "token validate err"}) + req := &rpc.GetGroupApplicationListReq{} + utils.CopyStructFields(req, params) + var ok bool + ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + if !ok { + log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) return - } else { - pbData.UID = claims.UID } + log.NewInfo(req.OperationID, "GetGroupApplicationList args ", req.String()) - log.Info("", "", "api GetGroupApplicationList is server, [data: %s]", pbData.String()) - reply, err := client.GetGroupApplicationList(context.Background(), pbData) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) + client := rpc.NewGroupClient(etcdConn) + + reply, err := client.GetGroupApplicationList(context.Background(), req) if err != nil { - log.Error("", "", "api GetGroupApplicationList call rpc fail, [data: %s] [err: %s]", pbData.String(), err.Error()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) return } - log.Info("", "", "api GetGroupApplicationList call rpc success, [data: %s] [reply: %s]", pbData.String(), reply.String()) - unProcessCount := 0 - userReq := make([]paramsGroupApplicationListRet, 0) - if reply != nil && reply.Data != nil && reply.Data.User != nil { - for i := 0; i < len(reply.Data.User); i++ { - req := paramsGroupApplicationListRet{} - req.ID = reply.Data.User[i].ID - req.GroupID = reply.Data.User[i].GroupID - req.FromUserID = reply.Data.User[i].FromUserID - req.ToUserID = reply.Data.User[i].ToUserID - req.Flag = reply.Data.User[i].Flag - req.RequestMsg = reply.Data.User[i].RequestMsg - req.HandledMsg = reply.Data.User[i].HandledMsg - req.AddTime = reply.Data.User[i].AddTime - req.FromUserNickname = reply.Data.User[i].FromUserNickname - req.ToUserNickname = reply.Data.User[i].ToUserNickname - req.FromUserFaceUrl = reply.Data.User[i].FromUserFaceUrl - req.ToUserFaceUrl = reply.Data.User[i].ToUserFaceUrl - req.HandledUser = reply.Data.User[i].HandledUser - req.Type = reply.Data.User[i].Type - req.HandleStatus = reply.Data.User[i].HandleStatus - req.HandleResult = reply.Data.User[i].HandleResult - userReq = append(userReq, req) - - if req.Flag == 0 { - unProcessCount++ - } - } - } - - c.JSON(http.StatusOK, gin.H{ - "errCode": reply.ErrCode, - "errMsg": reply.ErrMsg, - "data": gin.H{ - "count": unProcessCount, - "user": userReq, - }, - }) - -} - -type paramsGetGroupInfo struct { - GroupIDList []string `json:"groupIDList" binding:"required"` - OperationID string `json:"operationID" binding:"required"` + resp := api.GetGroupApplicationListResp{CommResp: api.CommResp{ErrCode: reply.ErrCode, ErrMsg: reply.ErrMsg}, Data: reply.GroupRequestList} + c.JSON(http.StatusOK, resp) + log.NewInfo(req.OperationID, "GetGroupApplicationList api return ", resp) } func GetGroupsInfo(c *gin.Context) { - log.Info("", "", "api get groups info init ....") - - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) - client := pb.NewGroupClient(etcdConn) - //defer etcdConn.Close() - - params := paramsGetGroupInfo{} + params := api.GetGroupInfoReq{} if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &pb.GetGroupsInfoReq{ - GroupIDList: params.GroupIDList, - Token: c.Request.Header.Get("token"), - OperationID: params.OperationID, + req := &rpc.GetGroupsInfoReq{} + utils.CopyStructFields(req, params) + var ok bool + ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + if !ok { + log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) + return } - log.Info(req.Token, req.OperationID, "get groups info is server,params=%s", req.String()) + log.NewInfo(req.OperationID, "GetGroupsInfo args ", req.String()) + + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) + client := rpc.NewGroupClient(etcdConn) RpcResp, err := client.GetGroupsInfo(context.Background(), req) if err != nil { - log.Error(req.Token, req.OperationID, "call get groups info rpc server failed,err=%s", err.Error()) + log.NewError(req.OperationID, "GetGroupsInfo failed ", err.Error(), req.String()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) return } - log.InfoByArgs("call get groups info rpc server success", RpcResp.String()) - if RpcResp.ErrorCode == 0 { - groupsInfo := make([]pb.GroupInfo, 0) - for _, v := range RpcResp.Data { - var groupInfo pb.GroupInfo - groupInfo.GroupId = v.GroupId - groupInfo.GroupName = v.GroupName - groupInfo.Notification = v.Notification - groupInfo.Introduction = v.Introduction - groupInfo.FaceUrl = v.FaceUrl - groupInfo.CreateTime = v.CreateTime - groupInfo.OwnerId = v.OwnerId - groupInfo.MemberCount = v.MemberCount - groupsInfo = append(groupsInfo, groupInfo) - } - c.JSON(http.StatusOK, gin.H{ - "errCode": RpcResp.ErrorCode, - "errMsg": RpcResp.ErrorMsg, - "data": groupsInfo, - }) - } else { - c.JSON(http.StatusOK, gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg}) - } -} - -type paramsGroupApplicationResponse struct { - OperationID string `json:"operationID" binding:"required"` - GroupID string `json:"groupID" binding:"required"` - FromUserID string `json:"fromUserID" binding:"required"` - FromUserNickName string `json:"fromUserNickName"` - FromUserFaceUrl string `json:"fromUserFaceUrl"` - ToUserID string `json:"toUserID" binding:"required"` - ToUserNickName string `json:"toUserNickName"` - ToUserFaceUrl string `json:"toUserFaceUrl"` - AddTime int64 `json:"addTime"` - RequestMsg string `json:"requestMsg"` - HandledMsg string `json:"handledMsg"` - Type int32 `json:"type"` - HandleStatus int32 `json:"handleStatus"` - HandleResult int32 `json:"handleResult"` - - UserID string `json:"userID"` -} - -func newGroupApplicationResponse(params *paramsGroupApplicationResponse) *group.GroupApplicationResponseReq { - pbData := group.GroupApplicationResponseReq{ - OperationID: params.OperationID, - GroupID: params.GroupID, - FromUserID: params.FromUserID, - FromUserNickName: params.FromUserNickName, - FromUserFaceUrl: params.FromUserFaceUrl, - ToUserID: params.ToUserID, - ToUserNickName: params.ToUserNickName, - ToUserFaceUrl: params.ToUserFaceUrl, - AddTime: params.AddTime, - RequestMsg: params.RequestMsg, - HandledMsg: params.HandledMsg, - Type: params.Type, - HandleStatus: params.HandleStatus, - HandleResult: params.HandleResult, - } - return &pbData + resp := api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg} + c.JSON(http.StatusOK, resp) + log.NewInfo(req.OperationID, "GetGroupsInfo api return ", resp) } +//process application func ApplicationGroupResponse(c *gin.Context) { - log.Info("", "", "api GroupApplicationResponse init ....") - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) - client := group.NewGroupClient(etcdConn) - //defer etcdConn.Close() - - params := paramsGroupApplicationResponse{} + params := api.ApplicationGroupResponseReq{} if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - pbData := newGroupApplicationResponse(¶ms) - - token := c.Request.Header.Get("token") - if claims, err := token_verify.ParseToken(token); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "token validate err"}) + req := &rpc.GroupApplicationResponseReq{} + utils.CopyStructFields(req, params) + var ok bool + ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + if !ok { + log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) return - } else { - pbData.OwnerID = claims.UID } + log.NewInfo(req.OperationID, "ApplicationGroupResponse args ", req.String()) - log.Info("", "", "api GroupApplicationResponse is server, [data: %s]", pbData.String()) - reply, err := client.GroupApplicationResponse(context.Background(), pbData) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) + client := rpc.NewGroupClient(etcdConn) + reply, err := client.GroupApplicationResponse(context.Background(), req) if err != nil { - log.Error("", "", "api GroupApplicationResponse call rpc fail, [data: %s] [err: %s]", pbData.String(), err.Error()) + log.NewError(req.OperationID, "GroupApplicationResponse failed ", req.String()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) return } - log.Info("", "", "api GroupApplicationResponse call rpc success, [data: %s] [reply: %s]", pbData.String(), reply.String()) - c.JSON(http.StatusOK, gin.H{ - "errCode": reply.ErrCode, - "errMsg": reply.ErrMsg, - }) - -} - -type paramsJoinGroup struct { - GroupID string `json:"groupID" binding:"required"` - Message string `json:"message"` - OperationID string `json:"operationID" binding:"required"` + resp := api.CommResp{ErrCode: reply.ErrCode, ErrMsg: reply.ErrMsg} + c.JSON(http.StatusOK, resp) + log.NewInfo(req.OperationID, "ApplicationGroupResponse api return ", resp) } func JoinGroup(c *gin.Context) { - log.Info("", "", "api join group init....") - - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) - client := pb.NewGroupClient(etcdConn) - //defer etcdConn.Close() - - params := paramsJoinGroup{} + params := api.JoinGroupReq{} if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &pb.JoinGroupReq{ - GroupID: params.GroupID, - Message: params.Message, - Token: c.Request.Header.Get("token"), - OperationID: params.OperationID, + req := &rpc.JoinGroupReq{} + utils.CopyStructFields(req, params) + var ok bool + ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + if !ok { + log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) + return } - log.Info(req.Token, req.OperationID, "api join group is server,params=%s", req.String()) + log.NewInfo(req.OperationID, "JoinGroup args ", req.String()) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) + client := rpc.NewGroupClient(etcdConn) + RpcResp, err := client.JoinGroup(context.Background(), req) if err != nil { - log.Error(req.Token, req.OperationID, "call join group rpc server failed,err=%s", err.Error()) + log.NewError(req.OperationID, "JoinGroup failed ", err.Error(), req.String()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) return } - log.InfoByArgs("call join group rpc server success,args=%s", RpcResp.String()) - c.JSON(http.StatusOK, gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg}) -} - -type paramsQuitGroup struct { - GroupID string `json:"groupID" binding:"required"` - OperationID string `json:"operationID" binding:"required"` + resp := api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg} + c.JSON(http.StatusOK, resp) + log.NewInfo("JoinGroup api return", RpcResp.String()) } func QuitGroup(c *gin.Context) { - log.Info("", "", "api quit group init ....") - - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) - client := pb.NewGroupClient(etcdConn) - //defer etcdConn.Close() - - params := paramsQuitGroup{} + params := api.QuitGroupReq{} if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &pb.QuitGroupReq{ - GroupID: params.GroupID, - OperationID: params.OperationID, - Token: c.Request.Header.Get("token"), + req := &rpc.QuitGroupReq{} + utils.CopyStructFields(req, params) + var ok bool + ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + if !ok { + log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) + return } - log.Info(req.Token, req.OperationID, "api quit group is server,params=%s", req.String()) + log.NewInfo(req.OperationID, "QuitGroup args ", req.String()) + + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) + client := rpc.NewGroupClient(etcdConn) RpcResp, err := client.QuitGroup(context.Background(), req) if err != nil { - log.Error(req.Token, req.OperationID, "call quit group rpc server failed,err=%s", err.Error()) + log.NewError(req.OperationID, "call quit group rpc server failed,err=%s", err.Error()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) return } - log.InfoByArgs("call quit group rpc server success,args=%s", RpcResp.String()) - c.JSON(http.StatusOK, gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg}) - log.InfoByArgs("api quit group success return,get args=%s,return args=%s", req.String(), RpcResp.String()) -} - -type paramsSetGroupInfo struct { - GroupID string `json:"groupId" binding:"required"` - GroupName string `json:"groupName"` - Notification string `json:"notification"` - Introduction string `json:"introduction"` - FaceUrl string `json:"faceUrl"` - OperationID string `json:"operationID" binding:"required"` + resp := api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg} + c.JSON(http.StatusOK, resp) + log.NewInfo("QuitGroup api return", RpcResp.String()) } func SetGroupInfo(c *gin.Context) { - log.Info("", "", "api set group info init...") - - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) - client := pb.NewGroupClient(etcdConn) - //defer etcdConn.Close() - - params := paramsSetGroupInfo{} + params := api.SetGroupInfoReq{} if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &pb.SetGroupInfoReq{ - GroupID: params.GroupID, - GroupName: params.GroupName, - Notification: params.Notification, - Introduction: params.Introduction, - FaceUrl: params.FaceUrl, - Token: c.Request.Header.Get("token"), - OperationID: params.OperationID, + req := &rpc.SetGroupInfoReq{} + utils.CopyStructFields(req, params) + var ok bool + ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + if !ok { + log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) + return } - log.Info(req.Token, req.OperationID, "api set group info is server,params=%s", req.String()) + log.NewInfo(req.OperationID, "SetGroupInfo args ", req.String()) + + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) + client := rpc.NewGroupClient(etcdConn) RpcResp, err := client.SetGroupInfo(context.Background(), req) if err != nil { - log.Error(req.Token, req.OperationID, "call set group info rpc server failed,err=%s", err.Error()) + log.NewError(req.OperationID, "SetGroupInfo failed ", err.Error(), req.String()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) return } - log.InfoByArgs("call set group info rpc server success,args=%s", RpcResp.String()) - c.JSON(http.StatusOK, gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg}) -} - -type paramsTransferGroupOwner struct { - OperationID string `json:"operationID" binding:"required"` - GroupID string `json:"groupID" binding:"required"` - UID string `json:"uid" binding:"required"` -} - -func newTransferGroupOwnerReq(params *paramsTransferGroupOwner) *group.TransferGroupOwnerReq { - pbData := group.TransferGroupOwnerReq{ - OperationID: params.OperationID, - GroupID: params.GroupID, - NewOwner: params.UID, - } - return &pbData + resp := api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg} + c.JSON(http.StatusOK, resp) + log.NewInfo(req.OperationID, "SetGroupInfo api return ", resp) } func TransferGroupOwner(c *gin.Context) { - log.Info("", "", "api TransferGroupOwner init ....") - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) - client := group.NewGroupClient(etcdConn) - //defer etcdConn.Close() - - params := paramsTransferGroupOwner{} + params := api.TransferGroupOwnerReq{} if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - pbData := newTransferGroupOwnerReq(¶ms) - - token := c.Request.Header.Get("token") - if claims, err := token_verify.ParseToken(token); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "token validate err"}) + req := &rpc.TransferGroupOwnerReq{} + utils.CopyStructFields(req, params) + var ok bool + ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + if !ok { + log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) return - } else { - pbData.OldOwner = claims.UID } + log.NewInfo(req.OperationID, "TransferGroupOwner args ", req.String()) - log.Info("", "", "api TransferGroupOwner is server, [data: %s]", pbData.String()) - reply, err := client.TransferGroupOwner(context.Background(), pbData) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) + client := rpc.NewGroupClient(etcdConn) + reply, err := client.TransferGroupOwner(context.Background(), req) if err != nil { - log.Error("", "", "api TransferGroupOwner call rpc fail, [data: %s] [err: %s]", pbData.String(), err.Error()) + log.NewError(req.OperationID, "TransferGroupOwner failed ", req.String()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) return } - log.Info("", "", "api TransferGroupOwner call rpc success, [data: %s] [reply: %s]", pbData.String(), reply.String()) - - c.JSON(http.StatusOK, gin.H{ - "errCode": reply.ErrCode, - "errMsg": reply.ErrMsg, - }) + resp := api.CommResp{ErrCode: reply.ErrCode, ErrMsg: reply.ErrMsg} + c.JSON(http.StatusOK, resp) + log.NewInfo(req.OperationID, "TransferGroupOwner api return ", resp) } diff --git a/internal/demo/register/login.go b/internal/demo/register/login.go index bc2605e08..b6702bbf4 100644 --- a/internal/demo/register/login.go +++ b/internal/demo/register/login.go @@ -65,7 +65,7 @@ func Login(c *gin.Context) { defer resp.Body.Close() if err != nil { log.ErrorByKv("Failed to read file", account, "err", err.Error()) - c.JSON(http.StatusOK, gin.H{"errCode": constant.IoErrot, "errMsg": err.Error()}) + c.JSON(http.StatusOK, gin.H{"errCode": constant.IoError, "errMsg": err.Error()}) return } imRep := IMRegisterResp{} diff --git a/internal/demo/register/set_password.go b/internal/demo/register/set_password.go index 7dca79dc6..9d66a09b0 100644 --- a/internal/demo/register/set_password.go +++ b/internal/demo/register/set_password.go @@ -86,7 +86,7 @@ openIMRegisterTab: response, err := ioutil.ReadAll(resp.Body) defer resp.Body.Close() if err != nil { - c.JSON(http.StatusOK, gin.H{"errCode": constant.IoErrot, "errMsg": err.Error()}) + c.JSON(http.StatusOK, gin.H{"errCode": constant.IoError, "errMsg": err.Error()}) return } imrep := IMRegisterResp{} diff --git a/internal/rpc/friend/firend.go b/internal/rpc/friend/firend.go index 7acd4f37a..1b459c49f 100644 --- a/internal/rpc/friend/firend.go +++ b/internal/rpc/friend/firend.go @@ -9,10 +9,9 @@ import ( "Open_IM/pkg/common/token_verify" "Open_IM/pkg/grpc-etcdv3/getcdv3" pbFriend "Open_IM/pkg/proto/friend" - sdk_ws "Open_IM/pkg/proto/sdk_ws" + sdkws "Open_IM/pkg/proto/sdk_ws" "Open_IM/pkg/utils" "context" - "fmt" "google.golang.org/grpc" "net" "strconv" @@ -37,17 +36,17 @@ func NewFriendServer(port int) *friendServer { } func (s *friendServer) Run() { - log.Info("", "", fmt.Sprintf("rpc friend init....")) + log.NewInfo("0", "friendServer run...") ip := utils.ServerIP registerAddress := ip + ":" + strconv.Itoa(s.rpcPort) //listener network listener, err := net.Listen("tcp", registerAddress) if err != nil { - log.InfoByArgs(fmt.Sprintf("Failed to listen rpc friend network,err=%s", err.Error())) + log.NewError("0", "Listen failed ", err.Error(), registerAddress) return } - log.Info("", "", "listen network success, address = %s", registerAddress) + log.NewInfo("0", "listen ok ", registerAddress) defer listener.Close() //grpc server srv := grpc.NewServer() @@ -56,62 +55,59 @@ func (s *friendServer) Run() { pbFriend.RegisterFriendServer(srv, s) err = getcdv3.RegisterEtcd(s.etcdSchema, strings.Join(s.etcdAddr, ","), ip, s.rpcPort, s.rpcRegisterName, 10) if err != nil { - log.ErrorByArgs("register rpc fiend service to etcd failed,err=%s", err.Error()) + log.NewError("0", "RegisterEtcd failed ", err.Error(), s.etcdSchema, strings.Join(s.etcdAddr, ","), ip, s.rpcPort, s.rpcRegisterName) return } err = srv.Serve(listener) if err != nil { - log.ErrorByArgs("listen rpc friend error,err=%s", err.Error()) + log.NewError("0", "Serve failed ", err.Error(), listener) return } } -func (s *friendServer) GetFriendsInfo(ctx context.Context, req *pbFriend.GetFriendsInfoReq) (*pbFriend.GetFriendInfoResp, error) { - log.NewInfo(req.CommID.OperationID, "GetFriendsInfo args ", req.String()) - var ( - isInBlackList int32 - // isFriend int32 - comment string - ) +//// +//func (s *friendServer) GetFriendsInfo(ctx context.Context, req *pbFriend.GetFriendsInfoReq) (*pbFriend.GetFriendInfoResp, error) { +// return nil, nil +//// log.NewInfo(req.CommID.OperationID, "GetFriendsInfo args ", req.String()) +//// var ( +//// isInBlackList int32 +//// // isFriend int32 +//// comment string +//// ) +//// +//// friendShip, err := imdb.FindFriendRelationshipFromFriend(req.CommID.FromUserID, req.CommID.ToUserID) +//// if err != nil { +//// log.NewError(req.CommID.OperationID, "FindFriendRelationshipFromFriend failed ", err.Error()) +//// return &pbFriend.GetFriendInfoResp{ErrCode: constant.ErrSearchUserInfo.ErrCode, ErrMsg: constant.ErrSearchUserInfo.ErrMsg}, nil +//// // isFriend = constant.FriendFlag +//// } +//// comment = friendShip.Remark +//// +//// friendUserInfo, err := imdb.FindUserByUID(req.CommID.ToUserID) +//// if err != nil { +//// log.NewError(req.CommID.OperationID, "FindUserByUID failed ", err.Error()) +//// return &pbFriend.GetFriendInfoResp{ErrCode: constant.ErrSearchUserInfo.ErrCode, ErrMsg: constant.ErrSearchUserInfo.ErrMsg}, nil +//// } +//// +//// err = imdb.FindRelationshipFromBlackList(req.CommID.FromUserID, req.CommID.ToUserID) +//// if err == nil { +//// isInBlackList = constant.BlackListFlag +//// } +//// +//// resp := pbFriend.GetFriendInfoResp{ErrCode: 0, ErrMsg: "",} +//// +//// utils.CopyStructFields(resp.FriendInfoList, friendUserInfo) +//// resp.Data.IsBlack = isInBlackList +//// resp.Data.OwnerUserID = req.CommID.FromUserID +//// resp.Data.Remark = comment +//// resp.Data.CreateTime = friendUserInfo.CreateTime +//// +//// log.NewInfo(req.CommID.OperationID, "GetFriendsInfo ok ", resp) +//// return &resp, nil +//// +//} - friendShip, err := imdb.FindFriendRelationshipFromFriend(req.CommID.FromUserID, req.CommID.ToUserID) - if err != nil { - log.NewError(req.CommID.OperationID, "FindFriendRelationshipFromFriend failed ", err.Error()) - return &pbFriend.GetFriendInfoResp{ErrCode: constant.ErrSearchUserInfo.ErrCode, ErrMsg: constant.ErrSearchUserInfo.ErrMsg}, nil - // isFriend = constant.FriendFlag - } - comment = friendShip.Remark - - friendUserInfo, err := imdb.FindUserByUID(req.CommID.ToUserID) - if err != nil { - log.NewError(req.CommID.OperationID, "FindUserByUID failed ", err.Error()) - return &pbFriend.GetFriendInfoResp{ErrCode: constant.ErrSearchUserInfo.ErrCode, ErrMsg: constant.ErrSearchUserInfo.ErrMsg}, nil - } - - err = imdb.FindRelationshipFromBlackList(req.CommID.FromUserID, req.CommID.ToUserID) - if err == nil { - isInBlackList = constant.BlackListFlag - } - - resp := pbFriend.GetFriendInfoResp{ - ErrCode: 0, - ErrMsg: "", - Data: &pbFriend.FriendInfo{ - IsBlack: isInBlackList, - }, - } - utils.CopyStructFields(resp.Data.FriendUser, friendUserInfo) - resp.Data.IsBlack = isInBlackList - resp.Data.OwnerUserID = req.CommID.FromUserID - resp.Data.Remark = comment - resp.Data.CreateTime = friendUserInfo.CreateTime - - log.NewInfo(req.CommID.OperationID, "GetFriendsInfo ok ", resp) - return &resp, nil - -} - -func (s *friendServer) AddBlacklist(ctx context.Context, req *pbFriend.AddBlacklistReq) (*pbFriend.CommonResp, error) { +func (s *friendServer) AddBlacklist(ctx context.Context, req *pbFriend.AddBlacklistReq) (*pbFriend.AddBlacklistResp, error) { log.NewInfo(req.CommID.OperationID, "AddBlacklist args ", req.String()) ok := token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) if !ok { @@ -121,15 +117,14 @@ func (s *friendServer) AddBlacklist(ctx context.Context, req *pbFriend.AddBlackl err := imdb.InsertInToUserBlackList(req.CommID.FromUserID, req.CommID.ToUserID) if err != nil { log.NewError(req.CommID.OperationID, "InsertInToUserBlackList failed ", err.Error()) - return &pbFriend.CommonResp{ErrCode: constant.ErrMysql.ErrCode, ErrMsg: constant.ErrMysql.ErrMsg}, nil + return &pbFriend.AddBlacklistResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } log.NewInfo(req.CommID.OperationID, "InsertInToUserBlackList ok ", req.CommID.FromUserID, req.CommID.ToUserID) chat.BlackAddedNotification(req) - return &pbFriend.CommonResp{}, nil - + return &pbFriend.AddBlacklistResp{CommonResp: &pbFriend.CommonResp{}}, nil } -func (s *friendServer) AddFriend(ctx context.Context, req *pbFriend.AddFriendReq) (*pbFriend.CommonResp, error) { +func (s *friendServer) AddFriend(ctx context.Context, req *pbFriend.AddFriendReq) (*pbFriend.AddFriendResp, error) { log.NewInfo(req.CommID.OperationID, "AddFriend args ", req.String()) ok := token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) if !ok { @@ -138,18 +133,18 @@ func (s *friendServer) AddFriend(ctx context.Context, req *pbFriend.AddFriendReq //Cannot add non-existent users if _, err := imdb.FindUserByUID(req.CommID.ToUserID); err != nil { log.NewError(req.CommID.OperationID, "FindUserByUID failed ", err.Error(), req.CommID.ToUserID) - return &pbFriend.CommonResp{ErrCode: constant.ErrAddFriend.ErrCode, ErrMsg: constant.ErrSearchUserInfo.ErrMsg}, nil + return &pbFriend.AddFriendResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } //Establish a latest relationship in the friend request table - err := imdb.ReplaceIntoFriendReq(req.CommID.FromUserID, req.CommID.ToUserID, constant.ApplicationFriendFlag, req.ReqMessage) + err := imdb.ReplaceIntoFriendReq(req.CommID.FromUserID, req.CommID.ToUserID, constant.ApplicationFriendFlag, req.ReqMsg) if err != nil { log.NewError(req.CommID.OperationID, "ReplaceIntoFriendReq failed ", err.Error()) - return &pbFriend.CommonResp{ErrCode: constant.ErrAddFriend.ErrCode, ErrMsg: constant.ErrAddFriend.ErrMsg}, nil + return &pbFriend.AddFriendResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } chat.FriendApplicationAddedNotification(req) - return &pbFriend.CommonResp{}, nil + return &pbFriend.AddFriendResp{CommonResp: &pbFriend.CommonResp{}}, nil } func (s *friendServer) ImportFriend(ctx context.Context, req *pbFriend.ImportFriendReq) (*pbFriend.ImportFriendResp, error) { @@ -159,29 +154,29 @@ func (s *friendServer) ImportFriend(ctx context.Context, req *pbFriend.ImportFri if !utils.IsContain(req.OpUserID, config.Config.Manager.AppManagerUid) { log.NewError(req.OperationID, "not authorized", req.OpUserID) - c.ErrCode = constant.ErrAddFriend.ErrCode - c.ErrMsg = "not authorized" - return &pbFriend.ImportFriendResp{CommonResp: &c, FailedUidList: req.FriendUserIDList}, nil + c.ErrCode = constant.ErrAccess.ErrCode + c.ErrMsg = constant.ErrAccess.ErrMsg + return &pbFriend.ImportFriendResp{CommonResp: &c, FailedFriendUserIDList: req.FriendUserIDList}, nil } if _, err := imdb.FindUserByUID(req.FromUserID); err != nil { log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), req.FromUserID) - c.ErrCode = constant.ErrAddFriend.ErrCode + c.ErrCode = constant.ErrDB.ErrCode c.ErrMsg = "this user not exists,cant not add friend" - return &pbFriend.ImportFriendResp{CommonResp: &c, FailedUidList: req.FriendUserIDList}, nil + return &pbFriend.ImportFriendResp{CommonResp: &c, FailedFriendUserIDList: req.FriendUserIDList}, nil } for _, v := range req.FriendUserIDList { if _, fErr := imdb.FindUserByUID(v); fErr != nil { c.ErrMsg = "some uid establish failed" c.ErrCode = 408 - resp.FailedUidList = append(resp.FailedUidList, v) + resp.FailedFriendUserIDList = append(resp.FailedFriendUserIDList, v) } else { if _, err := imdb.FindFriendRelationshipFromFriend(req.FromUserID, v); err != nil { //Establish two single friendship err1 := imdb.InsertToFriend(req.FromUserID, v, 1) if err1 != nil { - resp.FailedUidList = append(resp.FailedUidList, v) + resp.FailedFriendUserIDList = append(resp.FailedFriendUserIDList, v) log.NewError(req.OperationID, "InsertToFriend failed", req.FromUserID, v, err1.Error()) c.ErrMsg = "some uid establish failed" c.ErrCode = 408 @@ -189,7 +184,7 @@ func (s *friendServer) ImportFriend(ctx context.Context, req *pbFriend.ImportFri } err2 := imdb.InsertToFriend(v, req.FromUserID, 1) if err2 != nil { - resp.FailedUidList = append(resp.FailedUidList, v) + resp.FailedFriendUserIDList = append(resp.FailedFriendUserIDList, v) log.NewError(req.OperationID, "InsertToFriend failed", v, req.FromUserID, err2.Error()) c.ErrMsg = "some uid establish failed" c.ErrCode = 408 @@ -208,26 +203,26 @@ func (s *friendServer) ImportFriend(ctx context.Context, req *pbFriend.ImportFri } //process Friend application -func (s *friendServer) AddFriendResponse(ctx context.Context, req *pbFriend.AddFriendResponseReq) (*pbFriend.CommonResp, error) { +func (s *friendServer) AddFriendResponse(ctx context.Context, req *pbFriend.AddFriendResponseReq) (*pbFriend.AddFriendResponseResp, error) { log.NewInfo(req.CommID.OperationID, "AddFriendResponse args ", req.String()) if !token_verify.CheckAccess(req.CommID.FromUserID, req.CommID.ToUserID) { log.NewError(req.CommID.OperationID, "CheckAccess failed ", req.CommID.FromUserID, req.CommID.ToUserID) - return &pbFriend.CommonResp{ErrCode: constant.ErrAgreeToAddFriend.ErrCode, ErrMsg: constant.ErrAgreeToAddFriend.ErrMsg}, nil + return &pbFriend.AddFriendResponseResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil } //Check there application before agreeing or refuse to a friend's application //req.CommID.FromUserID process req.CommID.ToUserID if _, err := imdb.FindFriendApplyFromFriendReqByUid(req.CommID.ToUserID, req.CommID.FromUserID); err != nil { log.NewError(req.CommID.OperationID, "FindFriendApplyFromFriendReqByUid failed ", err.Error(), req.CommID.ToUserID, req.CommID.FromUserID) - return &pbFriend.CommonResp{ErrCode: constant.ErrAgreeToAddFriend.ErrCode, ErrMsg: constant.ErrAgreeToAddFriend.ErrMsg}, nil + return &pbFriend.AddFriendResponseResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } //Change friend request status flag err := imdb.UpdateFriendRelationshipToFriendReq(req.CommID.ToUserID, req.CommID.FromUserID, req.Flag) if err != nil { log.NewError(req.CommID.OperationID, "UpdateFriendRelationshipToFriendReq failed ", err.Error(), req.CommID.ToUserID, req.CommID.FromUserID, req.Flag) - return &pbFriend.CommonResp{ErrCode: constant.ErrMysql.ErrCode, ErrMsg: constant.ErrAgreeToAddFriend.ErrMsg}, nil + return &pbFriend.AddFriendResponseResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } log.NewInfo(req.CommID.OperationID, "rpc AddFriendResponse ok") //Change the status of the friend request form @@ -241,43 +236,43 @@ func (s *friendServer) AddFriendResponse(ctx context.Context, req *pbFriend.AddF err = imdb.InsertToFriend(req.CommID.FromUserID, req.CommID.ToUserID, req.Flag) if err != nil { log.NewError(req.CommID.OperationID, "InsertToFriend failed ", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID, req.Flag) - return &pbFriend.CommonResp{ErrCode: constant.ErrAgreeToAddFriend.ErrCode, ErrMsg: constant.ErrAgreeToAddFriend.ErrMsg}, nil + return &pbFriend.AddFriendResponseResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } } _, err = imdb.FindFriendRelationshipFromFriend(req.CommID.ToUserID, req.CommID.FromUserID) if err == nil { log.NewWarn(req.CommID.OperationID, "FindFriendRelationshipFromFriend exist", req.CommID.ToUserID, req.CommID.FromUserID) - return &pbFriend.CommonResp{}, nil + return &pbFriend.AddFriendResponseResp{CommonResp: &pbFriend.CommonResp{}}, nil } err = imdb.InsertToFriend(req.CommID.ToUserID, req.CommID.FromUserID, req.Flag) if err != nil { log.NewError(req.CommID.OperationID, "InsertToFriend failed ", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID, req.Flag) - return &pbFriend.CommonResp{ErrCode: constant.ErrAgreeToAddFriend.ErrCode, ErrMsg: constant.ErrAgreeToAddFriend.ErrMsg}, nil + return &pbFriend.AddFriendResponseResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } } chat.FriendApplicationProcessedNotification(req) chat.FriendAddedNotification(req.CommID.OperationID, req.CommID.OpUserID, req.CommID.FromUserID, req.CommID.ToUserID) - return &pbFriend.CommonResp{}, nil + return &pbFriend.AddFriendResponseResp{CommonResp: &pbFriend.CommonResp{}}, nil } -func (s *friendServer) DeleteFriend(ctx context.Context, req *pbFriend.DeleteFriendReq) (*pbFriend.CommonResp, error) { +func (s *friendServer) DeleteFriend(ctx context.Context, req *pbFriend.DeleteFriendReq) (*pbFriend.DeleteFriendResp, error) { log.NewInfo(req.CommID.OperationID, "DeleteFriend args ", req.String()) //Parse token, to find current user information if !token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) { log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID) - return &pbFriend.CommonResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil + return &pbFriend.DeleteFriendResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil } err := imdb.DeleteSingleFriendInfo(req.CommID.FromUserID, req.CommID.ToUserID) if err != nil { log.NewError(req.CommID.OperationID, "DeleteSingleFriendInfo failed", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID) - return &pbFriend.CommonResp{ErrCode: constant.ErrMysql.ErrCode, ErrMsg: constant.ErrMysql.ErrMsg}, nil + return &pbFriend.DeleteFriendResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil } log.NewInfo(req.CommID.OperationID, "DeleteFriend rpc ok") chat.FriendDeletedNotification(req) - return &pbFriend.CommonResp{}, nil + return &pbFriend.DeleteFriendResp{CommonResp: &pbFriend.CommonResp{}}, nil } func (s *friendServer) GetBlacklist(ctx context.Context, req *pbFriend.GetBlacklistReq) (*pbFriend.GetBlacklistResp, error) { @@ -286,20 +281,20 @@ func (s *friendServer) GetBlacklist(ctx context.Context, req *pbFriend.GetBlackl //Parse token, to find current user information if !token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) { log.NewError(req.CommID.OperationID, "CheckAccess failed", req.CommID.OpUserID, req.CommID.FromUserID) - return &pbFriend.GetBlacklistResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil + return &pbFriend.GetBlacklistResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } blackListInfo, err := imdb.GetBlackListByUID(req.CommID.FromUserID) if err != nil { log.NewError(req.CommID.OperationID, "GetBlackListByUID failed ", err.Error(), req.CommID.FromUserID) - return &pbFriend.GetBlacklistResp{ErrCode: constant.ErrGetBlackList.ErrCode, ErrMsg: constant.ErrGetBlackList.ErrMsg}, nil + return &pbFriend.GetBlacklistResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil } var ( - userInfoList []*sdk_ws.PublicUserInfo + userInfoList []*sdkws.PublicUserInfo ) for _, blackUser := range blackListInfo { - var blackUserInfo sdk_ws.PublicUserInfo + var blackUserInfo sdkws.PublicUserInfo //Find black user information us, err := imdb.FindUserByUID(blackUser.BlockUserID) if err != nil { @@ -310,49 +305,50 @@ func (s *friendServer) GetBlacklist(ctx context.Context, req *pbFriend.GetBlackl userInfoList = append(userInfoList, &blackUserInfo) } log.NewInfo(req.CommID.OperationID, "rpc GetBlacklist ok") - return &pbFriend.GetBlacklistResp{Data: userInfoList}, nil + return &pbFriend.GetBlacklistResp{BlackUserInfoList: userInfoList}, nil } -func (s *friendServer) SetFriendComment(ctx context.Context, req *pbFriend.SetFriendCommentReq) (*pbFriend.CommonResp, error) { +func (s *friendServer) SetFriendComment(ctx context.Context, req *pbFriend.SetFriendCommentReq) (*pbFriend.SetFriendCommentResp, error) { log.NewInfo(req.CommID.OperationID, "SetFriendComment args ", req.String()) //Parse token, to find current user information if !token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) { log.NewError(req.CommID.OperationID, "CheckAccess false", req.CommID.OpUserID, req.CommID.FromUserID) - return &pbFriend.CommonResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil + return &pbFriend.SetFriendCommentResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil } err := imdb.UpdateFriendComment(req.CommID.FromUserID, req.CommID.OpUserID, req.Remark) if err != nil { log.NewError(req.CommID.OperationID, "UpdateFriendComment failed ", err.Error(), req.CommID.FromUserID, req.CommID.OpUserID, req.Remark) - return &pbFriend.CommonResp{ErrCode: constant.ErrSetFriendComment.ErrCode, ErrMsg: constant.ErrSetFriendComment.ErrMsg}, nil + return &pbFriend.SetFriendCommentResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } log.NewInfo(req.CommID.OperationID, "rpc SetFriendComment ok") chat.FriendInfoChangedNotification(req) - return &pbFriend.CommonResp{}, nil + return &pbFriend.SetFriendCommentResp{CommonResp: &pbFriend.CommonResp{}}, nil } -func (s *friendServer) RemoveBlacklist(ctx context.Context, req *pbFriend.RemoveBlacklistReq) (*pbFriend.CommonResp, error) { +func (s *friendServer) RemoveBlacklist(ctx context.Context, req *pbFriend.RemoveBlacklistReq) (*pbFriend.RemoveBlacklistResp, error) { log.NewInfo(req.CommID.OperationID, "RemoveBlacklist args ", req.String()) //Parse token, to find current user information if !token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) { log.NewError(req.CommID.OperationID, "CheckAccess false", req.CommID.OpUserID, req.CommID.FromUserID) - return &pbFriend.CommonResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil + return &pbFriend.RemoveBlacklistResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil } err := imdb.RemoveBlackList(req.CommID.FromUserID, req.CommID.ToUserID) if err != nil { log.NewError(req.CommID.OperationID, "RemoveBlackList failed", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID) - return &pbFriend.CommonResp{ErrCode: constant.ErrMysql.ErrCode, ErrMsg: constant.ErrMysql.ErrMsg}, nil + return &pbFriend.RemoveBlacklistResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil + } log.NewInfo(req.CommID.OperationID, "rpc RemoveBlacklist ok") chat.BlackDeletedNotification(req) - return &pbFriend.CommonResp{}, nil + return &pbFriend.RemoveBlacklistResp{CommonResp: &pbFriend.CommonResp{}}, nil } func (s *friendServer) IsInBlackList(ctx context.Context, req *pbFriend.IsInBlackListReq) (*pbFriend.IsInBlackListResp, error) { log.NewInfo("IsInBlackList args ", req.String()) if !token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) { log.NewError(req.CommID.OperationID, "CheckAccess false", req.CommID.OpUserID, req.CommID.FromUserID) - return &pbFriend.IsInBlackListResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil + return &pbFriend.IsInBlackListResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } var isInBlacklist = false @@ -366,44 +362,44 @@ func (s *friendServer) IsInBlackList(ctx context.Context, req *pbFriend.IsInBlac func (s *friendServer) IsFriend(ctx context.Context, req *pbFriend.IsFriendReq) (*pbFriend.IsFriendResp, error) { log.NewInfo("IsFriend args ", req.String()) - var isFriend int32 + var isFriend bool if !token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) { log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID) - return &pbFriend.IsFriendResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil + return &pbFriend.IsFriendResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } _, err := imdb.FindFriendRelationshipFromFriend(req.CommID.FromUserID, req.CommID.ToUserID) if err == nil { - isFriend = constant.FriendFlag + isFriend = true } else { - isFriend = constant.ApplicationFriendFlag + isFriend = false } log.NewInfo("IsFriend rpc ok") - return &pbFriend.IsFriendResp{ShipType: isFriend}, nil + return &pbFriend.IsFriendResp{Response: isFriend}, nil } func (s *friendServer) GetFriendList(ctx context.Context, req *pbFriend.GetFriendListReq) (*pbFriend.GetFriendListResp, error) { log.NewInfo("GetFriendList args ", req.String()) - var userInfoList []*pbFriend.FriendInfo + var userInfoList []*sdkws.FriendInfo //Parse token, to find current user information if !token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) { log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID) - return &pbFriend.GetFriendListResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil + return &pbFriend.GetFriendListResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } friends, err := imdb.FindUserInfoFromFriend(req.CommID.FromUserID) if err != nil { log.NewError(req.CommID.OperationID, "FindUserInfoFromFriend failed", err.Error(), req.CommID.FromUserID) - return &pbFriend.GetFriendListResp{ErrCode: constant.ErrSearchUserInfo.ErrCode, ErrMsg: constant.ErrSearchUserInfo.ErrMsg}, nil + return &pbFriend.GetFriendListResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil } for _, friendUser := range friends { - var friendUserInfo pbFriend.FriendInfo + var friendUserInfo sdkws.FriendInfo //find user is in blackList err = imdb.FindRelationshipFromBlackList(req.CommID.FromUserID, friendUser.FriendUserID) - if err == nil { - friendUserInfo.IsBlack = constant.BlackListFlag - } else { - friendUserInfo.IsBlack = 0 - } + //if err == nil { + // friendUserInfo.IsBlack = constant.BlackListFlag + //} else { + // friendUserInfo.IsBlack = 0 + //} //Find user information us, err := imdb.FindUserByUID(friendUser.FriendUserID) if err != nil { @@ -416,77 +412,57 @@ func (s *friendServer) GetFriendList(ctx context.Context, req *pbFriend.GetFrien friendUserInfo.CreateTime = friendUser.CreateTime userInfoList = append(userInfoList, &friendUserInfo) } - log.NewInfo(req.CommID.OperationID, "rpc GetFriendList ok", pbFriend.GetFriendListResp{Data: userInfoList}) - return &pbFriend.GetFriendListResp{Data: userInfoList}, nil + log.NewInfo(req.CommID.OperationID, "rpc GetFriendList ok", pbFriend.GetFriendListResp{FriendInfoList: userInfoList}) + return &pbFriend.GetFriendListResp{FriendInfoList: userInfoList}, nil } -func (s *friendServer) GetFriendApplyList(ctx context.Context, req *pbFriend.GetFriendApplyReq) (*pbFriend.GetFriendApplyResp, error) { +func (s *friendServer) GetFriendApplyList(ctx context.Context, req *pbFriend.GetFriendApplyListReq) (*pbFriend.GetFriendApplyListResp, error) { log.NewInfo(req.CommID.OperationID, "GetFriendApplyList args ", req.String()) - var appleUserList []*pbFriend.ApplyUserInfo + //Parse token, to find current user information if !token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) { log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID) - return &pbFriend.GetFriendApplyResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil + return &pbFriend.GetFriendApplyListResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } // Find the current user friend applications received ApplyUsersInfo, err := imdb.FindFriendsApplyFromFriendReq(req.CommID.FromUserID) if err != nil { log.NewError(req.CommID.OperationID, "FindFriendsApplyFromFriendReq ", err.Error(), req.CommID.FromUserID) - return &pbFriend.GetFriendApplyResp{ErrCode: constant.ErrMysql.ErrCode, ErrMsg: constant.ErrMysql.ErrMsg}, nil + return &pbFriend.GetFriendApplyListResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil } + var appleUserList []*sdkws.FriendRequest for _, applyUserInfo := range ApplyUsersInfo { - var userInfo pbFriend.ApplyUserInfo - //Find friend application status - userInfo.Flag = applyUserInfo.Flag - userInfo.ReqMessage = applyUserInfo.ReqMessage - userInfo.ApplyTime = applyUserInfo.CreateTime - - //Find user information - us, err := imdb.FindUserByUID(applyUserInfo.ReqID) - if err != nil { - log.NewError(req.CommID.OperationID, "FindUserByUID failed ", err.Error(), applyUserInfo.ReqID) - continue - } - utils.CopyStructFields(userInfo.UserInfo, us) + var userInfo sdkws.FriendRequest + utils.CopyStructFields(&userInfo, applyUserInfo) appleUserList = append(appleUserList, &userInfo) } - log.NewInfo(req.CommID.OperationID, "rpc GetFriendApplyList ok", pbFriend.GetFriendApplyResp{Data: appleUserList}) - return &pbFriend.GetFriendApplyResp{Data: appleUserList}, nil + log.NewInfo(req.CommID.OperationID, "rpc GetFriendApplyList ok", pbFriend.GetFriendApplyListResp{FriendRequestList: appleUserList}) + return &pbFriend.GetFriendApplyListResp{FriendRequestList: appleUserList}, nil } -func (s *friendServer) GetSelfApplyList(ctx context.Context, req *pbFriend.GetFriendApplyReq) (*pbFriend.GetFriendApplyResp, error) { +func (s *friendServer) GetSelfApplyList(ctx context.Context, req *pbFriend.GetSelfApplyListReq) (*pbFriend.GetSelfApplyListResp, error) { log.NewInfo(req.CommID.OperationID, "GetSelfApplyList args ", req.String()) - var selfApplyOtherUserList []*pbFriend.ApplyUserInfo + var selfApplyOtherUserList []*sdkws.FriendRequest //Parse token, to find current user information if !token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) { log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID) - return &pbFriend.GetFriendApplyResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil + return &pbFriend.GetSelfApplyListResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } // Find the self add other userinfo usersInfo, err := imdb.FindSelfApplyFromFriendReq(req.CommID.FromUserID) if err != nil { log.NewError(req.CommID.OperationID, "FindSelfApplyFromFriendReq failed ", err.Error(), req.CommID.FromUserID) - return &pbFriend.GetFriendApplyResp{ErrCode: constant.ErrMysql.ErrCode, ErrMsg: constant.ErrMysql.ErrMsg}, nil + return &pbFriend.GetSelfApplyListResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil } for _, selfApplyOtherUserInfo := range usersInfo { - var userInfo pbFriend.ApplyUserInfo - //Find friend application status - userInfo.Flag = selfApplyOtherUserInfo.Flag - userInfo.ReqMessage = selfApplyOtherUserInfo.ReqMessage - userInfo.ApplyTime = selfApplyOtherUserInfo.CreateTime - //Find user information - us, err := imdb.FindUserByUID(selfApplyOtherUserInfo.UserID) - if err != nil { - log.NewError(req.CommID.OperationID, "FindUserByUID failed", err.Error(), selfApplyOtherUserInfo.UserID) - continue - } - utils.CopyStructFields(userInfo.UserInfo, us) + var userInfo sdkws.FriendRequest // pbFriend.ApplyUserInfo + utils.CopyStructFields(&userInfo, selfApplyOtherUserInfo) selfApplyOtherUserList = append(selfApplyOtherUserList, &userInfo) } - log.NewInfo(req.CommID.OperationID, "rpc GetSelfApplyList ok", pbFriend.GetFriendApplyResp{Data: selfApplyOtherUserList}) - return &pbFriend.GetFriendApplyResp{Data: selfApplyOtherUserList}, nil + log.NewInfo(req.CommID.OperationID, "rpc GetSelfApplyList ok", pbFriend.GetSelfApplyListResp{FriendRequestList: selfApplyOtherUserList}) + return &pbFriend.GetSelfApplyListResp{FriendRequestList: selfApplyOtherUserList}, nil } diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index cd2ce23df..db04d91f7 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -71,36 +71,36 @@ func (s *groupServer) Run() { func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupReq) (*pbGroup.CreateGroupResp, error) { log.NewInfo(req.OperationID, "CreateGroup, args ", req.String()) - if !token_verify.CheckAccess(req.OpUserID, req.FromUserID) { - log.NewError(req.OperationID, "CheckAccess false ", req.OpUserID, req.FromUserID) - return &pbGroup.CreateGroupResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil + if !token_verify.CheckAccess(req.OpUserID, req.OwnerUserID) { + log.NewError(req.OperationID, "CheckAccess false ", req.OpUserID, req.OwnerUserID) + return &pbGroup.CreateGroupResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } var okUserIDList []string //Time stamp + MD5 to generate group chat id groupId := utils.Md5(strconv.FormatInt(time.Now().UnixNano(), 10)) //to group - err := im_mysql_model.InsertIntoGroup(groupId, req.GroupName, req.Introduction, req.Notification, req.FaceUrl, req.Ext) + err := im_mysql_model.InsertIntoGroup(groupId, req.GroupInfo.GroupName, req.GroupInfo.Introduction, req.GroupInfo.Notification, req.GroupInfo.FaceUrl, req.GroupInfo.Ex, req.GroupInfo.GroupType) if err != nil { - log.NewError(req.OperationID, "InsertIntoGroup failed, ", err.Error(), groupId, req.GroupName, req.Introduction, req.Notification, req.FaceUrl, req.Ext) - return &pbGroup.CreateGroupResp{ErrCode: constant.ErrCreateGroup.ErrCode, ErrMsg: constant.ErrCreateGroup.ErrMsg}, nil + log.NewError(req.OperationID, "InsertIntoGroup failed, ", err.Error(), groupId, req.GroupInfo.GroupName, req.GroupInfo.Introduction, req.GroupInfo.Notification, req.GroupInfo.FaceUrl, req.GroupInfo.Ex, req.GroupInfo.GroupType) + return &pbGroup.CreateGroupResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil } - us, err := im_mysql_model.FindUserByUID(req.FromUserID) + us, err := im_mysql_model.FindUserByUID(req.OwnerUserID) if err != nil { - log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), req.FromUserID) - return &pbGroup.CreateGroupResp{ErrCode: constant.ErrCreateGroup.ErrCode, ErrMsg: constant.ErrCreateGroup.ErrMsg}, nil + log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), req.OwnerUserID) + return &pbGroup.CreateGroupResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil } //to group member err = im_mysql_model.InsertIntoGroupMember(groupId, us.UserID, us.Nickname, us.FaceUrl, constant.GroupOwner) if err != nil { log.NewError(req.OperationID, "InsertIntoGroupMember failed ", err.Error()) - return &pbGroup.CreateGroupResp{ErrCode: constant.ErrCreateGroup.ErrCode, ErrMsg: constant.ErrCreateGroup.ErrMsg}, nil + return &pbGroup.CreateGroupResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil } - err = db.DB.AddGroupMember(groupId, req.FromUserID) + err = db.DB.AddGroupMember(groupId, req.OwnerUserID) if err != nil { - log.NewError(req.OperationID, "AddGroupMember failed ", err.Error(), groupId, req.FromUserID) + log.NewError(req.OperationID, "AddGroupMember failed ", err.Error(), groupId, req.OwnerUserID) // return &pbGroup.CreateGroupResp{ErrCode: constant.ErrCreateGroup.ErrCode, ErrMsg: constant.ErrCreateGroup.ErrMsg}, nil } @@ -111,13 +111,13 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), user.UserID) continue } - if user.Role == 1 { + if user.RoleLevel == 1 { log.NewError(req.OperationID, "only one owner, failed ", user) continue } - err = im_mysql_model.InsertIntoGroupMember(groupId, user.UserID, us.Nickname, us.FaceUrl, user.Role) + err = im_mysql_model.InsertIntoGroupMember(groupId, user.UserID, us.Nickname, us.FaceUrl, user.RoleLevel) if err != nil { - log.NewError(req.OperationID, "InsertIntoGroupMember failed ", groupId, user.UserID, us.Nickname, us.FaceUrl, user.Role) + log.NewError(req.OperationID, "InsertIntoGroupMember failed ", groupId, user.UserID, us.Nickname, us.FaceUrl, user.RoleLevel) } okUserIDList = append(okUserIDList, user.UserID) err = db.DB.AddGroupMember(groupId, user.UserID) @@ -130,11 +130,11 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR group, err := im_mysql_model.FindGroupInfoByGroupId(groupId) if err != nil { log.NewError(req.OperationID, "FindGroupInfoByGroupId failed ", err.Error(), groupId) - resp.ErrCode = constant.ErrCreateGroup.ErrCode - resp.ErrMsg = constant.ErrCreateGroup.ErrMsg + resp.ErrCode = constant.ErrDB.ErrCode + resp.ErrMsg = constant.ErrDB.ErrMsg return resp, nil } - chat.GroupCreatedNotification(req.OperationID, req.OpUserID, req.FromUserID, groupId, okUserIDList) + chat.GroupCreatedNotification(req.OperationID, req.OpUserID, req.OwnerUserID, groupId, okUserIDList) utils.CopyStructFields(resp.GroupInfo, group) log.NewInfo(req.OperationID, "rpc CreateGroup return ", resp.String()) return resp, nil @@ -144,14 +144,14 @@ func (s *groupServer) GetJoinedGroupList(ctx context.Context, req *pbGroup.GetJo log.NewInfo(req.OperationID, "GetJoinedGroupList, args ", req.String()) if !token_verify.CheckAccess(req.OpUserID, req.FromUserID) { log.NewError(req.OperationID, "CheckAccess false ", req.OpUserID, req.FromUserID) - return &pbGroup.GetJoinedGroupListResp{ErrCode: constant.ErrParseToken.ErrCode, ErrMsg: constant.ErrParseToken.ErrMsg}, nil + return &pbGroup.GetJoinedGroupListResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } //group list joinedGroupList, err := imdb.GetJoinedGroupIdListByMemberId(req.FromUserID) if err != nil { log.NewError(req.OperationID, "GetJoinedGroupIdListByMemberId failed ", err.Error(), req.FromUserID) - return &pbGroup.GetJoinedGroupListResp{ErrCode: constant.ErrParam.ErrCode, ErrMsg: constant.ErrParam.ErrMsg}, nil + return &pbGroup.GetJoinedGroupListResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil } var resp pbGroup.GetJoinedGroupListResp @@ -163,7 +163,6 @@ func (s *groupServer) GetJoinedGroupList(ctx context.Context, req *pbGroup.GetJo if num > 0 && owner != nil && err2 == nil && group != nil && err == nil { utils.CopyStructFields(&groupNode, group) groupNode.CreateTime = group.CreateTime - utils.CopyStructFields(groupNode.Owner, owner) groupNode.MemberCount = uint32(num) resp.GroupList = append(resp.GroupList, &groupNode) } else { @@ -241,8 +240,8 @@ func (s *groupServer) GetGroupAllMember(ctx context.Context, req *pbGroup.GetGro resp.ErrCode = 0 memberList, err := imdb.FindGroupMemberListByGroupId(req.GroupID) if err != nil { - resp.ErrCode = constant.ErrDb.ErrCode - resp.ErrMsg = constant.ErrDb.ErrMsg + resp.ErrCode = constant.ErrDB.ErrCode + resp.ErrMsg = constant.ErrDB.ErrMsg log.NewError(req.OperationID, "FindGroupMemberListByGroupId failed,", err.Error(), req.GroupID) return &resp, nil } @@ -273,7 +272,7 @@ func (s *groupServer) GetGroupMemberList(ctx context.Context, req *pbGroup.GetGr resp.ErrCode = 0 memberList, err := imdb.GetGroupMemberByGroupId(req.GroupID, req.Filter, req.NextSeq, 30) if err != nil { - resp.ErrCode = constant.ErrDb.ErrCode + resp.ErrCode = constant.ErrDB.ErrCode resp.ErrMsg = err.Error() log.NewError(req.OperationID, "GetGroupMemberByGroupId failed,", req.GroupID, req.Filter, req.NextSeq, 30) return &resp, nil @@ -301,7 +300,7 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou ownerList, err := imdb.GetOwnerManagerByGroupId(req.GroupID) if err != nil { log.NewError(req.OperationID, "GetOwnerManagerByGroupId failed ", err.Error(), req.GroupID) - return &pbGroup.KickGroupMemberResp{ErrCode: constant.ErrParam.ErrCode, ErrMsg: constant.ErrParam.ErrMsg}, nil + return &pbGroup.KickGroupMemberResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } //op is group owner? var flag = 0 @@ -328,7 +327,7 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou if len(req.KickedUserIDList) == 0 { log.NewError(req.OperationID, "failed, kick list 0") - return &pbGroup.KickGroupMemberResp{ErrCode: constant.ErrParam.ErrCode, ErrMsg: constant.ErrParam.ErrMsg}, nil + return &pbGroup.KickGroupMemberResp{ErrCode: constant.ErrArgs.ErrCode, ErrMsg: constant.ErrArgs.ErrMsg}, nil } groupOwnerUserID := "" @@ -422,12 +421,12 @@ func (s *groupServer) GetGroupsInfo(ctx context.Context, req *pbGroup.GetGroupsI return &resp, nil } -func (s *groupServer) GroupApplicationResponse(_ context.Context, req *pbGroup.GroupApplicationResponseReq) (*pbGroup.CommonResp, error) { +func (s *groupServer) GroupApplicationResponse(_ context.Context, req *pbGroup.GroupApplicationResponseReq) (*pbGroup.GroupApplicationResponseResp, error) { log.NewInfo(req.OperationID, "GroupApplicationResponse args ", req.String()) reply, err := imdb.GroupApplicationResponse(req) if err != nil { log.NewError(req.OperationID, "GroupApplicationResponse failed ", err.Error(), req.String()) - return &pbGroup.CommonResp{ErrCode: 702, ErrMsg: err.Error()}, nil + return &pbGroup.GroupApplicationResponseResp{CommonResp: &pbGroup.CommonResp{ErrCode: 702, ErrMsg: err.Error()}}, nil } if req.HandleResult == 1 { @@ -471,13 +470,13 @@ func (s *groupServer) GroupApplicationResponse(_ context.Context, req *pbGroup.G return reply, nil } -func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq) (*pbGroup.CommonResp, error) { +func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq) (*pbGroup.JoinGroupResp, error) { log.NewInfo(req.OperationID, "JoinGroup args ", req.String()) applicationUserInfo, err := im_mysql_model.FindUserByUID(req.OpUserID) if err != nil { log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), req.OpUserID) - return &pbGroup.CommonResp{ErrCode: constant.ErrSearchUserInfo.ErrCode, ErrMsg: constant.ErrSearchUserInfo.ErrMsg}, nil + return &pbGroup.JoinGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } _, err = im_mysql_model.FindGroupRequestUserInfoByGroupIDAndUid(req.GroupID, req.OpUserID) @@ -487,34 +486,34 @@ func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq) if err = im_mysql_model.InsertIntoGroupRequest(req.GroupID, req.OpUserID, "0", req.ReqMessage, applicationUserInfo.Nickname, applicationUserInfo.FaceUrl); err != nil { log.NewError(req.OperationID, "InsertIntoGroupRequest ", err.Error(), req.GroupID, req.OpUserID, "0", req.ReqMessage, applicationUserInfo.Nickname, applicationUserInfo.FaceUrl) - return &pbGroup.CommonResp{ErrCode: constant.ErrJoinGroupApplication.ErrCode, ErrMsg: constant.ErrJoinGroupApplication.ErrMsg}, nil + return &pbGroup.JoinGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } memberList, err := im_mysql_model.FindGroupMemberListByGroupIdAndFilterInfo(req.GroupID, constant.GroupOwner) if len(memberList) == 0 { log.NewError(req.OperationID, "FindGroupMemberListByGroupIdAndFilterInfo failed ", req.GroupID, constant.GroupOwner, err) - return &pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""}, nil + return &pbGroup.JoinGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""}}, nil } chat.JoinApplicationNotification(req) log.NewInfo(req.OperationID, "ReceiveJoinApplicationNotification rpc return ") - return &pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""}, nil + return &pbGroup.JoinGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""}}, nil } -func (s *groupServer) QuitGroup(ctx context.Context, req *pbGroup.QuitGroupReq) (*pbGroup.CommonResp, error) { +func (s *groupServer) QuitGroup(ctx context.Context, req *pbGroup.QuitGroupReq) (*pbGroup.QuitGroupResp, error) { log.NewError("QuitGroup args ", req.String()) _, err := im_mysql_model.FindGroupMemberInfoByGroupIdAndUserId(req.GroupID, req.OpUserID) if err != nil { log.NewError(req.OperationID, "FindGroupMemberInfoByGroupIdAndUserId failed", err.Error(), req.GroupID, req.OpUserID) - return &pbGroup.CommonResp{ErrCode: constant.ErrQuitGroup.ErrCode, ErrMsg: constant.ErrQuitGroup.ErrMsg}, nil + return &pbGroup.QuitGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } err = im_mysql_model.DeleteGroupMemberByGroupIdAndUserId(req.GroupID, req.OpUserID) if err != nil { log.NewError(req.OperationID, "DeleteGroupMemberByGroupIdAndUserId failed ", err.Error(), req.GroupID, req.OpUserID) - return &pbGroup.CommonResp{ErrCode: constant.ErrQuitGroup.ErrCode, ErrMsg: constant.ErrQuitGroup.ErrMsg}, nil + return &pbGroup.QuitGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } err = db.DB.DelGroupMember(req.GroupID, req.OpUserID) @@ -525,7 +524,7 @@ func (s *groupServer) QuitGroup(ctx context.Context, req *pbGroup.QuitGroupReq) chat.MemberLeaveNotification(req) log.NewInfo(req.OperationID, "rpc QuitGroup return ") - return &pbGroup.CommonResp{}, nil + return &pbGroup.QuitGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""}}, nil } func hasAccess(req *pbGroup.SetGroupInfoReq) bool { @@ -543,17 +542,17 @@ func hasAccess(req *pbGroup.SetGroupInfoReq) bool { } } -func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInfoReq) (*pbGroup.CommonResp, error) { +func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInfoReq) (*pbGroup.SetGroupInfoResp, error) { log.NewInfo(req.OperationID, "SetGroupInfo args ", req.String()) if !hasAccess(req) { log.NewError(req.OperationID, "no access ") - return &pbGroup.CommonResp{ErrCode: constant.ErrSetGroupInfo.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil + return &pbGroup.SetGroupInfoResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil } group, err := im_mysql_model.FindGroupInfoByGroupId(req.GroupInfo.GroupID) if err != nil { log.NewError(req.OperationID, "FindGroupInfoByGroupId failed, ", err.Error(), req.GroupInfo.GroupID) - return &pbGroup.CommonResp{ErrCode: constant.ErrSetGroupInfo.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil + return &pbGroup.SetGroupInfoResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil } ////bitwise operators: 0001:groupName; 0010:Notification 0100:Introduction; 1000:FaceUrl; 10000:owner @@ -572,7 +571,7 @@ func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInf } //only administrators can set group information if err = im_mysql_model.SetGroupInfo(req.GroupInfo.GroupID, req.GroupInfo.GroupName, req.GroupInfo.Introduction, req.GroupInfo.Notification, req.GroupInfo.FaceUrl, ""); err != nil { - return &pbGroup.CommonResp{ErrCode: constant.ErrSetGroupInfo.ErrCode, ErrMsg: constant.ErrSetGroupInfo.ErrMsg}, nil + return &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil } if changedType != 0 { @@ -582,13 +581,13 @@ func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInf return &pbGroup.CommonResp{}, nil } -func (s *groupServer) TransferGroupOwner(_ context.Context, req *pbGroup.TransferGroupOwnerReq) (*pbGroup.CommonResp, error) { +func (s *groupServer) TransferGroupOwner(_ context.Context, req *pbGroup.TransferGroupOwnerReq) (*pbGroup.TransferGroupOwnerResp, error) { log.NewInfo(req.OperationID, "TransferGroupOwner ", req.String()) reply, err := im_mysql_model.TransferGroupOwner(req) if err != nil { log.NewError("TransferGroupOwner ", req.String()) - return &pbGroup.CommonResp{ErrCode: constant.ErrDb.ErrCode, ErrMsg: constant.ErrDb.ErrMsg}, nil + return &pbGroup.TransferGroupOwnerResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } changedType := int32(1) << 4 chat.GroupInfoChangedNotification(req.OperationID, req.OpUserID, req.GroupID, changedType) diff --git a/pkg/base_info/friend_api_struct.go b/pkg/base_info/friend_api_struct.go new file mode 100644 index 000000000..3b20185d8 --- /dev/null +++ b/pkg/base_info/friend_api_struct.go @@ -0,0 +1,155 @@ +package base_info + +import open_im_sdk "Open_IM/pkg/proto/sdk_ws" + +open_im_sdk "Open_IM/pkg/proto/sdk_ws" + +type paramsCommFriend struct { + OperationID string `json:"operationID" binding:"required"` + ToUserID string `json:"toUserID" binding:"required"` + FromUserID string `json:"fromUserID" binding:"required"` +} + + + +type AddBlacklistReq struct { + paramsCommFriend +} +type AddBlacklistResp struct { + CommResp +} + + + +type ImportFriendReq struct { + FriendUserIDList []string `json:"friendUserIDList" binding:"required"` + OperationID string `json:"operationID" binding:"required"` + FromUserID string `json:"fromUserID" binding:"required"` +} +type ImportFriendResp struct { + CommResp + Data []string `json:"data"` +} + + +type AddFriendReq struct { + paramsCommFriend + ReqMsg string `json:"reqMsg"` +} +type AddFriendResp struct { + CommResp +} + + +type AddFriendResponseReq struct { + paramsCommFriend + Flag int32 `json:"flag" binding:"required"` + HandleMsg string `json:"handleMsg"` +} +type AddFriendResponseResp struct { + CommResp +} + + + +type DeleteFriendReq struct { + paramsCommFriend +} +type DeleteFriendResp struct { + CommResp +} + + + +type GetBlackListReq struct { + paramsCommFriend +} +type GetBlackListResp struct { + CommResp + BlackUserInfoList []*blackUserInfo `json:"data"` +} + + +//type PublicUserInfo struct { +// UserID string `json:"userID"` +// Nickname string `json:"nickname"` +// FaceUrl string `json:"faceUrl"` +// Gender int32 `json:"gender"` +//} + +type blackUserInfo struct { + open_im_sdk.PublicUserInfo +} + + +type SetFriendCommentReq struct { + paramsCommFriend + Remark string `json:"remark" binding:"required"` +} +type SetFriendCommentResp struct { + CommResp +} + + +type RemoveBlackListReq struct { + paramsCommFriend +} +type RemoveBlackListResp struct { + CommResp +} + +type IsFriendReq struct { + paramsCommFriend +} +type IsFriendResp struct { + CommResp + Response bool `json:"response"` +} + + +type GetFriendsInfoReq struct { + paramsCommFriend +} +type GetFriendsInfoResp struct { + CommResp + FriendInfoList []*open_im_sdk.FriendInfo `json:"data"` +} + +type GetFriendListReq struct { + paramsCommFriend +} +type GetFriendListResp struct { + CommResp + FriendInfoList []*open_im_sdk.FriendInfo `json:"data"` +} + + + + + +type GetFriendApplyListReq struct { + paramsCommFriend +} +type GetFriendApplyListResp struct { + CommResp + FriendRequestList open_im_sdk.FriendRequest `json:"data"` +} + +type GetSelfApplyListReq struct { + paramsCommFriend +} +type GetSelfApplyListResp struct { + CommResp + FriendRequestList open_im_sdk.FriendRequest `json:"data"` +} + + + + + + + + + + + diff --git a/pkg/base_info/group_api_struct.go b/pkg/base_info/group_api_struct.go new file mode 100644 index 000000000..726a9c24a --- /dev/null +++ b/pkg/base_info/group_api_struct.go @@ -0,0 +1,153 @@ +package base_info + +import ( + pb "Open_IM/pkg/proto/group" + open_im_sdk "Open_IM/pkg/proto/sdk_ws" +) + +type CommResp struct { + ErrCode int32 `json:"errCode"` + ErrMsg string `json:"errMsg"` +} +type Id2Result struct { + UserID string `json:"userID"` + Result int32 `json:"result"` +} + +type KickGroupMemberReq struct { + GroupID string `json:"groupID" binding:"required"` + KickedUserIDList []string `json:"kickedUserIDList" binding:"required"` + Reason string `json:"reason"` + OperationID string `json:"operationID" binding:"required"` +} +type KickGroupMemberResp struct { + CommResp + Data []*Id2Result `json:"data"` +} + +type GetGroupMembersInfoReq struct { + GroupID string `json:"groupID" binding:"required"` + MemberList []string `json:"memberList" binding:"required"` + OperationID string `json:"operationID" binding:"required"` +} +type GetGroupMembersInfoResp struct { + CommResp + Data []*open_im_sdk.GroupMemberFullInfo `json:"data"` +} + +type InviteUserToGroupReq struct { + GroupID string `json:"groupID" binding:"required"` + InvitedUserIDList []string `json:"uidList" binding:"required"` + Reason string `json:"reason"` + OperationID string `json:"operationID" binding:"required"` +} +type InviteUserToGroupResp struct { + CommResp + Data []Id2Result `json:"data"` +} + +type GetJoinedGroupListReq struct { + OperationID string `json:"operationID" binding:"required"` + FromUserID string `json:"fromUserID" binding:"required"` +} +type GetJoinedGroupListResp struct { + CommResp + Data []*open_im_sdk.GroupInfo `json:"data"` +} + +type GetGroupMemberListReq struct { + GroupID string `json:"groupID"` + Filter int32 `json:"filter"` + NextSeq int32 `json:"nextSeq"` + OperationID string `json:"operationID"` +} +type GetGroupMemberListResp struct { + CommResp + NextSeq int32 `json:"nextSeq"` + Data []*open_im_sdk.GroupMemberFullInfo `json:"data"` +} + +type GetGroupAllMemberReq struct { + GroupID string `json:"groupID"` + OperationID string `json:"operationID"` +} +type GetGroupAllMemberResp struct { + CommResp + Data []*open_im_sdk.GroupMemberFullInfo `json:"data"` +} + +type CreateGroupReq struct { + MemberList []*pb.GroupAddMemberInfo `json:"memberList"` + GroupName string `json:"groupName"` + Introduction string `json:"introduction"` + Notification string `json:"notification"` + FaceUrl string `json:"faceUrl"` + OperationID string `json:"operationID" binding:"required"` + GroupType int32 `json:"groupType"` + Ex string `json:"ex"` +} +type CreateGroupResp struct { + CommResp + Data open_im_sdk.GroupInfo `json:"data"` +} + +type GetGroupApplicationListReq struct { + OperationID string `json:"operationID" binding:"required"` + FromUserID string `json:"fromUserID" binding:"required"` //my application +} +type GetGroupApplicationListResp struct { + CommResp + Data []*open_im_sdk.GroupRequest `json:"data"` +} + +type GetGroupInfoReq struct { + GroupIDList []string `json:"groupIDList" binding:"required"` + OperationID string `json:"operationID" binding:"required"` +} +type GetGroupInfoResp struct { + CommResp + Data []open_im_sdk.GroupInfo `json:"data"` +} + +type ApplicationGroupResponseReq struct { + OperationID string `json:"groupIDList" binding:"required"` + GroupID string `json:"groupIDList" binding:"required"` + FromUserID string `json:"groupIDList" binding:"required"` + HandledMsg string `json:"groupIDList" binding:"required"` + HandleResult int32 `json:"groupIDList" binding:"required"` +} +type ApplicationGroupResponseResp struct { + CommResp +} + +type JoinGroupReq struct { + GroupID string `json:"groupID"` + ReqMessage string `json:"reqMessage"` + OperationID string `json:"operationID"` +} +type JoinGroupResp struct { + CommResp +} + +type QuitGroupReq struct { + GroupID string `json:"groupID" binding:"required"` + OperationID string `json:"operationID" binding:"required"` +} +type QuitGroupResp struct { + CommResp +} + +type SetGroupInfoReq struct { + open_im_sdk.GroupInfo + OperationID string `json:"operationID" binding:"required"` +} +type SetGroupInfoResp struct { + CommResp +} + +type TransferGroupOwnerReq struct { + GroupID string `json:"groupID" binding:"required"` + OldOwnerUserID string `json:"oldOwnerUserID" binding:"required"` + NewOwnerUserID string `json:"newOwnerUserID" binding:"required"` + OperationID string `json:"operationID" binding:"required"` +} diff --git a/pkg/base_info/public_struct.go b/pkg/base_info/public_struct.go new file mode 100644 index 000000000..3669518e7 --- /dev/null +++ b/pkg/base_info/public_struct.go @@ -0,0 +1,95 @@ +//package base_info +// +//type GroupInfo struct { +// GroupID string `json:"groupID"` +// GroupName string `json:"groupName"` +// Notification string `json:"notification"` +// Introduction string `json:"introduction"` +// FaceUrl string `json:"faceUrl"` +// OperationID string `json:"operationID"` +// OwnerUserID string `json:"ownerUserID"` +// CreateTime int64 `json:"createTime"` +// MemberCount uint32 `json:"memberCount"` +// Ex string `json:"ex"` +// Status int32 `json:"status"` +// CreatorUserID string `json:"creatorUserID"` +// GroupType int32 `json:"groupType"` +//} +// +//type GroupMemberFullInfo struct { +// GroupID string `json:"groupID"` +// UserID string `json:"userID"` +// RoleLevel int32 `json:"roleLevel"` +// JoinTime uint64 `json:"joinTime"` +// Nickname string `json:"nickname"` +// FaceUrl string `json:"faceUrl"` +// FriendRemark string `json:"friendRemark"` +// AppMangerLevel int32 `json:"appMangerLevel"` +// JoinSource int32 `json:"joinSource"` +// OperatorUserID string `json:"operatorUserID"` +// Ex string `json:"ex"` +//} +// +//type PublicUserInfo struct { +// UserID string `json:"userID"` +// Nickname string `json:"nickname"` +// FaceUrl string `json:"faceUrl"` +// Gender int32 `json:"gender"` +//} +// +//type UserInfo struct { +// UserID string `json:"userID"` +// Nickname string `json:"nickname"` +// FaceUrl string `json:"faceUrl"` +// Gender int32 `json:"gender"` +// Mobile string `json:"mobile"` +// Birth string `json:"birth"` +// Email string `json:"email"` +// Ex string `json:"ex"` +//} +// +//type FriendInfo struct { +// OwnerUserID string `json:"ownerUserID"` +// Remark string `json:"remark"` +// CreateTime int64 `json:"createTime"` +// FriendUser UserInfo `json:"friendUser"` +// AddSource int32 `json:"addSource"` +// OperatorUserID string `json:"operatorUserID"` +// Ex string `json:"ex"` +//} +// +//type BlackInfo struct { +// OwnerUserID string `json:"ownerUserID"` +// CreateTime int64 `json:"createTime"` +// BlackUser PublicUserInfo `json:"friendUser"` +// AddSource int32 `json:"addSource"` +// OperatorUserID string `json:"operatorUserID"` +// Ex string `json:"ex"` +//} +// +//type GroupRequest struct { +// UserID string `json:"userID"` +// GroupID string `json:"groupID"` +// HandleResult string `json:"handleResult"` +// ReqMsg string `json:"reqMsg"` +// HandleMsg string `json:"handleMsg"` +// ReqTime int64 `json:"reqTime"` +// HandleUserID string `json:"handleUserID"` +// HandleTime int64 `json:"handleTime"` +// Ex string `json:"ex"` +//} +// +//type FriendRequest struct { +// FromUserID string `json:"fromUserID"` +// ToUserID string `json:"toUserID"` +// HandleResult int32 `json:"handleResult"` +// ReqMessage string `json:"reqMessage"` +// CreateTime int64 `json:"createTime"` +// HandlerUserID string `json:"handlerUserID"` +// HandleMsg string `json:"handleMsg"` +// HandleTime int64 `json:"handleTime"` +// Ex string `json:"ex"` +//} +// +// +// diff --git a/pkg/common/constant/error.go b/pkg/common/constant/error.go index 7541a784e..6df403140 100644 --- a/pkg/common/constant/error.go +++ b/pkg/common/constant/error.go @@ -11,53 +11,60 @@ type ErrInfo struct { var ( OK = ErrInfo{0, ""} - ErrMysql = ErrInfo{100, ""} - ErrMongo = ErrInfo{110, ""} - ErrRedis = ErrInfo{120, ""} - ErrParseToken = ErrInfo{200, "Parse token failed"} - ErrCreateToken = ErrInfo{201, "Create token failed"} - ErrAppServerKey = ErrInfo{300, "key error"} - ErrTencentCredential = ErrInfo{400, ""} + // ErrMysql = ErrInfo{100, ""} + // ErrMongo = ErrInfo{110, ""} + // ErrRedis = ErrInfo{120, ""} + ErrParseToken = ErrInfo{200, ParseTokenMsg.Error()} + // ErrCreateToken = ErrInfo{201, "Create token failed"} + // ErrAppServerKey = ErrInfo{300, "key error"} + ErrTencentCredential = ErrInfo{400, ThirdPartyMsg.Error()} - ErrorUserRegister = ErrInfo{600, "User registration failed"} - ErrAccountExists = ErrInfo{601, "The account is already registered and cannot be registered again"} - ErrUserPassword = ErrInfo{602, "User password error"} - ErrRefreshToken = ErrInfo{605, "Failed to refresh token"} - ErrAddFriend = ErrInfo{606, "Failed to add friends"} - ErrAgreeToAddFriend = ErrInfo{607, "Failed to agree application"} - ErrAddFriendToBlack = ErrInfo{608, "Failed to add friends to the blacklist"} - ErrGetBlackList = ErrInfo{609, "Failed to get blacklist"} - ErrDeleteFriend = ErrInfo{610, "Failed to delete friend"} - ErrGetFriendApplyList = ErrInfo{611, "Failed to get friend application list"} - ErrGetFriendList = ErrInfo{612, "Failed to get friend list"} - ErrRemoveBlackList = ErrInfo{613, "Failed to remove blacklist"} - ErrSearchUserInfo = ErrInfo{614, "Can't find the user information"} - ErrDelAppleDeviceToken = ErrInfo{615, ""} - ErrModifyUserInfo = ErrInfo{616, "update user some attribute failed"} - ErrSetFriendComment = ErrInfo{617, "set friend comment failed"} - ErrSearchUserInfoFromTheGroup = ErrInfo{618, "There is no such group or the user not in the group"} - ErrCreateGroup = ErrInfo{619, "create group chat failed"} - ErrJoinGroupApplication = ErrInfo{620, "Failed to apply to join the group"} - ErrQuitGroup = ErrInfo{621, "Failed to quit the group"} - ErrSetGroupInfo = ErrInfo{622, "Failed to set group info"} - ErrParam = ErrInfo{700, "param failed"} - ErrTokenExpired = ErrInfo{701, TokenExpired.Error()} - ErrTokenInvalid = ErrInfo{702, TokenInvalid.Error()} - ErrTokenMalformed = ErrInfo{703, TokenMalformed.Error()} - ErrTokenNotValidYet = ErrInfo{704, TokenNotValidYet.Error()} - ErrTokenUnknown = ErrInfo{705, TokenUnknown.Error()} + // ErrorUserRegister = ErrInfo{600, "User registration failed"} + // ErrAccountExists = ErrInfo{601, "The account is already registered and cannot be registered again"} + // ErrUserPassword = ErrInfo{602, "User password error"} + // ErrRefreshToken = ErrInfo{605, "Failed to refresh token"} + // ErrAddFriend = ErrInfo{606, "Failed to add friends"} + // ErrAgreeToAddFriend = ErrInfo{607, "Failed to agree application"} + // ErrAddFriendToBlack = ErrInfo{608, "Failed to add friends to the blacklist"} + // ErrGetBlackList = ErrInfo{609, "Failed to get blacklist"} + // ErrDeleteFriend = ErrInfo{610, "Failed to delete friend"} + // ErrGetFriendApplyList = ErrInfo{611, "Failed to get friend application list"} + // ErrGetFriendList = ErrInfo{612, "Failed to get friend list"} + // ErrRemoveBlackList = ErrInfo{613, "Failed to remove blacklist"} + // ErrSearchUserInfo = ErrInfo{614, "Can't find the user information"} + // ErrDelAppleDeviceToken = ErrInfo{615, ""} + // ErrModifyUserInfo = ErrInfo{616, "update user some attribute failed"} + // ErrSetFriendComment = ErrInfo{617, "set friend comment failed"} + // ErrSearchUserInfoFromTheGroup = ErrInfo{618, "There is no such group or the user not in the group"} + // ErrCreateGroup = ErrInfo{619, "create group chat failed"} + // ErrJoinGroupApplication = ErrInfo{620, "Failed to apply to join the group"} + // ErrQuitGroup = ErrInfo{621, "Failed to quit the group"} + // ErrSetGroupInfo = ErrInfo{622, "Failed to set group info"} + // ErrParam = ErrInfo{700, "param failed"} + ErrTokenExpired = ErrInfo{701, TokenExpiredMsg.Error()} + ErrTokenInvalid = ErrInfo{702, TokenInvalidMsg.Error()} + ErrTokenMalformed = ErrInfo{703, TokenMalformedMsg.Error()} + ErrTokenNotValidYet = ErrInfo{704, TokenNotValidYetMsg.Error()} + ErrTokenUnknown = ErrInfo{705, TokenUnknownMsg.Error()} - ErrAccess = ErrInfo{ErrCode: 800, ErrMsg: "no permission"} - - ErrDb = ErrInfo{ErrCode: 900, ErrMsg: "db failed"} + ErrAccess = ErrInfo{ErrCode: 801, ErrMsg: AccessMsg.Error()} + ErrDB = ErrInfo{ErrCode: 802, ErrMsg: DBMsg.Error()} + ErrArgs = ErrInfo{ErrCode: 8003, ErrMsg: ArgsMsg.Error()} ) var ( - TokenExpired = errors.New("token is timed out, please log in again") - TokenInvalid = errors.New("token has been invalidated") - TokenNotValidYet = errors.New("token not active yet") - TokenMalformed = errors.New("that's not even a token") - TokenUnknown = errors.New("couldn't handle this token") + ParseTokenMsg = errors.New("parse token failed") + TokenExpiredMsg = errors.New("token is timed out, please log in again") + TokenInvalidMsg = errors.New("token has been invalidated") + TokenNotValidYetMsg = errors.New("token not active yet") + TokenMalformedMsg = errors.New("that's not even a token") + TokenUnknownMsg = errors.New("couldn't handle this token") + + AccessMsg = errors.New("no permission") + DBMsg = errors.New("db failed") + ArgsMsg = errors.New("args failed") + + ThirdPartyMsg = errors.New("third party error") ) const ( @@ -67,7 +74,7 @@ const ( LogicalError = 10003 ServerError = 10004 HttpError = 10005 - IoErrot = 10006 + IoError = 10006 IntentionalError = 10007 ) diff --git a/pkg/common/db/mysql_model/im_mysql_model/friend_model.go b/pkg/common/db/mysql_model/im_mysql_model/friend_model.go index 8eefd1c63..6f5c5060e 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/friend_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/friend_model.go @@ -6,17 +6,13 @@ import ( "time" ) -func InsertToFriend(ownerId, friendId string, flag int32) error { +func InsertToFriend(toInsertFollow *Friend) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return err } - toInsertFollow := Friend{ - OwnerUserID: ownerId, - FriendUserID: friendId, - FriendFlag: flag, - CreateTime: time.Now(), - } + toInsertFollow.CreateTime = time.Now() + err = dbConn.Table("friend").Create(toInsertFollow).Error if err != nil { return err @@ -24,46 +20,56 @@ func InsertToFriend(ownerId, friendId string, flag int32) error { return nil } -func FindFriendRelationshipFromFriend(ownerId, friendId string) (*Friend, error) { +func FindFriendRelationshipFromFriend(OwnerUserID, FriendUserID string) (*Friend, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err } var friend Friend - err = dbConn.Table("friend").Where("owner_id=? and friend_id=?", ownerId, friendId).Find(&friend).Error + err = dbConn.Table("friend").Where("owner_user_id=? and friend_user_id=?", OwnerUserID, FriendUserID).Find(&friend).Error if err != nil { return nil, err } return &friend, err } -func FindUserInfoFromFriend(ownerId string) ([]Friend, error) { +func FindUserInfoFromFriend(OwnerUserID string) ([]Friend, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err } var friends []Friend - err = dbConn.Table("friend").Where("owner_id=?", ownerId).Find(&friends).Error + err = dbConn.Table("friend").Where("owner_user_id=?", OwnerUserID).Find(&friends).Error if err != nil { return nil, err } return friends, nil } -func UpdateFriendComment(ownerId, friendId, comment string) error { +func UpdateFriendComment(OwnerUserID, FriendUserID, Remark string) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return err } - err = dbConn.Exec("update friend set comment=? where owner_id=? and friend_id=?", comment, ownerId, friendId).Error + err = dbConn.Exec("update friend set remark=? where owner_user_id=? and friend_user_id=?", Remark, OwnerUserID, FriendUserID).Error return err } -func DeleteSingleFriendInfo(ownerId, friendId string) error { +func DeleteSingleFriendInfo(OwnerUserID, FriendUserID string) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return err } - err = dbConn.Table("friend").Where("owner_id=? and friend_id=?", ownerId, friendId).Delete(Friend{}).Error + err = dbConn.Table("friend").Where("owner_user_id=? and friend_user_id=?", OwnerUserID, FriendUserID).Delete(Friend{}).Error return err } + +//type Friend struct { +// OwnerUserID string `gorm:"column:owner_user_id;primaryKey;"` +// FriendUserID string `gorm:"column:friend_user_id;primaryKey;"` +// Remark string `gorm:"column:remark"` +// CreateTime time.Time `gorm:"column:create_time"` +// AddSource int32 `gorm:"column:add_source"` +// OperatorUserID string `gorm:"column:operator_user_id"` +// Ex string `gorm:"column:ex"` +//} diff --git a/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go b/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go index 9ccf17a0e..e2a332364 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go @@ -2,43 +2,42 @@ package im_mysql_model import ( "Open_IM/pkg/common/db" - "time" ) -// reqId add userId -func ReplaceIntoFriendReq(reqId, userId string, flag int32, reqMessage string) error { - dbConn, err := db.DB.MysqlDB.DefaultGormDB() - if err != nil { - return err - } - err = dbConn.Exec("replace into friend_request(req_id,user_id,flag,req_message,create_time) values(?,?,?,?,?)", reqId, userId, flag, reqMessage, time.Now()).Error - if err != nil { - return err - } - return nil -} +//type FriendRequest struct { +// FromUserID string `gorm:"column:from_user_id;primaryKey;"` +// ToUserID string `gorm:"column:to_user_id;primaryKey;"` +// HandleResult int32 `gorm:"column:handle_result"` +// ReqMessage string `gorm:"column:req_message"` +// CreateTime time.Time `gorm:"column:create_time"` +// HandlerUserID string `gorm:"column:handler_user_id"` +// HandleMsg string `gorm:"column:handle_msg"` +// HandleTime time.Time `gorm:"column:handle_time"` +// Ex string `gorm:"column:ex"` +//} -func FindFriendsApplyFromFriendReq(userId string) ([]FriendRequest, error) { +// who apply to add me +func GetReceivedFriendsApplicationListByUserID(ToUserID string) ([]FriendRequest, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err } var usersInfo []FriendRequest - //dbConn.LogMode(true) - err = dbConn.Table("friend_request").Where("user_id=?", userId).Find(&usersInfo).Error + err = dbConn.Table("friend_request").Where("to_user_id=?", ToUserID).Find(&usersInfo).Error if err != nil { return nil, err } return usersInfo, nil } -func FindSelfApplyFromFriendReq(userId string) ([]FriendRequest, error) { +//I apply to add somebody +func GetSendFriendApplicationListByUserID(FromUserID string) ([]FriendRequest, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err } var usersInfo []FriendRequest - err = dbConn.Table("friend_request").Where("req_id=?", userId).Find(&usersInfo).Error + err = dbConn.Table("friend_request").Where("from_user_id=?", FromUserID).Find(&usersInfo).Error if err != nil { return nil, err } @@ -46,26 +45,25 @@ func FindSelfApplyFromFriendReq(userId string) ([]FriendRequest, error) { } //reqId apply to add userId already -func FindFriendApplyFromFriendReqByUid(reqId, userId string) (*FriendRequest, error) { +func FindFriendApplicationByBothUserID(FromUserId, ToUserID string) (*FriendRequest, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err } var friendRequest FriendRequest - err = dbConn.Table("friend_request").Where("req_id=? and user_id=?", reqId, userId).Find(&friendRequest).Error + err = dbConn.Table("friend_request").Where("from_user_id=? and to_user_id=?", FromUserId, ToUserID).Find(&friendRequest).Error if err != nil { return nil, err } return &friendRequest, nil } -//userId process reqId -func UpdateFriendRelationshipToFriendReq(reqId, userId string, flag int32) error { +func UpdateFriendApplication(friendRequest FriendRequest) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return err } - err = dbConn.Exec("update friend_request set flag=? where req_id=? and user_id=?", flag, reqId, userId).Error + err = dbConn.Table("friend_request").Where("from_user_id=? and to_user_id=?", friendRequest.FromUserID, friendRequest.ToUserID).Update(&friendRequest).Error if err != nil { return err } diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go index 578b56632..888fff2e8 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go @@ -2,15 +2,25 @@ package im_mysql_model import ( "Open_IM/pkg/common/db" - "time" ) -func InsertIntoGroupMember(groupId, uid, nickName, userGroupFaceUrl string, administratorLevel int32) error { +//type GroupMember struct { +// GroupID string `gorm:"column:group_id;primaryKey;"` +// UserID string `gorm:"column:user_id;primaryKey;"` +// NickName string `gorm:"column:nickname"` +// FaceUrl string `gorm:"user_group_face_url"` +// RoleLevel int32 `gorm:"column:role_level"` +// JoinTime time.Time `gorm:"column:join_time"` +// JoinSource int32 `gorm:"column:join_source"` +// OperatorUserID string `gorm:"column:operator_user_id"` +// Ex string `gorm:"column:ex"` +//} + +func InsertIntoGroupMember(toInsertInfo GroupMember) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return err } - toInsertInfo := GroupMember{GroupID: groupId, UserID: uid, NickName: nickName, AdministratorLevel: administratorLevel, JoinTime: time.Now(), FaceUrl: userGroupFaceUrl} err = dbConn.Table("group_member").Create(toInsertInfo).Error if err != nil { return err @@ -18,154 +28,154 @@ func InsertIntoGroupMember(groupId, uid, nickName, userGroupFaceUrl string, admi return nil } -func FindGroupMemberListByUserId(uid string) ([]GroupMember, error) { +func GetGroupMemberListByUserID(userID string) ([]GroupMember, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err } var groupMemberList []GroupMember - err = dbConn.Raw("select * from `group_member` where uid=?", uid).Find(&groupMemberList).Error + err = dbConn.Table("group_member").Where("user_id=?", userID).Find(&groupMemberList).Error if err != nil { return nil, err } return groupMemberList, nil } -func FindGroupMemberListByGroupId(groupId string) ([]GroupMember, error) { +func GetGroupMemberListByGroupID(groupID string) ([]GroupMember, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err } var groupMemberList []GroupMember - err = dbConn.Raw("select * from `group_member` where group_id=?", groupId).Find(&groupMemberList).Error + err = dbConn.Table("group_member").Where("group_id=?", groupID).Find(&groupMemberList).Error if err != nil { return nil, err } return groupMemberList, nil } -func FindGroupMemberListByGroupIdAndFilterInfo(groupId string, filter int32) ([]GroupMember, error) { +func GetGroupMemberListByGroupIDAndFilter(groupID string, filter int32) ([]GroupMember, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() - dbConn.LogMode(true) if err != nil { return nil, err } var groupMemberList []GroupMember - err = dbConn.Raw("select * from `group_member` where group_id=? and administrator_level=?", groupId, filter).Find(&groupMemberList).Error + err = dbConn.Table("group_member").Where("group_id=? and role_level=?", groupID, filter).Find(&groupMemberList).Error if err != nil { return nil, err } return groupMemberList, nil } -func FindGroupMemberInfoByGroupIdAndUserId(groupId, uid string) (*GroupMember, error) { + +func GetGroupMemberInfoByGroupIDAndUserID(groupID, userID string) (*GroupMember, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err } var groupMember GroupMember - err = dbConn.Raw("select * from `group_member` where group_id=? and uid=? limit 1", groupId, uid).Find(&groupMember).Error + err = dbConn.Table("group_member").Where("group_id=? and user_id=? limit 1", groupID, userID).Find(&groupMember).Error if err != nil { return nil, err } return &groupMember, nil } -func DeleteGroupMemberByGroupIdAndUserId(groupId, uid string) error { +func DeleteGroupMemberByGroupIDAndUserID(groupID, userID string) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return err } - err = dbConn.Exec("delete from `group_member` where group_id=? and uid=?", groupId, uid).Error + err = dbConn.Table("group_member").Where("group_id=? and user_id=? limit 1", groupID, userID).Delete(&GroupMember{}).Error if err != nil { return err } return nil } -func UpdateOwnerGroupNickName(groupId, userId, groupNickName string) error { +func UpdateGroupMemberInfo(groupMemberInfo GroupMember) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return err } - err = dbConn.Exec("update `group_member` set nickname=? where group_id=? and uid=?", groupNickName, groupId, userId).Error + err = dbConn.Table("group_member").Where("group_id=? and user_id=?", groupMemberInfo.GroupID, groupMemberInfo.UserID).Update(&groupMemberInfo).Error if err != nil { return err } return nil } -func SelectGroupList(groupID string) ([]string, error) { - var groupUserID string - var groupList []string - dbConn, err := db.DB.MysqlDB.DefaultGormDB() - if err != nil { - return groupList, err - } - - rows, err := dbConn.Model(&GroupMember{}).Where("group_id = ?", groupID).Select("user_id").Rows() - if err != nil { - return groupList, err - } - defer rows.Close() - for rows.Next() { - rows.Scan(&groupUserID) - groupList = append(groupList, groupUserID) - } - return groupList, nil -} - -func UpdateTheUserAdministratorLevel(groupId, uid string, administratorLevel int64) error { - dbConn, err := db.DB.MysqlDB.DefaultGormDB() - if err != nil { - return err - } - err = dbConn.Exec("update `group_member` set administrator_level=? where group_id=? and uid=?", administratorLevel, groupId, uid).Error - if err != nil { - return err - } - return nil -} - -func GetOwnerManagerByGroupId(groupId string) ([]GroupMember, error) { +func GetOwnerManagerByGroupID(groupID string) ([]GroupMember, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err } var groupMemberList []GroupMember - err = dbConn.Raw("select * from `group_member` where group_id=? and administrator_level > 0", groupId).Find(&groupMemberList).Error + err = dbConn.Table("group_member").Where("group_id=? and role_level>0", groupID).Find(&groupMemberList).Error if err != nil { return nil, err } return groupMemberList, nil } -func IsExistGroupMember(groupId, uid string) bool { +func GetGroupMemberNumByGroupID(groupID string) int32 { + dbConn, err := db.DB.MysqlDB.DefaultGormDB() + if err != nil { + return 0 + } + var number int32 + err = dbConn.Table("group_member").Where("group_id=?", groupID).Count(&number).Error + if err != nil { + return 0 + } + return number +} + +func GetGroupOwnerInfoByGroupID(groupID string) (*GroupMember, error) { + omList, err := GetOwnerManagerByGroupID(groupID) + if err != nil { + return nil, err + } + for _, v := range omList { + if v.RoleLevel == 1 { + return &v, nil + } + } + return nil, nil +} + +func IsExistGroupMember(groupID, userID string) bool { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return false } var number int32 - err = dbConn.Raw("select count(*) from `group_member` where group_id = ? and uid = ?", groupId, uid).Count(&number).Error + err = dbConn.Table("group_member").Where("group_id = ? and user_id = ?", groupID, userID).Count(&number).Error if err != nil { return false } - if number != 1 { return false } return true } -func RemoveGroupMember(groupId string, memberId string) error { - return DeleteGroupMemberByGroupIdAndUserId(groupId, memberId) +func RemoveGroupMember(groupID string, UserID string) error { + return DeleteGroupMemberByGroupIDAndUserID(groupID, UserID) } -func GetMemberInfoById(groupId string, memberId string) (*GroupMember, error) { - return FindGroupMemberInfoByGroupIdAndUserId(groupId, memberId) +func GetMemberInfoByID(groupID string, userID string) (*GroupMember, error) { + return GetGroupMemberInfoByGroupIDAndUserID(groupID, userID) } -func GetGroupMemberByGroupId(groupId string, filter int32, begin int32, maxNumber int32) ([]GroupMember, error) { - memberList, err := FindGroupMemberListByGroupId(groupId) //sorted by join time +func GetGroupMemberByGroupID(groupID string, filter int32, begin int32, maxNumber int32) ([]GroupMember, error) { + var memberList []GroupMember + var err error + if filter >= 0 { + memberList, err = GetGroupMemberListByGroupIDAndFilter(groupID, filter) //sorted by join time + } else { + memberList, err = GetGroupMemberListByGroupID(groupID) + } + if err != nil { return nil, err } @@ -182,49 +192,35 @@ func GetGroupMemberByGroupId(groupId string, filter int32, begin int32, maxNumbe return memberList[begin:end], nil } -func GetJoinedGroupIdListByMemberId(memberId string) ([]GroupMember, error) { - return FindGroupMemberListByUserId(memberId) -} - -func GetGroupMemberNumByGroupId(groupId string) int32 { - dbConn, err := db.DB.MysqlDB.DefaultGormDB() - if err != nil { - return 0 - } - var number int32 - err = dbConn.Raw("select count(*) from `group_member` where group_id=? ", groupId).Count(&number).Error - if err != nil { - return 0 - } - return number -} - -func GetGroupOwnerByGroupId(groupId string) string { - omList, err := GetOwnerManagerByGroupId(groupId) - if err != nil { - return "" - } - for _, v := range omList { - if v.AdministratorLevel == 1 { - return v.UserID - } - } - return "" -} - -func GetGroupOwnerInfoByGroupId(groupId string) (*GroupMember, error) { - omList, err := GetOwnerManagerByGroupId(groupId) +func GetJoinedGroupIDListByUserID(userID string) ([]string, error) { + memberList, err := GetGroupMemberListByUserID(userID) if err != nil { return nil, err } - for _, v := range omList { - if v.AdministratorLevel == 1 { - return v, nil - } + var groupIDList []string = make([]string, len(memberList)) + for _, v := range memberList { + groupIDList = append(groupIDList, v.GroupID) } - return nil, nil + return groupIDList, nil } -func InsertGroupMember(groupId, userId, nickName, userFaceUrl string, role int32) error { - return InsertIntoGroupMember(groupId, userId, nickName, userFaceUrl, role) -} +// +//func SelectGroupList(groupID string) ([]string, error) { +// var groupUserID string +// var groupList []string +// dbConn, err := db.DB.MysqlDB.DefaultGormDB() +// if err != nil { +// return groupList, err +// } +// +// rows, err := dbConn.Model(&GroupMember{}).Where("group_id = ?", groupID).Select("user_id").Rows() +// if err != nil { +// return groupList, err +// } +// defer rows.Close() +// for rows.Next() { +// rows.Scan(&groupUserID) +// groupList = append(groupList, groupUserID) +// } +// return groupList, nil +//} diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_model.go index db4e7f3c0..5fc580c8a 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_model.go @@ -8,17 +8,16 @@ import ( "time" ) -func InsertIntoGroup(groupId, name, introduction, notification, faceUrl, ex string) error { +func InsertIntoGroup(groupInfo Group) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return err } - //Default group name - if name == "" { - name = "Group Chat" + if groupInfo.GroupName == "" { + groupInfo.GroupName = "Group Chat" } - toInsertInfo := Group{GroupID: groupId, GroupName: name, Introduction: introduction, Notification: notification, FaceUrl: faceUrl, CreateTime: time.Now(), Ex: ex} - err = dbConn.Table("group").Create(toInsertInfo).Error + groupInfo.CreateTime = time.Now() + err = dbConn.Table("group").Create(groupInfo).Error if err != nil { return err } @@ -164,7 +163,7 @@ func GetGroupApplicationList(uid string) (*group.GetGroupApplicationListResp, er return reply, nil } -func TransferGroupOwner(pb *group.TransferGroupOwnerReq) (*group.CommonResp, error) { +func TransferGroupOwner(pb *group.TransferGroupOwnerReq) (*group.TransferGroupOwnerResp, error) { oldOwner, err := FindGroupMemberInfoByGroupIdAndUserId(pb.GroupID, pb.OldOwnerUserID) if err != nil { return nil, err @@ -187,7 +186,7 @@ func TransferGroupOwner(pb *group.TransferGroupOwnerReq) (*group.CommonResp, err return nil, err } - return &group.CommonResp{}, nil + return &group.TransferGroupOwnerResp{CommonResp: &group.CommonResp{ErrCode: 0}}, nil } func GroupApplicationResponse(pb *group.GroupApplicationResponseReq) (*group.CommonResp, error) { diff --git a/pkg/common/db/mysql_model/im_mysql_model/model_struct.go b/pkg/common/db/mysql_model/im_mysql_model/model_struct.go index f25f4081f..45741797e 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/model_struct.go +++ b/pkg/common/db/mysql_model/im_mysql_model/model_struct.go @@ -2,69 +2,82 @@ package im_mysql_model import "time" -type User struct { - UserID string `gorm:"column:uid;primaryKey;"` - Nickname string `gorm:"column:name"` - FaceUrl string `gorm:"column:icon"` - Gender int32 `gorm:"column:gender"` - Mobile string `gorm:"column:mobile"` - Birth string `gorm:"column:birth"` - Email string `gorm:"column:email"` - Ex string `gorm:"column:ex"` - CreateTime time.Time `gorm:"column:create_time"` +type Friend struct { + OwnerUserID string `gorm:"column:owner_user_id;primaryKey;"` + FriendUserID string `gorm:"column:friend_user_id;primaryKey;"` + Remark string `gorm:"column:remark"` + CreateTime time.Time `gorm:"column:create_time"` + AddSource int32 `gorm:"column:add_source"` + OperatorUserID string `gorm:"column:operator_user_id"` + Ex string `gorm:"column:ex"` } -type Friend struct { - OwnerUserID string `gorm:"column:owner_id"` - FriendUserID string `gorm:"column:friend_id"` - Remark string `gorm:"column:comment"` - FriendFlag int32 `gorm:"column:friend_flag"` - CreateTime time.Time `gorm:"column:create_time"` -} type FriendRequest struct { - ReqID string `gorm:"column:req_id"` - UserID string `gorm:"column:user_id"` - Flag int32 `gorm:"column:flag"` - ReqMessage string `gorm:"column:req_message"` - CreateTime time.Time `gorm:"column:create_time"` -} -type BlackList struct { - OwnerUserID string `gorm:"column:owner_id"` - BlockUserID string `gorm:"column:block_id"` - CreateTime time.Time `gorm:"column:create_time"` + FromUserID string `gorm:"column:from_user_id;primaryKey;"` + ToUserID string `gorm:"column:to_user_id;primaryKey;"` + HandleResult int32 `gorm:"column:handle_result"` + ReqMessage string `gorm:"column:req_message"` + CreateTime time.Time `gorm:"column:create_time"` + HandlerUserID string `gorm:"column:handler_user_id"` + HandleMsg string `gorm:"column:handle_msg"` + HandleTime time.Time `gorm:"column:handle_time"` + Ex string `gorm:"column:ex"` } type Group struct { - GroupID string `gorm:"column:group_id"` - GroupName string `gorm:"column:name"` - Introduction string `gorm:"column:introduction"` - Notification string `gorm:"column:notification"` - FaceUrl string `gorm:"column:face_url"` - CreateTime time.Time `gorm:"column:create_time"` - Ext string `gorm:"column:ex"` + GroupID string `gorm:"column:group_id;primaryKey;"` + GroupName string `gorm:"column:name"` + Introduction string `gorm:"column:introduction"` + Notification string `gorm:"column:notification"` + FaceUrl string `gorm:"column:face_url"` + CreateTime time.Time `gorm:"column:create_time"` + Status int32 `gorm:"column:status"` + CreatorUserID string `gorm:"column:creator_user_id"` + GroupType int32 `gorm:"column:group_type"` + Ex string `gorm:"column:ex"` } type GroupMember struct { - GroupID string `gorm:"column:group_id"` - UserID string `gorm:"column:uid"` - NickName string `gorm:"column:nickname"` - AdministratorLevel int32 `gorm:"column:administrator_level"` - JoinTime time.Time `gorm:"column:join_time"` - FaceUrl string `gorm:"user_group_face_url"` + GroupID string `gorm:"column:group_id;primaryKey;"` + UserID string `gorm:"column:user_id;primaryKey;"` + NickName string `gorm:"column:nickname"` + FaceUrl string `gorm:"user_group_face_url"` + RoleLevel int32 `gorm:"column:role_level"` + JoinTime time.Time `gorm:"column:join_time"` + JoinSource int32 `gorm:"column:join_source"` + OperatorUserID string `gorm:"column:operator_user_id"` + Ex string `gorm:"column:ex"` } type GroupRequest struct { - ID string `gorm:"column:id"` - GroupID string `gorm:"column:group_id"` - FromUserID string `gorm:"column:from_user_id"` - ToUserID string `gorm:"column:to_user_id"` - Flag int32 `gorm:"column:flag"` - ReqMsg string `gorm:"column:req_msg"` - HandledMsg string `gorm:"column:handled_msg"` - CreateTime time.Time `gorm:"column:create_time"` - FromUserNickname string `gorm:"from_user_nickname"` - ToUserNickname string `gorm:"to_user_nickname"` - FromUserFaceUrl string `gorm:"from_user_face_url"` - ToUserFaceUrl string `gorm:"to_user_face_url"` - HandledUser string `gorm:"handled_user"` + UserID string `gorm:"column:user_id;primaryKey;"` + GroupID string `gorm:"column:group_id;primaryKey;"` + HandleResult string `gorm:"column:handle_result"` + ReqMsg string `gorm:"column:req_msg"` + HandledMsg string `gorm:"column:handled_msg"` + ReqTime time.Time `gorm:"column:req_time"` + HandleUserID string `gorm:"column:handle_user_id"` + HandledTime time.Time `gorm:"column:handle_time"` + Ex string `gorm:"column:ex"` +} + +type User struct { + UserID string `gorm:"column:user_id;primaryKey;"` + Nickname string `gorm:"column:name"` + FaceUrl string `gorm:"column:icon"` + Gender int32 `gorm:"column:gender"` + PhoneNumber string `gorm:"column:phone_number"` + Birth string `gorm:"column:birth"` + Email string `gorm:"column:email"` + Ex string `gorm:"column:ex"` + CreateTime time.Time `gorm:"column:create_time"` +} + +type BlackList struct { + OwnerUserID string `gorm:"column:owner_user_id;primaryKey;"` + BlockUserID string `gorm:"column:block_user_id;primaryKey;"` + CreateTime time.Time `gorm:"column:create_time"` + AddSource int32 `gorm:"column:add_source"` + OperatorUserID int32 `gorm:"column:operator_user_id"` + Ex string `gorm:"column:ex"` } diff --git a/pkg/proto/base/base.proto b/pkg/proto/base/base.proto new file mode 100644 index 000000000..6d5144f0b --- /dev/null +++ b/pkg/proto/base/base.proto @@ -0,0 +1,5 @@ +syntax = "proto3"; +package base; + + + diff --git a/pkg/proto/friend/friend.pb.go b/pkg/proto/friend/friend.pb.go index a0c0fb25e..67efb3483 100644 --- a/pkg/proto/friend/friend.pb.go +++ b/pkg/proto/friend/friend.pb.go @@ -36,7 +36,7 @@ func (m *CommonResp) Reset() { *m = CommonResp{} } func (m *CommonResp) String() string { return proto.CompactTextString(m) } func (*CommonResp) ProtoMessage() {} func (*CommonResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{0} + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{0} } func (m *CommonResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CommonResp.Unmarshal(m, b) @@ -84,7 +84,7 @@ func (m *CommID) Reset() { *m = CommID{} } func (m *CommID) String() string { return proto.CompactTextString(m) } func (*CommID) ProtoMessage() {} func (*CommID) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{1} + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{1} } func (m *CommID) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CommID.Unmarshal(m, b) @@ -143,7 +143,7 @@ func (m *GetFriendsInfoReq) Reset() { *m = GetFriendsInfoReq{} } func (m *GetFriendsInfoReq) String() string { return proto.CompactTextString(m) } func (*GetFriendsInfoReq) ProtoMessage() {} func (*GetFriendsInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{2} + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{2} } func (m *GetFriendsInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendsInfoReq.Unmarshal(m, b) @@ -171,19 +171,19 @@ func (m *GetFriendsInfoReq) GetCommID() *CommID { } type GetFriendInfoResp struct { - ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` - ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` - Data *FriendInfo `protobuf:"bytes,3,opt,name=Data" json:"Data,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` + FriendInfoList []*sdk_ws.FriendInfo `protobuf:"bytes,3,rep,name=FriendInfoList" json:"FriendInfoList,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GetFriendInfoResp) Reset() { *m = GetFriendInfoResp{} } func (m *GetFriendInfoResp) String() string { return proto.CompactTextString(m) } func (*GetFriendInfoResp) ProtoMessage() {} func (*GetFriendInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{3} + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{3} } func (m *GetFriendInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendInfoResp.Unmarshal(m, b) @@ -217,86 +217,16 @@ func (m *GetFriendInfoResp) GetErrMsg() string { return "" } -func (m *GetFriendInfoResp) GetData() *FriendInfo { +func (m *GetFriendInfoResp) GetFriendInfoList() []*sdk_ws.FriendInfo { if m != nil { - return m.Data + return m.FriendInfoList } return nil } -type FriendInfo struct { - OwnerUserID string `protobuf:"bytes,1,opt,name=OwnerUserID" json:"OwnerUserID,omitempty"` - Remark string `protobuf:"bytes,2,opt,name=Remark" json:"Remark,omitempty"` - CreateTime uint64 `protobuf:"varint,3,opt,name=CreateTime" json:"CreateTime,omitempty"` - FriendUser *sdk_ws.UserInfo `protobuf:"bytes,4,opt,name=FriendUser" json:"FriendUser,omitempty"` - IsBlack int32 `protobuf:"varint,5,opt,name=IsBlack" json:"IsBlack,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *FriendInfo) Reset() { *m = FriendInfo{} } -func (m *FriendInfo) String() string { return proto.CompactTextString(m) } -func (*FriendInfo) ProtoMessage() {} -func (*FriendInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{4} -} -func (m *FriendInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FriendInfo.Unmarshal(m, b) -} -func (m *FriendInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FriendInfo.Marshal(b, m, deterministic) -} -func (dst *FriendInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_FriendInfo.Merge(dst, src) -} -func (m *FriendInfo) XXX_Size() int { - return xxx_messageInfo_FriendInfo.Size(m) -} -func (m *FriendInfo) XXX_DiscardUnknown() { - xxx_messageInfo_FriendInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_FriendInfo proto.InternalMessageInfo - -func (m *FriendInfo) GetOwnerUserID() string { - if m != nil { - return m.OwnerUserID - } - return "" -} - -func (m *FriendInfo) GetRemark() string { - if m != nil { - return m.Remark - } - return "" -} - -func (m *FriendInfo) GetCreateTime() uint64 { - if m != nil { - return m.CreateTime - } - return 0 -} - -func (m *FriendInfo) GetFriendUser() *sdk_ws.UserInfo { - if m != nil { - return m.FriendUser - } - return nil -} - -func (m *FriendInfo) GetIsBlack() int32 { - if m != nil { - return m.IsBlack - } - return 0 -} - type AddFriendReq struct { CommID *CommID `protobuf:"bytes,1,opt,name=CommID" json:"CommID,omitempty"` - ReqMessage string `protobuf:"bytes,2,opt,name=ReqMessage" json:"ReqMessage,omitempty"` + ReqMsg string `protobuf:"bytes,2,opt,name=ReqMsg" json:"ReqMsg,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -306,7 +236,7 @@ func (m *AddFriendReq) Reset() { *m = AddFriendReq{} } func (m *AddFriendReq) String() string { return proto.CompactTextString(m) } func (*AddFriendReq) ProtoMessage() {} func (*AddFriendReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{5} + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{4} } func (m *AddFriendReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddFriendReq.Unmarshal(m, b) @@ -333,13 +263,51 @@ func (m *AddFriendReq) GetCommID() *CommID { return nil } -func (m *AddFriendReq) GetReqMessage() string { +func (m *AddFriendReq) GetReqMsg() string { if m != nil { - return m.ReqMessage + return m.ReqMsg } return "" } +type AddFriendResp struct { + CommonResp *CommonResp `protobuf:"bytes,1,opt,name=CommonResp" json:"CommonResp,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AddFriendResp) Reset() { *m = AddFriendResp{} } +func (m *AddFriendResp) String() string { return proto.CompactTextString(m) } +func (*AddFriendResp) ProtoMessage() {} +func (*AddFriendResp) Descriptor() ([]byte, []int) { + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{5} +} +func (m *AddFriendResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AddFriendResp.Unmarshal(m, b) +} +func (m *AddFriendResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AddFriendResp.Marshal(b, m, deterministic) +} +func (dst *AddFriendResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_AddFriendResp.Merge(dst, src) +} +func (m *AddFriendResp) XXX_Size() int { + return xxx_messageInfo_AddFriendResp.Size(m) +} +func (m *AddFriendResp) XXX_DiscardUnknown() { + xxx_messageInfo_AddFriendResp.DiscardUnknown(m) +} + +var xxx_messageInfo_AddFriendResp proto.InternalMessageInfo + +func (m *AddFriendResp) GetCommonResp() *CommonResp { + if m != nil { + return m.CommonResp + } + return nil +} + type ImportFriendReq struct { FriendUserIDList []string `protobuf:"bytes,1,rep,name=FriendUserIDList" json:"FriendUserIDList,omitempty"` OperationID string `protobuf:"bytes,2,opt,name=OperationID" json:"OperationID,omitempty"` @@ -354,7 +322,7 @@ func (m *ImportFriendReq) Reset() { *m = ImportFriendReq{} } func (m *ImportFriendReq) String() string { return proto.CompactTextString(m) } func (*ImportFriendReq) ProtoMessage() {} func (*ImportFriendReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{6} + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{6} } func (m *ImportFriendReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ImportFriendReq.Unmarshal(m, b) @@ -403,18 +371,18 @@ func (m *ImportFriendReq) GetOpUserID() string { } type ImportFriendResp struct { - CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` - FailedUidList []string `protobuf:"bytes,2,rep,name=failedUidList" json:"failedUidList,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + CommonResp *CommonResp `protobuf:"bytes,1,opt,name=CommonResp" json:"CommonResp,omitempty"` + FailedFriendUserIDList []string `protobuf:"bytes,2,rep,name=FailedFriendUserIDList" json:"FailedFriendUserIDList,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *ImportFriendResp) Reset() { *m = ImportFriendResp{} } func (m *ImportFriendResp) String() string { return proto.CompactTextString(m) } func (*ImportFriendResp) ProtoMessage() {} func (*ImportFriendResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{7} + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{7} } func (m *ImportFriendResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ImportFriendResp.Unmarshal(m, b) @@ -441,167 +409,105 @@ func (m *ImportFriendResp) GetCommonResp() *CommonResp { return nil } -func (m *ImportFriendResp) GetFailedUidList() []string { +func (m *ImportFriendResp) GetFailedFriendUserIDList() []string { if m != nil { - return m.FailedUidList + return m.FailedFriendUserIDList } return nil } -type GetFriendApplyReq struct { +type GetFriendApplyListReq struct { CommID *CommID `protobuf:"bytes,1,opt,name=CommID" json:"CommID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *GetFriendApplyReq) Reset() { *m = GetFriendApplyReq{} } -func (m *GetFriendApplyReq) String() string { return proto.CompactTextString(m) } -func (*GetFriendApplyReq) ProtoMessage() {} -func (*GetFriendApplyReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{8} +func (m *GetFriendApplyListReq) Reset() { *m = GetFriendApplyListReq{} } +func (m *GetFriendApplyListReq) String() string { return proto.CompactTextString(m) } +func (*GetFriendApplyListReq) ProtoMessage() {} +func (*GetFriendApplyListReq) Descriptor() ([]byte, []int) { + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{8} } -func (m *GetFriendApplyReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetFriendApplyReq.Unmarshal(m, b) +func (m *GetFriendApplyListReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetFriendApplyListReq.Unmarshal(m, b) } -func (m *GetFriendApplyReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetFriendApplyReq.Marshal(b, m, deterministic) +func (m *GetFriendApplyListReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetFriendApplyListReq.Marshal(b, m, deterministic) } -func (dst *GetFriendApplyReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetFriendApplyReq.Merge(dst, src) +func (dst *GetFriendApplyListReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetFriendApplyListReq.Merge(dst, src) } -func (m *GetFriendApplyReq) XXX_Size() int { - return xxx_messageInfo_GetFriendApplyReq.Size(m) +func (m *GetFriendApplyListReq) XXX_Size() int { + return xxx_messageInfo_GetFriendApplyListReq.Size(m) } -func (m *GetFriendApplyReq) XXX_DiscardUnknown() { - xxx_messageInfo_GetFriendApplyReq.DiscardUnknown(m) +func (m *GetFriendApplyListReq) XXX_DiscardUnknown() { + xxx_messageInfo_GetFriendApplyListReq.DiscardUnknown(m) } -var xxx_messageInfo_GetFriendApplyReq proto.InternalMessageInfo +var xxx_messageInfo_GetFriendApplyListReq proto.InternalMessageInfo -func (m *GetFriendApplyReq) GetCommID() *CommID { +func (m *GetFriendApplyListReq) GetCommID() *CommID { if m != nil { return m.CommID } return nil } -type GetFriendApplyResp struct { - ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` - ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` - Data []*ApplyUserInfo `protobuf:"bytes,4,rep,name=data" json:"data,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +type GetFriendApplyListResp struct { + ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` + FriendRequestList []*sdk_ws.FriendRequest `protobuf:"bytes,3,rep,name=FriendRequestList" json:"FriendRequestList,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *GetFriendApplyResp) Reset() { *m = GetFriendApplyResp{} } -func (m *GetFriendApplyResp) String() string { return proto.CompactTextString(m) } -func (*GetFriendApplyResp) ProtoMessage() {} -func (*GetFriendApplyResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{9} +func (m *GetFriendApplyListResp) Reset() { *m = GetFriendApplyListResp{} } +func (m *GetFriendApplyListResp) String() string { return proto.CompactTextString(m) } +func (*GetFriendApplyListResp) ProtoMessage() {} +func (*GetFriendApplyListResp) Descriptor() ([]byte, []int) { + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{9} } -func (m *GetFriendApplyResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetFriendApplyResp.Unmarshal(m, b) +func (m *GetFriendApplyListResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetFriendApplyListResp.Unmarshal(m, b) } -func (m *GetFriendApplyResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetFriendApplyResp.Marshal(b, m, deterministic) +func (m *GetFriendApplyListResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetFriendApplyListResp.Marshal(b, m, deterministic) } -func (dst *GetFriendApplyResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetFriendApplyResp.Merge(dst, src) +func (dst *GetFriendApplyListResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetFriendApplyListResp.Merge(dst, src) } -func (m *GetFriendApplyResp) XXX_Size() int { - return xxx_messageInfo_GetFriendApplyResp.Size(m) +func (m *GetFriendApplyListResp) XXX_Size() int { + return xxx_messageInfo_GetFriendApplyListResp.Size(m) } -func (m *GetFriendApplyResp) XXX_DiscardUnknown() { - xxx_messageInfo_GetFriendApplyResp.DiscardUnknown(m) +func (m *GetFriendApplyListResp) XXX_DiscardUnknown() { + xxx_messageInfo_GetFriendApplyListResp.DiscardUnknown(m) } -var xxx_messageInfo_GetFriendApplyResp proto.InternalMessageInfo +var xxx_messageInfo_GetFriendApplyListResp proto.InternalMessageInfo -func (m *GetFriendApplyResp) GetErrCode() int32 { +func (m *GetFriendApplyListResp) GetErrCode() int32 { if m != nil { return m.ErrCode } return 0 } -func (m *GetFriendApplyResp) GetErrMsg() string { +func (m *GetFriendApplyListResp) GetErrMsg() string { if m != nil { return m.ErrMsg } return "" } -func (m *GetFriendApplyResp) GetData() []*ApplyUserInfo { +func (m *GetFriendApplyListResp) GetFriendRequestList() []*sdk_ws.FriendRequest { if m != nil { - return m.Data + return m.FriendRequestList } return nil } -type ApplyUserInfo struct { - UserInfo *sdk_ws.PublicUserInfo `protobuf:"bytes,1,opt,name=UserInfo" json:"UserInfo,omitempty"` - ApplyTime int64 `protobuf:"varint,2,opt,name=applyTime" json:"applyTime,omitempty"` - ReqMessage string `protobuf:"bytes,3,opt,name=reqMessage" json:"reqMessage,omitempty"` - Flag int32 `protobuf:"varint,4,opt,name=Flag" json:"Flag,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ApplyUserInfo) Reset() { *m = ApplyUserInfo{} } -func (m *ApplyUserInfo) String() string { return proto.CompactTextString(m) } -func (*ApplyUserInfo) ProtoMessage() {} -func (*ApplyUserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{10} -} -func (m *ApplyUserInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ApplyUserInfo.Unmarshal(m, b) -} -func (m *ApplyUserInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ApplyUserInfo.Marshal(b, m, deterministic) -} -func (dst *ApplyUserInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_ApplyUserInfo.Merge(dst, src) -} -func (m *ApplyUserInfo) XXX_Size() int { - return xxx_messageInfo_ApplyUserInfo.Size(m) -} -func (m *ApplyUserInfo) XXX_DiscardUnknown() { - xxx_messageInfo_ApplyUserInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_ApplyUserInfo proto.InternalMessageInfo - -func (m *ApplyUserInfo) GetUserInfo() *sdk_ws.PublicUserInfo { - if m != nil { - return m.UserInfo - } - return nil -} - -func (m *ApplyUserInfo) GetApplyTime() int64 { - if m != nil { - return m.ApplyTime - } - return 0 -} - -func (m *ApplyUserInfo) GetReqMessage() string { - if m != nil { - return m.ReqMessage - } - return "" -} - -func (m *ApplyUserInfo) GetFlag() int32 { - if m != nil { - return m.Flag - } - return 0 -} - type GetFriendListReq struct { CommID *CommID `protobuf:"bytes,1,opt,name=CommID" json:"CommID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -613,7 +519,7 @@ func (m *GetFriendListReq) Reset() { *m = GetFriendListReq{} } func (m *GetFriendListReq) String() string { return proto.CompactTextString(m) } func (*GetFriendListReq) ProtoMessage() {} func (*GetFriendListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{11} + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{10} } func (m *GetFriendListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendListReq.Unmarshal(m, b) @@ -641,19 +547,19 @@ func (m *GetFriendListReq) GetCommID() *CommID { } type GetFriendListResp struct { - ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` - ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` - Data []*FriendInfo `protobuf:"bytes,3,rep,name=Data" json:"Data,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` + FriendInfoList []*sdk_ws.FriendInfo `protobuf:"bytes,3,rep,name=FriendInfoList" json:"FriendInfoList,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GetFriendListResp) Reset() { *m = GetFriendListResp{} } func (m *GetFriendListResp) String() string { return proto.CompactTextString(m) } func (*GetFriendListResp) ProtoMessage() {} func (*GetFriendListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{12} + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{11} } func (m *GetFriendListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendListResp.Unmarshal(m, b) @@ -687,9 +593,9 @@ func (m *GetFriendListResp) GetErrMsg() string { return "" } -func (m *GetFriendListResp) GetData() []*FriendInfo { +func (m *GetFriendListResp) GetFriendInfoList() []*sdk_ws.FriendInfo { if m != nil { - return m.Data + return m.FriendInfoList } return nil } @@ -705,7 +611,7 @@ func (m *AddBlacklistReq) Reset() { *m = AddBlacklistReq{} } func (m *AddBlacklistReq) String() string { return proto.CompactTextString(m) } func (*AddBlacklistReq) ProtoMessage() {} func (*AddBlacklistReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{13} + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{12} } func (m *AddBlacklistReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddBlacklistReq.Unmarshal(m, b) @@ -732,6 +638,44 @@ func (m *AddBlacklistReq) GetCommID() *CommID { return nil } +type AddBlacklistResp struct { + CommonResp *CommonResp `protobuf:"bytes,1,opt,name=CommonResp" json:"CommonResp,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AddBlacklistResp) Reset() { *m = AddBlacklistResp{} } +func (m *AddBlacklistResp) String() string { return proto.CompactTextString(m) } +func (*AddBlacklistResp) ProtoMessage() {} +func (*AddBlacklistResp) Descriptor() ([]byte, []int) { + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{13} +} +func (m *AddBlacklistResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AddBlacklistResp.Unmarshal(m, b) +} +func (m *AddBlacklistResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AddBlacklistResp.Marshal(b, m, deterministic) +} +func (dst *AddBlacklistResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_AddBlacklistResp.Merge(dst, src) +} +func (m *AddBlacklistResp) XXX_Size() int { + return xxx_messageInfo_AddBlacklistResp.Size(m) +} +func (m *AddBlacklistResp) XXX_DiscardUnknown() { + xxx_messageInfo_AddBlacklistResp.DiscardUnknown(m) +} + +var xxx_messageInfo_AddBlacklistResp proto.InternalMessageInfo + +func (m *AddBlacklistResp) GetCommonResp() *CommonResp { + if m != nil { + return m.CommonResp + } + return nil +} + type RemoveBlacklistReq struct { CommID *CommID `protobuf:"bytes,1,opt,name=CommID" json:"CommID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -743,7 +687,7 @@ func (m *RemoveBlacklistReq) Reset() { *m = RemoveBlacklistReq{} } func (m *RemoveBlacklistReq) String() string { return proto.CompactTextString(m) } func (*RemoveBlacklistReq) ProtoMessage() {} func (*RemoveBlacklistReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{14} + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{14} } func (m *RemoveBlacklistReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RemoveBlacklistReq.Unmarshal(m, b) @@ -770,6 +714,44 @@ func (m *RemoveBlacklistReq) GetCommID() *CommID { return nil } +type RemoveBlacklistResp struct { + CommonResp *CommonResp `protobuf:"bytes,1,opt,name=CommonResp" json:"CommonResp,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RemoveBlacklistResp) Reset() { *m = RemoveBlacklistResp{} } +func (m *RemoveBlacklistResp) String() string { return proto.CompactTextString(m) } +func (*RemoveBlacklistResp) ProtoMessage() {} +func (*RemoveBlacklistResp) Descriptor() ([]byte, []int) { + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{15} +} +func (m *RemoveBlacklistResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RemoveBlacklistResp.Unmarshal(m, b) +} +func (m *RemoveBlacklistResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RemoveBlacklistResp.Marshal(b, m, deterministic) +} +func (dst *RemoveBlacklistResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_RemoveBlacklistResp.Merge(dst, src) +} +func (m *RemoveBlacklistResp) XXX_Size() int { + return xxx_messageInfo_RemoveBlacklistResp.Size(m) +} +func (m *RemoveBlacklistResp) XXX_DiscardUnknown() { + xxx_messageInfo_RemoveBlacklistResp.DiscardUnknown(m) +} + +var xxx_messageInfo_RemoveBlacklistResp proto.InternalMessageInfo + +func (m *RemoveBlacklistResp) GetCommonResp() *CommonResp { + if m != nil { + return m.CommonResp + } + return nil +} + type GetBlacklistReq struct { CommID *CommID `protobuf:"bytes,1,opt,name=CommID" json:"CommID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -781,7 +763,7 @@ func (m *GetBlacklistReq) Reset() { *m = GetBlacklistReq{} } func (m *GetBlacklistReq) String() string { return proto.CompactTextString(m) } func (*GetBlacklistReq) ProtoMessage() {} func (*GetBlacklistReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{15} + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{16} } func (m *GetBlacklistReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetBlacklistReq.Unmarshal(m, b) @@ -811,7 +793,7 @@ func (m *GetBlacklistReq) GetCommID() *CommID { type GetBlacklistResp struct { ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` - Data []*sdk_ws.PublicUserInfo `protobuf:"bytes,3,rep,name=data" json:"data,omitempty"` + BlackUserInfoList []*sdk_ws.PublicUserInfo `protobuf:"bytes,3,rep,name=BlackUserInfoList" json:"BlackUserInfoList,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -821,7 +803,7 @@ func (m *GetBlacklistResp) Reset() { *m = GetBlacklistResp{} } func (m *GetBlacklistResp) String() string { return proto.CompactTextString(m) } func (*GetBlacklistResp) ProtoMessage() {} func (*GetBlacklistResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{16} + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{17} } func (m *GetBlacklistResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetBlacklistResp.Unmarshal(m, b) @@ -855,9 +837,9 @@ func (m *GetBlacklistResp) GetErrMsg() string { return "" } -func (m *GetBlacklistResp) GetData() []*sdk_ws.PublicUserInfo { +func (m *GetBlacklistResp) GetBlackUserInfoList() []*sdk_ws.PublicUserInfo { if m != nil { - return m.Data + return m.BlackUserInfoList } return nil } @@ -873,7 +855,7 @@ func (m *IsFriendReq) Reset() { *m = IsFriendReq{} } func (m *IsFriendReq) String() string { return proto.CompactTextString(m) } func (*IsFriendReq) ProtoMessage() {} func (*IsFriendReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{17} + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{18} } func (m *IsFriendReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IsFriendReq.Unmarshal(m, b) @@ -903,7 +885,7 @@ func (m *IsFriendReq) GetCommID() *CommID { type IsFriendResp struct { ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` - ShipType int32 `protobuf:"varint,3,opt,name=ShipType" json:"ShipType,omitempty"` + Response bool `protobuf:"varint,3,opt,name=Response" json:"Response,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -913,7 +895,7 @@ func (m *IsFriendResp) Reset() { *m = IsFriendResp{} } func (m *IsFriendResp) String() string { return proto.CompactTextString(m) } func (*IsFriendResp) ProtoMessage() {} func (*IsFriendResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{18} + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{19} } func (m *IsFriendResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IsFriendResp.Unmarshal(m, b) @@ -947,11 +929,11 @@ func (m *IsFriendResp) GetErrMsg() string { return "" } -func (m *IsFriendResp) GetShipType() int32 { +func (m *IsFriendResp) GetResponse() bool { if m != nil { - return m.ShipType + return m.Response } - return 0 + return false } type IsInBlackListReq struct { @@ -965,7 +947,7 @@ func (m *IsInBlackListReq) Reset() { *m = IsInBlackListReq{} } func (m *IsInBlackListReq) String() string { return proto.CompactTextString(m) } func (*IsInBlackListReq) ProtoMessage() {} func (*IsInBlackListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{19} + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{20} } func (m *IsInBlackListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IsInBlackListReq.Unmarshal(m, b) @@ -1005,7 +987,7 @@ func (m *IsInBlackListResp) Reset() { *m = IsInBlackListResp{} } func (m *IsInBlackListResp) String() string { return proto.CompactTextString(m) } func (*IsInBlackListResp) ProtoMessage() {} func (*IsInBlackListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{20} + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{21} } func (m *IsInBlackListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IsInBlackListResp.Unmarshal(m, b) @@ -1057,7 +1039,7 @@ func (m *DeleteFriendReq) Reset() { *m = DeleteFriendReq{} } func (m *DeleteFriendReq) String() string { return proto.CompactTextString(m) } func (*DeleteFriendReq) ProtoMessage() {} func (*DeleteFriendReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{21} + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{22} } func (m *DeleteFriendReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteFriendReq.Unmarshal(m, b) @@ -1084,9 +1066,49 @@ func (m *DeleteFriendReq) GetCommID() *CommID { return nil } +type DeleteFriendResp struct { + CommonResp *CommonResp `protobuf:"bytes,1,opt,name=CommonResp" json:"CommonResp,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeleteFriendResp) Reset() { *m = DeleteFriendResp{} } +func (m *DeleteFriendResp) String() string { return proto.CompactTextString(m) } +func (*DeleteFriendResp) ProtoMessage() {} +func (*DeleteFriendResp) Descriptor() ([]byte, []int) { + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{23} +} +func (m *DeleteFriendResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeleteFriendResp.Unmarshal(m, b) +} +func (m *DeleteFriendResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeleteFriendResp.Marshal(b, m, deterministic) +} +func (dst *DeleteFriendResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteFriendResp.Merge(dst, src) +} +func (m *DeleteFriendResp) XXX_Size() int { + return xxx_messageInfo_DeleteFriendResp.Size(m) +} +func (m *DeleteFriendResp) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteFriendResp.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteFriendResp proto.InternalMessageInfo + +func (m *DeleteFriendResp) GetCommonResp() *CommonResp { + if m != nil { + return m.CommonResp + } + return nil +} + +// process type AddFriendResponseReq struct { CommID *CommID `protobuf:"bytes,1,opt,name=CommID" json:"CommID,omitempty"` Flag int32 `protobuf:"varint,2,opt,name=flag" json:"flag,omitempty"` + HandleMsg string `protobuf:"bytes,3,opt,name=handleMsg" json:"handleMsg,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1096,7 +1118,7 @@ func (m *AddFriendResponseReq) Reset() { *m = AddFriendResponseReq{} } func (m *AddFriendResponseReq) String() string { return proto.CompactTextString(m) } func (*AddFriendResponseReq) ProtoMessage() {} func (*AddFriendResponseReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{22} + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{24} } func (m *AddFriendResponseReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddFriendResponseReq.Unmarshal(m, b) @@ -1130,6 +1152,51 @@ func (m *AddFriendResponseReq) GetFlag() int32 { return 0 } +func (m *AddFriendResponseReq) GetHandleMsg() string { + if m != nil { + return m.HandleMsg + } + return "" +} + +type AddFriendResponseResp struct { + CommonResp *CommonResp `protobuf:"bytes,1,opt,name=CommonResp" json:"CommonResp,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AddFriendResponseResp) Reset() { *m = AddFriendResponseResp{} } +func (m *AddFriendResponseResp) String() string { return proto.CompactTextString(m) } +func (*AddFriendResponseResp) ProtoMessage() {} +func (*AddFriendResponseResp) Descriptor() ([]byte, []int) { + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{25} +} +func (m *AddFriendResponseResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AddFriendResponseResp.Unmarshal(m, b) +} +func (m *AddFriendResponseResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AddFriendResponseResp.Marshal(b, m, deterministic) +} +func (dst *AddFriendResponseResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_AddFriendResponseResp.Merge(dst, src) +} +func (m *AddFriendResponseResp) XXX_Size() int { + return xxx_messageInfo_AddFriendResponseResp.Size(m) +} +func (m *AddFriendResponseResp) XXX_DiscardUnknown() { + xxx_messageInfo_AddFriendResponseResp.DiscardUnknown(m) +} + +var xxx_messageInfo_AddFriendResponseResp proto.InternalMessageInfo + +func (m *AddFriendResponseResp) GetCommonResp() *CommonResp { + if m != nil { + return m.CommonResp + } + return nil +} + type SetFriendCommentReq struct { CommID *CommID `protobuf:"bytes,1,opt,name=CommID" json:"CommID,omitempty"` Remark string `protobuf:"bytes,2,opt,name=Remark" json:"Remark,omitempty"` @@ -1142,7 +1209,7 @@ func (m *SetFriendCommentReq) Reset() { *m = SetFriendCommentReq{} } func (m *SetFriendCommentReq) String() string { return proto.CompactTextString(m) } func (*SetFriendCommentReq) ProtoMessage() {} func (*SetFriendCommentReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_525e368387d696e2, []int{23} + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{26} } func (m *SetFriendCommentReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetFriendCommentReq.Unmarshal(m, b) @@ -1176,22 +1243,153 @@ func (m *SetFriendCommentReq) GetRemark() string { return "" } +type SetFriendCommentResp struct { + CommonResp *CommonResp `protobuf:"bytes,1,opt,name=CommonResp" json:"CommonResp,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SetFriendCommentResp) Reset() { *m = SetFriendCommentResp{} } +func (m *SetFriendCommentResp) String() string { return proto.CompactTextString(m) } +func (*SetFriendCommentResp) ProtoMessage() {} +func (*SetFriendCommentResp) Descriptor() ([]byte, []int) { + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{27} +} +func (m *SetFriendCommentResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SetFriendCommentResp.Unmarshal(m, b) +} +func (m *SetFriendCommentResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SetFriendCommentResp.Marshal(b, m, deterministic) +} +func (dst *SetFriendCommentResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetFriendCommentResp.Merge(dst, src) +} +func (m *SetFriendCommentResp) XXX_Size() int { + return xxx_messageInfo_SetFriendCommentResp.Size(m) +} +func (m *SetFriendCommentResp) XXX_DiscardUnknown() { + xxx_messageInfo_SetFriendCommentResp.DiscardUnknown(m) +} + +var xxx_messageInfo_SetFriendCommentResp proto.InternalMessageInfo + +func (m *SetFriendCommentResp) GetCommonResp() *CommonResp { + if m != nil { + return m.CommonResp + } + return nil +} + +type GetSelfApplyListReq struct { + CommID *CommID `protobuf:"bytes,1,opt,name=CommID" json:"CommID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetSelfApplyListReq) Reset() { *m = GetSelfApplyListReq{} } +func (m *GetSelfApplyListReq) String() string { return proto.CompactTextString(m) } +func (*GetSelfApplyListReq) ProtoMessage() {} +func (*GetSelfApplyListReq) Descriptor() ([]byte, []int) { + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{28} +} +func (m *GetSelfApplyListReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetSelfApplyListReq.Unmarshal(m, b) +} +func (m *GetSelfApplyListReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetSelfApplyListReq.Marshal(b, m, deterministic) +} +func (dst *GetSelfApplyListReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetSelfApplyListReq.Merge(dst, src) +} +func (m *GetSelfApplyListReq) XXX_Size() int { + return xxx_messageInfo_GetSelfApplyListReq.Size(m) +} +func (m *GetSelfApplyListReq) XXX_DiscardUnknown() { + xxx_messageInfo_GetSelfApplyListReq.DiscardUnknown(m) +} + +var xxx_messageInfo_GetSelfApplyListReq proto.InternalMessageInfo + +func (m *GetSelfApplyListReq) GetCommID() *CommID { + if m != nil { + return m.CommID + } + return nil +} + +type GetSelfApplyListResp struct { + ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` + FriendRequestList []*sdk_ws.FriendRequest `protobuf:"bytes,3,rep,name=FriendRequestList" json:"FriendRequestList,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetSelfApplyListResp) Reset() { *m = GetSelfApplyListResp{} } +func (m *GetSelfApplyListResp) String() string { return proto.CompactTextString(m) } +func (*GetSelfApplyListResp) ProtoMessage() {} +func (*GetSelfApplyListResp) Descriptor() ([]byte, []int) { + return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{29} +} +func (m *GetSelfApplyListResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetSelfApplyListResp.Unmarshal(m, b) +} +func (m *GetSelfApplyListResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetSelfApplyListResp.Marshal(b, m, deterministic) +} +func (dst *GetSelfApplyListResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetSelfApplyListResp.Merge(dst, src) +} +func (m *GetSelfApplyListResp) XXX_Size() int { + return xxx_messageInfo_GetSelfApplyListResp.Size(m) +} +func (m *GetSelfApplyListResp) XXX_DiscardUnknown() { + xxx_messageInfo_GetSelfApplyListResp.DiscardUnknown(m) +} + +var xxx_messageInfo_GetSelfApplyListResp proto.InternalMessageInfo + +func (m *GetSelfApplyListResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *GetSelfApplyListResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + +func (m *GetSelfApplyListResp) GetFriendRequestList() []*sdk_ws.FriendRequest { + if m != nil { + return m.FriendRequestList + } + return nil +} + func init() { proto.RegisterType((*CommonResp)(nil), "friend.CommonResp") proto.RegisterType((*CommID)(nil), "friend.CommID") proto.RegisterType((*GetFriendsInfoReq)(nil), "friend.GetFriendsInfoReq") proto.RegisterType((*GetFriendInfoResp)(nil), "friend.GetFriendInfoResp") - proto.RegisterType((*FriendInfo)(nil), "friend.FriendInfo") proto.RegisterType((*AddFriendReq)(nil), "friend.AddFriendReq") + proto.RegisterType((*AddFriendResp)(nil), "friend.AddFriendResp") proto.RegisterType((*ImportFriendReq)(nil), "friend.ImportFriendReq") proto.RegisterType((*ImportFriendResp)(nil), "friend.ImportFriendResp") - proto.RegisterType((*GetFriendApplyReq)(nil), "friend.GetFriendApplyReq") - proto.RegisterType((*GetFriendApplyResp)(nil), "friend.GetFriendApplyResp") - proto.RegisterType((*ApplyUserInfo)(nil), "friend.ApplyUserInfo") - proto.RegisterType((*GetFriendListReq)(nil), "friend.getFriendListReq") - proto.RegisterType((*GetFriendListResp)(nil), "friend.getFriendListResp") + proto.RegisterType((*GetFriendApplyListReq)(nil), "friend.GetFriendApplyListReq") + proto.RegisterType((*GetFriendApplyListResp)(nil), "friend.GetFriendApplyListResp") + proto.RegisterType((*GetFriendListReq)(nil), "friend.GetFriendListReq") + proto.RegisterType((*GetFriendListResp)(nil), "friend.GetFriendListResp") proto.RegisterType((*AddBlacklistReq)(nil), "friend.AddBlacklistReq") + proto.RegisterType((*AddBlacklistResp)(nil), "friend.AddBlacklistResp") proto.RegisterType((*RemoveBlacklistReq)(nil), "friend.RemoveBlacklistReq") + proto.RegisterType((*RemoveBlacklistResp)(nil), "friend.RemoveBlacklistResp") proto.RegisterType((*GetBlacklistReq)(nil), "friend.GetBlacklistReq") proto.RegisterType((*GetBlacklistResp)(nil), "friend.GetBlacklistResp") proto.RegisterType((*IsFriendReq)(nil), "friend.IsFriendReq") @@ -1199,8 +1397,13 @@ func init() { proto.RegisterType((*IsInBlackListReq)(nil), "friend.IsInBlackListReq") proto.RegisterType((*IsInBlackListResp)(nil), "friend.IsInBlackListResp") proto.RegisterType((*DeleteFriendReq)(nil), "friend.DeleteFriendReq") + proto.RegisterType((*DeleteFriendResp)(nil), "friend.DeleteFriendResp") proto.RegisterType((*AddFriendResponseReq)(nil), "friend.AddFriendResponseReq") + proto.RegisterType((*AddFriendResponseResp)(nil), "friend.AddFriendResponseResp") proto.RegisterType((*SetFriendCommentReq)(nil), "friend.SetFriendCommentReq") + proto.RegisterType((*SetFriendCommentResp)(nil), "friend.SetFriendCommentResp") + proto.RegisterType((*GetSelfApplyListReq)(nil), "friend.GetSelfApplyListReq") + proto.RegisterType((*GetSelfApplyListResp)(nil), "friend.GetSelfApplyListResp") } // Reference imports to suppress errors if they are not otherwise used. @@ -1214,19 +1417,19 @@ const _ = grpc.SupportPackageIsVersion4 // Client API for Friend service type FriendClient interface { - GetFriendsInfo(ctx context.Context, in *GetFriendsInfoReq, opts ...grpc.CallOption) (*GetFriendInfoResp, error) - AddFriend(ctx context.Context, in *AddFriendReq, opts ...grpc.CallOption) (*CommonResp, error) - GetFriendApplyList(ctx context.Context, in *GetFriendApplyReq, opts ...grpc.CallOption) (*GetFriendApplyResp, error) - GetSelfApplyList(ctx context.Context, in *GetFriendApplyReq, opts ...grpc.CallOption) (*GetFriendApplyResp, error) + // rpc getFriendsInfo(GetFriendsInfoReq) returns(GetFriendInfoResp); + AddFriend(ctx context.Context, in *AddFriendReq, opts ...grpc.CallOption) (*AddFriendResp, error) + GetFriendApplyList(ctx context.Context, in *GetFriendApplyListReq, opts ...grpc.CallOption) (*GetFriendApplyListResp, error) + GetSelfApplyList(ctx context.Context, in *GetSelfApplyListReq, opts ...grpc.CallOption) (*GetSelfApplyListResp, error) GetFriendList(ctx context.Context, in *GetFriendListReq, opts ...grpc.CallOption) (*GetFriendListResp, error) - AddBlacklist(ctx context.Context, in *AddBlacklistReq, opts ...grpc.CallOption) (*CommonResp, error) - RemoveBlacklist(ctx context.Context, in *RemoveBlacklistReq, opts ...grpc.CallOption) (*CommonResp, error) + AddBlacklist(ctx context.Context, in *AddBlacklistReq, opts ...grpc.CallOption) (*AddBlacklistResp, error) + RemoveBlacklist(ctx context.Context, in *RemoveBlacklistReq, opts ...grpc.CallOption) (*RemoveBlacklistResp, error) IsFriend(ctx context.Context, in *IsFriendReq, opts ...grpc.CallOption) (*IsFriendResp, error) IsInBlackList(ctx context.Context, in *IsInBlackListReq, opts ...grpc.CallOption) (*IsInBlackListResp, error) GetBlacklist(ctx context.Context, in *GetBlacklistReq, opts ...grpc.CallOption) (*GetBlacklistResp, error) - DeleteFriend(ctx context.Context, in *DeleteFriendReq, opts ...grpc.CallOption) (*CommonResp, error) - AddFriendResponse(ctx context.Context, in *AddFriendResponseReq, opts ...grpc.CallOption) (*CommonResp, error) - SetFriendComment(ctx context.Context, in *SetFriendCommentReq, opts ...grpc.CallOption) (*CommonResp, error) + DeleteFriend(ctx context.Context, in *DeleteFriendReq, opts ...grpc.CallOption) (*DeleteFriendResp, error) + AddFriendResponse(ctx context.Context, in *AddFriendResponseReq, opts ...grpc.CallOption) (*AddFriendResponseResp, error) + SetFriendComment(ctx context.Context, in *SetFriendCommentReq, opts ...grpc.CallOption) (*SetFriendCommentResp, error) ImportFriend(ctx context.Context, in *ImportFriendReq, opts ...grpc.CallOption) (*ImportFriendResp, error) } @@ -1238,17 +1441,8 @@ func NewFriendClient(cc *grpc.ClientConn) FriendClient { return &friendClient{cc} } -func (c *friendClient) GetFriendsInfo(ctx context.Context, in *GetFriendsInfoReq, opts ...grpc.CallOption) (*GetFriendInfoResp, error) { - out := new(GetFriendInfoResp) - err := grpc.Invoke(ctx, "/friend.friend/getFriendsInfo", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *friendClient) AddFriend(ctx context.Context, in *AddFriendReq, opts ...grpc.CallOption) (*CommonResp, error) { - out := new(CommonResp) +func (c *friendClient) AddFriend(ctx context.Context, in *AddFriendReq, opts ...grpc.CallOption) (*AddFriendResp, error) { + out := new(AddFriendResp) err := grpc.Invoke(ctx, "/friend.friend/addFriend", in, out, c.cc, opts...) if err != nil { return nil, err @@ -1256,8 +1450,8 @@ func (c *friendClient) AddFriend(ctx context.Context, in *AddFriendReq, opts ... return out, nil } -func (c *friendClient) GetFriendApplyList(ctx context.Context, in *GetFriendApplyReq, opts ...grpc.CallOption) (*GetFriendApplyResp, error) { - out := new(GetFriendApplyResp) +func (c *friendClient) GetFriendApplyList(ctx context.Context, in *GetFriendApplyListReq, opts ...grpc.CallOption) (*GetFriendApplyListResp, error) { + out := new(GetFriendApplyListResp) err := grpc.Invoke(ctx, "/friend.friend/getFriendApplyList", in, out, c.cc, opts...) if err != nil { return nil, err @@ -1265,8 +1459,8 @@ func (c *friendClient) GetFriendApplyList(ctx context.Context, in *GetFriendAppl return out, nil } -func (c *friendClient) GetSelfApplyList(ctx context.Context, in *GetFriendApplyReq, opts ...grpc.CallOption) (*GetFriendApplyResp, error) { - out := new(GetFriendApplyResp) +func (c *friendClient) GetSelfApplyList(ctx context.Context, in *GetSelfApplyListReq, opts ...grpc.CallOption) (*GetSelfApplyListResp, error) { + out := new(GetSelfApplyListResp) err := grpc.Invoke(ctx, "/friend.friend/getSelfApplyList", in, out, c.cc, opts...) if err != nil { return nil, err @@ -1283,8 +1477,8 @@ func (c *friendClient) GetFriendList(ctx context.Context, in *GetFriendListReq, return out, nil } -func (c *friendClient) AddBlacklist(ctx context.Context, in *AddBlacklistReq, opts ...grpc.CallOption) (*CommonResp, error) { - out := new(CommonResp) +func (c *friendClient) AddBlacklist(ctx context.Context, in *AddBlacklistReq, opts ...grpc.CallOption) (*AddBlacklistResp, error) { + out := new(AddBlacklistResp) err := grpc.Invoke(ctx, "/friend.friend/addBlacklist", in, out, c.cc, opts...) if err != nil { return nil, err @@ -1292,8 +1486,8 @@ func (c *friendClient) AddBlacklist(ctx context.Context, in *AddBlacklistReq, op return out, nil } -func (c *friendClient) RemoveBlacklist(ctx context.Context, in *RemoveBlacklistReq, opts ...grpc.CallOption) (*CommonResp, error) { - out := new(CommonResp) +func (c *friendClient) RemoveBlacklist(ctx context.Context, in *RemoveBlacklistReq, opts ...grpc.CallOption) (*RemoveBlacklistResp, error) { + out := new(RemoveBlacklistResp) err := grpc.Invoke(ctx, "/friend.friend/removeBlacklist", in, out, c.cc, opts...) if err != nil { return nil, err @@ -1328,8 +1522,8 @@ func (c *friendClient) GetBlacklist(ctx context.Context, in *GetBlacklistReq, op return out, nil } -func (c *friendClient) DeleteFriend(ctx context.Context, in *DeleteFriendReq, opts ...grpc.CallOption) (*CommonResp, error) { - out := new(CommonResp) +func (c *friendClient) DeleteFriend(ctx context.Context, in *DeleteFriendReq, opts ...grpc.CallOption) (*DeleteFriendResp, error) { + out := new(DeleteFriendResp) err := grpc.Invoke(ctx, "/friend.friend/deleteFriend", in, out, c.cc, opts...) if err != nil { return nil, err @@ -1337,8 +1531,8 @@ func (c *friendClient) DeleteFriend(ctx context.Context, in *DeleteFriendReq, op return out, nil } -func (c *friendClient) AddFriendResponse(ctx context.Context, in *AddFriendResponseReq, opts ...grpc.CallOption) (*CommonResp, error) { - out := new(CommonResp) +func (c *friendClient) AddFriendResponse(ctx context.Context, in *AddFriendResponseReq, opts ...grpc.CallOption) (*AddFriendResponseResp, error) { + out := new(AddFriendResponseResp) err := grpc.Invoke(ctx, "/friend.friend/addFriendResponse", in, out, c.cc, opts...) if err != nil { return nil, err @@ -1346,8 +1540,8 @@ func (c *friendClient) AddFriendResponse(ctx context.Context, in *AddFriendRespo return out, nil } -func (c *friendClient) SetFriendComment(ctx context.Context, in *SetFriendCommentReq, opts ...grpc.CallOption) (*CommonResp, error) { - out := new(CommonResp) +func (c *friendClient) SetFriendComment(ctx context.Context, in *SetFriendCommentReq, opts ...grpc.CallOption) (*SetFriendCommentResp, error) { + out := new(SetFriendCommentResp) err := grpc.Invoke(ctx, "/friend.friend/setFriendComment", in, out, c.cc, opts...) if err != nil { return nil, err @@ -1357,7 +1551,7 @@ func (c *friendClient) SetFriendComment(ctx context.Context, in *SetFriendCommen func (c *friendClient) ImportFriend(ctx context.Context, in *ImportFriendReq, opts ...grpc.CallOption) (*ImportFriendResp, error) { out := new(ImportFriendResp) - err := grpc.Invoke(ctx, "/friend.friend/ImportFriend", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/friend.friend/importFriend", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -1367,19 +1561,19 @@ func (c *friendClient) ImportFriend(ctx context.Context, in *ImportFriendReq, op // Server API for Friend service type FriendServer interface { - GetFriendsInfo(context.Context, *GetFriendsInfoReq) (*GetFriendInfoResp, error) - AddFriend(context.Context, *AddFriendReq) (*CommonResp, error) - GetFriendApplyList(context.Context, *GetFriendApplyReq) (*GetFriendApplyResp, error) - GetSelfApplyList(context.Context, *GetFriendApplyReq) (*GetFriendApplyResp, error) + // rpc getFriendsInfo(GetFriendsInfoReq) returns(GetFriendInfoResp); + AddFriend(context.Context, *AddFriendReq) (*AddFriendResp, error) + GetFriendApplyList(context.Context, *GetFriendApplyListReq) (*GetFriendApplyListResp, error) + GetSelfApplyList(context.Context, *GetSelfApplyListReq) (*GetSelfApplyListResp, error) GetFriendList(context.Context, *GetFriendListReq) (*GetFriendListResp, error) - AddBlacklist(context.Context, *AddBlacklistReq) (*CommonResp, error) - RemoveBlacklist(context.Context, *RemoveBlacklistReq) (*CommonResp, error) + AddBlacklist(context.Context, *AddBlacklistReq) (*AddBlacklistResp, error) + RemoveBlacklist(context.Context, *RemoveBlacklistReq) (*RemoveBlacklistResp, error) IsFriend(context.Context, *IsFriendReq) (*IsFriendResp, error) IsInBlackList(context.Context, *IsInBlackListReq) (*IsInBlackListResp, error) GetBlacklist(context.Context, *GetBlacklistReq) (*GetBlacklistResp, error) - DeleteFriend(context.Context, *DeleteFriendReq) (*CommonResp, error) - AddFriendResponse(context.Context, *AddFriendResponseReq) (*CommonResp, error) - SetFriendComment(context.Context, *SetFriendCommentReq) (*CommonResp, error) + DeleteFriend(context.Context, *DeleteFriendReq) (*DeleteFriendResp, error) + AddFriendResponse(context.Context, *AddFriendResponseReq) (*AddFriendResponseResp, error) + SetFriendComment(context.Context, *SetFriendCommentReq) (*SetFriendCommentResp, error) ImportFriend(context.Context, *ImportFriendReq) (*ImportFriendResp, error) } @@ -1387,24 +1581,6 @@ func RegisterFriendServer(s *grpc.Server, srv FriendServer) { s.RegisterService(&_Friend_serviceDesc, srv) } -func _Friend_GetFriendsInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetFriendsInfoReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(FriendServer).GetFriendsInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/friend.friend/GetFriendsInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FriendServer).GetFriendsInfo(ctx, req.(*GetFriendsInfoReq)) - } - return interceptor(ctx, in, info, handler) -} - func _Friend_AddFriend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(AddFriendReq) if err := dec(in); err != nil { @@ -1424,7 +1600,7 @@ func _Friend_AddFriend_Handler(srv interface{}, ctx context.Context, dec func(in } func _Friend_GetFriendApplyList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetFriendApplyReq) + in := new(GetFriendApplyListReq) if err := dec(in); err != nil { return nil, err } @@ -1436,13 +1612,13 @@ func _Friend_GetFriendApplyList_Handler(srv interface{}, ctx context.Context, de FullMethod: "/friend.friend/GetFriendApplyList", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FriendServer).GetFriendApplyList(ctx, req.(*GetFriendApplyReq)) + return srv.(FriendServer).GetFriendApplyList(ctx, req.(*GetFriendApplyListReq)) } return interceptor(ctx, in, info, handler) } func _Friend_GetSelfApplyList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetFriendApplyReq) + in := new(GetSelfApplyListReq) if err := dec(in); err != nil { return nil, err } @@ -1454,7 +1630,7 @@ func _Friend_GetSelfApplyList_Handler(srv interface{}, ctx context.Context, dec FullMethod: "/friend.friend/GetSelfApplyList", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FriendServer).GetSelfApplyList(ctx, req.(*GetFriendApplyReq)) + return srv.(FriendServer).GetSelfApplyList(ctx, req.(*GetSelfApplyListReq)) } return interceptor(ctx, in, info, handler) } @@ -1643,10 +1819,6 @@ var _Friend_serviceDesc = grpc.ServiceDesc{ ServiceName: "friend.friend", HandlerType: (*FriendServer)(nil), Methods: []grpc.MethodDesc{ - { - MethodName: "getFriendsInfo", - Handler: _Friend_GetFriendsInfo_Handler, - }, { MethodName: "addFriend", Handler: _Friend_AddFriend_Handler, @@ -1696,7 +1868,7 @@ var _Friend_serviceDesc = grpc.ServiceDesc{ Handler: _Friend_SetFriendComment_Handler, }, { - MethodName: "ImportFriend", + MethodName: "importFriend", Handler: _Friend_ImportFriend_Handler, }, }, @@ -1704,68 +1876,66 @@ var _Friend_serviceDesc = grpc.ServiceDesc{ Metadata: "friend/friend.proto", } -func init() { proto.RegisterFile("friend/friend.proto", fileDescriptor_friend_525e368387d696e2) } +func init() { proto.RegisterFile("friend/friend.proto", fileDescriptor_friend_a4d5a06cd0a3d99f) } -var fileDescriptor_friend_525e368387d696e2 = []byte{ - // 950 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x57, 0x5f, 0x6f, 0xe3, 0x44, - 0x10, 0x57, 0x9a, 0xa4, 0x97, 0x4c, 0xd3, 0x4b, 0x3a, 0x2d, 0x10, 0x7c, 0x27, 0x14, 0x2c, 0x74, - 0x2a, 0x3c, 0x24, 0x52, 0x51, 0x85, 0x8e, 0x22, 0xa4, 0x5c, 0xd3, 0x9e, 0x2c, 0xa8, 0x8a, 0xb6, - 0x2d, 0x0f, 0x08, 0xa9, 0xf2, 0xd5, 0x9b, 0x60, 0xc5, 0xff, 0xea, 0xf5, 0x51, 0xdd, 0x2b, 0x1f, - 0x03, 0x3e, 0x05, 0x4f, 0x7c, 0x3d, 0xb4, 0xbb, 0x5e, 0x7b, 0xd7, 0x49, 0x4f, 0xe7, 0xdc, 0x53, - 0xbc, 0x33, 0x3b, 0xb3, 0x33, 0x3f, 0xff, 0xe6, 0xe7, 0x0d, 0xec, 0xcf, 0x53, 0x9f, 0x46, 0xde, - 0x44, 0xfe, 0x8c, 0x93, 0x34, 0xce, 0x62, 0xdc, 0x96, 0x2b, 0xeb, 0xcb, 0xcb, 0x84, 0x46, 0xb7, - 0xce, 0xc5, 0x24, 0x59, 0x2e, 0x26, 0xc2, 0x35, 0x61, 0xde, 0xf2, 0xf6, 0x81, 0x4d, 0x1e, 0x98, - 0xdc, 0x6a, 0xff, 0x08, 0x70, 0x1a, 0x87, 0x61, 0x1c, 0x11, 0xca, 0x12, 0x1c, 0xc2, 0x13, 0x9a, - 0xa6, 0xa7, 0xb1, 0x47, 0x87, 0x8d, 0x51, 0xe3, 0xb0, 0x4d, 0xd4, 0x12, 0x3f, 0x85, 0x6d, 0x9a, - 0xa6, 0x17, 0x6c, 0x31, 0xdc, 0x1a, 0x35, 0x0e, 0xbb, 0x24, 0x5f, 0xd9, 0x7f, 0x35, 0x60, 0x9b, - 0x27, 0x70, 0x66, 0x68, 0x41, 0xe7, 0x32, 0xb9, 0x61, 0x34, 0x75, 0x66, 0x22, 0xba, 0x4b, 0x8a, - 0x35, 0x8e, 0x60, 0xe7, 0x32, 0xa1, 0xa9, 0x9b, 0xf9, 0x71, 0xe4, 0xcc, 0xf2, 0x1c, 0xba, 0x89, - 0x47, 0x5f, 0xc7, 0x79, 0x74, 0x4b, 0x46, 0xab, 0x35, 0x7e, 0x01, 0x70, 0x9e, 0xc6, 0x61, 0xee, - 0x6d, 0x0b, 0xaf, 0x66, 0xb1, 0x4f, 0x60, 0xef, 0x35, 0xcd, 0xce, 0x45, 0xd3, 0xcc, 0x89, 0xe6, - 0x31, 0xa1, 0xf7, 0xf8, 0x42, 0x15, 0x26, 0x8a, 0xd9, 0x39, 0x7a, 0x3a, 0xce, 0x31, 0x92, 0x56, - 0x92, 0x7b, 0xed, 0x50, 0x0b, 0x96, 0xb1, 0x12, 0x88, 0x33, 0x13, 0x88, 0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9a, - 0x72, 0x85, 0x45, 0xc5, 0xab, 0x3a, 0xb6, 0x36, 0xc5, 0x31, 0x74, 0xfc, 0x7c, 0x94, 0x71, 0x5f, - 0xf9, 0x35, 0x4d, 0xb0, 0x0e, 0x56, 0x8d, 0xb2, 0x79, 0x5f, 0x9f, 0xb3, 0xb2, 0xf9, 0xea, 0xe8, - 0x96, 0xcd, 0xaf, 0x0e, 0xe6, 0x14, 0x7a, 0x0b, 0x4d, 0xf5, 0xca, 0xe6, 0x2b, 0x32, 0x6a, 0x0d, - 0xd7, 0x3b, 0x24, 0x7e, 0x9e, 0x36, 0x8d, 0x65, 0x8a, 0xca, 0x8c, 0xae, 0x6d, 0xfe, 0x0c, 0xf6, - 0xdc, 0xea, 0x3c, 0xe2, 0xf3, 0x35, 0xcc, 0x2c, 0x46, 0x75, 0x6d, 0x9a, 0x53, 0x18, 0xb0, 0xca, - 0x08, 0xe2, 0x33, 0xb5, 0x6f, 0xcd, 0x70, 0x3e, 0xf2, 0x2e, 0x7b, 0xfa, 0xdd, 0xa8, 0x6c, 0xa4, - 0x72, 0x9d, 0x2b, 0xb1, 0xa8, 0x5e, 0xa5, 0x5e, 0xed, 0xfd, 0xd6, 0x1f, 0xe7, 0x7f, 0x5e, 0x4e, - 0xe4, 0xcf, 0x9b, 0x6d, 0xf1, 0xcf, 0xe4, 0xdb, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0x3e, 0x04, - 0x07, 0x68, 0xdb, 0x0c, 0x00, 0x00, +var fileDescriptor_friend_a4d5a06cd0a3d99f = []byte{ + // 919 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x57, 0xcb, 0x4f, 0xf3, 0x46, + 0x10, 0x97, 0x09, 0x84, 0x64, 0x12, 0x48, 0xb2, 0x09, 0x90, 0x9a, 0x87, 0x52, 0x1f, 0xaa, 0xa8, + 0x87, 0x44, 0x4a, 0x45, 0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84, 0xa7, 0x7f, 0xb1, 0x9d, 0x6e, + 0xa0, 0x04, 0x5d, 0x42, 0xcd, 0x8e, 0xae, 0x1d, 0x24, 0x06, 0x87, 0x93, 0xdb, 0x4c, 0xdc, 0x5d, + 0x6a, 0xa3, 0x04, 0x1d, 0x42, 0x49, 0xf7, 0x39, 0x17, 0x35, 0x83, 0x83, 0x1c, 0x79, 0x8b, 0xad, + 0xa4, 0x92, 0xd5, 0x42, 0xe7, 0x09, 0x31, 0xac, 0x45, 0x9c, 0x63, 0xc3, 0x5a, 0x24, 0x19, 0x74, + 0x08, 0xd5, 0x29, 0xb7, 0xb8, 0xc2, 0x5a, 0xc4, 0x56, 0xa1, 0xd8, 0x4e, 0x37, 0xb0, 0x10, 0x1a, + 0xc7, 0x7d, 0x61, 0x88, 0x18, 0x99, 0x86, 0x21, 0x12, 0x54, 0x79, 0x03, 0x0d, 0x35, 0x4e, 0x42, + 0x68, 0x2f, 0x75, 0x4e, 0x7d, 0x46, 0x14, 0xf7, 0x5f, 0xb1, 0xb2, 0xc1, 0xa3, 0x31, 0xca, 0x08, + 0x07, 0x2f, 0x85, 0xa3, 0xc2, 0xc1, 0x4b, 0x65, 0x9a, 0x21, 0x54, 0x75, 0xee, 0x11, 0x1d, 0xe6, + 0x18, 0x7b, 0xf7, 0x87, 0x39, 0xc6, 0xdf, 0xdc, 0xa7, 0x8d, 0x9f, 0x6a, 0x3d, 0xff, 0x27, 0xe8, + 0x31, 0xfb, 0xf3, 0x50, 0xf4, 0x7e, 0x5f, 0x7e, 0xf6, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xcc, + 0xd1, 0x9d, 0x13, 0xa1, 0x0e, 0x00, 0x00, } diff --git a/pkg/proto/friend/friend.proto b/pkg/proto/friend/friend.proto index 4591e9704..052eb1d9d 100644 --- a/pkg/proto/friend/friend.proto +++ b/pkg/proto/friend/friend.proto @@ -15,29 +15,26 @@ message CommID{ string FromUserID = 5; } + message GetFriendsInfoReq{ CommID CommID = 1; } - message GetFriendInfoResp{ int32 ErrCode = 1; string ErrMsg = 2; - FriendInfo Data = 3; -} - -message FriendInfo{ - string OwnerUserID = 1; - string Remark = 2; - uint64 CreateTime = 3; - open_im_sdk.UserInfo FriendUser = 4; - int32 IsBlack = 5; + repeated open_im_sdk.FriendInfo FriendInfoList = 3; +// int32 IsBlack = 4; } message AddFriendReq{ CommID CommID = 1; - string ReqMessage = 2; + string ReqMsg = 2; } +message AddFriendResp{ + CommonResp CommonResp = 1; +} + message ImportFriendReq{ repeated string FriendUserIDList = 1; @@ -45,108 +42,124 @@ message ImportFriendReq{ string FromUserID = 3; string OpUserID = 4; } - message ImportFriendResp{ - CommonResp commonResp = 1; - repeated string failedUidList = 2; + CommonResp CommonResp = 1; + repeated string FailedFriendUserIDList = 2; } -message GetFriendApplyReq{ + +message GetFriendApplyListReq{ CommID CommID = 1; } -message GetFriendApplyResp{ +message GetFriendApplyListResp{ int32 ErrCode = 1; string ErrMsg = 2; - repeated ApplyUserInfo data = 4; -} - -message ApplyUserInfo{ - open_im_sdk.PublicUserInfo UserInfo = 1; - int64 applyTime = 2; - string reqMessage = 3; - int32 Flag = 4; + repeated open_im_sdk.FriendRequest FriendRequestList = 3; } -message getFriendListReq{ +message GetFriendListReq{ CommID CommID = 1; } - -message getFriendListResp{ +message GetFriendListResp{ int32 ErrCode = 1; string ErrMsg = 2; - repeated FriendInfo Data = 3; + repeated open_im_sdk.FriendInfo FriendInfoList = 3; } message AddBlacklistReq{ CommID CommID = 1; } +message AddBlacklistResp{ + CommonResp CommonResp = 1; +} message RemoveBlacklistReq{ CommID CommID = 1; } - +message RemoveBlacklistResp{ + CommonResp CommonResp = 1; +} message GetBlacklistReq{ CommID CommID = 1; } - message GetBlacklistResp{ int32 ErrCode = 1; string ErrMsg = 2; - repeated open_im_sdk.PublicUserInfo data = 3; + repeated open_im_sdk.PublicUserInfo BlackUserInfoList = 3; } + message IsFriendReq{ CommID CommID = 1; } - message IsFriendResp{ int32 ErrCode = 1; string ErrMsg = 2; - int32 ShipType = 3; + bool Response = 3; } + message IsInBlackListReq{ CommID CommID = 1; } - message IsInBlackListResp{ int32 ErrCode = 1; string ErrMsg = 2; bool Response = 3; } + message DeleteFriendReq{ CommID CommID = 1; } +message DeleteFriendResp{ + CommonResp CommonResp = 1; +} - +//process message AddFriendResponseReq{ CommID CommID = 1; int32 flag = 2; + string handleMsg = 3; +} +message AddFriendResponseResp{ + CommonResp CommonResp = 1; } message SetFriendCommentReq{ CommID CommID = 1; string Remark = 2; } +message SetFriendCommentResp{ + CommonResp CommonResp = 1; +} + +message GetSelfApplyListReq{ + CommID CommID = 1; +} +message GetSelfApplyListResp{ + int32 ErrCode = 1; + string ErrMsg = 2; + repeated open_im_sdk.FriendRequest FriendRequestList = 3; +} service friend{ - rpc getFriendsInfo(GetFriendsInfoReq) returns(GetFriendInfoResp); - rpc addFriend(AddFriendReq) returns(CommonResp); - rpc getFriendApplyList(GetFriendApplyReq) returns(GetFriendApplyResp); - rpc getSelfApplyList(GetFriendApplyReq) returns(GetFriendApplyResp); - rpc getFriendList(getFriendListReq) returns(getFriendListResp); - rpc addBlacklist(AddBlacklistReq) returns(CommonResp); - rpc removeBlacklist(RemoveBlacklistReq) returns(CommonResp); + // rpc getFriendsInfo(GetFriendsInfoReq) returns(GetFriendInfoResp); + rpc addFriend(AddFriendReq) returns(AddFriendResp); + rpc getFriendApplyList(GetFriendApplyListReq) returns(GetFriendApplyListResp); + rpc getSelfApplyList(GetSelfApplyListReq) returns(GetSelfApplyListResp); + rpc getFriendList(GetFriendListReq) returns(GetFriendListResp); + rpc addBlacklist(AddBlacklistReq) returns(AddBlacklistResp); + rpc removeBlacklist(RemoveBlacklistReq) returns(RemoveBlacklistResp); rpc isFriend(IsFriendReq) returns(IsFriendResp); rpc isInBlackList(IsInBlackListReq) returns(IsInBlackListResp); rpc getBlacklist(GetBlacklistReq) returns(GetBlacklistResp); - rpc deleteFriend(DeleteFriendReq) returns(CommonResp); - rpc addFriendResponse(AddFriendResponseReq) returns(CommonResp); - rpc setFriendComment(SetFriendCommentReq) returns(CommonResp); - rpc ImportFriend(ImportFriendReq) returns(ImportFriendResp); + rpc deleteFriend(DeleteFriendReq) returns(DeleteFriendResp); + rpc addFriendResponse(AddFriendResponseReq) returns(AddFriendResponseResp); + rpc setFriendComment(SetFriendCommentReq) returns(SetFriendCommentResp); + rpc importFriend(ImportFriendReq) returns(ImportFriendResp); } \ No newline at end of file diff --git a/pkg/proto/group/group.pb.go b/pkg/proto/group/group.pb.go index cbd93fb5e..ea305a14b 100644 --- a/pkg/proto/group/group.pb.go +++ b/pkg/proto/group/group.pb.go @@ -36,7 +36,7 @@ func (m *CommonResp) Reset() { *m = CommonResp{} } func (m *CommonResp) String() string { return proto.CompactTextString(m) } func (*CommonResp) ProtoMessage() {} func (*CommonResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{0} + return fileDescriptor_group_5b7911b898fdd5c5, []int{0} } func (m *CommonResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CommonResp.Unmarshal(m, b) @@ -72,7 +72,7 @@ func (m *CommonResp) GetErrMsg() string { type GroupAddMemberInfo struct { UserID string `protobuf:"bytes,1,opt,name=UserID" json:"UserID,omitempty"` - Role int32 `protobuf:"varint,2,opt,name=Role" json:"Role,omitempty"` + RoleLevel int32 `protobuf:"varint,2,opt,name=RoleLevel" json:"RoleLevel,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -82,7 +82,7 @@ func (m *GroupAddMemberInfo) Reset() { *m = GroupAddMemberInfo{} } func (m *GroupAddMemberInfo) String() string { return proto.CompactTextString(m) } func (*GroupAddMemberInfo) ProtoMessage() {} func (*GroupAddMemberInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{1} + return fileDescriptor_group_5b7911b898fdd5c5, []int{1} } func (m *GroupAddMemberInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupAddMemberInfo.Unmarshal(m, b) @@ -109,23 +109,19 @@ func (m *GroupAddMemberInfo) GetUserID() string { return "" } -func (m *GroupAddMemberInfo) GetRole() int32 { +func (m *GroupAddMemberInfo) GetRoleLevel() int32 { if m != nil { - return m.Role + return m.RoleLevel } return 0 } type CreateGroupReq struct { InitMemberList []*GroupAddMemberInfo `protobuf:"bytes,1,rep,name=InitMemberList" json:"InitMemberList,omitempty"` - GroupName string `protobuf:"bytes,2,opt,name=GroupName" json:"GroupName,omitempty"` - Introduction string `protobuf:"bytes,3,opt,name=Introduction" json:"Introduction,omitempty"` - Notification string `protobuf:"bytes,4,opt,name=Notification" json:"Notification,omitempty"` - FaceUrl string `protobuf:"bytes,5,opt,name=FaceUrl" json:"FaceUrl,omitempty"` - Ext string `protobuf:"bytes,6,opt,name=Ext" json:"Ext,omitempty"` - OperationID string `protobuf:"bytes,7,opt,name=OperationID" json:"OperationID,omitempty"` - OpUserID string `protobuf:"bytes,8,opt,name=OpUserID" json:"OpUserID,omitempty"` - FromUserID string `protobuf:"bytes,9,opt,name=FromUserID" json:"FromUserID,omitempty"` + GroupInfo *sdk_ws.GroupInfo `protobuf:"bytes,2,opt,name=GroupInfo" json:"GroupInfo,omitempty"` + OperationID string `protobuf:"bytes,3,opt,name=OperationID" json:"OperationID,omitempty"` + OpUserID string `protobuf:"bytes,4,opt,name=OpUserID" json:"OpUserID,omitempty"` + OwnerUserID string `protobuf:"bytes,5,opt,name=OwnerUserID" json:"OwnerUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -135,7 +131,7 @@ func (m *CreateGroupReq) Reset() { *m = CreateGroupReq{} } func (m *CreateGroupReq) String() string { return proto.CompactTextString(m) } func (*CreateGroupReq) ProtoMessage() {} func (*CreateGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{2} + return fileDescriptor_group_5b7911b898fdd5c5, []int{2} } func (m *CreateGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreateGroupReq.Unmarshal(m, b) @@ -162,39 +158,11 @@ func (m *CreateGroupReq) GetInitMemberList() []*GroupAddMemberInfo { return nil } -func (m *CreateGroupReq) GetGroupName() string { +func (m *CreateGroupReq) GetGroupInfo() *sdk_ws.GroupInfo { if m != nil { - return m.GroupName + return m.GroupInfo } - return "" -} - -func (m *CreateGroupReq) GetIntroduction() string { - if m != nil { - return m.Introduction - } - return "" -} - -func (m *CreateGroupReq) GetNotification() string { - if m != nil { - return m.Notification - } - return "" -} - -func (m *CreateGroupReq) GetFaceUrl() string { - if m != nil { - return m.FaceUrl - } - return "" -} - -func (m *CreateGroupReq) GetExt() string { - if m != nil { - return m.Ext - } - return "" + return nil } func (m *CreateGroupReq) GetOperationID() string { @@ -211,9 +179,9 @@ func (m *CreateGroupReq) GetOpUserID() string { return "" } -func (m *CreateGroupReq) GetFromUserID() string { +func (m *CreateGroupReq) GetOwnerUserID() string { if m != nil { - return m.FromUserID + return m.OwnerUserID } return "" } @@ -231,7 +199,7 @@ func (m *CreateGroupResp) Reset() { *m = CreateGroupResp{} } func (m *CreateGroupResp) String() string { return proto.CompactTextString(m) } func (*CreateGroupResp) ProtoMessage() {} func (*CreateGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{3} + return fileDescriptor_group_5b7911b898fdd5c5, []int{3} } func (m *CreateGroupResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreateGroupResp.Unmarshal(m, b) @@ -285,7 +253,7 @@ func (m *GetGroupsInfoReq) Reset() { *m = GetGroupsInfoReq{} } func (m *GetGroupsInfoReq) String() string { return proto.CompactTextString(m) } func (*GetGroupsInfoReq) ProtoMessage() {} func (*GetGroupsInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{4} + return fileDescriptor_group_5b7911b898fdd5c5, []int{4} } func (m *GetGroupsInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupsInfoReq.Unmarshal(m, b) @@ -339,7 +307,7 @@ func (m *GetGroupsInfoResp) Reset() { *m = GetGroupsInfoResp{} } func (m *GetGroupsInfoResp) String() string { return proto.CompactTextString(m) } func (*GetGroupsInfoResp) ProtoMessage() {} func (*GetGroupsInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{5} + return fileDescriptor_group_5b7911b898fdd5c5, []int{5} } func (m *GetGroupsInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupsInfoResp.Unmarshal(m, b) @@ -393,7 +361,7 @@ func (m *SetGroupInfoReq) Reset() { *m = SetGroupInfoReq{} } func (m *SetGroupInfoReq) String() string { return proto.CompactTextString(m) } func (*SetGroupInfoReq) ProtoMessage() {} func (*SetGroupInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{6} + return fileDescriptor_group_5b7911b898fdd5c5, []int{6} } func (m *SetGroupInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetGroupInfoReq.Unmarshal(m, b) @@ -434,6 +402,44 @@ func (m *SetGroupInfoReq) GetOperationID() string { return "" } +type SetGroupInfoResp struct { + CommonResp *CommonResp `protobuf:"bytes,1,opt,name=CommonResp" json:"CommonResp,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SetGroupInfoResp) Reset() { *m = SetGroupInfoResp{} } +func (m *SetGroupInfoResp) String() string { return proto.CompactTextString(m) } +func (*SetGroupInfoResp) ProtoMessage() {} +func (*SetGroupInfoResp) Descriptor() ([]byte, []int) { + return fileDescriptor_group_5b7911b898fdd5c5, []int{7} +} +func (m *SetGroupInfoResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SetGroupInfoResp.Unmarshal(m, b) +} +func (m *SetGroupInfoResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SetGroupInfoResp.Marshal(b, m, deterministic) +} +func (dst *SetGroupInfoResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetGroupInfoResp.Merge(dst, src) +} +func (m *SetGroupInfoResp) XXX_Size() int { + return xxx_messageInfo_SetGroupInfoResp.Size(m) +} +func (m *SetGroupInfoResp) XXX_DiscardUnknown() { + xxx_messageInfo_SetGroupInfoResp.DiscardUnknown(m) +} + +var xxx_messageInfo_SetGroupInfoResp proto.InternalMessageInfo + +func (m *SetGroupInfoResp) GetCommonResp() *CommonResp { + if m != nil { + return m.CommonResp + } + return nil +} + type GetGroupApplicationListReq struct { OpUserID string `protobuf:"bytes,1,opt,name=OpUserID" json:"OpUserID,omitempty"` OperationID string `protobuf:"bytes,2,opt,name=OperationID" json:"OperationID,omitempty"` @@ -447,7 +453,7 @@ func (m *GetGroupApplicationListReq) Reset() { *m = GetGroupApplicationL func (m *GetGroupApplicationListReq) String() string { return proto.CompactTextString(m) } func (*GetGroupApplicationListReq) ProtoMessage() {} func (*GetGroupApplicationListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{7} + return fileDescriptor_group_5b7911b898fdd5c5, []int{8} } func (m *GetGroupApplicationListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupApplicationListReq.Unmarshal(m, b) @@ -488,224 +494,20 @@ func (m *GetGroupApplicationListReq) GetFromUserID() string { return "" } -type GetGroupApplicationList_Data_User struct { - ID string `protobuf:"bytes,1,opt,name=ID" json:"ID,omitempty"` - GroupID string `protobuf:"bytes,2,opt,name=GroupID" json:"GroupID,omitempty"` - FromUserID string `protobuf:"bytes,3,opt,name=FromUserID" json:"FromUserID,omitempty"` - ToUserID string `protobuf:"bytes,4,opt,name=ToUserID" json:"ToUserID,omitempty"` - Flag int32 `protobuf:"varint,5,opt,name=Flag" json:"Flag,omitempty"` - RequestMsg string `protobuf:"bytes,6,opt,name=RequestMsg" json:"RequestMsg,omitempty"` - HandledMsg string `protobuf:"bytes,7,opt,name=HandledMsg" json:"HandledMsg,omitempty"` - AddTime int64 `protobuf:"varint,8,opt,name=AddTime" json:"AddTime,omitempty"` - FromUserNickname string `protobuf:"bytes,9,opt,name=FromUserNickname" json:"FromUserNickname,omitempty"` - ToUserNickname string `protobuf:"bytes,10,opt,name=ToUserNickname" json:"ToUserNickname,omitempty"` - FromUserFaceUrl string `protobuf:"bytes,11,opt,name=FromUserFaceUrl" json:"FromUserFaceUrl,omitempty"` - ToUserFaceUrl string `protobuf:"bytes,12,opt,name=ToUserFaceUrl" json:"ToUserFaceUrl,omitempty"` - HandledUser string `protobuf:"bytes,13,opt,name=HandledUser" json:"HandledUser,omitempty"` - Type int32 `protobuf:"varint,14,opt,name=Type" json:"Type,omitempty"` - HandleStatus int32 `protobuf:"varint,15,opt,name=HandleStatus" json:"HandleStatus,omitempty"` - HandleResult int32 `protobuf:"varint,16,opt,name=HandleResult" json:"HandleResult,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetGroupApplicationList_Data_User) Reset() { *m = GetGroupApplicationList_Data_User{} } -func (m *GetGroupApplicationList_Data_User) String() string { return proto.CompactTextString(m) } -func (*GetGroupApplicationList_Data_User) ProtoMessage() {} -func (*GetGroupApplicationList_Data_User) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{8} -} -func (m *GetGroupApplicationList_Data_User) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetGroupApplicationList_Data_User.Unmarshal(m, b) -} -func (m *GetGroupApplicationList_Data_User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetGroupApplicationList_Data_User.Marshal(b, m, deterministic) -} -func (dst *GetGroupApplicationList_Data_User) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetGroupApplicationList_Data_User.Merge(dst, src) -} -func (m *GetGroupApplicationList_Data_User) XXX_Size() int { - return xxx_messageInfo_GetGroupApplicationList_Data_User.Size(m) -} -func (m *GetGroupApplicationList_Data_User) XXX_DiscardUnknown() { - xxx_messageInfo_GetGroupApplicationList_Data_User.DiscardUnknown(m) -} - -var xxx_messageInfo_GetGroupApplicationList_Data_User proto.InternalMessageInfo - -func (m *GetGroupApplicationList_Data_User) GetID() string { - if m != nil { - return m.ID - } - return "" -} - -func (m *GetGroupApplicationList_Data_User) GetGroupID() string { - if m != nil { - return m.GroupID - } - return "" -} - -func (m *GetGroupApplicationList_Data_User) GetFromUserID() string { - if m != nil { - return m.FromUserID - } - return "" -} - -func (m *GetGroupApplicationList_Data_User) GetToUserID() string { - if m != nil { - return m.ToUserID - } - return "" -} - -func (m *GetGroupApplicationList_Data_User) GetFlag() int32 { - if m != nil { - return m.Flag - } - return 0 -} - -func (m *GetGroupApplicationList_Data_User) GetRequestMsg() string { - if m != nil { - return m.RequestMsg - } - return "" -} - -func (m *GetGroupApplicationList_Data_User) GetHandledMsg() string { - if m != nil { - return m.HandledMsg - } - return "" -} - -func (m *GetGroupApplicationList_Data_User) GetAddTime() int64 { - if m != nil { - return m.AddTime - } - return 0 -} - -func (m *GetGroupApplicationList_Data_User) GetFromUserNickname() string { - if m != nil { - return m.FromUserNickname - } - return "" -} - -func (m *GetGroupApplicationList_Data_User) GetToUserNickname() string { - if m != nil { - return m.ToUserNickname - } - return "" -} - -func (m *GetGroupApplicationList_Data_User) GetFromUserFaceUrl() string { - if m != nil { - return m.FromUserFaceUrl - } - return "" -} - -func (m *GetGroupApplicationList_Data_User) GetToUserFaceUrl() string { - if m != nil { - return m.ToUserFaceUrl - } - return "" -} - -func (m *GetGroupApplicationList_Data_User) GetHandledUser() string { - if m != nil { - return m.HandledUser - } - return "" -} - -func (m *GetGroupApplicationList_Data_User) GetType() int32 { - if m != nil { - return m.Type - } - return 0 -} - -func (m *GetGroupApplicationList_Data_User) GetHandleStatus() int32 { - if m != nil { - return m.HandleStatus - } - return 0 -} - -func (m *GetGroupApplicationList_Data_User) GetHandleResult() int32 { - if m != nil { - return m.HandleResult - } - return 0 -} - -type GetGroupApplicationListData struct { - Count int32 `protobuf:"varint,1,opt,name=Count" json:"Count,omitempty"` - User []*GetGroupApplicationList_Data_User `protobuf:"bytes,2,rep,name=User" json:"User,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetGroupApplicationListData) Reset() { *m = GetGroupApplicationListData{} } -func (m *GetGroupApplicationListData) String() string { return proto.CompactTextString(m) } -func (*GetGroupApplicationListData) ProtoMessage() {} -func (*GetGroupApplicationListData) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{9} -} -func (m *GetGroupApplicationListData) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetGroupApplicationListData.Unmarshal(m, b) -} -func (m *GetGroupApplicationListData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetGroupApplicationListData.Marshal(b, m, deterministic) -} -func (dst *GetGroupApplicationListData) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetGroupApplicationListData.Merge(dst, src) -} -func (m *GetGroupApplicationListData) XXX_Size() int { - return xxx_messageInfo_GetGroupApplicationListData.Size(m) -} -func (m *GetGroupApplicationListData) XXX_DiscardUnknown() { - xxx_messageInfo_GetGroupApplicationListData.DiscardUnknown(m) -} - -var xxx_messageInfo_GetGroupApplicationListData proto.InternalMessageInfo - -func (m *GetGroupApplicationListData) GetCount() int32 { - if m != nil { - return m.Count - } - return 0 -} - -func (m *GetGroupApplicationListData) GetUser() []*GetGroupApplicationList_Data_User { - if m != nil { - return m.User - } - return nil -} - type GetGroupApplicationListResp struct { - ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` - ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` - Data *GetGroupApplicationListData `protobuf:"bytes,3,opt,name=Data" json:"Data,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` + GroupRequestList []*sdk_ws.GroupRequest `protobuf:"bytes,3,rep,name=GroupRequestList" json:"GroupRequestList,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GetGroupApplicationListResp) Reset() { *m = GetGroupApplicationListResp{} } func (m *GetGroupApplicationListResp) String() string { return proto.CompactTextString(m) } func (*GetGroupApplicationListResp) ProtoMessage() {} func (*GetGroupApplicationListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{10} + return fileDescriptor_group_5b7911b898fdd5c5, []int{9} } func (m *GetGroupApplicationListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupApplicationListResp.Unmarshal(m, b) @@ -739,9 +541,9 @@ func (m *GetGroupApplicationListResp) GetErrMsg() string { return "" } -func (m *GetGroupApplicationListResp) GetData() *GetGroupApplicationListData { +func (m *GetGroupApplicationListResp) GetGroupRequestList() []*sdk_ws.GroupRequest { if m != nil { - return m.Data + return m.GroupRequestList } return nil } @@ -761,7 +563,7 @@ func (m *TransferGroupOwnerReq) Reset() { *m = TransferGroupOwnerReq{} } func (m *TransferGroupOwnerReq) String() string { return proto.CompactTextString(m) } func (*TransferGroupOwnerReq) ProtoMessage() {} func (*TransferGroupOwnerReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{11} + return fileDescriptor_group_5b7911b898fdd5c5, []int{10} } func (m *TransferGroupOwnerReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TransferGroupOwnerReq.Unmarshal(m, b) @@ -816,6 +618,44 @@ func (m *TransferGroupOwnerReq) GetOpUserID() string { return "" } +type TransferGroupOwnerResp struct { + CommonResp *CommonResp `protobuf:"bytes,1,opt,name=CommonResp" json:"CommonResp,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TransferGroupOwnerResp) Reset() { *m = TransferGroupOwnerResp{} } +func (m *TransferGroupOwnerResp) String() string { return proto.CompactTextString(m) } +func (*TransferGroupOwnerResp) ProtoMessage() {} +func (*TransferGroupOwnerResp) Descriptor() ([]byte, []int) { + return fileDescriptor_group_5b7911b898fdd5c5, []int{11} +} +func (m *TransferGroupOwnerResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TransferGroupOwnerResp.Unmarshal(m, b) +} +func (m *TransferGroupOwnerResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TransferGroupOwnerResp.Marshal(b, m, deterministic) +} +func (dst *TransferGroupOwnerResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_TransferGroupOwnerResp.Merge(dst, src) +} +func (m *TransferGroupOwnerResp) XXX_Size() int { + return xxx_messageInfo_TransferGroupOwnerResp.Size(m) +} +func (m *TransferGroupOwnerResp) XXX_DiscardUnknown() { + xxx_messageInfo_TransferGroupOwnerResp.DiscardUnknown(m) +} + +var xxx_messageInfo_TransferGroupOwnerResp proto.InternalMessageInfo + +func (m *TransferGroupOwnerResp) GetCommonResp() *CommonResp { + if m != nil { + return m.CommonResp + } + return nil +} + type JoinGroupReq struct { GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` ReqMessage string `protobuf:"bytes,2,opt,name=ReqMessage" json:"ReqMessage,omitempty"` @@ -830,7 +670,7 @@ func (m *JoinGroupReq) Reset() { *m = JoinGroupReq{} } func (m *JoinGroupReq) String() string { return proto.CompactTextString(m) } func (*JoinGroupReq) ProtoMessage() {} func (*JoinGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{12} + return fileDescriptor_group_5b7911b898fdd5c5, []int{12} } func (m *JoinGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JoinGroupReq.Unmarshal(m, b) @@ -878,15 +718,51 @@ func (m *JoinGroupReq) GetOperationID() string { return "" } +type JoinGroupResp struct { + CommonResp *CommonResp `protobuf:"bytes,1,opt,name=CommonResp" json:"CommonResp,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *JoinGroupResp) Reset() { *m = JoinGroupResp{} } +func (m *JoinGroupResp) String() string { return proto.CompactTextString(m) } +func (*JoinGroupResp) ProtoMessage() {} +func (*JoinGroupResp) Descriptor() ([]byte, []int) { + return fileDescriptor_group_5b7911b898fdd5c5, []int{13} +} +func (m *JoinGroupResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_JoinGroupResp.Unmarshal(m, b) +} +func (m *JoinGroupResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_JoinGroupResp.Marshal(b, m, deterministic) +} +func (dst *JoinGroupResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_JoinGroupResp.Merge(dst, src) +} +func (m *JoinGroupResp) XXX_Size() int { + return xxx_messageInfo_JoinGroupResp.Size(m) +} +func (m *JoinGroupResp) XXX_DiscardUnknown() { + xxx_messageInfo_JoinGroupResp.DiscardUnknown(m) +} + +var xxx_messageInfo_JoinGroupResp proto.InternalMessageInfo + +func (m *JoinGroupResp) GetCommonResp() *CommonResp { + if m != nil { + return m.CommonResp + } + return nil +} + type GroupApplicationResponseReq struct { OperationID string `protobuf:"bytes,1,opt,name=OperationID" json:"OperationID,omitempty"` OpUserID string `protobuf:"bytes,2,opt,name=OpUserID" json:"OpUserID,omitempty"` GroupID string `protobuf:"bytes,3,opt,name=GroupID" json:"GroupID,omitempty"` FromUserID string `protobuf:"bytes,4,opt,name=FromUserID" json:"FromUserID,omitempty"` - ToUserID string `protobuf:"bytes,5,opt,name=ToUserID" json:"ToUserID,omitempty"` - AddTime int64 `protobuf:"varint,6,opt,name=AddTime" json:"AddTime,omitempty"` - HandledMsg string `protobuf:"bytes,7,opt,name=HandledMsg" json:"HandledMsg,omitempty"` - HandleResult int32 `protobuf:"varint,8,opt,name=HandleResult" json:"HandleResult,omitempty"` + HandledMsg string `protobuf:"bytes,5,opt,name=HandledMsg" json:"HandledMsg,omitempty"` + HandleResult int32 `protobuf:"varint,6,opt,name=HandleResult" json:"HandleResult,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -896,7 +772,7 @@ func (m *GroupApplicationResponseReq) Reset() { *m = GroupApplicationRes func (m *GroupApplicationResponseReq) String() string { return proto.CompactTextString(m) } func (*GroupApplicationResponseReq) ProtoMessage() {} func (*GroupApplicationResponseReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{13} + return fileDescriptor_group_5b7911b898fdd5c5, []int{14} } func (m *GroupApplicationResponseReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupApplicationResponseReq.Unmarshal(m, b) @@ -944,20 +820,6 @@ func (m *GroupApplicationResponseReq) GetFromUserID() string { return "" } -func (m *GroupApplicationResponseReq) GetToUserID() string { - if m != nil { - return m.ToUserID - } - return "" -} - -func (m *GroupApplicationResponseReq) GetAddTime() int64 { - if m != nil { - return m.AddTime - } - return 0 -} - func (m *GroupApplicationResponseReq) GetHandledMsg() string { if m != nil { return m.HandledMsg @@ -972,74 +834,42 @@ func (m *GroupApplicationResponseReq) GetHandleResult() int32 { return 0 } -type SetOwnerGroupNickNameReq struct { - GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` - Nickname string `protobuf:"bytes,2,opt,name=Nickname" json:"Nickname,omitempty"` - OperationID string `protobuf:"bytes,3,opt,name=OperationID" json:"OperationID,omitempty"` - FromUserID string `protobuf:"bytes,4,opt,name=FromUserID" json:"FromUserID,omitempty"` - OpUserID string `protobuf:"bytes,5,opt,name=OpUserID" json:"OpUserID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +type GroupApplicationResponseResp struct { + CommonResp *CommonResp `protobuf:"bytes,1,opt,name=CommonResp" json:"CommonResp,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *SetOwnerGroupNickNameReq) Reset() { *m = SetOwnerGroupNickNameReq{} } -func (m *SetOwnerGroupNickNameReq) String() string { return proto.CompactTextString(m) } -func (*SetOwnerGroupNickNameReq) ProtoMessage() {} -func (*SetOwnerGroupNickNameReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{14} +func (m *GroupApplicationResponseResp) Reset() { *m = GroupApplicationResponseResp{} } +func (m *GroupApplicationResponseResp) String() string { return proto.CompactTextString(m) } +func (*GroupApplicationResponseResp) ProtoMessage() {} +func (*GroupApplicationResponseResp) Descriptor() ([]byte, []int) { + return fileDescriptor_group_5b7911b898fdd5c5, []int{15} } -func (m *SetOwnerGroupNickNameReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SetOwnerGroupNickNameReq.Unmarshal(m, b) +func (m *GroupApplicationResponseResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupApplicationResponseResp.Unmarshal(m, b) } -func (m *SetOwnerGroupNickNameReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SetOwnerGroupNickNameReq.Marshal(b, m, deterministic) +func (m *GroupApplicationResponseResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupApplicationResponseResp.Marshal(b, m, deterministic) } -func (dst *SetOwnerGroupNickNameReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_SetOwnerGroupNickNameReq.Merge(dst, src) +func (dst *GroupApplicationResponseResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupApplicationResponseResp.Merge(dst, src) } -func (m *SetOwnerGroupNickNameReq) XXX_Size() int { - return xxx_messageInfo_SetOwnerGroupNickNameReq.Size(m) +func (m *GroupApplicationResponseResp) XXX_Size() int { + return xxx_messageInfo_GroupApplicationResponseResp.Size(m) } -func (m *SetOwnerGroupNickNameReq) XXX_DiscardUnknown() { - xxx_messageInfo_SetOwnerGroupNickNameReq.DiscardUnknown(m) +func (m *GroupApplicationResponseResp) XXX_DiscardUnknown() { + xxx_messageInfo_GroupApplicationResponseResp.DiscardUnknown(m) } -var xxx_messageInfo_SetOwnerGroupNickNameReq proto.InternalMessageInfo +var xxx_messageInfo_GroupApplicationResponseResp proto.InternalMessageInfo -func (m *SetOwnerGroupNickNameReq) GetGroupID() string { +func (m *GroupApplicationResponseResp) GetCommonResp() *CommonResp { if m != nil { - return m.GroupID + return m.CommonResp } - return "" -} - -func (m *SetOwnerGroupNickNameReq) GetNickname() string { - if m != nil { - return m.Nickname - } - return "" -} - -func (m *SetOwnerGroupNickNameReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - -func (m *SetOwnerGroupNickNameReq) GetFromUserID() string { - if m != nil { - return m.FromUserID - } - return "" -} - -func (m *SetOwnerGroupNickNameReq) GetOpUserID() string { - if m != nil { - return m.OpUserID - } - return "" + return nil } type QuitGroupReq struct { @@ -1055,7 +885,7 @@ func (m *QuitGroupReq) Reset() { *m = QuitGroupReq{} } func (m *QuitGroupReq) String() string { return proto.CompactTextString(m) } func (*QuitGroupReq) ProtoMessage() {} func (*QuitGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{15} + return fileDescriptor_group_5b7911b898fdd5c5, []int{16} } func (m *QuitGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_QuitGroupReq.Unmarshal(m, b) @@ -1096,6 +926,44 @@ func (m *QuitGroupReq) GetOpUserID() string { return "" } +type QuitGroupResp struct { + CommonResp *CommonResp `protobuf:"bytes,1,opt,name=CommonResp" json:"CommonResp,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *QuitGroupResp) Reset() { *m = QuitGroupResp{} } +func (m *QuitGroupResp) String() string { return proto.CompactTextString(m) } +func (*QuitGroupResp) ProtoMessage() {} +func (*QuitGroupResp) Descriptor() ([]byte, []int) { + return fileDescriptor_group_5b7911b898fdd5c5, []int{17} +} +func (m *QuitGroupResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_QuitGroupResp.Unmarshal(m, b) +} +func (m *QuitGroupResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_QuitGroupResp.Marshal(b, m, deterministic) +} +func (dst *QuitGroupResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuitGroupResp.Merge(dst, src) +} +func (m *QuitGroupResp) XXX_Size() int { + return xxx_messageInfo_QuitGroupResp.Size(m) +} +func (m *QuitGroupResp) XXX_DiscardUnknown() { + xxx_messageInfo_QuitGroupResp.DiscardUnknown(m) +} + +var xxx_messageInfo_QuitGroupResp proto.InternalMessageInfo + +func (m *QuitGroupResp) GetCommonResp() *CommonResp { + if m != nil { + return m.CommonResp + } + return nil +} + type GetGroupMemberListReq struct { GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` OpUserID string `protobuf:"bytes,2,opt,name=OpUserID" json:"OpUserID,omitempty"` @@ -1111,7 +979,7 @@ func (m *GetGroupMemberListReq) Reset() { *m = GetGroupMemberListReq{} } func (m *GetGroupMemberListReq) String() string { return proto.CompactTextString(m) } func (*GetGroupMemberListReq) ProtoMessage() {} func (*GetGroupMemberListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{16} + return fileDescriptor_group_5b7911b898fdd5c5, []int{18} } func (m *GetGroupMemberListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMemberListReq.Unmarshal(m, b) @@ -1180,7 +1048,7 @@ func (m *GetGroupMemberListResp) Reset() { *m = GetGroupMemberListResp{} func (m *GetGroupMemberListResp) String() string { return proto.CompactTextString(m) } func (*GetGroupMemberListResp) ProtoMessage() {} func (*GetGroupMemberListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{17} + return fileDescriptor_group_5b7911b898fdd5c5, []int{19} } func (m *GetGroupMemberListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMemberListResp.Unmarshal(m, b) @@ -1242,7 +1110,7 @@ func (m *GetGroupMembersInfoReq) Reset() { *m = GetGroupMembersInfoReq{} func (m *GetGroupMembersInfoReq) String() string { return proto.CompactTextString(m) } func (*GetGroupMembersInfoReq) ProtoMessage() {} func (*GetGroupMembersInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{18} + return fileDescriptor_group_5b7911b898fdd5c5, []int{20} } func (m *GetGroupMembersInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMembersInfoReq.Unmarshal(m, b) @@ -1303,7 +1171,7 @@ func (m *GetGroupMembersInfoResp) Reset() { *m = GetGroupMembersInfoResp func (m *GetGroupMembersInfoResp) String() string { return proto.CompactTextString(m) } func (*GetGroupMembersInfoResp) ProtoMessage() {} func (*GetGroupMembersInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{19} + return fileDescriptor_group_5b7911b898fdd5c5, []int{21} } func (m *GetGroupMembersInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMembersInfoResp.Unmarshal(m, b) @@ -1359,7 +1227,7 @@ func (m *KickGroupMemberReq) Reset() { *m = KickGroupMemberReq{} } func (m *KickGroupMemberReq) String() string { return proto.CompactTextString(m) } func (*KickGroupMemberReq) ProtoMessage() {} func (*KickGroupMemberReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{20} + return fileDescriptor_group_5b7911b898fdd5c5, []int{22} } func (m *KickGroupMemberReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_KickGroupMemberReq.Unmarshal(m, b) @@ -1426,7 +1294,7 @@ func (m *Id2Result) Reset() { *m = Id2Result{} } func (m *Id2Result) String() string { return proto.CompactTextString(m) } func (*Id2Result) ProtoMessage() {} func (*Id2Result) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{21} + return fileDescriptor_group_5b7911b898fdd5c5, []int{23} } func (m *Id2Result) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Id2Result.Unmarshal(m, b) @@ -1473,7 +1341,7 @@ func (m *KickGroupMemberResp) Reset() { *m = KickGroupMemberResp{} } func (m *KickGroupMemberResp) String() string { return proto.CompactTextString(m) } func (*KickGroupMemberResp) ProtoMessage() {} func (*KickGroupMemberResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{22} + return fileDescriptor_group_5b7911b898fdd5c5, []int{24} } func (m *KickGroupMemberResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_KickGroupMemberResp.Unmarshal(m, b) @@ -1527,7 +1395,7 @@ func (m *GetJoinedGroupListReq) Reset() { *m = GetJoinedGroupListReq{} } func (m *GetJoinedGroupListReq) String() string { return proto.CompactTextString(m) } func (*GetJoinedGroupListReq) ProtoMessage() {} func (*GetJoinedGroupListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{23} + return fileDescriptor_group_5b7911b898fdd5c5, []int{25} } func (m *GetJoinedGroupListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetJoinedGroupListReq.Unmarshal(m, b) @@ -1581,7 +1449,7 @@ func (m *GetJoinedGroupListResp) Reset() { *m = GetJoinedGroupListResp{} func (m *GetJoinedGroupListResp) String() string { return proto.CompactTextString(m) } func (*GetJoinedGroupListResp) ProtoMessage() {} func (*GetJoinedGroupListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{24} + return fileDescriptor_group_5b7911b898fdd5c5, []int{26} } func (m *GetJoinedGroupListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetJoinedGroupListResp.Unmarshal(m, b) @@ -1637,7 +1505,7 @@ func (m *InviteUserToGroupReq) Reset() { *m = InviteUserToGroupReq{} } func (m *InviteUserToGroupReq) String() string { return proto.CompactTextString(m) } func (*InviteUserToGroupReq) ProtoMessage() {} func (*InviteUserToGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{25} + return fileDescriptor_group_5b7911b898fdd5c5, []int{27} } func (m *InviteUserToGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_InviteUserToGroupReq.Unmarshal(m, b) @@ -1705,7 +1573,7 @@ func (m *InviteUserToGroupResp) Reset() { *m = InviteUserToGroupResp{} } func (m *InviteUserToGroupResp) String() string { return proto.CompactTextString(m) } func (*InviteUserToGroupResp) ProtoMessage() {} func (*InviteUserToGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{26} + return fileDescriptor_group_5b7911b898fdd5c5, []int{28} } func (m *InviteUserToGroupResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_InviteUserToGroupResp.Unmarshal(m, b) @@ -1759,7 +1627,7 @@ func (m *GetGroupAllMemberReq) Reset() { *m = GetGroupAllMemberReq{} } func (m *GetGroupAllMemberReq) String() string { return proto.CompactTextString(m) } func (*GetGroupAllMemberReq) ProtoMessage() {} func (*GetGroupAllMemberReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{27} + return fileDescriptor_group_5b7911b898fdd5c5, []int{29} } func (m *GetGroupAllMemberReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupAllMemberReq.Unmarshal(m, b) @@ -1813,7 +1681,7 @@ func (m *GetGroupAllMemberResp) Reset() { *m = GetGroupAllMemberResp{} } func (m *GetGroupAllMemberResp) String() string { return proto.CompactTextString(m) } func (*GetGroupAllMemberResp) ProtoMessage() {} func (*GetGroupAllMemberResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_95297d6a59bab850, []int{28} + return fileDescriptor_group_5b7911b898fdd5c5, []int{30} } func (m *GetGroupAllMemberResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupAllMemberResp.Unmarshal(m, b) @@ -1862,15 +1730,17 @@ func init() { proto.RegisterType((*GetGroupsInfoReq)(nil), "group.GetGroupsInfoReq") proto.RegisterType((*GetGroupsInfoResp)(nil), "group.GetGroupsInfoResp") proto.RegisterType((*SetGroupInfoReq)(nil), "group.SetGroupInfoReq") + proto.RegisterType((*SetGroupInfoResp)(nil), "group.SetGroupInfoResp") proto.RegisterType((*GetGroupApplicationListReq)(nil), "group.GetGroupApplicationListReq") - proto.RegisterType((*GetGroupApplicationList_Data_User)(nil), "group.GetGroupApplicationList_Data_User") - proto.RegisterType((*GetGroupApplicationListData)(nil), "group.GetGroupApplicationListData") proto.RegisterType((*GetGroupApplicationListResp)(nil), "group.GetGroupApplicationListResp") proto.RegisterType((*TransferGroupOwnerReq)(nil), "group.TransferGroupOwnerReq") + proto.RegisterType((*TransferGroupOwnerResp)(nil), "group.TransferGroupOwnerResp") proto.RegisterType((*JoinGroupReq)(nil), "group.JoinGroupReq") + proto.RegisterType((*JoinGroupResp)(nil), "group.JoinGroupResp") proto.RegisterType((*GroupApplicationResponseReq)(nil), "group.GroupApplicationResponseReq") - proto.RegisterType((*SetOwnerGroupNickNameReq)(nil), "group.SetOwnerGroupNickNameReq") + proto.RegisterType((*GroupApplicationResponseResp)(nil), "group.GroupApplicationResponseResp") proto.RegisterType((*QuitGroupReq)(nil), "group.QuitGroupReq") + proto.RegisterType((*QuitGroupResp)(nil), "group.QuitGroupResp") proto.RegisterType((*GetGroupMemberListReq)(nil), "group.GetGroupMemberListReq") proto.RegisterType((*GetGroupMemberListResp)(nil), "group.GetGroupMemberListResp") proto.RegisterType((*GetGroupMembersInfoReq)(nil), "group.GetGroupMembersInfoReq") @@ -1898,14 +1768,13 @@ const _ = grpc.SupportPackageIsVersion4 type GroupClient interface { CreateGroup(ctx context.Context, in *CreateGroupReq, opts ...grpc.CallOption) (*CreateGroupResp, error) - JoinGroup(ctx context.Context, in *JoinGroupReq, opts ...grpc.CallOption) (*CommonResp, error) - QuitGroup(ctx context.Context, in *QuitGroupReq, opts ...grpc.CallOption) (*CommonResp, error) + JoinGroup(ctx context.Context, in *JoinGroupReq, opts ...grpc.CallOption) (*JoinGroupResp, error) + QuitGroup(ctx context.Context, in *QuitGroupReq, opts ...grpc.CallOption) (*QuitGroupResp, error) GetGroupsInfo(ctx context.Context, in *GetGroupsInfoReq, opts ...grpc.CallOption) (*GetGroupsInfoResp, error) - SetGroupInfo(ctx context.Context, in *SetGroupInfoReq, opts ...grpc.CallOption) (*CommonResp, error) + SetGroupInfo(ctx context.Context, in *SetGroupInfoReq, opts ...grpc.CallOption) (*SetGroupInfoResp, error) GetGroupApplicationList(ctx context.Context, in *GetGroupApplicationListReq, opts ...grpc.CallOption) (*GetGroupApplicationListResp, error) - TransferGroupOwner(ctx context.Context, in *TransferGroupOwnerReq, opts ...grpc.CallOption) (*CommonResp, error) - GroupApplicationResponse(ctx context.Context, in *GroupApplicationResponseReq, opts ...grpc.CallOption) (*CommonResp, error) - // rpc setOwnerGroupNickName(SetOwnerGroupNickNameReq) returns(CommonResp); + TransferGroupOwner(ctx context.Context, in *TransferGroupOwnerReq, opts ...grpc.CallOption) (*TransferGroupOwnerResp, error) + GroupApplicationResponse(ctx context.Context, in *GroupApplicationResponseReq, opts ...grpc.CallOption) (*GroupApplicationResponseResp, error) GetGroupMemberList(ctx context.Context, in *GetGroupMemberListReq, opts ...grpc.CallOption) (*GetGroupMemberListResp, error) GetGroupMembersInfo(ctx context.Context, in *GetGroupMembersInfoReq, opts ...grpc.CallOption) (*GetGroupMembersInfoResp, error) KickGroupMember(ctx context.Context, in *KickGroupMemberReq, opts ...grpc.CallOption) (*KickGroupMemberResp, error) @@ -1931,8 +1800,8 @@ func (c *groupClient) CreateGroup(ctx context.Context, in *CreateGroupReq, opts return out, nil } -func (c *groupClient) JoinGroup(ctx context.Context, in *JoinGroupReq, opts ...grpc.CallOption) (*CommonResp, error) { - out := new(CommonResp) +func (c *groupClient) JoinGroup(ctx context.Context, in *JoinGroupReq, opts ...grpc.CallOption) (*JoinGroupResp, error) { + out := new(JoinGroupResp) err := grpc.Invoke(ctx, "/group.group/joinGroup", in, out, c.cc, opts...) if err != nil { return nil, err @@ -1940,8 +1809,8 @@ func (c *groupClient) JoinGroup(ctx context.Context, in *JoinGroupReq, opts ...g return out, nil } -func (c *groupClient) QuitGroup(ctx context.Context, in *QuitGroupReq, opts ...grpc.CallOption) (*CommonResp, error) { - out := new(CommonResp) +func (c *groupClient) QuitGroup(ctx context.Context, in *QuitGroupReq, opts ...grpc.CallOption) (*QuitGroupResp, error) { + out := new(QuitGroupResp) err := grpc.Invoke(ctx, "/group.group/quitGroup", in, out, c.cc, opts...) if err != nil { return nil, err @@ -1958,8 +1827,8 @@ func (c *groupClient) GetGroupsInfo(ctx context.Context, in *GetGroupsInfoReq, o return out, nil } -func (c *groupClient) SetGroupInfo(ctx context.Context, in *SetGroupInfoReq, opts ...grpc.CallOption) (*CommonResp, error) { - out := new(CommonResp) +func (c *groupClient) SetGroupInfo(ctx context.Context, in *SetGroupInfoReq, opts ...grpc.CallOption) (*SetGroupInfoResp, error) { + out := new(SetGroupInfoResp) err := grpc.Invoke(ctx, "/group.group/setGroupInfo", in, out, c.cc, opts...) if err != nil { return nil, err @@ -1976,8 +1845,8 @@ func (c *groupClient) GetGroupApplicationList(ctx context.Context, in *GetGroupA return out, nil } -func (c *groupClient) TransferGroupOwner(ctx context.Context, in *TransferGroupOwnerReq, opts ...grpc.CallOption) (*CommonResp, error) { - out := new(CommonResp) +func (c *groupClient) TransferGroupOwner(ctx context.Context, in *TransferGroupOwnerReq, opts ...grpc.CallOption) (*TransferGroupOwnerResp, error) { + out := new(TransferGroupOwnerResp) err := grpc.Invoke(ctx, "/group.group/transferGroupOwner", in, out, c.cc, opts...) if err != nil { return nil, err @@ -1985,8 +1854,8 @@ func (c *groupClient) TransferGroupOwner(ctx context.Context, in *TransferGroupO return out, nil } -func (c *groupClient) GroupApplicationResponse(ctx context.Context, in *GroupApplicationResponseReq, opts ...grpc.CallOption) (*CommonResp, error) { - out := new(CommonResp) +func (c *groupClient) GroupApplicationResponse(ctx context.Context, in *GroupApplicationResponseReq, opts ...grpc.CallOption) (*GroupApplicationResponseResp, error) { + out := new(GroupApplicationResponseResp) err := grpc.Invoke(ctx, "/group.group/groupApplicationResponse", in, out, c.cc, opts...) if err != nil { return nil, err @@ -2052,14 +1921,13 @@ func (c *groupClient) GetGroupAllMember(ctx context.Context, in *GetGroupAllMemb type GroupServer interface { CreateGroup(context.Context, *CreateGroupReq) (*CreateGroupResp, error) - JoinGroup(context.Context, *JoinGroupReq) (*CommonResp, error) - QuitGroup(context.Context, *QuitGroupReq) (*CommonResp, error) + JoinGroup(context.Context, *JoinGroupReq) (*JoinGroupResp, error) + QuitGroup(context.Context, *QuitGroupReq) (*QuitGroupResp, error) GetGroupsInfo(context.Context, *GetGroupsInfoReq) (*GetGroupsInfoResp, error) - SetGroupInfo(context.Context, *SetGroupInfoReq) (*CommonResp, error) + SetGroupInfo(context.Context, *SetGroupInfoReq) (*SetGroupInfoResp, error) GetGroupApplicationList(context.Context, *GetGroupApplicationListReq) (*GetGroupApplicationListResp, error) - TransferGroupOwner(context.Context, *TransferGroupOwnerReq) (*CommonResp, error) - GroupApplicationResponse(context.Context, *GroupApplicationResponseReq) (*CommonResp, error) - // rpc setOwnerGroupNickName(SetOwnerGroupNickNameReq) returns(CommonResp); + TransferGroupOwner(context.Context, *TransferGroupOwnerReq) (*TransferGroupOwnerResp, error) + GroupApplicationResponse(context.Context, *GroupApplicationResponseReq) (*GroupApplicationResponseResp, error) GetGroupMemberList(context.Context, *GetGroupMemberListReq) (*GetGroupMemberListResp, error) GetGroupMembersInfo(context.Context, *GetGroupMembersInfoReq) (*GetGroupMembersInfoResp, error) KickGroupMember(context.Context, *KickGroupMemberReq) (*KickGroupMemberResp, error) @@ -2389,100 +2257,86 @@ var _Group_serviceDesc = grpc.ServiceDesc{ Metadata: "group/group.proto", } -func init() { proto.RegisterFile("group/group.proto", fileDescriptor_group_95297d6a59bab850) } +func init() { proto.RegisterFile("group/group.proto", fileDescriptor_group_5b7911b898fdd5c5) } -var fileDescriptor_group_95297d6a59bab850 = []byte{ - // 1464 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0xcd, 0x6f, 0x1b, 0x45, - 0x14, 0xd7, 0xfa, 0x23, 0x8d, 0x5f, 0xbe, 0x9c, 0x69, 0x93, 0x2e, 0xdb, 0x50, 0xb9, 0x2b, 0x54, - 0x45, 0x15, 0x4a, 0xa4, 0x14, 0x21, 0xa1, 0x46, 0xa8, 0x69, 0x3e, 0x5a, 0x03, 0x71, 0xd4, 0x8d, - 0x7b, 0xe1, 0x12, 0xb6, 0xde, 0x89, 0xb5, 0x78, 0xbd, 0xbb, 0xde, 0x59, 0x93, 0x96, 0x0b, 0x20, - 0x04, 0x1c, 0x10, 0xa2, 0x57, 0x8e, 0x5c, 0x38, 0x22, 0x0e, 0xdc, 0x39, 0xf0, 0x8f, 0xa1, 0xf9, - 0xd8, 0xf5, 0xec, 0xa7, 0x2d, 0x47, 0xa2, 0x17, 0xcb, 0xf3, 0xde, 0x9b, 0x79, 0x1f, 0xf3, 0xde, - 0xef, 0xbd, 0x59, 0x58, 0xef, 0x07, 0xde, 0xd8, 0xdf, 0x65, 0xbf, 0x3b, 0x7e, 0xe0, 0x85, 0x1e, - 0xaa, 0xb3, 0x85, 0x76, 0xef, 0xcc, 0xc7, 0xee, 0x45, 0xfb, 0x74, 0xd7, 0x1f, 0xf4, 0x77, 0x19, - 0x67, 0x97, 0x58, 0x83, 0x8b, 0x2b, 0xb2, 0x7b, 0x45, 0xb8, 0xa4, 0xfe, 0x31, 0xc0, 0xa1, 0x37, - 0x1c, 0x7a, 0xae, 0x81, 0x89, 0x8f, 0x54, 0xb8, 0x71, 0x1c, 0x04, 0x87, 0x9e, 0x85, 0x55, 0xa5, - 0xa5, 0x6c, 0xd7, 0x8d, 0x68, 0x89, 0x36, 0x61, 0xe1, 0x38, 0x08, 0x4e, 0x49, 0x5f, 0xad, 0xb4, - 0x94, 0xed, 0x86, 0x21, 0x56, 0xfa, 0x63, 0x40, 0x4f, 0xa9, 0xae, 0x03, 0xcb, 0x3a, 0xc5, 0xc3, - 0x97, 0x38, 0x68, 0xbb, 0x97, 0x1e, 0x95, 0x7e, 0x41, 0x70, 0xd0, 0x3e, 0x62, 0xc7, 0x34, 0x0c, - 0xb1, 0x42, 0x08, 0x6a, 0x86, 0xe7, 0x60, 0x76, 0x46, 0xdd, 0x60, 0xff, 0xf5, 0x7f, 0x2b, 0xb0, - 0x7a, 0x18, 0x60, 0x33, 0xc4, 0xec, 0x20, 0x03, 0x8f, 0xd0, 0x01, 0xac, 0xb6, 0x5d, 0x3b, 0xe4, - 0x07, 0x7e, 0x66, 0x93, 0x50, 0x55, 0x5a, 0xd5, 0xed, 0xa5, 0xbd, 0x77, 0x76, 0xb8, 0x93, 0x59, - 0x8d, 0x46, 0x6a, 0x03, 0xda, 0x82, 0x06, 0x93, 0xea, 0x98, 0x43, 0x2c, 0x4c, 0x9e, 0x10, 0x90, - 0x0e, 0xcb, 0x6d, 0x37, 0x0c, 0x3c, 0x6b, 0xdc, 0x0b, 0x6d, 0xcf, 0x55, 0xab, 0x4c, 0x20, 0x41, - 0xa3, 0x32, 0x1d, 0x2f, 0xb4, 0x2f, 0xed, 0x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1, 0x62, 0x97, 0x53, - 0xd0, 0x2e, 0xbb, 0x9c, 0xed, 0x36, 0xb2, 0xcb, 0x79, 0x3d, 0xa1, 0x03, 0xeb, 0x76, 0x1a, 0xf3, - 0xd0, 0x9d, 0x08, 0xa6, 0x72, 0x40, 0x5c, 0xdb, 0x2a, 0x66, 0xf2, 0xf3, 0xfa, 0x69, 0x3c, 0x89, - 0xcf, 0xcb, 0x83, 0x36, 0x6d, 0xab, 0x98, 0x49, 0xfc, 0x27, 0x6b, 0x9f, 0xaf, 0xec, 0xf0, 0x2f, - 0xc6, 0x8f, 0xd8, 0xef, 0xcb, 0x05, 0xf6, 0x39, 0xf8, 0xe1, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, - 0x22, 0xaf, 0xfb, 0xc7, 0x4d, 0x16, 0x00, 0x00, +var fileDescriptor_group_5b7911b898fdd5c5 = []byte{ + // 1235 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0x49, 0x6f, 0x1c, 0x45, + 0x14, 0x56, 0x79, 0x3c, 0x4e, 0xe6, 0xd9, 0xe3, 0xa5, 0xbc, 0x4d, 0x3a, 0xc6, 0x9a, 0x14, 0x12, + 0xb2, 0x10, 0xb2, 0x85, 0x41, 0xb9, 0x24, 0x02, 0xbc, 0x26, 0x93, 0xc4, 0xb6, 0xdc, 0x31, 0x17, + 0x2e, 0x66, 0xe2, 0x2e, 0xb7, 0x1a, 0xf7, 0x74, 0xb7, 0xbb, 0x7a, 0x62, 0xe0, 0x02, 0x08, 0xc1, + 0x05, 0x21, 0x71, 0xe2, 0xce, 0x85, 0x33, 0x07, 0x4e, 0x5c, 0xf8, 0x1d, 0xfc, 0x04, 0xfe, 0x05, + 0xaa, 0xa5, 0x7b, 0xaa, 0x57, 0x8f, 0x66, 0x24, 0x72, 0x19, 0xe9, 0x2d, 0xd5, 0xef, 0xbd, 0xaf, + 0xde, 0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5c, 0x28, 0xbf, 0x67, 0x67, 0x3b, 0x4f, 0xf2, 0xbd, 0xa2, 0x26, 0x68, 0xac, + 0x95, 0x0b, 0x59, 0xb0, 0x3b, 0xf7, 0x59, 0x73, 0x53, 0xfe, 0x27, 0xf8, 0x48, 0xfc, 0xbe, 0x9a, + 0x12, 0x7f, 0xf8, 0x7d, 0xf0, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xac, 0x58, 0xf3, 0xe0, 0x2f, + 0x14, 0x00, 0x00, } diff --git a/pkg/proto/group/group.proto b/pkg/proto/group/group.proto index cf207d69a..c10ae01f9 100644 --- a/pkg/proto/group/group.proto +++ b/pkg/proto/group/group.proto @@ -10,33 +10,29 @@ message CommonResp{ message GroupAddMemberInfo{ string UserID = 1; - int32 Role = 2; + int32 RoleLevel = 2; } + message CreateGroupReq{ - repeated GroupAddMemberInfo InitMemberList = 1; // - string GroupName = 2; - string Introduction = 3; - string Notification = 4; - string FaceUrl = 5; - string Ext = 6; - string OperationID = 7; - string OpUserID = 8; //app manager or group owner - string FromUserID = 9; + repeated GroupAddMemberInfo InitMemberList = 1; + open_im_sdk.GroupInfo GroupInfo = 2; + string OperationID = 3; + string OpUserID = 4; //app manager or group owner + string OwnerUserID = 5; //owner } - message CreateGroupResp{ int32 ErrCode = 1; string ErrMsg = 2; open_im_sdk.GroupInfo GroupInfo = 3; } + message GetGroupsInfoReq{ repeated string GroupIDList = 1; string OperationID = 2; string OpUserID = 3; //No verification permission } - message GetGroupsInfoResp{ int32 ErrCode = 1; string ErrMsg = 2; @@ -49,44 +45,23 @@ message SetGroupInfoReq{ string OpUserID = 2; //app manager or group owner string OperationID = 3; } +message SetGroupInfoResp{ + CommonResp CommonResp = 1; +} message GetGroupApplicationListReq { string OpUserID = 1; //app manager or group owner(manager) string OperationID = 2; - string FromUserID = 3; //owner or manager (Received) + string FromUserID = 3; //owner or manager } - -message GetGroupApplicationList_Data_User { - string ID = 1; - string GroupID = 2; - string FromUserID = 3; - string ToUserID = 4; - int32 Flag = 5; - string RequestMsg = 6; - string HandledMsg = 7; - int64 AddTime = 8; - string FromUserNickname = 9; - string ToUserNickname = 10; - string FromUserFaceUrl = 11; - string ToUserFaceUrl = 12; - string HandledUser = 13; - int32 Type = 14; - int32 HandleStatus = 15; - int32 HandleResult = 16; -} - -message GetGroupApplicationListData { - int32 Count = 1; - repeated GetGroupApplicationList_Data_User User = 2; -} - message GetGroupApplicationListResp { int32 ErrCode = 1; string ErrMsg = 2; - GetGroupApplicationListData Data = 3; + repeated open_im_sdk.GroupRequest GroupRequestList = 3; } + message TransferGroupOwnerReq { string GroupID = 1; string OldOwnerUserID = 2; @@ -94,7 +69,9 @@ message TransferGroupOwnerReq { string OperationID = 4; string OpUserID = 5; //app manager or group owner } - +message TransferGroupOwnerResp{ + CommonResp CommonResp = 1; +} message JoinGroupReq{ string GroupID = 1; @@ -102,35 +79,33 @@ message JoinGroupReq{ string OpUserID = 3; string OperationID = 4; } +message JoinGroupResp{ + CommonResp CommonResp = 1; +} + message GroupApplicationResponseReq{ string OperationID = 1; string OpUserID = 2; string GroupID = 3; - string FromUserID = 4; //请求加群:请求者,邀请加群:邀请人 - string ToUserID = 5; //请求加群:0,邀请加群:被邀请人 - int64 AddTime = 6; - string HandledMsg = 7; - int32 HandleResult = 8; + string FromUserID = 4; // + string HandledMsg = 5; + int32 HandleResult = 6; +} +message GroupApplicationResponseResp{ + CommonResp CommonResp = 1; } - -message SetOwnerGroupNickNameReq{ - string GroupID = 1; - string Nickname = 2; - string OperationID = 3; - string FromUserID = 4; - string OpUserID = 5; //app manger or FromUserID -} - - message QuitGroupReq{ string GroupID = 1; string OperationID = 2; string OpUserID = 3; } +message QuitGroupResp{ + CommonResp CommonResp = 1; +} @@ -150,7 +125,6 @@ message GetGroupMemberListResp { } - message GetGroupMembersInfoReq { string GroupID = 1; repeated string memberList = 2; @@ -189,8 +163,6 @@ message GetJoinedGroupListReq { string operationID = 2; string OpUserID = 3; //app manager or FromUserID } - - message GetJoinedGroupListResp{ int32 ErrCode = 1; string ErrMsg = 2; @@ -205,7 +177,6 @@ message InviteUserToGroupReq { repeated string InvitedUserIDList = 5; string OpUserID = 6; //group member or app manager } - message InviteUserToGroupResp { int32 ErrCode = 1; string ErrMsg = 2; @@ -218,7 +189,6 @@ message GetGroupAllMemberReq { string OpUserID = 2; //No verification permission string OperationID = 3; } - message GetGroupAllMemberResp { int32 ErrCode = 1; string ErrMsg = 2; @@ -229,20 +199,18 @@ message GetGroupAllMemberResp { service group{ rpc createGroup(CreateGroupReq) returns(CreateGroupResp); - rpc joinGroup(JoinGroupReq) returns(CommonResp); - rpc quitGroup(QuitGroupReq) returns(CommonResp); + rpc joinGroup(JoinGroupReq) returns(JoinGroupResp); + rpc quitGroup(QuitGroupReq) returns(QuitGroupResp); rpc getGroupsInfo(GetGroupsInfoReq) returns(GetGroupsInfoResp); - rpc setGroupInfo(SetGroupInfoReq) returns(CommonResp); + rpc setGroupInfo(SetGroupInfoReq) returns(SetGroupInfoResp); rpc getGroupApplicationList(GetGroupApplicationListReq) returns(GetGroupApplicationListResp); - rpc transferGroupOwner(TransferGroupOwnerReq) returns(CommonResp); - rpc groupApplicationResponse(GroupApplicationResponseReq) returns(CommonResp); - // rpc setOwnerGroupNickName(SetOwnerGroupNickNameReq) returns(CommonResp); + rpc transferGroupOwner(TransferGroupOwnerReq) returns(TransferGroupOwnerResp); + rpc groupApplicationResponse(GroupApplicationResponseReq) returns(GroupApplicationResponseResp); rpc getGroupMemberList(GetGroupMemberListReq) returns(GetGroupMemberListResp); rpc getGroupMembersInfo(GetGroupMembersInfoReq) returns(GetGroupMembersInfoResp); rpc kickGroupMember(KickGroupMemberReq) returns (KickGroupMemberResp); rpc getJoinedGroupList(GetJoinedGroupListReq) returns (GetJoinedGroupListResp); rpc inviteUserToGroup(InviteUserToGroupReq) returns (InviteUserToGroupResp); - rpc getGroupAllMember(GetGroupAllMemberReq) returns(GetGroupAllMemberResp); } diff --git a/pkg/proto/sdk_ws/ws.pb.go b/pkg/proto/sdk_ws/ws.pb.go index 979e03888..e4fa4ca6a 100644 --- a/pkg/proto/sdk_ws/ws.pb.go +++ b/pkg/proto/sdk_ws/ws.pb.go @@ -18,6 +18,782 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package +type GroupInfo struct { + GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` + GroupName string `protobuf:"bytes,2,opt,name=GroupName" json:"GroupName,omitempty"` + Notification string `protobuf:"bytes,3,opt,name=Notification" json:"Notification,omitempty"` + Introduction string `protobuf:"bytes,4,opt,name=Introduction" json:"Introduction,omitempty"` + FaceUrl string `protobuf:"bytes,5,opt,name=FaceUrl" json:"FaceUrl,omitempty"` + OwnerUserID string `protobuf:"bytes,6,opt,name=OwnerUserID" json:"OwnerUserID,omitempty"` + CreateTime int64 `protobuf:"varint,7,opt,name=CreateTime" json:"CreateTime,omitempty"` + MemberCount uint32 `protobuf:"varint,8,opt,name=MemberCount" json:"MemberCount,omitempty"` + Ex string `protobuf:"bytes,9,opt,name=Ex" json:"Ex,omitempty"` + Status int32 `protobuf:"varint,10,opt,name=Status" json:"Status,omitempty"` + CreatorUserID string `protobuf:"bytes,11,opt,name=CreatorUserID" json:"CreatorUserID,omitempty"` + GroupType int32 `protobuf:"varint,12,opt,name=GroupType" json:"GroupType,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GroupInfo) Reset() { *m = GroupInfo{} } +func (m *GroupInfo) String() string { return proto.CompactTextString(m) } +func (*GroupInfo) ProtoMessage() {} +func (*GroupInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_a1fbf2797043d7f3, []int{0} +} +func (m *GroupInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupInfo.Unmarshal(m, b) +} +func (m *GroupInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupInfo.Marshal(b, m, deterministic) +} +func (dst *GroupInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupInfo.Merge(dst, src) +} +func (m *GroupInfo) XXX_Size() int { + return xxx_messageInfo_GroupInfo.Size(m) +} +func (m *GroupInfo) XXX_DiscardUnknown() { + xxx_messageInfo_GroupInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupInfo proto.InternalMessageInfo + +func (m *GroupInfo) GetGroupID() string { + if m != nil { + return m.GroupID + } + return "" +} + +func (m *GroupInfo) GetGroupName() string { + if m != nil { + return m.GroupName + } + return "" +} + +func (m *GroupInfo) GetNotification() string { + if m != nil { + return m.Notification + } + return "" +} + +func (m *GroupInfo) GetIntroduction() string { + if m != nil { + return m.Introduction + } + return "" +} + +func (m *GroupInfo) GetFaceUrl() string { + if m != nil { + return m.FaceUrl + } + return "" +} + +func (m *GroupInfo) GetOwnerUserID() string { + if m != nil { + return m.OwnerUserID + } + return "" +} + +func (m *GroupInfo) GetCreateTime() int64 { + if m != nil { + return m.CreateTime + } + return 0 +} + +func (m *GroupInfo) GetMemberCount() uint32 { + if m != nil { + return m.MemberCount + } + return 0 +} + +func (m *GroupInfo) GetEx() string { + if m != nil { + return m.Ex + } + return "" +} + +func (m *GroupInfo) GetStatus() int32 { + if m != nil { + return m.Status + } + return 0 +} + +func (m *GroupInfo) GetCreatorUserID() string { + if m != nil { + return m.CreatorUserID + } + return "" +} + +func (m *GroupInfo) GetGroupType() int32 { + if m != nil { + return m.GroupType + } + return 0 +} + +type GroupMemberFullInfo struct { + GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` + UserID string `protobuf:"bytes,2,opt,name=UserID" json:"UserID,omitempty"` + RoleLevel int32 `protobuf:"varint,3,opt,name=roleLevel" json:"roleLevel,omitempty"` + JoinTime int64 `protobuf:"varint,4,opt,name=JoinTime" json:"JoinTime,omitempty"` + NickName string `protobuf:"bytes,5,opt,name=NickName" json:"NickName,omitempty"` + FaceUrl string `protobuf:"bytes,6,opt,name=FaceUrl" json:"FaceUrl,omitempty"` + FriendRemark string `protobuf:"bytes,7,opt,name=FriendRemark" json:"FriendRemark,omitempty"` + AppMangerLevel int32 `protobuf:"varint,8,opt,name=AppMangerLevel" json:"AppMangerLevel,omitempty"` + JoinSource int32 `protobuf:"varint,9,opt,name=JoinSource" json:"JoinSource,omitempty"` + OperatorUserID string `protobuf:"bytes,10,opt,name=OperatorUserID" json:"OperatorUserID,omitempty"` + Ex string `protobuf:"bytes,11,opt,name=Ex" json:"Ex,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GroupMemberFullInfo) Reset() { *m = GroupMemberFullInfo{} } +func (m *GroupMemberFullInfo) String() string { return proto.CompactTextString(m) } +func (*GroupMemberFullInfo) ProtoMessage() {} +func (*GroupMemberFullInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_a1fbf2797043d7f3, []int{1} +} +func (m *GroupMemberFullInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupMemberFullInfo.Unmarshal(m, b) +} +func (m *GroupMemberFullInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupMemberFullInfo.Marshal(b, m, deterministic) +} +func (dst *GroupMemberFullInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupMemberFullInfo.Merge(dst, src) +} +func (m *GroupMemberFullInfo) XXX_Size() int { + return xxx_messageInfo_GroupMemberFullInfo.Size(m) +} +func (m *GroupMemberFullInfo) XXX_DiscardUnknown() { + xxx_messageInfo_GroupMemberFullInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupMemberFullInfo proto.InternalMessageInfo + +func (m *GroupMemberFullInfo) GetGroupID() string { + if m != nil { + return m.GroupID + } + return "" +} + +func (m *GroupMemberFullInfo) GetUserID() string { + if m != nil { + return m.UserID + } + return "" +} + +func (m *GroupMemberFullInfo) GetRoleLevel() int32 { + if m != nil { + return m.RoleLevel + } + return 0 +} + +func (m *GroupMemberFullInfo) GetJoinTime() int64 { + if m != nil { + return m.JoinTime + } + return 0 +} + +func (m *GroupMemberFullInfo) GetNickName() string { + if m != nil { + return m.NickName + } + return "" +} + +func (m *GroupMemberFullInfo) GetFaceUrl() string { + if m != nil { + return m.FaceUrl + } + return "" +} + +func (m *GroupMemberFullInfo) GetFriendRemark() string { + if m != nil { + return m.FriendRemark + } + return "" +} + +func (m *GroupMemberFullInfo) GetAppMangerLevel() int32 { + if m != nil { + return m.AppMangerLevel + } + return 0 +} + +func (m *GroupMemberFullInfo) GetJoinSource() int32 { + if m != nil { + return m.JoinSource + } + return 0 +} + +func (m *GroupMemberFullInfo) GetOperatorUserID() string { + if m != nil { + return m.OperatorUserID + } + return "" +} + +func (m *GroupMemberFullInfo) GetEx() string { + if m != nil { + return m.Ex + } + return "" +} + +type PublicUserInfo struct { + UserID string `protobuf:"bytes,1,opt,name=UserID" json:"UserID,omitempty"` + Nickname string `protobuf:"bytes,2,opt,name=Nickname" json:"Nickname,omitempty"` + FaceUrl string `protobuf:"bytes,3,opt,name=FaceUrl" json:"FaceUrl,omitempty"` + Gender int32 `protobuf:"varint,4,opt,name=Gender" json:"Gender,omitempty"` + AppMangerLevel int32 `protobuf:"varint,5,opt,name=AppMangerLevel" json:"AppMangerLevel,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PublicUserInfo) Reset() { *m = PublicUserInfo{} } +func (m *PublicUserInfo) String() string { return proto.CompactTextString(m) } +func (*PublicUserInfo) ProtoMessage() {} +func (*PublicUserInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_a1fbf2797043d7f3, []int{2} +} +func (m *PublicUserInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PublicUserInfo.Unmarshal(m, b) +} +func (m *PublicUserInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PublicUserInfo.Marshal(b, m, deterministic) +} +func (dst *PublicUserInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_PublicUserInfo.Merge(dst, src) +} +func (m *PublicUserInfo) XXX_Size() int { + return xxx_messageInfo_PublicUserInfo.Size(m) +} +func (m *PublicUserInfo) XXX_DiscardUnknown() { + xxx_messageInfo_PublicUserInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_PublicUserInfo proto.InternalMessageInfo + +func (m *PublicUserInfo) GetUserID() string { + if m != nil { + return m.UserID + } + return "" +} + +func (m *PublicUserInfo) GetNickname() string { + if m != nil { + return m.Nickname + } + return "" +} + +func (m *PublicUserInfo) GetFaceUrl() string { + if m != nil { + return m.FaceUrl + } + return "" +} + +func (m *PublicUserInfo) GetGender() int32 { + if m != nil { + return m.Gender + } + return 0 +} + +func (m *PublicUserInfo) GetAppMangerLevel() int32 { + if m != nil { + return m.AppMangerLevel + } + return 0 +} + +type UserInfo struct { + UserID string `protobuf:"bytes,1,opt,name=UserID" json:"UserID,omitempty"` + Nickname string `protobuf:"bytes,2,opt,name=Nickname" json:"Nickname,omitempty"` + FaceUrl string `protobuf:"bytes,3,opt,name=FaceUrl" json:"FaceUrl,omitempty"` + Gender int32 `protobuf:"varint,4,opt,name=Gender" json:"Gender,omitempty"` + PhoneNumber string `protobuf:"bytes,5,opt,name=PhoneNumber" json:"PhoneNumber,omitempty"` + Birth string `protobuf:"bytes,6,opt,name=Birth" json:"Birth,omitempty"` + Email string `protobuf:"bytes,7,opt,name=Email" json:"Email,omitempty"` + Ex string `protobuf:"bytes,8,opt,name=Ex" json:"Ex,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UserInfo) Reset() { *m = UserInfo{} } +func (m *UserInfo) String() string { return proto.CompactTextString(m) } +func (*UserInfo) ProtoMessage() {} +func (*UserInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_a1fbf2797043d7f3, []int{3} +} +func (m *UserInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UserInfo.Unmarshal(m, b) +} +func (m *UserInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UserInfo.Marshal(b, m, deterministic) +} +func (dst *UserInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_UserInfo.Merge(dst, src) +} +func (m *UserInfo) XXX_Size() int { + return xxx_messageInfo_UserInfo.Size(m) +} +func (m *UserInfo) XXX_DiscardUnknown() { + xxx_messageInfo_UserInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_UserInfo proto.InternalMessageInfo + +func (m *UserInfo) GetUserID() string { + if m != nil { + return m.UserID + } + return "" +} + +func (m *UserInfo) GetNickname() string { + if m != nil { + return m.Nickname + } + return "" +} + +func (m *UserInfo) GetFaceUrl() string { + if m != nil { + return m.FaceUrl + } + return "" +} + +func (m *UserInfo) GetGender() int32 { + if m != nil { + return m.Gender + } + return 0 +} + +func (m *UserInfo) GetPhoneNumber() string { + if m != nil { + return m.PhoneNumber + } + return "" +} + +func (m *UserInfo) GetBirth() string { + if m != nil { + return m.Birth + } + return "" +} + +func (m *UserInfo) GetEmail() string { + if m != nil { + return m.Email + } + return "" +} + +func (m *UserInfo) GetEx() string { + if m != nil { + return m.Ex + } + return "" +} + +type FriendInfo struct { + OwnerUserID string `protobuf:"bytes,1,opt,name=OwnerUserID" json:"OwnerUserID,omitempty"` + Remark string `protobuf:"bytes,2,opt,name=Remark" json:"Remark,omitempty"` + CreateTime int64 `protobuf:"varint,3,opt,name=CreateTime" json:"CreateTime,omitempty"` + FriendUser *UserInfo `protobuf:"bytes,4,opt,name=FriendUser" json:"FriendUser,omitempty"` + AddSource int32 `protobuf:"varint,5,opt,name=AddSource" json:"AddSource,omitempty"` + OperatorUserID string `protobuf:"bytes,6,opt,name=OperatorUserID" json:"OperatorUserID,omitempty"` + Ex string `protobuf:"bytes,7,opt,name=Ex" json:"Ex,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FriendInfo) Reset() { *m = FriendInfo{} } +func (m *FriendInfo) String() string { return proto.CompactTextString(m) } +func (*FriendInfo) ProtoMessage() {} +func (*FriendInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_a1fbf2797043d7f3, []int{4} +} +func (m *FriendInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FriendInfo.Unmarshal(m, b) +} +func (m *FriendInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FriendInfo.Marshal(b, m, deterministic) +} +func (dst *FriendInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_FriendInfo.Merge(dst, src) +} +func (m *FriendInfo) XXX_Size() int { + return xxx_messageInfo_FriendInfo.Size(m) +} +func (m *FriendInfo) XXX_DiscardUnknown() { + xxx_messageInfo_FriendInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_FriendInfo proto.InternalMessageInfo + +func (m *FriendInfo) GetOwnerUserID() string { + if m != nil { + return m.OwnerUserID + } + return "" +} + +func (m *FriendInfo) GetRemark() string { + if m != nil { + return m.Remark + } + return "" +} + +func (m *FriendInfo) GetCreateTime() int64 { + if m != nil { + return m.CreateTime + } + return 0 +} + +func (m *FriendInfo) GetFriendUser() *UserInfo { + if m != nil { + return m.FriendUser + } + return nil +} + +func (m *FriendInfo) GetAddSource() int32 { + if m != nil { + return m.AddSource + } + return 0 +} + +func (m *FriendInfo) GetOperatorUserID() string { + if m != nil { + return m.OperatorUserID + } + return "" +} + +func (m *FriendInfo) GetEx() string { + if m != nil { + return m.Ex + } + return "" +} + +type BlackInfo struct { + OwnerUserID string `protobuf:"bytes,1,opt,name=OwnerUserID" json:"OwnerUserID,omitempty"` + CreateTime int64 `protobuf:"varint,2,opt,name=CreateTime" json:"CreateTime,omitempty"` + BlackUserInfo *PublicUserInfo `protobuf:"bytes,4,opt,name=BlackUserInfo" json:"BlackUserInfo,omitempty"` + AddSource int32 `protobuf:"varint,5,opt,name=AddSource" json:"AddSource,omitempty"` + OperatorUserID string `protobuf:"bytes,6,opt,name=OperatorUserID" json:"OperatorUserID,omitempty"` + Ex string `protobuf:"bytes,7,opt,name=Ex" json:"Ex,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BlackInfo) Reset() { *m = BlackInfo{} } +func (m *BlackInfo) String() string { return proto.CompactTextString(m) } +func (*BlackInfo) ProtoMessage() {} +func (*BlackInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_a1fbf2797043d7f3, []int{5} +} +func (m *BlackInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BlackInfo.Unmarshal(m, b) +} +func (m *BlackInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BlackInfo.Marshal(b, m, deterministic) +} +func (dst *BlackInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_BlackInfo.Merge(dst, src) +} +func (m *BlackInfo) XXX_Size() int { + return xxx_messageInfo_BlackInfo.Size(m) +} +func (m *BlackInfo) XXX_DiscardUnknown() { + xxx_messageInfo_BlackInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_BlackInfo proto.InternalMessageInfo + +func (m *BlackInfo) GetOwnerUserID() string { + if m != nil { + return m.OwnerUserID + } + return "" +} + +func (m *BlackInfo) GetCreateTime() int64 { + if m != nil { + return m.CreateTime + } + return 0 +} + +func (m *BlackInfo) GetBlackUserInfo() *PublicUserInfo { + if m != nil { + return m.BlackUserInfo + } + return nil +} + +func (m *BlackInfo) GetAddSource() int32 { + if m != nil { + return m.AddSource + } + return 0 +} + +func (m *BlackInfo) GetOperatorUserID() string { + if m != nil { + return m.OperatorUserID + } + return "" +} + +func (m *BlackInfo) GetEx() string { + if m != nil { + return m.Ex + } + return "" +} + +type GroupRequest struct { + UserID string `protobuf:"bytes,1,opt,name=UserID" json:"UserID,omitempty"` + GroupID string `protobuf:"bytes,2,opt,name=GroupID" json:"GroupID,omitempty"` + HandleResult string `protobuf:"bytes,3,opt,name=HandleResult" json:"HandleResult,omitempty"` + ReqMsg string `protobuf:"bytes,4,opt,name=ReqMsg" json:"ReqMsg,omitempty"` + HandleMsg string `protobuf:"bytes,5,opt,name=HandleMsg" json:"HandleMsg,omitempty"` + ReqTime int64 `protobuf:"varint,6,opt,name=ReqTime" json:"ReqTime,omitempty"` + HandleUserID string `protobuf:"bytes,7,opt,name=HandleUserID" json:"HandleUserID,omitempty"` + HandleTime int64 `protobuf:"varint,8,opt,name=HandleTime" json:"HandleTime,omitempty"` + Ex string `protobuf:"bytes,9,opt,name=Ex" json:"Ex,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GroupRequest) Reset() { *m = GroupRequest{} } +func (m *GroupRequest) String() string { return proto.CompactTextString(m) } +func (*GroupRequest) ProtoMessage() {} +func (*GroupRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_a1fbf2797043d7f3, []int{6} +} +func (m *GroupRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupRequest.Unmarshal(m, b) +} +func (m *GroupRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupRequest.Marshal(b, m, deterministic) +} +func (dst *GroupRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupRequest.Merge(dst, src) +} +func (m *GroupRequest) XXX_Size() int { + return xxx_messageInfo_GroupRequest.Size(m) +} +func (m *GroupRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GroupRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupRequest proto.InternalMessageInfo + +func (m *GroupRequest) GetUserID() string { + if m != nil { + return m.UserID + } + return "" +} + +func (m *GroupRequest) GetGroupID() string { + if m != nil { + return m.GroupID + } + return "" +} + +func (m *GroupRequest) GetHandleResult() string { + if m != nil { + return m.HandleResult + } + return "" +} + +func (m *GroupRequest) GetReqMsg() string { + if m != nil { + return m.ReqMsg + } + return "" +} + +func (m *GroupRequest) GetHandleMsg() string { + if m != nil { + return m.HandleMsg + } + return "" +} + +func (m *GroupRequest) GetReqTime() int64 { + if m != nil { + return m.ReqTime + } + return 0 +} + +func (m *GroupRequest) GetHandleUserID() string { + if m != nil { + return m.HandleUserID + } + return "" +} + +func (m *GroupRequest) GetHandleTime() int64 { + if m != nil { + return m.HandleTime + } + return 0 +} + +func (m *GroupRequest) GetEx() string { + if m != nil { + return m.Ex + } + return "" +} + +type FriendRequest struct { + FromUserID string `protobuf:"bytes,1,opt,name=FromUserID" json:"FromUserID,omitempty"` + ToUserID string `protobuf:"bytes,2,opt,name=ToUserID" json:"ToUserID,omitempty"` + HandleResult int32 `protobuf:"varint,3,opt,name=HandleResult" json:"HandleResult,omitempty"` + ReqMsg string `protobuf:"bytes,4,opt,name=ReqMsg" json:"ReqMsg,omitempty"` + CreateTime int64 `protobuf:"varint,5,opt,name=CreateTime" json:"CreateTime,omitempty"` + HandlerUserID string `protobuf:"bytes,6,opt,name=HandlerUserID" json:"HandlerUserID,omitempty"` + HandleMsg string `protobuf:"bytes,7,opt,name=HandleMsg" json:"HandleMsg,omitempty"` + HandleTime int64 `protobuf:"varint,8,opt,name=HandleTime" json:"HandleTime,omitempty"` + Ex string `protobuf:"bytes,9,opt,name=Ex" json:"Ex,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FriendRequest) Reset() { *m = FriendRequest{} } +func (m *FriendRequest) String() string { return proto.CompactTextString(m) } +func (*FriendRequest) ProtoMessage() {} +func (*FriendRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_a1fbf2797043d7f3, []int{7} +} +func (m *FriendRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FriendRequest.Unmarshal(m, b) +} +func (m *FriendRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FriendRequest.Marshal(b, m, deterministic) +} +func (dst *FriendRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_FriendRequest.Merge(dst, src) +} +func (m *FriendRequest) XXX_Size() int { + return xxx_messageInfo_FriendRequest.Size(m) +} +func (m *FriendRequest) XXX_DiscardUnknown() { + xxx_messageInfo_FriendRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_FriendRequest proto.InternalMessageInfo + +func (m *FriendRequest) GetFromUserID() string { + if m != nil { + return m.FromUserID + } + return "" +} + +func (m *FriendRequest) GetToUserID() string { + if m != nil { + return m.ToUserID + } + return "" +} + +func (m *FriendRequest) GetHandleResult() int32 { + if m != nil { + return m.HandleResult + } + return 0 +} + +func (m *FriendRequest) GetReqMsg() string { + if m != nil { + return m.ReqMsg + } + return "" +} + +func (m *FriendRequest) GetCreateTime() int64 { + if m != nil { + return m.CreateTime + } + return 0 +} + +func (m *FriendRequest) GetHandlerUserID() string { + if m != nil { + return m.HandlerUserID + } + return "" +} + +func (m *FriendRequest) GetHandleMsg() string { + if m != nil { + return m.HandleMsg + } + return "" +} + +func (m *FriendRequest) GetHandleTime() int64 { + if m != nil { + return m.HandleTime + } + return 0 +} + +func (m *FriendRequest) GetEx() string { + if m != nil { + return m.Ex + } + return "" +} + type PullMessageBySeqListResp struct { ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` @@ -34,7 +810,7 @@ func (m *PullMessageBySeqListResp) Reset() { *m = PullMessageBySeqListRe func (m *PullMessageBySeqListResp) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListResp) ProtoMessage() {} func (*PullMessageBySeqListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{0} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{8} } func (m *PullMessageBySeqListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListResp.Unmarshal(m, b) @@ -109,7 +885,7 @@ func (m *PullMessageBySeqListReq) Reset() { *m = PullMessageBySeqListReq func (m *PullMessageBySeqListReq) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListReq) ProtoMessage() {} func (*PullMessageBySeqListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{1} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{9} } func (m *PullMessageBySeqListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListReq.Unmarshal(m, b) @@ -164,7 +940,7 @@ func (m *PullMessageReq) Reset() { *m = PullMessageReq{} } func (m *PullMessageReq) String() string { return proto.CompactTextString(m) } func (*PullMessageReq) ProtoMessage() {} func (*PullMessageReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{2} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{10} } func (m *PullMessageReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageReq.Unmarshal(m, b) @@ -228,7 +1004,7 @@ func (m *PullMessageResp) Reset() { *m = PullMessageResp{} } func (m *PullMessageResp) String() string { return proto.CompactTextString(m) } func (*PullMessageResp) ProtoMessage() {} func (*PullMessageResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{3} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{11} } func (m *PullMessageResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageResp.Unmarshal(m, b) @@ -300,7 +1076,7 @@ func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} } func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqReq) ProtoMessage() {} func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{4} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{12} } func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) @@ -332,7 +1108,7 @@ func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} } func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqResp) ProtoMessage() {} func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{5} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{13} } func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) @@ -380,7 +1156,7 @@ func (m *GatherFormat) Reset() { *m = GatherFormat{} } func (m *GatherFormat) String() string { return proto.CompactTextString(m) } func (*GatherFormat) ProtoMessage() {} func (*GatherFormat) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{6} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{14} } func (m *GatherFormat) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GatherFormat.Unmarshal(m, b) @@ -427,7 +1203,7 @@ func (m *UserSendMsgResp) Reset() { *m = UserSendMsgResp{} } func (m *UserSendMsgResp) String() string { return proto.CompactTextString(m) } func (*UserSendMsgResp) ProtoMessage() {} func (*UserSendMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{7} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{15} } func (m *UserSendMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserSendMsgResp.Unmarshal(m, b) @@ -475,7 +1251,7 @@ type MsgData struct { ClientMsgID string `protobuf:"bytes,4,opt,name=clientMsgID" json:"clientMsgID,omitempty"` ServerMsgID string `protobuf:"bytes,5,opt,name=serverMsgID" json:"serverMsgID,omitempty"` SenderPlatformID int32 `protobuf:"varint,6,opt,name=senderPlatformID" json:"senderPlatformID,omitempty"` - SenderNickName string `protobuf:"bytes,7,opt,name=senderNickName" json:"senderNickName,omitempty"` + SenderNickname string `protobuf:"bytes,7,opt,name=senderNickname" json:"senderNickname,omitempty"` SenderFaceURL string `protobuf:"bytes,8,opt,name=senderFaceURL" json:"senderFaceURL,omitempty"` SessionType int32 `protobuf:"varint,9,opt,name=sessionType" json:"sessionType,omitempty"` MsgFrom int32 `protobuf:"varint,10,opt,name=msgFrom" json:"msgFrom,omitempty"` @@ -496,7 +1272,7 @@ func (m *MsgData) Reset() { *m = MsgData{} } func (m *MsgData) String() string { return proto.CompactTextString(m) } func (*MsgData) ProtoMessage() {} func (*MsgData) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{8} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{16} } func (m *MsgData) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgData.Unmarshal(m, b) @@ -558,9 +1334,9 @@ func (m *MsgData) GetSenderPlatformID() int32 { return 0 } -func (m *MsgData) GetSenderNickName() string { +func (m *MsgData) GetSenderNickname() string { if m != nil { - return m.SenderNickName + return m.SenderNickname } return "" } @@ -645,7 +1421,7 @@ func (m *MsgData) GetOfflinePushInfo() *OfflinePushInfo { type OfflinePushInfo struct { Title string `protobuf:"bytes,1,opt,name=Title" json:"Title,omitempty"` Desc string `protobuf:"bytes,2,opt,name=Desc" json:"Desc,omitempty"` - Ext string `protobuf:"bytes,3,opt,name=Ext" json:"Ext,omitempty"` + Ex string `protobuf:"bytes,3,opt,name=Ex" json:"Ex,omitempty"` IOSPushSound string `protobuf:"bytes,4,opt,name=iOSPushSound" json:"iOSPushSound,omitempty"` IOSBadgeCount bool `protobuf:"varint,5,opt,name=iOSBadgeCount" json:"iOSBadgeCount,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -657,7 +1433,7 @@ func (m *OfflinePushInfo) Reset() { *m = OfflinePushInfo{} } func (m *OfflinePushInfo) String() string { return proto.CompactTextString(m) } func (*OfflinePushInfo) ProtoMessage() {} func (*OfflinePushInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{9} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{17} } func (m *OfflinePushInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OfflinePushInfo.Unmarshal(m, b) @@ -691,9 +1467,9 @@ func (m *OfflinePushInfo) GetDesc() string { return "" } -func (m *OfflinePushInfo) GetExt() string { +func (m *OfflinePushInfo) GetEx() string { if m != nil { - return m.Ext + return m.Ex } return "" } @@ -712,362 +1488,6 @@ func (m *OfflinePushInfo) GetIOSBadgeCount() bool { return false } -// public -type GroupInfo struct { - GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` - GroupName string `protobuf:"bytes,2,opt,name=GroupName" json:"GroupName,omitempty"` - Notification string `protobuf:"bytes,3,opt,name=Notification" json:"Notification,omitempty"` - Introduction string `protobuf:"bytes,4,opt,name=Introduction" json:"Introduction,omitempty"` - FaceUrl string `protobuf:"bytes,5,opt,name=FaceUrl" json:"FaceUrl,omitempty"` - Owner *PublicUserInfo `protobuf:"bytes,6,opt,name=Owner" json:"Owner,omitempty"` - CreateTime uint64 `protobuf:"varint,7,opt,name=CreateTime" json:"CreateTime,omitempty"` - MemberCount uint32 `protobuf:"varint,8,opt,name=MemberCount" json:"MemberCount,omitempty"` - Ext string `protobuf:"bytes,9,opt,name=Ext" json:"Ext,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GroupInfo) Reset() { *m = GroupInfo{} } -func (m *GroupInfo) String() string { return proto.CompactTextString(m) } -func (*GroupInfo) ProtoMessage() {} -func (*GroupInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{10} -} -func (m *GroupInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GroupInfo.Unmarshal(m, b) -} -func (m *GroupInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GroupInfo.Marshal(b, m, deterministic) -} -func (dst *GroupInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_GroupInfo.Merge(dst, src) -} -func (m *GroupInfo) XXX_Size() int { - return xxx_messageInfo_GroupInfo.Size(m) -} -func (m *GroupInfo) XXX_DiscardUnknown() { - xxx_messageInfo_GroupInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_GroupInfo proto.InternalMessageInfo - -func (m *GroupInfo) GetGroupID() string { - if m != nil { - return m.GroupID - } - return "" -} - -func (m *GroupInfo) GetGroupName() string { - if m != nil { - return m.GroupName - } - return "" -} - -func (m *GroupInfo) GetNotification() string { - if m != nil { - return m.Notification - } - return "" -} - -func (m *GroupInfo) GetIntroduction() string { - if m != nil { - return m.Introduction - } - return "" -} - -func (m *GroupInfo) GetFaceUrl() string { - if m != nil { - return m.FaceUrl - } - return "" -} - -func (m *GroupInfo) GetOwner() *PublicUserInfo { - if m != nil { - return m.Owner - } - return nil -} - -func (m *GroupInfo) GetCreateTime() uint64 { - if m != nil { - return m.CreateTime - } - return 0 -} - -func (m *GroupInfo) GetMemberCount() uint32 { - if m != nil { - return m.MemberCount - } - return 0 -} - -func (m *GroupInfo) GetExt() string { - if m != nil { - return m.Ext - } - return "" -} - -// private, Group members have permission to view -type GroupMemberFullInfo struct { - GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` - UserID string `protobuf:"bytes,2,opt,name=UserID" json:"UserID,omitempty"` - AdministratorLevel int32 `protobuf:"varint,3,opt,name=AdministratorLevel" json:"AdministratorLevel,omitempty"` - JoinTime uint64 `protobuf:"varint,4,opt,name=JoinTime" json:"JoinTime,omitempty"` - NickName string `protobuf:"bytes,5,opt,name=NickName" json:"NickName,omitempty"` - FaceUrl string `protobuf:"bytes,6,opt,name=FaceUrl" json:"FaceUrl,omitempty"` - FriendRemark string `protobuf:"bytes,7,opt,name=FriendRemark" json:"FriendRemark,omitempty"` - AppMangerLevel int32 `protobuf:"varint,8,opt,name=AppMangerLevel" json:"AppMangerLevel,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GroupMemberFullInfo) Reset() { *m = GroupMemberFullInfo{} } -func (m *GroupMemberFullInfo) String() string { return proto.CompactTextString(m) } -func (*GroupMemberFullInfo) ProtoMessage() {} -func (*GroupMemberFullInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{11} -} -func (m *GroupMemberFullInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GroupMemberFullInfo.Unmarshal(m, b) -} -func (m *GroupMemberFullInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GroupMemberFullInfo.Marshal(b, m, deterministic) -} -func (dst *GroupMemberFullInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_GroupMemberFullInfo.Merge(dst, src) -} -func (m *GroupMemberFullInfo) XXX_Size() int { - return xxx_messageInfo_GroupMemberFullInfo.Size(m) -} -func (m *GroupMemberFullInfo) XXX_DiscardUnknown() { - xxx_messageInfo_GroupMemberFullInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_GroupMemberFullInfo proto.InternalMessageInfo - -func (m *GroupMemberFullInfo) GetGroupID() string { - if m != nil { - return m.GroupID - } - return "" -} - -func (m *GroupMemberFullInfo) GetUserID() string { - if m != nil { - return m.UserID - } - return "" -} - -func (m *GroupMemberFullInfo) GetAdministratorLevel() int32 { - if m != nil { - return m.AdministratorLevel - } - return 0 -} - -func (m *GroupMemberFullInfo) GetJoinTime() uint64 { - if m != nil { - return m.JoinTime - } - return 0 -} - -func (m *GroupMemberFullInfo) GetNickName() string { - if m != nil { - return m.NickName - } - return "" -} - -func (m *GroupMemberFullInfo) GetFaceUrl() string { - if m != nil { - return m.FaceUrl - } - return "" -} - -func (m *GroupMemberFullInfo) GetFriendRemark() string { - if m != nil { - return m.FriendRemark - } - return "" -} - -func (m *GroupMemberFullInfo) GetAppMangerLevel() int32 { - if m != nil { - return m.AppMangerLevel - } - return 0 -} - -// private, Friends have permission to view -type UserInfo struct { - UserID string `protobuf:"bytes,1,opt,name=UserID" json:"UserID,omitempty"` - Nickname string `protobuf:"bytes,2,opt,name=Nickname" json:"Nickname,omitempty"` - FaceUrl string `protobuf:"bytes,3,opt,name=FaceUrl" json:"FaceUrl,omitempty"` - Gender int32 `protobuf:"varint,4,opt,name=Gender" json:"Gender,omitempty"` - Mobile string `protobuf:"bytes,5,opt,name=Mobile" json:"Mobile,omitempty"` - Birth string `protobuf:"bytes,6,opt,name=Birth" json:"Birth,omitempty"` - Email string `protobuf:"bytes,7,opt,name=Email" json:"Email,omitempty"` - Ext string `protobuf:"bytes,8,opt,name=Ext" json:"Ext,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *UserInfo) Reset() { *m = UserInfo{} } -func (m *UserInfo) String() string { return proto.CompactTextString(m) } -func (*UserInfo) ProtoMessage() {} -func (*UserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{12} -} -func (m *UserInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UserInfo.Unmarshal(m, b) -} -func (m *UserInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UserInfo.Marshal(b, m, deterministic) -} -func (dst *UserInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_UserInfo.Merge(dst, src) -} -func (m *UserInfo) XXX_Size() int { - return xxx_messageInfo_UserInfo.Size(m) -} -func (m *UserInfo) XXX_DiscardUnknown() { - xxx_messageInfo_UserInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_UserInfo proto.InternalMessageInfo - -func (m *UserInfo) GetUserID() string { - if m != nil { - return m.UserID - } - return "" -} - -func (m *UserInfo) GetNickname() string { - if m != nil { - return m.Nickname - } - return "" -} - -func (m *UserInfo) GetFaceUrl() string { - if m != nil { - return m.FaceUrl - } - return "" -} - -func (m *UserInfo) GetGender() int32 { - if m != nil { - return m.Gender - } - return 0 -} - -func (m *UserInfo) GetMobile() string { - if m != nil { - return m.Mobile - } - return "" -} - -func (m *UserInfo) GetBirth() string { - if m != nil { - return m.Birth - } - return "" -} - -func (m *UserInfo) GetEmail() string { - if m != nil { - return m.Email - } - return "" -} - -func (m *UserInfo) GetExt() string { - if m != nil { - return m.Ext - } - return "" -} - -// No permissions required -type PublicUserInfo struct { - UserID string `protobuf:"bytes,1,opt,name=UserID" json:"UserID,omitempty"` - Nickname string `protobuf:"bytes,2,opt,name=Nickname" json:"Nickname,omitempty"` - FaceUrl string `protobuf:"bytes,3,opt,name=FaceUrl" json:"FaceUrl,omitempty"` - Gender int32 `protobuf:"varint,4,opt,name=Gender" json:"Gender,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PublicUserInfo) Reset() { *m = PublicUserInfo{} } -func (m *PublicUserInfo) String() string { return proto.CompactTextString(m) } -func (*PublicUserInfo) ProtoMessage() {} -func (*PublicUserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{13} -} -func (m *PublicUserInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PublicUserInfo.Unmarshal(m, b) -} -func (m *PublicUserInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PublicUserInfo.Marshal(b, m, deterministic) -} -func (dst *PublicUserInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_PublicUserInfo.Merge(dst, src) -} -func (m *PublicUserInfo) XXX_Size() int { - return xxx_messageInfo_PublicUserInfo.Size(m) -} -func (m *PublicUserInfo) XXX_DiscardUnknown() { - xxx_messageInfo_PublicUserInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_PublicUserInfo proto.InternalMessageInfo - -func (m *PublicUserInfo) GetUserID() string { - if m != nil { - return m.UserID - } - return "" -} - -func (m *PublicUserInfo) GetNickname() string { - if m != nil { - return m.Nickname - } - return "" -} - -func (m *PublicUserInfo) GetFaceUrl() string { - if m != nil { - return m.FaceUrl - } - return "" -} - -func (m *PublicUserInfo) GetGender() int32 { - if m != nil { - return m.Gender - } - return 0 -} - type TipsComm struct { Detail []byte `protobuf:"bytes,1,opt,name=Detail,proto3" json:"Detail,omitempty"` DefaultTips string `protobuf:"bytes,2,opt,name=DefaultTips" json:"DefaultTips,omitempty"` @@ -1080,7 +1500,7 @@ func (m *TipsComm) Reset() { *m = TipsComm{} } func (m *TipsComm) String() string { return proto.CompactTextString(m) } func (*TipsComm) ProtoMessage() {} func (*TipsComm) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{14} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{18} } func (m *TipsComm) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TipsComm.Unmarshal(m, b) @@ -1119,7 +1539,7 @@ func (m *TipsComm) GetDefaultTips() string { type MemberEnterTips struct { Group *GroupInfo `protobuf:"bytes,1,opt,name=Group" json:"Group,omitempty"` EntrantUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=EntrantUser" json:"EntrantUser,omitempty"` - OperationTime uint64 `protobuf:"varint,3,opt,name=OperationTime" json:"OperationTime,omitempty"` + OperationTime int64 `protobuf:"varint,3,opt,name=OperationTime" json:"OperationTime,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1129,7 +1549,7 @@ func (m *MemberEnterTips) Reset() { *m = MemberEnterTips{} } func (m *MemberEnterTips) String() string { return proto.CompactTextString(m) } func (*MemberEnterTips) ProtoMessage() {} func (*MemberEnterTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{15} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{19} } func (m *MemberEnterTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberEnterTips.Unmarshal(m, b) @@ -1163,7 +1583,7 @@ func (m *MemberEnterTips) GetEntrantUser() *GroupMemberFullInfo { return nil } -func (m *MemberEnterTips) GetOperationTime() uint64 { +func (m *MemberEnterTips) GetOperationTime() int64 { if m != nil { return m.OperationTime } @@ -1174,7 +1594,7 @@ func (m *MemberEnterTips) GetOperationTime() uint64 { type MemberLeaveTips struct { Group *GroupInfo `protobuf:"bytes,1,opt,name=Group" json:"Group,omitempty"` LeaverUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=LeaverUser" json:"LeaverUser,omitempty"` - OperationTime uint64 `protobuf:"varint,3,opt,name=OperationTime" json:"OperationTime,omitempty"` + OperationTime int64 `protobuf:"varint,3,opt,name=OperationTime" json:"OperationTime,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1184,7 +1604,7 @@ func (m *MemberLeaveTips) Reset() { *m = MemberLeaveTips{} } func (m *MemberLeaveTips) String() string { return proto.CompactTextString(m) } func (*MemberLeaveTips) ProtoMessage() {} func (*MemberLeaveTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{16} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{20} } func (m *MemberLeaveTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberLeaveTips.Unmarshal(m, b) @@ -1218,7 +1638,7 @@ func (m *MemberLeaveTips) GetLeaverUser() *GroupMemberFullInfo { return nil } -func (m *MemberLeaveTips) GetOperationTime() uint64 { +func (m *MemberLeaveTips) GetOperationTime() int64 { if m != nil { return m.OperationTime } @@ -1229,7 +1649,7 @@ type MemberInvitedTips struct { Group *GroupInfo `protobuf:"bytes,1,opt,name=Group" json:"Group,omitempty"` OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=OpUser" json:"OpUser,omitempty"` InvitedUserList []*GroupMemberFullInfo `protobuf:"bytes,3,rep,name=InvitedUserList" json:"InvitedUserList,omitempty"` - OperationTime uint64 `protobuf:"varint,4,opt,name=OperationTime" json:"OperationTime,omitempty"` + OperationTime int64 `protobuf:"varint,4,opt,name=OperationTime" json:"OperationTime,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1239,7 +1659,7 @@ func (m *MemberInvitedTips) Reset() { *m = MemberInvitedTips{} } func (m *MemberInvitedTips) String() string { return proto.CompactTextString(m) } func (*MemberInvitedTips) ProtoMessage() {} func (*MemberInvitedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{17} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{21} } func (m *MemberInvitedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInvitedTips.Unmarshal(m, b) @@ -1280,7 +1700,7 @@ func (m *MemberInvitedTips) GetInvitedUserList() []*GroupMemberFullInfo { return nil } -func (m *MemberInvitedTips) GetOperationTime() uint64 { +func (m *MemberInvitedTips) GetOperationTime() int64 { if m != nil { return m.OperationTime } @@ -1291,7 +1711,7 @@ type MemberKickedTips struct { Group *GroupInfo `protobuf:"bytes,1,opt,name=Group" json:"Group,omitempty"` OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=OpUser" json:"OpUser,omitempty"` KickedUserList []*GroupMemberFullInfo `protobuf:"bytes,3,rep,name=KickedUserList" json:"KickedUserList,omitempty"` - OperationTime uint64 `protobuf:"varint,4,opt,name=OperationTime" json:"OperationTime,omitempty"` + OperationTime int64 `protobuf:"varint,4,opt,name=OperationTime" json:"OperationTime,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1301,7 +1721,7 @@ func (m *MemberKickedTips) Reset() { *m = MemberKickedTips{} } func (m *MemberKickedTips) String() string { return proto.CompactTextString(m) } func (*MemberKickedTips) ProtoMessage() {} func (*MemberKickedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{18} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{22} } func (m *MemberKickedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberKickedTips.Unmarshal(m, b) @@ -1342,7 +1762,7 @@ func (m *MemberKickedTips) GetKickedUserList() []*GroupMemberFullInfo { return nil } -func (m *MemberKickedTips) GetOperationTime() uint64 { +func (m *MemberKickedTips) GetOperationTime() int64 { if m != nil { return m.OperationTime } @@ -1353,7 +1773,7 @@ type MemberInfoChangedTips struct { ChangeType int32 `protobuf:"varint,1,opt,name=ChangeType" json:"ChangeType,omitempty"` OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=OpUser" json:"OpUser,omitempty"` FinalInfo *GroupMemberFullInfo `protobuf:"bytes,3,opt,name=FinalInfo" json:"FinalInfo,omitempty"` - MuteTime uint64 `protobuf:"varint,4,opt,name=MuteTime" json:"MuteTime,omitempty"` + MuteTime int64 `protobuf:"varint,4,opt,name=MuteTime" json:"MuteTime,omitempty"` Group *GroupInfo `protobuf:"bytes,5,opt,name=Group" json:"Group,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1364,7 +1784,7 @@ func (m *MemberInfoChangedTips) Reset() { *m = MemberInfoChangedTips{} } func (m *MemberInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*MemberInfoChangedTips) ProtoMessage() {} func (*MemberInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{19} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{23} } func (m *MemberInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInfoChangedTips.Unmarshal(m, b) @@ -1405,7 +1825,7 @@ func (m *MemberInfoChangedTips) GetFinalInfo() *GroupMemberFullInfo { return nil } -func (m *MemberInfoChangedTips) GetMuteTime() uint64 { +func (m *MemberInfoChangedTips) GetMuteTime() int64 { if m != nil { return m.MuteTime } @@ -1423,7 +1843,7 @@ type GroupCreatedTips struct { Group *GroupInfo `protobuf:"bytes,1,opt,name=Group" json:"Group,omitempty"` Creator *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=Creator" json:"Creator,omitempty"` MemberList []*GroupMemberFullInfo `protobuf:"bytes,3,rep,name=MemberList" json:"MemberList,omitempty"` - OperationTime uint64 `protobuf:"varint,4,opt,name=OperationTime" json:"OperationTime,omitempty"` + OperationTime int64 `protobuf:"varint,4,opt,name=OperationTime" json:"OperationTime,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1433,7 +1853,7 @@ func (m *GroupCreatedTips) Reset() { *m = GroupCreatedTips{} } func (m *GroupCreatedTips) String() string { return proto.CompactTextString(m) } func (*GroupCreatedTips) ProtoMessage() {} func (*GroupCreatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{20} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{24} } func (m *GroupCreatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupCreatedTips.Unmarshal(m, b) @@ -1474,7 +1894,7 @@ func (m *GroupCreatedTips) GetMemberList() []*GroupMemberFullInfo { return nil } -func (m *GroupCreatedTips) GetOperationTime() uint64 { +func (m *GroupCreatedTips) GetOperationTime() int64 { if m != nil { return m.OperationTime } @@ -1494,7 +1914,7 @@ func (m *GroupInfoChangedTips) Reset() { *m = GroupInfoChangedTips{} } func (m *GroupInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*GroupInfoChangedTips) ProtoMessage() {} func (*GroupInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{21} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{25} } func (m *GroupInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfoChangedTips.Unmarshal(m, b) @@ -1548,7 +1968,7 @@ func (m *JoinGroupApplicationTips) Reset() { *m = JoinGroupApplicationTi func (m *JoinGroupApplicationTips) String() string { return proto.CompactTextString(m) } func (*JoinGroupApplicationTips) ProtoMessage() {} func (*JoinGroupApplicationTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{22} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{26} } func (m *JoinGroupApplicationTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JoinGroupApplicationTips.Unmarshal(m, b) @@ -1603,7 +2023,7 @@ func (m *ApplicationProcessedTips) Reset() { *m = ApplicationProcessedTi func (m *ApplicationProcessedTips) String() string { return proto.CompactTextString(m) } func (*ApplicationProcessedTips) ProtoMessage() {} func (*ApplicationProcessedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{23} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{27} } func (m *ApplicationProcessedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ApplicationProcessedTips.Unmarshal(m, b) @@ -1651,71 +2071,8 @@ func (m *ApplicationProcessedTips) GetReason() string { return "" } -// ////////////////////friend///////////////////// -type FriendInfo struct { - OwnerUser *UserInfo `protobuf:"bytes,1,opt,name=OwnerUser" json:"OwnerUser,omitempty"` - Remark string `protobuf:"bytes,2,opt,name=Remark" json:"Remark,omitempty"` - CreateTime uint64 `protobuf:"varint,3,opt,name=CreateTime" json:"CreateTime,omitempty"` - FriendUser *UserInfo `protobuf:"bytes,4,opt,name=FriendUser" json:"FriendUser,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *FriendInfo) Reset() { *m = FriendInfo{} } -func (m *FriendInfo) String() string { return proto.CompactTextString(m) } -func (*FriendInfo) ProtoMessage() {} -func (*FriendInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{24} -} -func (m *FriendInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FriendInfo.Unmarshal(m, b) -} -func (m *FriendInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FriendInfo.Marshal(b, m, deterministic) -} -func (dst *FriendInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_FriendInfo.Merge(dst, src) -} -func (m *FriendInfo) XXX_Size() int { - return xxx_messageInfo_FriendInfo.Size(m) -} -func (m *FriendInfo) XXX_DiscardUnknown() { - xxx_messageInfo_FriendInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_FriendInfo proto.InternalMessageInfo - -func (m *FriendInfo) GetOwnerUser() *UserInfo { - if m != nil { - return m.OwnerUser - } - return nil -} - -func (m *FriendInfo) GetRemark() string { - if m != nil { - return m.Remark - } - return "" -} - -func (m *FriendInfo) GetCreateTime() uint64 { - if m != nil { - return m.CreateTime - } - return 0 -} - -func (m *FriendInfo) GetFriendUser() *UserInfo { - if m != nil { - return m.FriendUser - } - return nil -} - type FriendApplication struct { - AddTime uint64 `protobuf:"varint,1,opt,name=AddTime" json:"AddTime,omitempty"` + AddTime int64 `protobuf:"varint,1,opt,name=AddTime" json:"AddTime,omitempty"` AddSource string `protobuf:"bytes,2,opt,name=AddSource" json:"AddSource,omitempty"` AddWording string `protobuf:"bytes,3,opt,name=AddWording" json:"AddWording,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -1727,7 +2084,7 @@ func (m *FriendApplication) Reset() { *m = FriendApplication{} } func (m *FriendApplication) String() string { return proto.CompactTextString(m) } func (*FriendApplication) ProtoMessage() {} func (*FriendApplication) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{25} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{28} } func (m *FriendApplication) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplication.Unmarshal(m, b) @@ -1747,7 +2104,7 @@ func (m *FriendApplication) XXX_DiscardUnknown() { var xxx_messageInfo_FriendApplication proto.InternalMessageInfo -func (m *FriendApplication) GetAddTime() uint64 { +func (m *FriendApplication) GetAddTime() int64 { if m != nil { return m.AddTime } @@ -1780,7 +2137,7 @@ func (m *FromToUserID) Reset() { *m = FromToUserID{} } func (m *FromToUserID) String() string { return proto.CompactTextString(m) } func (*FromToUserID) ProtoMessage() {} func (*FromToUserID) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{26} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{29} } func (m *FromToUserID) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FromToUserID.Unmarshal(m, b) @@ -1826,7 +2183,7 @@ func (m *FriendApplicationAddedTips) Reset() { *m = FriendApplicationAdd func (m *FriendApplicationAddedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationAddedTips) ProtoMessage() {} func (*FriendApplicationAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{27} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{30} } func (m *FriendApplicationAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationAddedTips.Unmarshal(m, b) @@ -1865,7 +2222,7 @@ func (m *FriendApplicationProcessedTips) Reset() { *m = FriendApplicatio func (m *FriendApplicationProcessedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationProcessedTips) ProtoMessage() {} func (*FriendApplicationProcessedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{28} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{31} } func (m *FriendApplicationProcessedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationProcessedTips.Unmarshal(m, b) @@ -1895,7 +2252,7 @@ func (m *FriendApplicationProcessedTips) GetFromToUserID() *FromToUserID { // FromUserID Added a friend ToUserID type FriendAddedTips struct { Friend *FriendInfo `protobuf:"bytes,1,opt,name=Friend" json:"Friend,omitempty"` - OperationTime uint64 `protobuf:"varint,2,opt,name=OperationTime" json:"OperationTime,omitempty"` + OperationTime int64 `protobuf:"varint,2,opt,name=OperationTime" json:"OperationTime,omitempty"` OpUser *PublicUserInfo `protobuf:"bytes,3,opt,name=OpUser" json:"OpUser,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1906,7 +2263,7 @@ func (m *FriendAddedTips) Reset() { *m = FriendAddedTips{} } func (m *FriendAddedTips) String() string { return proto.CompactTextString(m) } func (*FriendAddedTips) ProtoMessage() {} func (*FriendAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{29} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{32} } func (m *FriendAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendAddedTips.Unmarshal(m, b) @@ -1933,7 +2290,7 @@ func (m *FriendAddedTips) GetFriend() *FriendInfo { return nil } -func (m *FriendAddedTips) GetOperationTime() uint64 { +func (m *FriendAddedTips) GetOperationTime() int64 { if m != nil { return m.OperationTime } @@ -1959,7 +2316,7 @@ func (m *FriendDeletedTips) Reset() { *m = FriendDeletedTips{} } func (m *FriendDeletedTips) String() string { return proto.CompactTextString(m) } func (*FriendDeletedTips) ProtoMessage() {} func (*FriendDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{30} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{33} } func (m *FriendDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendDeletedTips.Unmarshal(m, b) @@ -1997,7 +2354,7 @@ func (m *BlackAddedTips) Reset() { *m = BlackAddedTips{} } func (m *BlackAddedTips) String() string { return proto.CompactTextString(m) } func (*BlackAddedTips) ProtoMessage() {} func (*BlackAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{31} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{34} } func (m *BlackAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackAddedTips.Unmarshal(m, b) @@ -2035,7 +2392,7 @@ func (m *BlackDeletedTips) Reset() { *m = BlackDeletedTips{} } func (m *BlackDeletedTips) String() string { return proto.CompactTextString(m) } func (*BlackDeletedTips) ProtoMessage() {} func (*BlackDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{32} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{35} } func (m *BlackDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackDeletedTips.Unmarshal(m, b) @@ -2073,7 +2430,7 @@ func (m *FriendInfoChangedTips) Reset() { *m = FriendInfoChangedTips{} } func (m *FriendInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*FriendInfoChangedTips) ProtoMessage() {} func (*FriendInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{33} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{36} } func (m *FriendInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfoChangedTips.Unmarshal(m, b) @@ -2112,7 +2469,7 @@ func (m *SelfInfoUpdatedTips) Reset() { *m = SelfInfoUpdatedTips{} } func (m *SelfInfoUpdatedTips) String() string { return proto.CompactTextString(m) } func (*SelfInfoUpdatedTips) ProtoMessage() {} func (*SelfInfoUpdatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1ed69884ac12b8b9, []int{34} + return fileDescriptor_ws_a1fbf2797043d7f3, []int{37} } func (m *SelfInfoUpdatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SelfInfoUpdatedTips.Unmarshal(m, b) @@ -2140,6 +2497,14 @@ func (m *SelfInfoUpdatedTips) GetUserID() string { } func init() { + proto.RegisterType((*GroupInfo)(nil), "open_im_sdk.GroupInfo") + proto.RegisterType((*GroupMemberFullInfo)(nil), "open_im_sdk.GroupMemberFullInfo") + proto.RegisterType((*PublicUserInfo)(nil), "open_im_sdk.PublicUserInfo") + proto.RegisterType((*UserInfo)(nil), "open_im_sdk.UserInfo") + proto.RegisterType((*FriendInfo)(nil), "open_im_sdk.FriendInfo") + proto.RegisterType((*BlackInfo)(nil), "open_im_sdk.BlackInfo") + proto.RegisterType((*GroupRequest)(nil), "open_im_sdk.GroupRequest") + proto.RegisterType((*FriendRequest)(nil), "open_im_sdk.FriendRequest") proto.RegisterType((*PullMessageBySeqListResp)(nil), "open_im_sdk.PullMessageBySeqListResp") proto.RegisterType((*PullMessageBySeqListReq)(nil), "open_im_sdk.PullMessageBySeqListReq") proto.RegisterType((*PullMessageReq)(nil), "open_im_sdk.PullMessageReq") @@ -2151,10 +2516,6 @@ func init() { proto.RegisterType((*MsgData)(nil), "open_im_sdk.MsgData") proto.RegisterMapType((map[string]bool)(nil), "open_im_sdk.MsgData.OptionsEntry") proto.RegisterType((*OfflinePushInfo)(nil), "open_im_sdk.OfflinePushInfo") - proto.RegisterType((*GroupInfo)(nil), "open_im_sdk.GroupInfo") - proto.RegisterType((*GroupMemberFullInfo)(nil), "open_im_sdk.GroupMemberFullInfo") - proto.RegisterType((*UserInfo)(nil), "open_im_sdk.UserInfo") - proto.RegisterType((*PublicUserInfo)(nil), "open_im_sdk.PublicUserInfo") proto.RegisterType((*TipsComm)(nil), "open_im_sdk.TipsComm") proto.RegisterType((*MemberEnterTips)(nil), "open_im_sdk.MemberEnterTips") proto.RegisterType((*MemberLeaveTips)(nil), "open_im_sdk.MemberLeaveTips") @@ -2165,7 +2526,6 @@ func init() { proto.RegisterType((*GroupInfoChangedTips)(nil), "open_im_sdk.GroupInfoChangedTips") proto.RegisterType((*JoinGroupApplicationTips)(nil), "open_im_sdk.JoinGroupApplicationTips") proto.RegisterType((*ApplicationProcessedTips)(nil), "open_im_sdk.ApplicationProcessedTips") - proto.RegisterType((*FriendInfo)(nil), "open_im_sdk.FriendInfo") proto.RegisterType((*FriendApplication)(nil), "open_im_sdk.FriendApplication") proto.RegisterType((*FromToUserID)(nil), "open_im_sdk.FromToUserID") proto.RegisterType((*FriendApplicationAddedTips)(nil), "open_im_sdk.FriendApplicationAddedTips") @@ -2178,115 +2538,128 @@ func init() { proto.RegisterType((*SelfInfoUpdatedTips)(nil), "open_im_sdk.SelfInfoUpdatedTips") } -func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_1ed69884ac12b8b9) } +func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_a1fbf2797043d7f3) } -var fileDescriptor_ws_1ed69884ac12b8b9 = []byte{ - // 1703 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x58, 0x4f, 0x6f, 0x23, 0x4b, - 0x11, 0xd7, 0xf8, 0x5f, 0xec, 0x72, 0x36, 0xce, 0xce, 0xfe, 0x79, 0xc3, 0xf2, 0xb4, 0x32, 0x23, - 0x84, 0x2c, 0x04, 0x79, 0x22, 0x2b, 0xa4, 0xc7, 0xa2, 0x07, 0x38, 0x71, 0x92, 0x97, 0x65, 0xbd, - 0x0e, 0xe3, 0x2c, 0x1c, 0x38, 0x44, 0x13, 0x4f, 0xdb, 0x19, 0x79, 0xa6, 0xc7, 0xe9, 0x1e, 0x67, - 0x37, 0x17, 0xbe, 0x05, 0xe2, 0x80, 0x90, 0xb8, 0x21, 0x24, 0x0e, 0x88, 0x03, 0x1f, 0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 0x2d, 0x78, 0x98, 0x13, 0x37, 0x6b, 0x8c, - 0x7f, 0x8f, 0x68, 0x71, 0x51, 0x64, 0x13, 0x5a, 0x24, 0xa3, 0x74, 0xbb, 0xbe, 0x2f, 0xdf, 0xae, - 0x27, 0xdc, 0xdf, 0x5b, 0xe0, 0xe0, 0x83, 0x4e, 0x3a, 0xdd, 0xd9, 0x2c, 0xd2, 0x7b, 0xd3, 0x1d, - 0x2a, 0xf2, 0x23, 0x68, 0x68, 0x03, 0x3c, 0xd5, 0xb4, 0xaf, 0xdd, 0x97, 0x16, 0xda, 0xf8, 0xf4, - 0x78, 0xcc, 0x97, 0xf9, 0x0a, 0xa7, 0x25, 0xf7, 0x6f, 0x16, 0x38, 0x06, 0xa9, 0x23, 0x91, 0x8c, - 0x98, 0x94, 0x1f, 0x79, 0x34, 0x10, 0x39, 0x39, 0x8f, 0x52, 0xbd, 0x26, 0x69, 0xc9, 0x20, 0x5d, - 0x29, 0x90, 0xfe, 0xab, 0x05, 0xa0, 0xb6, 0x19, 0xba, 0x35, 0xcf, 0xa0, 0x41, 0x8b, 0x21, 0xf9, - 0x56, 0x54, 0x1f, 0x15, 0x7c, 0x2f, 0x12, 0x92, 0xeb, 0x29, 0xdb, 0xb4, 0x1e, 0x95, 0x32, 0xdb, - 0xb4, 0x18, 0x15, 0x97, 0xcb, 0xf2, 0xca, 0x72, 0xf9, 0xc3, 0xcc, 0x35, 0x79, 0xab, 0x5c, 0xe7, - 0xcd, 0x50, 0x74, 0xa7, 0x70, 0x5f, 0x49, 0x46, 0xb2, 0x71, 0x9b, 0xe8, 0x06, 0xea, 0x2f, 0x27, - 0x8b, 0x1c, 0x65, 0x22, 0x6e, 0xe5, 0xdd, 0x20, 0x18, 0x26, 0x73, 0x31, 0xca, 0xb7, 0xf2, 0x1c, - 0x40, 0x8e, 0xdd, 0x20, 0xf8, 0x55, 0x22, 0x82, 0x90, 0x4f, 0x74, 0x41, 0x0d, 0xc4, 0x7d, 0x81, - 0x0b, 0x60, 0x12, 0x1f, 0x27, 0x7a, 0xa3, 0x79, 0x8a, 0x9c, 0x93, 0xb8, 0xb0, 0xed, 0x18, 0x08, - 0x8e, 0x9d, 0x4c, 0x37, 0xdb, 0x78, 0x32, 0xd9, 0xfd, 0x35, 0x3c, 0x59, 0x21, 0xde, 0x0d, 0x02, - 0xdd, 0x21, 0x5f, 0x14, 0x3d, 0xe9, 0xec, 0x17, 0xff, 0x23, 0x62, 0x2a, 0x78, 0x05, 0x75, 0xf7, - 0x04, 0x9e, 0xae, 0x18, 0x2f, 0xb6, 0xe0, 0x7b, 0x3a, 0xf8, 0x83, 0x05, 0x2d, 0xed, 0x21, 0xe7, - 0xfc, 0x19, 0xd4, 0x14, 0xa4, 0x8d, 0x7d, 0xb2, 0x64, 0x2c, 0xeb, 0x2b, 0x4f, 0xab, 0xad, 0x8e, - 0xa2, 0xd2, 0x15, 0xa3, 0xc8, 0x7e, 0xb6, 0x34, 0x21, 0xae, 0xbd, 0x99, 0xd9, 0x70, 0xf0, 0xb2, - 0xb6, 0xe8, 0xb1, 0x88, 0xa5, 0x1f, 0x26, 0xe6, 0x01, 0x6c, 0xec, 0x44, 0xfe, 0x68, 0xfa, 0xc1, - 0xaa, 0xf4, 0x0b, 0xd8, 0x24, 0x83, 0x1f, 0x90, 0xe3, 0x2f, 0xe1, 0xd1, 0x22, 0xd1, 0xe6, 0xdc, - 0x7e, 0x4f, 0xbb, 0xdf, 0x87, 0x07, 0x43, 0x16, 0x8d, 0xd1, 0xea, 0xeb, 0x59, 0x90, 0x3f, 0x7c, - 0x5f, 0xb1, 0xea, 0x9f, 0xd6, 0xe8, 0x3f, 0xd1, 0xcf, 0xfe, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x45, - 0x62, 0x8c, 0xef, 0x9c, 0x16, 0x00, 0x00, +var fileDescriptor_ws_a1fbf2797043d7f3 = []byte{ + // 1916 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00,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, 0xd8, 0x96, 0xf7, 0xb5, 0xbd, 0x62, 0x5f, 0x3b, 0x9f, 0x2d, 0x6c, 0xb7, 0x37, + 0x96, 0x79, 0xb1, 0xd3, 0xfc, 0xa2, 0x2c, 0x8e, 0x59, 0xcc, 0xb2, 0xf7, 0xe3, 0x73, 0x1f, 0x76, + 0xe8, 0x75, 0xee, 0xbd, 0x65, 0xe9, 0x67, 0xb0, 0x4b, 0x0a, 0xdf, 0xa3, 0x8d, 0x3f, 0x87, 0x9b, + 0x55, 0xa0, 0xf5, 0x26, 0xf8, 0x8e, 0x7a, 0xbf, 0x07, 0xd7, 0x07, 0x2c, 0x1e, 0xa1, 0xd6, 0xa7, + 0xb3, 0xb0, 0x3c, 0x45, 0x5e, 0xf3, 0x70, 0xf8, 0xbc, 0x41, 0x7f, 0x4e, 0x7d, 0xf6, 0xbf, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x1c, 0xbd, 0xfd, 0xa5, 0xaf, 0x1a, 0x00, 0x00, } diff --git a/pkg/proto/sdk_ws/ws.proto b/pkg/proto/sdk_ws/ws.proto index 7ef3d4d22..1921ef694 100644 --- a/pkg/proto/sdk_ws/ws.proto +++ b/pkg/proto/sdk_ws/ws.proto @@ -2,6 +2,102 @@ syntax = "proto3"; package open_im_sdk;//The package name to which the proto file belongs //option go_package = "./sdk_ws;open_im_sdk";//The generated go pb file is in the current directory, and the package name is open_im_sdk +////////////////////////////////base/////////////////////////////// + + +message GroupInfo{ + string GroupID = 1; + string GroupName = 2; + string Notification = 3; + string Introduction = 4; + string FaceUrl = 5; + string OwnerUserID = 6; + int64 CreateTime = 7; + uint32 MemberCount = 8; + string Ex = 9; + int32 Status = 10; + string CreatorUserID = 11; + int32 GroupType = 12; +} + +message GroupMemberFullInfo { + string GroupID = 1 ; + string UserID = 2 ; + int32 roleLevel = 3; + int64 JoinTime = 4; + string NickName = 5; + string FaceUrl = 6; + string FriendRemark = 7; + int32 AppMangerLevel = 8; //if >0 + int32 JoinSource = 9; + string OperatorUserID = 10; + string Ex = 11; +} + +message PublicUserInfo{ + string UserID = 1; + string Nickname = 2; + string FaceUrl = 3; + int32 Gender = 4; + int32 AppMangerLevel = 5; //if >0 +} + +message UserInfo{ + string UserID = 1; + string Nickname = 2; + string FaceUrl = 3; + int32 Gender = 4; + string PhoneNumber = 5; + string Birth = 6; + string Email = 7; + string Ex = 8; +} + +message FriendInfo{ + string OwnerUserID = 1; + string Remark = 2; + int64 CreateTime = 3; + UserInfo FriendUser = 4; + int32 AddSource = 5; + string OperatorUserID = 6; + string Ex = 7; +} + +message BlackInfo{ + string OwnerUserID = 1; + int64 CreateTime = 2; + PublicUserInfo BlackUserInfo = 4; + int32 AddSource = 5; + string OperatorUserID = 6; + string Ex = 7; +} + +message GroupRequest{ + string UserID = 1; + string GroupID = 2; + string HandleResult = 3; + string ReqMsg = 4; + string HandleMsg = 5; + int64 ReqTime = 6; + string HandleUserID = 7; + int64 HandleTime = 8; + string Ex = 9; +} + +message FriendRequest{ + string FromUserID = 1; + string ToUserID = 2; + int32 HandleResult = 3; + string ReqMsg = 4; + int64 CreateTime = 5; + string HandlerUserID = 6; + string HandleMsg = 7; + int64 HandleTime = 8; + string Ex = 9; +} + +///////////////////////////////////base end///////////////////////////////////// + message PullMessageBySeqListResp { int32 errCode = 1; @@ -14,7 +110,7 @@ message PullMessageBySeqListResp { message PullMessageBySeqListReq{ string userID = 1; string operationID = 2; - repeated int64 seqList =3; + repeated int64 seqList = 3; } message PullMessageReq { string userID = 1; @@ -80,76 +176,38 @@ message MsgData { string sendID = 1; string recvID = 2; string groupID = 3; - string clientMsgID =4; - string serverMsgID =5; - int32 senderPlatformID =6; - string senderNickName =7; - string senderFaceURL =8; + string clientMsgID = 4; + string serverMsgID = 5; + int32 senderPlatformID = 6; + string senderNickname = 7; + string senderFaceURL = 8; int32 sessionType = 9; int32 msgFrom = 10; int32 contentType = 11; - bytes content =12; + bytes content = 12; repeated string forceList = 13; - int64 seq =14; + int64 seq = 14; int64 sendTime = 15; int64 createTime = 16; - map Options= 17; - OfflinePushInfo offlinePushInfo =18; + map Options = 17; + OfflinePushInfo offlinePushInfo = 18; } message OfflinePushInfo{ - string Title = 1; - string Desc = 2; - string Ext = 3; - string iOSPushSound = 4; - bool iOSBadgeCount = 5; -} - -//public -message GroupInfo{ - string GroupID = 1; - string GroupName = 2; - string Notification = 3; - string Introduction = 4; - string FaceUrl = 5; - PublicUserInfo Owner = 6; - uint64 CreateTime = 7; - uint32 MemberCount = 8; - string Ext = 9; + string Title = 1; + string Desc = 2; + string Ex = 3; + string iOSPushSound = 4; + bool iOSBadgeCount = 5; } -//private, Group members have permission to view -message GroupMemberFullInfo { - string GroupID = 1 ; - string UserID = 2 ; - int32 AdministratorLevel = 3; - uint64 JoinTime = 4; - string NickName = 5; - string FaceUrl = 6; - string FriendRemark = 7; - int32 AppMangerLevel = 8; // >0 -} -//private, Friends have permission to view -message UserInfo{ - string UserID = 1; - string Nickname = 2; - string FaceUrl = 3; - int32 Gender = 4; - string Mobile = 5; - string Birth = 6; - string Email = 7; - string Ext = 8; -} -//No permissions required -message PublicUserInfo{ - string UserID = 1; - string Nickname = 2; - string FaceUrl = 3; - int32 Gender = 4; -} + + + + message TipsComm{ bytes Detail = 1; @@ -161,35 +219,35 @@ message TipsComm{ message MemberEnterTips{ GroupInfo Group = 1; GroupMemberFullInfo EntrantUser = 2; - uint64 OperationTime = 3; + int64 OperationTime = 3; } //Actively leave the group message MemberLeaveTips{ GroupInfo Group = 1; GroupMemberFullInfo LeaverUser = 2; - uint64 OperationTime = 3; + int64 OperationTime = 3; } message MemberInvitedTips{ GroupInfo Group = 1; GroupMemberFullInfo OpUser = 2; repeated GroupMemberFullInfo InvitedUserList = 3; - uint64 OperationTime = 4; + int64 OperationTime = 4; } message MemberKickedTips{ GroupInfo Group = 1; GroupMemberFullInfo OpUser = 2; repeated GroupMemberFullInfo KickedUserList = 3; - uint64 OperationTime = 4; + int64 OperationTime = 4; } message MemberInfoChangedTips{ int32 ChangeType = 1; ///bitwise operators 0001:member info changed; 0010:mute ; GroupMemberFullInfo OpUser = 2; //who do this GroupMemberFullInfo FinalInfo = 3; // - uint64 MuteTime = 4; + int64 MuteTime = 4; GroupInfo Group = 5; } @@ -197,7 +255,7 @@ message GroupCreatedTips{ GroupInfo Group = 1; GroupMemberFullInfo Creator = 2; repeated GroupMemberFullInfo MemberList = 3; - uint64 OperationTime = 4; + int64 OperationTime = 4; } message GroupInfoChangedTips{ @@ -208,27 +266,27 @@ message GroupInfoChangedTips{ message JoinGroupApplicationTips{ GroupInfo Group = 1; - PublicUserInfo Applicant = 2; - string Reason = 3; + PublicUserInfo Applicant = 2; + string Reason = 3; } message ApplicationProcessedTips{ GroupInfo Group = 1; GroupMemberFullInfo OpUser = 2; int32 Result = 3; - string Reason = 4; + string Reason = 4; } //////////////////////friend///////////////////// -message FriendInfo{ - UserInfo OwnerUser = 1; - string Remark = 2; - uint64 CreateTime = 3; - UserInfo FriendUser = 4; -} +//message FriendInfo{ +// UserInfo OwnerUser = 1; +// string Remark = 2; +// uint64 CreateTime = 3; +// UserInfo FriendUser = 4; +//} message FriendApplication{ - uint64 AddTime = 1; + int64 AddTime = 1; string AddSource = 2; string AddWording = 3; } @@ -240,7 +298,7 @@ message FromToUserID{ //FromUserID apply to add ToUserID message FriendApplicationAddedTips{ - FromToUserID FromToUserID = 1; + FromToUserID FromToUserID = 1; } //FromUserID accept or reject ToUserID @@ -251,7 +309,7 @@ message FriendApplicationProcessedTips{ // FromUserID Added a friend ToUserID message FriendAddedTips{ FriendInfo Friend = 1; - uint64 OperationTime = 2; + int64 OperationTime = 2; PublicUserInfo OpUser = 3; //who do this } @@ -261,11 +319,7 @@ message FriendDeletedTips{ FromToUserID FromToUserID = 1; } -//message BlackInfo{ -// PublicUserInfo OwnerUser = 1; -// uint64 CreateTime = 3; -// PublicUserInfo BlackUser = 4; -//} + message BlackAddedTips{ FromToUserID FromToUserID = 1; From 774e348f958ac47cfed8cda1452df991f3534ed4 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Mon, 27 Dec 2021 11:49:01 +0800 Subject: [PATCH 029/337] send msg file modify --- internal/rpc/msg/send_msg.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/internal/rpc/msg/send_msg.go b/internal/rpc/msg/send_msg.go index 293abe06b..2ea8aa2da 100644 --- a/internal/rpc/msg/send_msg.go +++ b/internal/rpc/msg/send_msg.go @@ -245,7 +245,7 @@ func Notification(n *NotificationMsg, onlineUserOnly bool) { var req pbChat.SendMsgReq var msg sdk_ws.MsgData var offlineInfo sdk_ws.OfflinePushInfo - var title, desc, ext string + var title, desc, ex string var pushSwitch bool req.OperationID = n.OperationID msg.SendID = n.SendID @@ -263,33 +263,33 @@ func Notification(n *NotificationMsg, onlineUserOnly bool) { } if onlineUserOnly { msg.Options = make(map[string]bool, 10) - utils.SetSwitchFromOptions(msg.Options, constant.IsOfflinePush, false) + //utils.SetSwitchFromOptions(msg.Options, constant.IsOfflinePush, false) utils.SetSwitchFromOptions(msg.Options, constant.IsHistory, false) utils.SetSwitchFromOptions(msg.Options, constant.IsPersistent, false) } offlineInfo.IOSBadgeCount = config.Config.IOSPush.BadgeCount offlineInfo.IOSPushSound = config.Config.IOSPush.PushSound switch msg.ContentType { - case constant.CreateGroupTip: + case constant.GroupCreatedNotification: pushSwitch = config.Config.Notification.GroupCreated.OfflinePush.PushSwitch title = config.Config.Notification.GroupCreated.OfflinePush.Title desc = config.Config.Notification.GroupCreated.OfflinePush.Desc - ext = config.Config.Notification.GroupCreated.OfflinePush.Ext - case constant.ChangeGroupInfoTip: + ex = config.Config.Notification.GroupCreated.OfflinePush.Ext + case constant.GroupInfoChangedNotification: pushSwitch = config.Config.Notification.GroupInfoChanged.OfflinePush.PushSwitch title = config.Config.Notification.GroupInfoChanged.OfflinePush.Title desc = config.Config.Notification.GroupInfoChanged.OfflinePush.Desc - ext = config.Config.Notification.GroupInfoChanged.OfflinePush.Ext - case constant.ApplyJoinGroupTip: + ex = config.Config.Notification.GroupInfoChanged.OfflinePush.Ext + case constant.JoinApplicationNotification: pushSwitch = config.Config.Notification.ApplyJoinGroup.OfflinePush.PushSwitch title = config.Config.Notification.ApplyJoinGroup.OfflinePush.Title desc = config.Config.Notification.ApplyJoinGroup.OfflinePush.Desc - ext = config.Config.Notification.ApplyJoinGroup.OfflinePush.Ext + ex = config.Config.Notification.ApplyJoinGroup.OfflinePush.Ext } utils.SetSwitchFromOptions(msg.Options, constant.IsOfflinePush, pushSwitch) offlineInfo.Title = title offlineInfo.Desc = desc - offlineInfo.Ext = ext + offlineInfo.Ex = ex msg.OfflinePushInfo = &offlineInfo req.MsgData = &msg etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfflineMessageName) From e439ef4ddd76301b73f983125797b99ff66e76e7 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Mon, 27 Dec 2021 16:48:05 +0800 Subject: [PATCH 030/337] tidy code --- internal/api/user/get_user_info.go | 142 --- internal/api/user/update_user_info.go | 61 - internal/api/user/user.go | 164 +++ internal/rpc/auth/auth.go | 100 ++ internal/rpc/auth/rpcAuth.go | 62 - internal/rpc/auth/user_register.go | 20 - internal/rpc/auth/user_token.go | 29 - internal/rpc/group/group.go | 80 +- internal/rpc/msg/send_msg.go | 23 +- internal/rpc/user/conversation.go | 59 - internal/rpc/user/get_user_info.go | 90 -- .../get_user_info_to_client.go | 16 - internal/rpc/user/management_user.go | 96 -- internal/rpc/user/update_user_info.go | 85 -- internal/rpc/user/user.go | 238 ++++ pkg/base_info/friend_api_struct.go | 35 +- pkg/base_info/user_api_struct.go | 29 + .../mysql_model/im_mysql_model/group_model.go | 227 +--- .../im_mysql_model/group_request_model.go | 150 ++- .../im_mysql_model/model_struct.go | 6 +- .../im_mysql_model/user_black_list_model.go | 32 +- .../mysql_model/im_mysql_model/user_model.go | 166 +-- pkg/proto/auth/auth.pb.go | 233 ++-- pkg/proto/auth/auth.proto | 37 +- pkg/proto/user/user.pb.go | 1002 +++++++---------- pkg/proto/user/user.proto | 138 +-- 26 files changed, 1421 insertions(+), 1899 deletions(-) delete mode 100644 internal/api/user/get_user_info.go create mode 100644 internal/api/user/user.go create mode 100644 internal/rpc/auth/auth.go delete mode 100644 internal/rpc/auth/rpcAuth.go delete mode 100644 internal/rpc/auth/user_register.go delete mode 100644 internal/rpc/auth/user_token.go delete mode 100644 internal/rpc/user/conversation.go delete mode 100644 internal/rpc/user/get_user_info.go delete mode 100644 internal/rpc/user/internal_service/get_user_info_to_client.go delete mode 100644 internal/rpc/user/management_user.go delete mode 100644 internal/rpc/user/update_user_info.go create mode 100644 internal/rpc/user/user.go create mode 100644 pkg/base_info/user_api_struct.go diff --git a/internal/api/user/get_user_info.go b/internal/api/user/get_user_info.go deleted file mode 100644 index db8a6d77d..000000000 --- a/internal/api/user/get_user_info.go +++ /dev/null @@ -1,142 +0,0 @@ -package user - -import ( - "Open_IM/pkg/common/config" - "Open_IM/pkg/common/constant" - "Open_IM/pkg/common/log" - "Open_IM/pkg/grpc-etcdv3/getcdv3" - pbRelay "Open_IM/pkg/proto/relay" - pbUser "Open_IM/pkg/proto/user" - "context" - "github.com/gin-gonic/gin" - "net/http" - "strings" -) - -type userInfo struct { - UID string `json:"uid"` - Name string `json:"name"` - Icon string `json:"icon"` - Gender int32 `json:"gender"` - Mobile string `json:"mobile"` - Birth string `json:"birth"` - Email string `json:"email"` - Ex string `json:"ex"` -} - -type paramsGetUsersOnlineStatus struct { - OperationID string `json:"operationID" binding:"required"` - UserIDList []string `json:"userIDList" binding:"required,lte=200"` - Secret string `json:"secret" binding:"required,max=32"` -} - -func GetUsersOnlineStatus(c *gin.Context) { - params := paramsGetUsersOnlineStatus{} - if err := c.BindJSON(¶ms); err != nil { - log.NewError(params.OperationID, "bind json failed ", err.Error(), c) - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) - return - } - - if params.Secret != config.Config.Secret { - log.NewError(params.OperationID, "parse token failed ", params.Secret, config.Config.Secret) - c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "secret failed"}) - return - } - - req := &pbRelay.GetUsersOnlineStatusReq{ - OperationID: params.OperationID, - UserIDList: params.UserIDList, - } - var wsResult []*pbRelay.GetUsersOnlineStatusResp_SuccessResult - var respResult []*pbRelay.GetUsersOnlineStatusResp_SuccessResult - flag := false - log.NewDebug(params.OperationID, "GetUsersOnlineStatus req come here", params.UserIDList) - - grpcCons := getcdv3.GetConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOnlineMessageRelayName) - for _, v := range grpcCons { - client := pbRelay.NewOnlineMessageRelayServiceClient(v) - reply, err := client.GetUsersOnlineStatus(context.Background(), req) - if err != nil { - log.NewError(params.OperationID, "GetUsersOnlineStatus rpc err", req.String(), err.Error()) - continue - } else { - if reply.ErrCode == 0 { - wsResult = append(wsResult, reply.SuccessResult...) - } - } - } - log.NewDebug(params.OperationID, "call GetUsersOnlineStatus rpc server is success", wsResult) - //Online data merge of each node - for _, v1 := range params.UserIDList { - flag = false - temp := new(pbRelay.GetUsersOnlineStatusResp_SuccessResult) - for _, v2 := range wsResult { - if v2.UserID == v1 { - flag = true - temp.UserID = v1 - temp.Status = constant.OnlineStatus - temp.DetailPlatformStatus = append(temp.DetailPlatformStatus, v2.DetailPlatformStatus...) - } - } - if !flag { - temp.UserID = v1 - temp.Status = constant.OfflineStatus - } - respResult = append(respResult, temp) - } - log.NewDebug(params.OperationID, "Finished merged data", respResult) - resp := gin.H{"errCode": 0, "errMsg": "", "successResult": respResult} - c.JSON(http.StatusOK, resp) -} - -func GetUserInfo(c *gin.Context) { - log.InfoByKv("api get userinfo init...", "") - - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName) - client := pbUser.NewUserClient(etcdConn) - //defer etcdConn.Close() - - params := paramsStruct{} - if err := c.BindJSON(¶ms); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) - return - } - req := &pbUser.GetUserInfoReq{ - UserIDList: params.UIDList, - OperationID: params.OperationID, - Token: c.Request.Header.Get("token"), - } - log.InfoByKv("api get user info is server", c.PostForm("OperationID"), c.Request.Header.Get("token")) - RpcResp, err := client.GetUserInfo(context.Background(), req) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,call get user info rpc server failed", err) - c.JSON(http.StatusInternalServerError, gin.H{ - "errorCode": 500, - "errorMsg": "call rpc server failed", - }) - return - } - log.InfoByKv("call get user info rpc server success", params.OperationID) - if RpcResp.ErrorCode == 0 { - userInfoList := make([]userInfo, 0) - for _, user := range RpcResp.Data { - var ui userInfo - ui.UID = user.Uid - ui.Name = user.Name - ui.Icon = user.Icon - ui.Gender = user.Gender - ui.Mobile = user.Mobile - ui.Birth = user.Birth - ui.Email = user.Email - ui.Ex = user.Ex - userInfoList = append(userInfoList, ui) - } - resp := gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg, "data": userInfoList} - c.JSON(http.StatusOK, resp) - } else { - resp := gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg} - c.JSON(http.StatusOK, resp) - } - log.InfoByKv("api get user info return success", params.OperationID, "args=%s", RpcResp.String()) -} diff --git a/internal/api/user/update_user_info.go b/internal/api/user/update_user_info.go index 89628ded4..a00006b65 100644 --- a/internal/api/user/update_user_info.go +++ b/internal/api/user/update_user_info.go @@ -1,62 +1 @@ package user - -import ( - "Open_IM/pkg/common/config" - "Open_IM/pkg/common/log" - "Open_IM/pkg/grpc-etcdv3/getcdv3" - pbUser "Open_IM/pkg/proto/user" - "context" - "github.com/gin-gonic/gin" - "net/http" - "strings" -) - -type paramsStruct struct { - OperationID string `json:"operationID" binding:"required"` - UIDList []string `json:"uidList"` - Platform int32 `json:"platform"` - Name string `json:"name"` - Icon string `json:"icon"` - Gender int32 `json:"gender"` - Mobile string `json:"mobile"` - Birth string `json:"birth"` - Email string `json:"email"` - Ex string `json:"ex"` - Uid string `json:"uid"` -} - -func UpdateUserInfo(c *gin.Context) { - log.InfoByKv("api update userinfo init...", "") - - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName) - client := pbUser.NewUserClient(etcdConn) - //defer etcdConn.Close() - - params := paramsStruct{} - if err := c.BindJSON(¶ms); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) - return - } - req := &pbUser.UpdateUserInfoReq{ - OperationID: params.OperationID, - Token: c.Request.Header.Get("token"), - Name: params.Name, - Icon: params.Icon, - Gender: params.Gender, - Mobile: params.Mobile, - Birth: params.Birth, - Email: params.Email, - Ex: params.Ex, - Uid: params.Uid, - } - log.InfoByKv("api update user info is server", req.OperationID, req.Token) - RpcResp, err := client.UpdateUserInfo(context.Background(), req) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,call get user info rpc server failed", err) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) - return - } - log.InfoByKv("call update user info rpc server success", params.OperationID) - c.JSON(http.StatusOK, gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg}) - log.InfoByKv("api update user info return success", params.OperationID, "args=%s", RpcResp.String()) -} diff --git a/internal/api/user/user.go b/internal/api/user/user.go new file mode 100644 index 000000000..a3d311649 --- /dev/null +++ b/internal/api/user/user.go @@ -0,0 +1,164 @@ +package user + +import ( + "Open_IM/pkg/common/config" + "Open_IM/pkg/common/log" + "Open_IM/pkg/common/token_verify" + "Open_IM/pkg/grpc-etcdv3/getcdv3" + "Open_IM/pkg/utils" + + // rpc "Open_IM/pkg/proto/relay" + api "Open_IM/pkg/base_info" + rpc "Open_IM/pkg/proto/user" + "context" + "github.com/gin-gonic/gin" + "net/http" + "strings" +) + +// +//func GetUsersOnlineStatus(c *gin.Context) { +// params := api.GetUsersOnlineStatusReq{} +// if err := c.BindJSON(¶ms); err != nil { +// log.NewError(params.OperationID, "bind json failed ", err.Error(), c) +// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) +// return +// } +// +// if params.Secret != config.Config.Secret { +// log.NewError(params.OperationID, "parse token failed ", params.Secret, config.Config.Secret) +// c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "secret failed"}) +// return +// } +// +// req := &pbRelay.GetUsersOnlineStatusReq{ +// OperationID: params.OperationID, +// UserIDList: params.UserIDList, +// } +// var wsResult []*rpc.GetUsersOnlineStatusResp_SuccessResult +// var respResult []*rpc.GetUsersOnlineStatusResp_SuccessResult +// flag := false +// log.NewDebug(params.OperationID, "GetUsersOnlineStatus req come here", params.UserIDList) +// +// grpcCons := getcdv3.GetConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOnlineMessageRelayName) +// for _, v := range grpcCons { +// client := rpc.NewOnlineMessageRelayServiceClient(v) +// reply, err := client.GetUsersOnlineStatus(context.Background(), req) +// if err != nil { +// log.NewError(params.OperationID, "GetUsersOnlineStatus rpc err", req.String(), err.Error()) +// continue +// } else { +// if reply.ErrCode == 0 { +// wsResult = append(wsResult, reply.SuccessResult...) +// } +// } +// } +// log.NewDebug(params.OperationID, "call GetUsersOnlineStatus rpc server is success", wsResult) +// //Online data merge of each node +// for _, v1 := range params.UserIDList { +// flag = false +// temp := new(pbRelay.GetUsersOnlineStatusResp_SuccessResult) +// for _, v2 := range wsResult { +// if v2.UserID == v1 { +// flag = true +// temp.UserID = v1 +// temp.Status = constant.OnlineStatus +// temp.DetailPlatformStatus = append(temp.DetailPlatformStatus, v2.DetailPlatformStatus...) +// } +// } +// if !flag { +// temp.UserID = v1 +// temp.Status = constant.OfflineStatus +// } +// respResult = append(respResult, temp) +// } +// log.NewDebug(params.OperationID, "Finished merged data", respResult) +// resp := gin.H{"errCode": 0, "errMsg": "", "data": respResult} +// +// c.JSON(http.StatusOK, resp) +//} +//params := api.AddBlacklistReq{} +// if err := c.BindJSON(¶ms); err != nil { +// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) +// log.NewError("0", "BindJSON failed ", err.Error()) +// return +// } +// req := &rpc.AddBlacklistReq{} +// utils.CopyStructFields(req.CommID, params) +// var ok bool +// ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) +// if !ok { +// log.NewError(req.CommID.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) +// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) +// return +// } +// log.NewInfo(params.OperationID, "AddBlacklist args ", req.String()) + +func GetUserInfo(c *gin.Context) { + params := api.GetUserInfoReq{} + if err := c.BindJSON(¶ms); err != nil { + c.JSON(http.StatusBadRequest, gin.H{"errCode": http.StatusBadRequest, "errMsg": err.Error()}) + return + } + req := &rpc.GetUserInfoReq{} + utils.CopyStructFields(&req, params) + var ok bool + ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + if !ok { + log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) + return + } + log.NewInfo(params.OperationID, "GetUserInfo args ", req.String()) + + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName) + client := rpc.NewUserClient(etcdConn) + RpcResp, err := client.GetUserInfo(context.Background(), req) + if err != nil { + log.NewError(req.OperationID, "GetUserInfo failed ", err.Error(), req.String()) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) + return + } + + resp := api.GetUserInfoResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} + resp.UserInfoList = RpcResp.UserInfoList + c.JSON(http.StatusOK, resp) + + log.NewInfo(req.OperationID, "GetUserInfo api return ", resp) +} + +func UpdateUserInfo(c *gin.Context) { + log.InfoByKv("api update userinfo init...", "") + + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName) + client := pbUser.NewUserClient(etcdConn) + //defer etcdConn.Close() + + params := paramsStruct{} + if err := c.BindJSON(¶ms); err != nil { + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) + return + } + req := &pbUser.UpdateUserInfoReq{ + OperationID: params.OperationID, + Token: c.Request.Header.Get("token"), + Name: params.Name, + Icon: params.Icon, + Gender: params.Gender, + Mobile: params.Mobile, + Birth: params.Birth, + Email: params.Email, + Ex: params.Ex, + Uid: params.Uid, + } + log.InfoByKv("api update user info is server", req.OperationID, req.Token) + RpcResp, err := client.UpdateUserInfo(context.Background(), req) + if err != nil { + log.Error(req.Token, req.OperationID, "err=%s,call get user info rpc server failed", err) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) + return + } + log.InfoByKv("call update user info rpc server success", params.OperationID) + c.JSON(http.StatusOK, gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg}) + log.InfoByKv("api update user info return success", params.OperationID, "args=%s", RpcResp.String()) +} diff --git a/internal/rpc/auth/auth.go b/internal/rpc/auth/auth.go new file mode 100644 index 000000000..166df967a --- /dev/null +++ b/internal/rpc/auth/auth.go @@ -0,0 +1,100 @@ +package auth + +import ( + "Open_IM/pkg/common/constant" + imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" + "Open_IM/pkg/common/log" + "Open_IM/pkg/common/token_verify" + "Open_IM/pkg/grpc-etcdv3/getcdv3" + pbAuth "Open_IM/pkg/proto/auth" + "Open_IM/pkg/utils" + "context" + "net" + "strconv" + "strings" + + "Open_IM/pkg/common/config" + + "google.golang.org/grpc" +) + +func (rpc *rpcAuth) UserRegister(_ context.Context, req *pbAuth.UserRegisterReq) (*pbAuth.UserRegisterResp, error) { + log.NewInfo(req.OperationID, "UserRegister args ", req.String()) + var user imdb.User + utils.CopyStructFields(&user, req.UserInfo) + err := imdb.UserRegister(user) + if err != nil { + log.NewError(req.OperationID, "UserRegister failed ", err.Error(), user) + return &pbAuth.UserRegisterResp{CommonResp: &pbAuth.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil + } + + log.NewInfo(req.OperationID, "rpc UserRegister return") + return &pbAuth.UserRegisterResp{CommonResp: &pbAuth.CommonResp{}}, nil +} + +func (rpc *rpcAuth) UserToken(_ context.Context, req *pbAuth.UserTokenReq) (*pbAuth.UserTokenResp, error) { + log.NewInfo(req.OperationID, "UserToken args ", req.String()) + + _, err := imdb.GetUserByUserID(req.FromUserID) + if err != nil { + log.NewError(req.OperationID, "GetUserByUserID failed ", err.Error(), req.FromUserID) + return &pbAuth.UserTokenResp{CommonResp: &pbAuth.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil + } + + tokens, expTime, err := token_verify.CreateToken(req.FromUserID, req.Platform) + if err != nil { + log.NewError(req.OperationID, "CreateToken failed ", err.Error(), req.FromUserID, req.Platform) + return &pbAuth.UserTokenResp{CommonResp: &pbAuth.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil + } + + log.NewInfo(req.OperationID, "rpc UserToken return ") + return &pbAuth.UserTokenResp{Token: tokens, ExpiredTime: expTime}, nil +} + +type rpcAuth struct { + rpcPort int + rpcRegisterName string + etcdSchema string + etcdAddr []string +} + +func NewRpcAuthServer(port int) *rpcAuth { + log.NewPrivateLog("auth") + return &rpcAuth{ + rpcPort: port, + rpcRegisterName: config.Config.RpcRegisterName.OpenImAuthName, + etcdSchema: config.Config.Etcd.EtcdSchema, + etcdAddr: config.Config.Etcd.EtcdAddr, + } +} + +func (rpc *rpcAuth) Run() { + log.NewInfo("0", "rpc auth start...") + + address := utils.ServerIP + ":" + strconv.Itoa(rpc.rpcPort) + listener, err := net.Listen("tcp", address) + if err != nil { + log.NewError("0", "listen network failed ", err.Error(), address) + return + } + log.NewInfo("0", "listen network success, ", address, listener) + //grpc server + srv := grpc.NewServer() + defer srv.GracefulStop() + + //service registers with etcd + pbAuth.RegisterAuthServer(srv, rpc) + err = getcdv3.RegisterEtcd(rpc.etcdSchema, strings.Join(rpc.etcdAddr, ","), utils.ServerIP, rpc.rpcPort, rpc.rpcRegisterName, 10) + if err != nil { + log.NewError("0", "RegisterEtcd failed ", err.Error(), + rpc.etcdSchema, strings.Join(rpc.etcdAddr, ","), utils.ServerIP, rpc.rpcPort, rpc.rpcRegisterName) + return + } + log.NewInfo("0", "RegisterAuthServer ok ", rpc.etcdSchema, strings.Join(rpc.etcdAddr, ","), utils.ServerIP, rpc.rpcPort, rpc.rpcRegisterName) + err = srv.Serve(listener) + if err != nil { + log.NewError("0", "Serve failed ", err.Error()) + return + } + log.NewInfo("0", "rpc auth ok") +} diff --git a/internal/rpc/auth/rpcAuth.go b/internal/rpc/auth/rpcAuth.go deleted file mode 100644 index 162f04fd5..000000000 --- a/internal/rpc/auth/rpcAuth.go +++ /dev/null @@ -1,62 +0,0 @@ -package auth - -import ( - "Open_IM/pkg/common/config" - "Open_IM/pkg/common/log" - "Open_IM/pkg/grpc-etcdv3/getcdv3" - pbAuth "Open_IM/pkg/proto/auth" - "Open_IM/pkg/utils" - "google.golang.org/grpc" - "net" - "strconv" - "strings" -) - -type rpcAuth struct { - rpcPort int - rpcRegisterName string - etcdSchema string - etcdAddr []string -} - -func NewRpcAuthServer(port int) *rpcAuth { - log.NewPrivateLog("auth") - return &rpcAuth{ - rpcPort: port, - rpcRegisterName: config.Config.RpcRegisterName.OpenImAuthName, - etcdSchema: config.Config.Etcd.EtcdSchema, - etcdAddr: config.Config.Etcd.EtcdAddr, - } -} - -func (rpc *rpcAuth) Run() { - log.Info("", "", "rpc get_token init...") - - address := utils.ServerIP + ":" + strconv.Itoa(rpc.rpcPort) - listener, err := net.Listen("tcp", address) - if err != nil { - log.Error("", "", "listen network failed, err = %s, address = %s", err.Error(), address) - return - } - log.Info("", "", "listen network success, address = %s", address) - - //grpc server - srv := grpc.NewServer() - defer srv.GracefulStop() - - //service registers with etcd - - pbAuth.RegisterAuthServer(srv, rpc) - err = getcdv3.RegisterEtcd(rpc.etcdSchema, strings.Join(rpc.etcdAddr, ","), utils.ServerIP, rpc.rpcPort, rpc.rpcRegisterName, 10) - if err != nil { - log.Error("", "", "register rpc get_token to etcd failed, err = %s", err.Error()) - return - } - - err = srv.Serve(listener) - if err != nil { - log.Info("", "", "rpc get_token fail, err = %s", err.Error()) - return - } - log.Info("", "", "rpc get_token init success") -} diff --git a/internal/rpc/auth/user_register.go b/internal/rpc/auth/user_register.go deleted file mode 100644 index 3f5de7032..000000000 --- a/internal/rpc/auth/user_register.go +++ /dev/null @@ -1,20 +0,0 @@ -package auth - -import ( - "Open_IM/pkg/common/db/mysql_model/im_mysql_model" - "Open_IM/pkg/common/log" - pbAuth "Open_IM/pkg/proto/auth" - "context" -) - -func (rpc *rpcAuth) UserRegister(_ context.Context, pb *pbAuth.UserRegisterReq) (*pbAuth.UserRegisterResp, error) { - log.Info("", "", "rpc user_register start, [data: %s]", pb.String()) - - if err := im_mysql_model.UserRegister(pb); err != nil { - log.Error("", "", "rpc user_register error, [data: %s] [err: %s]", pb.String(), err.Error()) - return &pbAuth.UserRegisterResp{Success: false}, err - } - log.Info("", "", "rpc user_register success return") - - return &pbAuth.UserRegisterResp{Success: true}, nil -} diff --git a/internal/rpc/auth/user_token.go b/internal/rpc/auth/user_token.go deleted file mode 100644 index a1455b237..000000000 --- a/internal/rpc/auth/user_token.go +++ /dev/null @@ -1,29 +0,0 @@ -package auth - -import ( - "Open_IM/pkg/common/db/mysql_model/im_mysql_model" - "Open_IM/pkg/common/log" - "Open_IM/pkg/common/token_verify" - pbAuth "Open_IM/pkg/proto/auth" - "context" -) - -func (rpc *rpcAuth) UserToken(_ context.Context, pb *pbAuth.UserTokenReq) (*pbAuth.UserTokenResp, error) { - log.Info("", "", "rpc user_token call start..., [pbTokenReq: %s]", pb.String()) - - _, err := im_mysql_model.FindUserByUID(pb.UID) - if err != nil { - log.Error("", "", "rpc user_token call..., im_mysql_model.AppServerFindFromUserByUserID fail [uid: %s] [err: %s]", pb.UID, err.Error()) - return &pbAuth.UserTokenResp{ErrCode: 500, ErrMsg: err.Error()}, err - } - log.Info("", "", "rpc user_token call..., im_mysql_model.AppServerFindFromUserByUserID") - - tokens, expTime, err := token_verify.CreateToken(pb.UID, pb.Platform) - if err != nil { - log.Error("", "", "rpc user_token call..., utils.CreateToken fail [uid: %s] [err: %s]", pb.UID, err.Error()) - return &pbAuth.UserTokenResp{ErrCode: 500, ErrMsg: err.Error()}, err - } - log.Info("", "", "rpc user_token success return, [uid: %s] [tokens: %s]", pb.UID, tokens) - - return &pbAuth.UserTokenResp{Token: tokens, ExpiredTime: expTime}, nil -} diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index db04d91f7..da9f82709 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -423,51 +423,37 @@ func (s *groupServer) GetGroupsInfo(ctx context.Context, req *pbGroup.GetGroupsI func (s *groupServer) GroupApplicationResponse(_ context.Context, req *pbGroup.GroupApplicationResponseReq) (*pbGroup.GroupApplicationResponseResp, error) { log.NewInfo(req.OperationID, "GroupApplicationResponse args ", req.String()) - reply, err := imdb.GroupApplicationResponse(req) + + groupRequest := imdb.GroupRequest{} + groupRequest.UserID = req.FromUserID + groupRequest.GroupID = req.GroupID + groupRequest.HandledTime = time.Now() + groupRequest.HandleResult = req.HandleResult + groupRequest.HandleUserID = req.OpUserID + groupRequest.HandledMsg = req.HandledMsg + err := imdb.UpdateGroupRequest(groupRequest) if err != nil { log.NewError(req.OperationID, "GroupApplicationResponse failed ", err.Error(), req.String()) - return &pbGroup.GroupApplicationResponseResp{CommonResp: &pbGroup.CommonResp{ErrCode: 702, ErrMsg: err.Error()}}, nil + return &pbGroup.GroupApplicationResponseResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } - + chat.ApplicationProcessedNotification(req) if req.HandleResult == 1 { - if req.ToUserID == "0" { - err = db.DB.AddGroupMember(req.GroupID, req.FromUserID) - if err != nil { - log.NewError(req.OperationID, "AddGroupMember failed ", err.Error(), req.GroupID, req.FromUserID) - } - } else { - err = db.DB.AddGroupMember(req.GroupID, req.ToUserID) - if err != nil { - log.NewError(req.OperationID, "AddGroupMember failed ", err.Error(), req.GroupID, req.ToUserID) - } - } - } - if req.ToUserID == "0" { - //group, err := imdb.FindGroupInfoByGroupId(req.GroupID) - //if err != nil { - // log.NewError(req.OperationID, "FindGroupInfoByGroupId failed ", req.GroupID) - // return reply, nil + chat.MemberEnterNotification(req) + //if req.ToUserID == "0" { + // err = db.DB.AddGroupMember(req.GroupID, req.FromUserID) + // if err != nil { + // log.NewError(req.OperationID, "AddGroupMember failed ", err.Error(), req.GroupID, req.FromUserID) + // } + //} else { + // err = db.DB.AddGroupMember(req.GroupID, req.ToUserID) + // if err != nil { + // log.NewError(req.OperationID, "AddGroupMember failed ", err.Error(), req.GroupID, req.ToUserID) + // } //} - //member, err := imdb.FindGroupMemberInfoByGroupIdAndUserId(req.GroupID, req.OpUserID) - //if err != nil { - // log.NewError(req.OperationID, "FindGroupMemberInfoByGroupIdAndUserId failed ", req.GroupID, req.OpUserID) - // return reply, nil - //} - chat.ApplicationProcessedNotification(req) - if req.HandleResult == 1 { - // entrantUser, err := imdb.FindGroupMemberInfoByGroupIdAndUserId(req.GroupID, req.FromUserID) - // if err != nil { - // log.NewError(req.OperationID, "FindGroupMemberInfoByGroupIdAndUserId failed ", err.Error(), req.GroupID, req.FromUserID) - // return reply, nil - // } - chat.MemberEnterNotification(req) - } - } else { - log.NewError(req.OperationID, "args failed ", req.String()) } - log.NewInfo(req.OperationID, "rpc GroupApplicationResponse return ", reply) - return reply, nil + log.NewInfo(req.OperationID, "rpc GroupApplicationResponse return ") + return &pbGroup.GroupApplicationResponseResp{CommonResp: &pbGroup.CommonResp{}}, nil } func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq) (*pbGroup.JoinGroupResp, error) { @@ -584,13 +570,23 @@ func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInf func (s *groupServer) TransferGroupOwner(_ context.Context, req *pbGroup.TransferGroupOwnerReq) (*pbGroup.TransferGroupOwnerResp, error) { log.NewInfo(req.OperationID, "TransferGroupOwner ", req.String()) - reply, err := im_mysql_model.TransferGroupOwner(req) + if req.OldOwnerUserID == req.NewOwnerUserID { + log.NewError(req.OperationID, "same owner ", req.String()) + return &pbGroup.TransferGroupOwnerResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrArgs.ErrCode, ErrMsg: constant.ErrArgs.ErrMsg}}, nil + } + groupMemberInfo := imdb.GroupMember{GroupID: req.GroupID, UserID: req.OldOwnerUserID, RoleLevel: 0} + err := imdb.UpdateGroupMemberInfo(groupMemberInfo) + if err != nil { + return &pbGroup.TransferGroupOwnerResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil + } + groupMemberInfo = imdb.GroupMember{GroupID: req.GroupID, UserID: req.NewOwnerUserID, RoleLevel: 1} + err = imdb.UpdateGroupMemberInfo(groupMemberInfo) if err != nil { - log.NewError("TransferGroupOwner ", req.String()) return &pbGroup.TransferGroupOwnerResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } changedType := int32(1) << 4 chat.GroupInfoChangedNotification(req.OperationID, req.OpUserID, req.GroupID, changedType) - log.NewInfo("TransferGroupOwner rpc return ", reply.String()) - return reply, nil + + return &pbGroup.TransferGroupOwnerResp{CommonResp: &pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""}}, nil + } diff --git a/internal/rpc/msg/send_msg.go b/internal/rpc/msg/send_msg.go index 293abe06b..61fa147cf 100644 --- a/internal/rpc/msg/send_msg.go +++ b/internal/rpc/msg/send_msg.go @@ -792,19 +792,19 @@ func FriendDeletedNotification(req *pbFriend.DeleteFriendReq) { // PublicUserInfo OpUser = 2; // uint64 OperationTime = 3; //} -func FriendInfoChangedNotification(req *pbFriend.SetFriendCommentReq) { +func FriendInfoChangedNotification(operationID, opUserID, fromUserID, toUserID string) { var n NotificationMsg - n.SendID = req.CommID.FromUserID - n.RecvID = req.CommID.ToUserID + n.SendID = fromUserID + n.RecvID = toUserID n.ContentType = constant.FriendInfoChangedNotification n.SessionType = constant.SingleChatType n.MsgFrom = constant.SysMsgType - n.OperationID = req.CommID.OperationID + n.OperationID = operationID var FriendInfoChangedTips open_im_sdk.FriendInfoChangedTips - FriendInfoChangedTips.FromToUserID.FromUserID = req.CommID.FromUserID - FriendInfoChangedTips.FromToUserID.ToUserID = req.CommID.ToUserID - fromUserNickname, toUserNickname := getFromToUserNickname(req.CommID.OperationID, req.CommID.FromUserID, req.CommID.ToUserID) + FriendInfoChangedTips.FromToUserID.FromUserID = fromUserID + FriendInfoChangedTips.FromToUserID.ToUserID = toUserID + fromUserNickname, toUserNickname := getFromToUserNickname(operationID, fromUserID, toUserID) var tips open_im_sdk.TipsComm tips.Detail, _ = json.Marshal(FriendInfoChangedTips) tips.DefaultTips = fromUserNickname + " FriendDeletedNotification " + toUserNickname @@ -812,15 +812,6 @@ func FriendInfoChangedNotification(req *pbFriend.SetFriendCommentReq) { Notification(&n, true) } -//message BlackAddedTips{ -// BlackInfo Black = 1; -//} -//message BlackInfo{ -// PublicUserInfo OwnerUser = 1; -// string Remark = 2; -// uint64 CreateTime = 3; -// PublicUserInfo BlackUser = 4; -//} func BlackAddedNotification(req *pbFriend.AddBlacklistReq) { var n NotificationMsg n.SendID = req.CommID.FromUserID diff --git a/internal/rpc/user/conversation.go b/internal/rpc/user/conversation.go deleted file mode 100644 index 1f87c1cd4..000000000 --- a/internal/rpc/user/conversation.go +++ /dev/null @@ -1,59 +0,0 @@ -package user - -import ( - "Open_IM/pkg/common/constant" - "Open_IM/pkg/common/db" - "Open_IM/pkg/common/log" - pbUser "Open_IM/pkg/proto/user" - "context" -) - -func (s *userServer) SetReceiveMessageOpt(ctx context.Context, req *pbUser.SetReceiveMessageOptReq) (*pbUser.SetReceiveMessageOptResp, error) { - m := make(map[string]int, len(req.ConversationId)) - for _, v := range req.ConversationId { - m[v] = int(req.Opt) - } - err := db.DB.SetMultiConversationMsgOpt(req.UId, m) - if err != nil { - log.NewError(req.OperationID, "SetMultiConversationMsgOpt failed ", err.Error(), req) - return &pbUser.SetReceiveMessageOptResp{ErrCode: constant.DatabaseError, ErrMsg: err.Error()}, nil - } - var resp pbUser.SetReceiveMessageOptResp - resp.ErrCode = 0 - - for _, v := range req.ConversationId { - resp.OptResult = append(resp.OptResult, &pbUser.OptResult{ConversationId: v, Result: 0}) - } - log.NewInfo(req.OperationID, "SetReceiveMessageOpt req, resp ", req, resp) - return &resp, nil -} - -func (s *userServer) GetReceiveMessageOpt(ctx context.Context, req *pbUser.GetReceiveMessageOptReq) (*pbUser.GetReceiveMessageOptResp, error) { - m, err := db.DB.GetMultiConversationMsgOpt(req.UId, req.ConversationId) - if err != nil { - log.NewError(req.OperationID, "GetMultiConversationMsgOpt failed ", err.Error(), req) - return &pbUser.GetReceiveMessageOptResp{ErrCode: constant.DatabaseError, ErrMsg: err.Error()}, nil - } - var resp pbUser.GetReceiveMessageOptResp - resp.ErrCode = 0 - for k, v := range m { - resp.ConversationOptResult = append(resp.ConversationOptResult, &pbUser.OptResult{ConversationId: k, Result: int32(v)}) - } - log.NewInfo(req.OperationID, "GetReceiveMessageOpt, req, resp", req, resp) - return &resp, nil -} - -func (s *userServer) GetAllConversationMsgOpt(ctx context.Context, req *pbUser.GetAllConversationMsgOptReq) (*pbUser.GetAllConversationMsgOptResp, error) { - m, err := db.DB.GetAllConversationMsgOpt(req.UId) - if err != nil { - log.NewError(req.OperationID, "GetAllConversationMsgOpt failed ", err.Error(), req) - return &pbUser.GetAllConversationMsgOptResp{ErrCode: constant.DatabaseError, ErrMsg: err.Error()}, nil - } - var resp pbUser.GetAllConversationMsgOptResp - resp.ErrCode = 0 - for k, v := range m { - resp.ConversationOptResult = append(resp.ConversationOptResult, &pbUser.OptResult{ConversationId: k, Result: int32(v)}) - } - log.NewInfo(req.OperationID, "GetAllConversationMsgOpt, req, resp", req, resp) - return &resp, nil -} diff --git a/internal/rpc/user/get_user_info.go b/internal/rpc/user/get_user_info.go deleted file mode 100644 index eca8afbd5..000000000 --- a/internal/rpc/user/get_user_info.go +++ /dev/null @@ -1,90 +0,0 @@ -package user - -import ( - "Open_IM/pkg/common/config" - "Open_IM/pkg/common/db/mysql_model/im_mysql_model" - "Open_IM/pkg/common/log" - "Open_IM/pkg/grpc-etcdv3/getcdv3" - pbUser "Open_IM/pkg/proto/user" - "Open_IM/pkg/utils" - "context" - "google.golang.org/grpc" - "net" - "strconv" - "strings" -) - -type userServer struct { - rpcPort int - rpcRegisterName string - etcdSchema string - etcdAddr []string -} - -func NewUserServer(port int) *userServer { - log.NewPrivateLog("user") - return &userServer{ - rpcPort: port, - rpcRegisterName: config.Config.RpcRegisterName.OpenImUserName, - etcdSchema: config.Config.Etcd.EtcdSchema, - etcdAddr: config.Config.Etcd.EtcdAddr, - } -} - -func (s *userServer) Run() { - log.Info("", "", "rpc user init....") - - ip := utils.ServerIP - registerAddress := ip + ":" + strconv.Itoa(s.rpcPort) - //listener network - listener, err := net.Listen("tcp", registerAddress) - if err != nil { - log.InfoByArgs("listen network failed,err=%s", err.Error()) - return - } - log.Info("", "", "listen network success, address = %s", registerAddress) - defer listener.Close() - //grpc server - srv := grpc.NewServer() - defer srv.GracefulStop() - //Service registers with etcd - pbUser.RegisterUserServer(srv, s) - err = getcdv3.RegisterEtcd(s.etcdSchema, strings.Join(s.etcdAddr, ","), ip, s.rpcPort, s.rpcRegisterName, 10) - if err != nil { - log.ErrorByArgs("register rpc token to etcd failed,err=%s", err.Error()) - return - } - err = srv.Serve(listener) - if err != nil { - log.ErrorByArgs("listen token failed,err=%s", err.Error()) - return - } - log.Info("", "", "rpc token init success") -} - -func (s *userServer) GetUserInfo(ctx context.Context, req *pbUser.GetUserInfoReq) (*pbUser.GetUserInfoResp, error) { - log.InfoByKv("rpc get_user_info is server", req.OperationID) - - var userInfoList []*pbUser.UserInfo - //Obtain user information according to userID - if len(req.UserIDList) > 0 { - for _, userID := range req.UserIDList { - var userInfo pbUser.UserInfo - user, err := im_mysql_model.FindUserByUID(userID) - if err != nil { - log.ErrorByKv("search userinfo failed", req.OperationID, "userID", userID, "err=%s", err.Error()) - continue - } - utils.CopyStructFields(&userInfo, user) - userInfoList = append(userInfoList, &userInfo) - } - } else { - return &pbUser.GetUserInfoResp{ErrorCode: 999, ErrorMsg: "uidList is nil"}, nil - } - log.InfoByKv("rpc get userInfo return success", req.OperationID, "token", req.Token) - return &pbUser.GetUserInfoResp{ - ErrorCode: 0, - ErrorMsg: "", - Data: userInfoList, - }, nil -} diff --git a/internal/rpc/user/internal_service/get_user_info_to_client.go b/internal/rpc/user/internal_service/get_user_info_to_client.go deleted file mode 100644 index e7281419f..000000000 --- a/internal/rpc/user/internal_service/get_user_info_to_client.go +++ /dev/null @@ -1,16 +0,0 @@ -package internal_service - -import ( - "Open_IM/pkg/common/config" - "Open_IM/pkg/grpc-etcdv3/getcdv3" - pbUser "Open_IM/pkg/proto/user" - "context" - "strings" -) - -func GetUserInfoClient(req *pbUser.GetUserInfoReq) (*pbUser.GetUserInfoResp, error) { - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName) - client := pbUser.NewUserClient(etcdConn) - RpcResp, err := client.GetUserInfo(context.Background(), req) - return RpcResp, err -} diff --git a/internal/rpc/user/management_user.go b/internal/rpc/user/management_user.go deleted file mode 100644 index 4c797d9b4..000000000 --- a/internal/rpc/user/management_user.go +++ /dev/null @@ -1,96 +0,0 @@ -/* -** description(""). -** copyright('open-im,www.open-im.io'). -** author("fg,Gordon@tuoyun.net"). -** time(2021/9/15 10:28). - */ -package user - -import ( - "Open_IM/pkg/common/config" - "Open_IM/pkg/common/constant" - "Open_IM/pkg/common/db/mysql_model/im_mysql_model" - "Open_IM/pkg/common/log" - "Open_IM/pkg/common/token_verify" - pbUser "Open_IM/pkg/proto/user" - "Open_IM/pkg/utils" - "context" -) - -func (s *userServer) DeleteUsers(_ context.Context, req *pbUser.DeleteUsersReq) (*pbUser.DeleteUsersResp, error) { - log.InfoByKv("rpc DeleteUsers arrived server", req.OperationID, "args", req.String()) - var resp pbUser.DeleteUsersResp - var common pbUser.CommonResp - c, err := token_verify.ParseToken(req.Token) - if err != nil { - log.ErrorByKv("parse token failed", req.OperationID, "err", err.Error()) - return &pbUser.DeleteUsersResp{CommonResp: &pbUser.CommonResp{ErrorCode: constant.ErrParseToken.ErrCode, ErrorMsg: err.Error()}, FailedUidList: req.DeleteUidList}, nil - } - if !utils.IsContain(c.UID, config.Config.Manager.AppManagerUid) { - log.ErrorByKv(" Authentication failed", req.OperationID, "args", c) - return &pbUser.DeleteUsersResp{CommonResp: &pbUser.CommonResp{ErrorCode: 401, ErrorMsg: "not authorized"}, FailedUidList: req.DeleteUidList}, nil - } - for _, uid := range req.DeleteUidList { - err = im_mysql_model.UserDelete(uid) - if err != nil { - common.ErrorCode = 201 - common.ErrorMsg = "some uid deleted failed" - resp.FailedUidList = append(resp.FailedUidList, uid) - } - } - resp.CommonResp = &common - return &resp, nil - -} - -func (s *userServer) GetAllUsersUid(_ context.Context, req *pbUser.GetAllUsersUidReq) (*pbUser.GetAllUsersUidResp, error) { - log.InfoByKv("rpc GetAllUsersUid arrived server", req.OperationID, "args", req.String()) - c, err := token_verify.ParseToken(req.Token) - if err != nil { - log.InfoByKv("parse token failed", req.OperationID, "err", err.Error()) - return &pbUser.GetAllUsersUidResp{CommonResp: &pbUser.CommonResp{ErrorCode: constant.ErrParseToken.ErrCode, ErrorMsg: err.Error()}}, nil - } - if !utils.IsContain(c.UID, config.Config.Manager.AppManagerUid) { - log.ErrorByKv(" Authentication failed", req.OperationID, "args", c) - return &pbUser.GetAllUsersUidResp{CommonResp: &pbUser.CommonResp{ErrorCode: 401, ErrorMsg: "not authorized"}}, nil - } - uidList, err := im_mysql_model.SelectAllUID() - if err != nil { - log.ErrorByKv("db get failed", req.OperationID, "err", err.Error()) - return &pbUser.GetAllUsersUidResp{CommonResp: &pbUser.CommonResp{ErrorCode: constant.ErrMysql.ErrCode, ErrorMsg: err.Error()}}, nil - } else { - return &pbUser.GetAllUsersUidResp{CommonResp: &pbUser.CommonResp{ErrorCode: 0, ErrorMsg: ""}, UidList: uidList}, nil - } - -} -func (s *userServer) AccountCheck(_ context.Context, req *pbUser.AccountCheckReq) (*pbUser.AccountCheckResp, error) { - log.InfoByKv("rpc AccountCheck arrived server", req.OperationID, "args", req.String()) - c, err := token_verify.ParseToken(req.Token) - if err != nil { - log.InfoByKv("parse token failed", req.OperationID, "err", err.Error()) - return &pbUser.AccountCheckResp{CommonResp: &pbUser.CommonResp{ErrorCode: constant.ErrParseToken.ErrCode, ErrorMsg: err.Error()}}, nil - } - if !utils.IsContain(c.UID, config.Config.Manager.AppManagerUid) { - log.ErrorByKv(" Authentication failed", req.OperationID, "args", c) - return &pbUser.AccountCheckResp{CommonResp: &pbUser.CommonResp{ErrorCode: 401, ErrorMsg: "not authorized"}}, nil - } - uidList, err := im_mysql_model.SelectSomeUID(req.UidList) - if err != nil { - log.ErrorByKv("db get SelectSomeUID failed", req.OperationID, "err", err.Error()) - return &pbUser.AccountCheckResp{CommonResp: &pbUser.CommonResp{ErrorCode: constant.ErrMysql.ErrCode, ErrorMsg: err.Error()}}, nil - } else { - var r []*pbUser.AccountCheckResp_SingleUserStatus - for _, v := range req.UidList { - temp := new(pbUser.AccountCheckResp_SingleUserStatus) - temp.UserID = v - if utils.IsContain(v, uidList) { - temp.AccountStatus = constant.Registered - } else { - temp.AccountStatus = constant.UnRegistered - } - r = append(r, temp) - } - return &pbUser.AccountCheckResp{CommonResp: &pbUser.CommonResp{ErrorCode: 0, ErrorMsg: ""}, Result: r}, nil - } - -} diff --git a/internal/rpc/user/update_user_info.go b/internal/rpc/user/update_user_info.go deleted file mode 100644 index f022542e4..000000000 --- a/internal/rpc/user/update_user_info.go +++ /dev/null @@ -1,85 +0,0 @@ -package user - -import ( - "Open_IM/internal/push/logic" - chat "Open_IM/internal/rpc/msg" - "Open_IM/pkg/common/config" - "Open_IM/pkg/common/constant" - "Open_IM/pkg/common/db/mysql_model/im_mysql_model" - "Open_IM/pkg/common/log" - "Open_IM/pkg/common/token_verify" - "Open_IM/pkg/grpc-etcdv3/getcdv3" - pbChat "Open_IM/pkg/proto/chat" - pbFriend "Open_IM/pkg/proto/friend" - pbUser "Open_IM/pkg/proto/user" - "Open_IM/pkg/utils" - "context" - "strings" -) - -func (s *userServer) UpdateUserInfo(ctx context.Context, req *pbUser.UpdateUserInfoReq) (*pbUser.CommonResp, error) { - log.Info(req.Token, req.OperationID, "rpc modify user is server,args=%s", req.String()) - claims, err := token_verify.ParseToken(req.Token) - if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error()) - return &pbUser.CommonResp{ErrorCode: constant.ErrParseToken.ErrCode, ErrorMsg: err.Error()}, nil - } - - ownerUid := "" - //if claims.UID == config.Config.AppManagerUid { - if utils.IsContain(claims.UID, config.Config.Manager.AppManagerUid) { - ownerUid = req.Uid - } else { - ownerUid = claims.UID - } - - err = im_mysql_model.UpDateUserInfo(ownerUid, req.Name, req.Icon, req.Mobile, req.Birth, req.Email, req.Ex, req.Gender) - if err != nil { - log.Error(req.Token, req.OperationID, "update user some attribute failed,err=%s", err.Error()) - return &pbUser.CommonResp{ErrorCode: constant.ErrModifyUserInfo.ErrCode, ErrorMsg: constant.ErrModifyUserInfo.ErrMsg}, nil - } - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) - client := pbFriend.NewFriendClient(etcdConn) - newReq := &pbFriend.GetFriendListReq{ - OperationID: req.OperationID, - Token: req.Token, - } - - RpcResp, err := client.GetFriendList(context.Background(), newReq) - if err != nil { - log.ErrorByKv("get friend list rpc server failed", req.OperationID, "err", err.Error(), "req", req.String()) - return &pbUser.CommonResp{}, nil - } - if RpcResp.ErrCode != 0 { - log.ErrorByKv("get friend list rpc server failed", req.OperationID, "err", err.Error(), "req", req.String()) - return &pbUser.CommonResp{}, nil - } - self, err := im_mysql_model.FindUserByUID(ownerUid) - if err != nil { - log.ErrorByKv("get self info failed", req.OperationID, "err", err.Error(), "req", req.String()) - return &pbUser.CommonResp{}, nil - } - var name, faceUrl string - if self != nil { - name, faceUrl = self.Name, self.Icon - } - - chat.SelfInfoUpdatedNotification(req.OperationID, req.Uid) - for _, v := range RpcResp.Data { - logic.SendMsgByWS(&pbChat.WSToMsgSvrChatMsg{ - SendID: ownerUid, - RecvID: v.Uid, - SenderNickName: name, - SenderFaceURL: faceUrl, - Content: ownerUid + "'s info has changed", - SendTime: utils.GetCurrentTimestampByNano(), - MsgFrom: constant.SysMsgType, - ContentType: constant.SetSelfInfoTip, - SessionType: constant.SingleChatType, - OperationID: req.OperationID, - Token: req.Token, - }) - - } - return &pbUser.CommonResp{}, nil -} diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go new file mode 100644 index 000000000..e9407d8bf --- /dev/null +++ b/internal/rpc/user/user.go @@ -0,0 +1,238 @@ +package user + +import ( + chat "Open_IM/internal/rpc/msg" + "Open_IM/pkg/common/config" + "Open_IM/pkg/common/constant" + "Open_IM/pkg/common/db" + imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" + "Open_IM/pkg/common/log" + "Open_IM/pkg/common/token_verify" + "Open_IM/pkg/grpc-etcdv3/getcdv3" + pbFriend "Open_IM/pkg/proto/friend" + pbUser "Open_IM/pkg/proto/user" + "Open_IM/pkg/utils" + "context" + "google.golang.org/grpc" + "net" + "strconv" + "strings" + sdkws "Open_IM/pkg/proto/sdk_ws" +) + +type userServer struct { + rpcPort int + rpcRegisterName string + etcdSchema string + etcdAddr []string +} + +func (s *userServer) Run() { + log.NewInfo("0", "", "rpc user start...") + + ip := utils.ServerIP + registerAddress := ip + ":" + strconv.Itoa(s.rpcPort) + //listener network + listener, err := net.Listen("tcp", registerAddress) + if err != nil { + log.NewError("0", "listen network failed ", err.Error(), registerAddress) + return + } + log.NewInfo("0", "listen network success, address ", registerAddress, listener) + defer listener.Close() + //grpc server + srv := grpc.NewServer() + defer srv.GracefulStop() + //Service registers with etcd + pbUser.RegisterUserServer(srv, s) + err = getcdv3.RegisterEtcd(s.etcdSchema, strings.Join(s.etcdAddr, ","), ip, s.rpcPort, s.rpcRegisterName, 10) + if err != nil { + log.NewError("0", "RegisterEtcd failed ", err.Error(), s.etcdSchema, strings.Join(s.etcdAddr, ","), ip, s.rpcPort, s.rpcRegisterName) + return + } + err = srv.Serve(listener) + if err != nil { + log.NewError("0", "Serve failed ", err.Error()) + return + } + log.NewInfo("0", "rpc user success") +} + +func (s *userServer) GetUserInfo(ctx context.Context, req *pbUser.GetUserInfoReq) (*pbUser.GetUserInfoResp, error) { + log.NewInfo(req.OperationID, "GetUserInfo args ", req.String()) + var userInfoList []*sdkws.UserInfo + if len(req.UserIDList) > 0 { + for _, userID := range req.UserIDList { + var userInfo sdkws.UserInfo + user, err := imdb.GetUserByUserID(userID) + if err != nil { + log.NewError(req.OperationID, "GetUserByUserID failed ", err.Error(), userID) + continue + } + utils.CopyStructFields(&userInfo, user) + userInfoList = append(userInfoList, &userInfo) + } + } else { + + return &pbUser.GetUserInfoResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrArgs.ErrCode, ErrMsg: constant.ErrArgs.ErrMsg}}, nil + } + log.NewInfo(req.OperationID, "GetUserInfo rpc return ", pbUser.GetUserInfoResp{CommonResp: &pbUser.CommonResp{}, UserInfoList:userInfoList}) + return &pbUser.GetUserInfoResp{CommonResp: &pbUser.CommonResp{}, UserInfoList:userInfoList}, nil +} + + + +func (s *userServer) SetReceiveMessageOpt(ctx context.Context, req *pbUser.SetReceiveMessageOptReq) (*pbUser.SetReceiveMessageOptResp, error) { + log.NewInfo(req.OperationID, "SetReceiveMessageOpt args ", req.String()) + m := make(map[string]int, len(req.ConversationIDList)) + for _, v := range req.ConversationIDList { + m[v] = int(req.Opt) + } + err := db.DB.SetMultiConversationMsgOpt(req.FromUserID, m) + if err != nil { + log.NewError(req.OperationID, "SetMultiConversationMsgOpt failed ", err.Error(), req) + return &pbUser.SetReceiveMessageOptResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil + } + resp := pbUser.SetReceiveMessageOptResp{CommonResp: &pbUser.CommonResp{}} + + for _, v := range req.ConversationIDList { + resp.OptResultList = append(resp.OptResultList, &pbUser.OptResult{ConversationId: v, Result: 0}) + } + log.NewInfo(req.OperationID, "SetReceiveMessageOpt rpc return ", resp.String()) + return &resp, nil +} + +func (s *userServer) GetReceiveMessageOpt(ctx context.Context, req *pbUser.GetReceiveMessageOptReq) (*pbUser.GetReceiveMessageOptResp, error) { + log.NewInfo(req.OperationID, "GetReceiveMessageOpt args ", req.String()) + m, err := db.DB.GetMultiConversationMsgOpt(req.FromUserID, req.ConversationId) + if err != nil { + log.NewError(req.OperationID, "GetMultiConversationMsgOpt failed ", err.Error(), req.FromUserID, req.ConversationId) + return &pbUser.GetReceiveMessageOptResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil + } + resp := pbUser.GetReceiveMessageOptResp{CommonResp: &pbUser.CommonResp{}} + for k, v := range m { + resp.ConversationOptResultList = append(resp.ConversationOptResultList, &pbUser.OptResult{ConversationId: k, Result: int32(v)}) + } + log.NewInfo(req.OperationID, "GetReceiveMessageOpt rpc return ", resp.String()) + return &resp, nil +} + +func (s *userServer) GetAllConversationMsgOpt(ctx context.Context, req *pbUser.GetAllConversationMsgOptReq) (*pbUser.GetAllConversationMsgOptResp, error) { + log.NewInfo(req.OperationID, "GetAllConversationMsgOpt args ", req.String()) + m, err := db.DB.GetAllConversationMsgOpt(req.FromUserId) + if err != nil { + log.NewError(req.OperationID, "GetAllConversationMsgOpt failed ", err.Error(), req.FromUserId) + return &pbUser.GetAllConversationMsgOptResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil + } + resp := pbUser.GetAllConversationMsgOptResp{CommonResp: &pbUser.CommonResp{}} + for k, v := range m { + resp.ConversationOptResultList = append(resp.ConversationOptResultList, &pbUser.OptResult{ConversationId: k, Result: int32(v)}) + } + log.NewInfo(req.OperationID, "GetAllConversationMsgOpt rpc return ", resp.String()) + return &resp, nil +} + + +func (s *userServer) DeleteUsers(_ context.Context, req *pbUser.DeleteUsersReq) (*pbUser.DeleteUsersResp, error) { + log.NewInfo(req.OperationID, "DeleteUsers args ", req.String()) + if token_verify.IsMangerUserID(req.OpUserID){ + log.NewError(req.OperationID, "IsMangerUserID false ", req.OpUserID) + return &pbUser.DeleteUsersResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, FailedUserIDList: req.DeleteUserIDList}, nil + } + var common pbUser.CommonResp + resp := pbUser.DeleteUsersResp{CommonResp: &common} + for _, userID := range req.DeleteUserIDList { + err := imdb.DeleteUser(userID) + if err != nil { + common.ErrCode = 201 + common.ErrMsg = "some uid deleted failed" + resp.FailedUserIDList = append(resp.FailedUserIDList, userID) + } + } + log.NewInfo(req.OperationID, "DeleteUsers rpc return ", resp.String()) + return &resp, nil +} + +func (s *userServer) GetAllUserID(_ context.Context, req *pbUser.GetAllUserIDReq) (*pbUser.GetAllUserIDResp, error) { + log.NewInfo(req.OperationID,"GetAllUserID args ", req.String()) + if token_verify.IsMangerUserID(req.OpUserID){ + log.NewError(req.OperationID, "IsMangerUserID false ", req.OpUserID) + return &pbUser.GetAllUserIDResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil + } + uidList, err := imdb.SelectAllUserID() + if err != nil { + log.NewError(req.OperationID, "SelectAllUserID false ", err.Error()) + return &pbUser.GetAllUserIDResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil + } else { + log.NewInfo(req.OperationID, "GetAllUserID rpc return ", pbUser.GetAllUserIDResp{CommonResp: &pbUser.CommonResp{}, UserIDList: uidList}) + return &pbUser.GetAllUserIDResp{CommonResp: &pbUser.CommonResp{}, UserIDList: uidList}, nil + } +} + + +func (s *userServer) AccountCheck(_ context.Context, req *pbUser.AccountCheckReq) (*pbUser.AccountCheckResp, error) { + log.NewInfo(req.OperationID,"AccountCheck args ", req.String()) + if token_verify.IsMangerUserID(req.OpUserID){ + log.NewError(req.OperationID, "IsMangerUserID false ", req.OpUserID) + return &pbUser.AccountCheckResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil + } + uidList, err := imdb.SelectSomeUserID(req.CheckUserIDList) + if err != nil { + log.NewError(req.OperationID, "SelectSomeUserID failed ", err.Error(), req.CheckUserIDList) + return &pbUser.AccountCheckResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil + } else { + var r []*pbUser.AccountCheckResp_SingleUserStatus + for _, v := range req.CheckUserIDList { + temp := new(pbUser.AccountCheckResp_SingleUserStatus) + temp.UserID = v + if utils.IsContain(v, uidList) { + temp.AccountStatus = constant.Registered + } else { + temp.AccountStatus = constant.UnRegistered + } + r = append(r, temp) + } + resp := pbUser.AccountCheckResp{CommonResp: &pbUser.CommonResp{ErrCode: 0, ErrMsg: ""}, ResultList: r} + log.NewInfo(req.OperationID, "AccountCheck rpc return ", resp.String()) + return &resp, nil + } + +} + + + + +func (s *userServer) UpdateUserInfo(ctx context.Context, req *pbUser.UpdateUserInfoReq) (*pbUser.UpdateUserInfoResp, error) { + log.NewInfo(req.OperationID,"UpdateUserInfo args ", req.String()) + if !token_verify.CheckAccess(req.OpUserID, req.UserInfo.UserID){ + log.NewError(req.OperationID, "CheckAccess false ", req.OpUserID, req.UserInfo.UserID) + return &pbUser.UpdateUserInfoResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil + } + + var user imdb.User + utils.CopyStructFields(&user, req.UserInfo) + err := imdb.UpdateUserInfo(user) + if err != nil { + log.NewError(req.OperationID, "UpdateUserInfo failed ", err.Error(), user) + return &pbUser.UpdateUserInfoResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil + } + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) + client := pbFriend.NewFriendClient(etcdConn) + newReq := &pbFriend.GetFriendListReq{ + CommID: &pbFriend.CommID{OperationID: req.OperationID, FromUserID: req.UserInfo.UserID, OpUserID: req.OpUserID} + } + + RpcResp, err := client.GetFriendList(context.Background(), newReq) + if err != nil { + log.NewError(req.OperationID, "GetFriendList failed ", err.Error(), newReq) + return &pbUser.UpdateUserInfoResp{CommonResp: &pbUser.CommonResp{}}, nil + } + for _, v := range RpcResp.FriendInfoList{ + chat.FriendInfoChangedNotification(req.OperationID, req.OpUserID, req.UserInfo.UserID, v.FriendUser.UserID) + } + chat.SelfInfoUpdatedNotification(req.OperationID, req.UserInfo.UserID) + return &pbUser.UpdateUserInfoResp{CommonResp: &pbUser.CommonResp{}}, nil +} + + + diff --git a/pkg/base_info/friend_api_struct.go b/pkg/base_info/friend_api_struct.go index 3b20185d8..94a48662b 100644 --- a/pkg/base_info/friend_api_struct.go +++ b/pkg/base_info/friend_api_struct.go @@ -2,16 +2,12 @@ package base_info import open_im_sdk "Open_IM/pkg/proto/sdk_ws" -open_im_sdk "Open_IM/pkg/proto/sdk_ws" - type paramsCommFriend struct { OperationID string `json:"operationID" binding:"required"` ToUserID string `json:"toUserID" binding:"required"` FromUserID string `json:"fromUserID" binding:"required"` } - - type AddBlacklistReq struct { paramsCommFriend } @@ -19,8 +15,6 @@ type AddBlacklistResp struct { CommResp } - - type ImportFriendReq struct { FriendUserIDList []string `json:"friendUserIDList" binding:"required"` OperationID string `json:"operationID" binding:"required"` @@ -28,10 +22,9 @@ type ImportFriendReq struct { } type ImportFriendResp struct { CommResp - Data []string `json:"data"` + Data []string `json:"data"` } - type AddFriendReq struct { paramsCommFriend ReqMsg string `json:"reqMsg"` @@ -40,18 +33,15 @@ type AddFriendResp struct { CommResp } - type AddFriendResponseReq struct { paramsCommFriend - Flag int32 `json:"flag" binding:"required"` + Flag int32 `json:"flag" binding:"required"` HandleMsg string `json:"handleMsg"` } type AddFriendResponseResp struct { CommResp } - - type DeleteFriendReq struct { paramsCommFriend } @@ -59,8 +49,6 @@ type DeleteFriendResp struct { CommResp } - - type GetBlackListReq struct { paramsCommFriend } @@ -69,7 +57,6 @@ type GetBlackListResp struct { BlackUserInfoList []*blackUserInfo `json:"data"` } - //type PublicUserInfo struct { // UserID string `json:"userID"` // Nickname string `json:"nickname"` @@ -81,7 +68,6 @@ type blackUserInfo struct { open_im_sdk.PublicUserInfo } - type SetFriendCommentReq struct { paramsCommFriend Remark string `json:"remark" binding:"required"` @@ -90,7 +76,6 @@ type SetFriendCommentResp struct { CommResp } - type RemoveBlackListReq struct { paramsCommFriend } @@ -106,7 +91,6 @@ type IsFriendResp struct { Response bool `json:"response"` } - type GetFriendsInfoReq struct { paramsCommFriend } @@ -123,10 +107,6 @@ type GetFriendListResp struct { FriendInfoList []*open_im_sdk.FriendInfo `json:"data"` } - - - - type GetFriendApplyListReq struct { paramsCommFriend } @@ -142,14 +122,3 @@ type GetSelfApplyListResp struct { CommResp FriendRequestList open_im_sdk.FriendRequest `json:"data"` } - - - - - - - - - - - diff --git a/pkg/base_info/user_api_struct.go b/pkg/base_info/user_api_struct.go new file mode 100644 index 000000000..c129e8c76 --- /dev/null +++ b/pkg/base_info/user_api_struct.go @@ -0,0 +1,29 @@ +package base_info + +import ( + open_im_sdk "Open_IM/pkg/proto/sdk_ws" +) + +type GetUsersOnlineStatusReq struct { + OperationID string `json:"operationID" binding:"required"` + UserIDList []string `json:"userIDList" binding:"required,lte=200"` + Secret string `json:"secret" binding:"required,max=32"` +} +type OnlineStatus struct { + UserID string `json:"userID"` + Status string `json:"status"` +} +type GetUsersOnlineStatusResp struct { + CommResp + OnlineStatusList []*OnlineStatus `json:"data"` +} + +type GetUserInfoReq struct { + OperationID string `json:"operationID" binding:"required"` + UserIDList []string `json:"userIDList" binding:"required"` +} + +type GetUserInfoResp struct { + CommResp + UserInfoList []*open_im_sdk.UserInfo `json:"data"` +} diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_model.go index 5fc580c8a..120815a61 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_model.go @@ -8,6 +8,19 @@ import ( "time" ) +//type Group struct { +// GroupID string `gorm:"column:group_id;primaryKey;"` +// GroupName string `gorm:"column:name"` +// Introduction string `gorm:"column:introduction"` +// Notification string `gorm:"column:notification"` +// FaceUrl string `gorm:"column:face_url"` +// CreateTime time.Time `gorm:"column:create_time"` +// Status int32 `gorm:"column:status"` +// CreatorUserID string `gorm:"column:creator_user_id"` +// GroupType int32 `gorm:"column:group_type"` +// Ex string `gorm:"column:ex"` +//} + func InsertIntoGroup(groupInfo Group) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { @@ -24,228 +37,24 @@ func InsertIntoGroup(groupInfo Group) error { return nil } -func FindGroupInfoByGroupId(groupId string) (*Group, error) { +func GetGroupInfoByGroupID(groupId string) (*Group, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err } var groupInfo Group - err = dbConn.Raw("select * from `group` where group_id=?", groupId).Scan(&groupInfo).Error + err = dbConn.Table("group").Where("group_id=?", groupId).Find(&groupInfo).Error if err != nil { return nil, err } return &groupInfo, nil } -func SetGroupInfo(groupId, groupName, introduction, notification, groupFaceUrl, ex string) error { +func SetGroupInfo(groupInfo Group) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() - dbConn.LogMode(true) if err != nil { return err } - if groupName != "" { - if err = dbConn.Exec("update `group` set name=? where group_id=?", groupName, groupId).Error; err != nil { - return err - } - } - if introduction != "" { - if err = dbConn.Exec("update `group` set introduction=? where group_id=?", introduction, groupId).Error; err != nil { - return err - } - } - if notification != "" { - if err = dbConn.Exec("update `group` set notification=? where group_id=?", notification, groupId).Error; err != nil { - return err - } - } - if groupFaceUrl != "" { - if err = dbConn.Exec("update `group` set face_url=? where group_id=?", groupFaceUrl, groupId).Error; err != nil { - return err - } - } - if ex != "" { - if err = dbConn.Exec("update `group` set ex=? where group_id=?", ex, groupId).Error; err != nil { - return err - } - } - return nil -} - -func GetGroupApplicationList(uid string) (*group.GetGroupApplicationListResp, error) { - dbConn, err := db.DB.MysqlDB.DefaultGormDB() - if err != nil { - return nil, err - } - - var gID string - var gIDs []string - rows, err := dbConn.Raw("select group_id from `group_member` where uid = ? and administrator_level > 0", uid).Rows() - defer rows.Close() - if err != nil { - return nil, err - } - - for rows.Next() { - rows.Scan(&gID) - gIDs = append(gIDs, gID) - } - - if len(gIDs) == 0 { - return &group.GetGroupApplicationListResp{}, nil - } - - sql := "select id, group_id, from_user_id, to_user_id, flag, req_msg, handled_msg, create_time, " + - "from_user_nickname, to_user_nickname, from_user_face_url, to_user_face_url, handled_user from `group_request` where group_id in ( " - for i := 0; i < len(gIDs); i++ { - if i == len(gIDs)-1 { - sql = sql + "\"" + gIDs[i] + "\"" + " )" - } else { - sql = sql + "\"" + gIDs[i] + "\"" + ", " - } - } - - var groupRequest GroupRequest - var groupRequests []GroupRequest - log.Info("", "", sql) - rows, err = dbConn.Raw(sql).Rows() - defer rows.Close() - if err != nil { - return nil, err - } - for rows.Next() { - rows.Scan(&groupRequest.ID, &groupRequest.GroupID, &groupRequest.FromUserID, &groupRequest.ToUserID, &groupRequest.Flag, &groupRequest.ReqMsg, - &groupRequest.HandledMsg, &groupRequest.CreateTime, &groupRequest.FromUserNickname, &groupRequest.ToUserNickname, - &groupRequest.FromUserFaceUrl, &groupRequest.ToUserFaceUrl, &groupRequest.HandledUser) - groupRequests = append(groupRequests, groupRequest) - } - - reply := &group.GetGroupApplicationListResp{} - reply.Data = &group.GetGroupApplicationListData{} - reply.Data.Count = int32(len(groupRequests)) - for i := 0; i < int(reply.Data.Count); i++ { - addUser := group.GetGroupApplicationList_Data_User{ - ID: groupRequests[i].ID, - GroupID: groupRequests[i].GroupID, - FromUserID: groupRequests[i].FromUserID, - FromUserNickname: groupRequests[i].FromUserNickname, - FromUserFaceUrl: groupRequests[i].FromUserFaceUrl, - ToUserID: groupRequests[i].ToUserID, - AddTime: groupRequests[i].CreateTime.Unix(), - RequestMsg: groupRequests[i].ReqMsg, - HandledMsg: groupRequests[i].HandledMsg, - Flag: groupRequests[i].Flag, - ToUserNickname: groupRequests[i].ToUserNickname, - ToUserFaceUrl: groupRequests[i].ToUserFaceUrl, - HandledUser: groupRequests[i].HandledUser, - Type: 0, - HandleStatus: 0, - HandleResult: 0, - } - - if addUser.ToUserID != "0" { - addUser.Type = 1 - } - - if len(groupRequests[i].HandledUser) > 0 { - if groupRequests[i].HandledUser == uid { - addUser.HandleStatus = 2 - } else { - addUser.HandleStatus = 1 - } - } - - if groupRequests[i].Flag == 1 { - addUser.HandleResult = 1 - } - - reply.Data.User = append(reply.Data.User, &addUser) - } - return reply, nil -} - -func TransferGroupOwner(pb *group.TransferGroupOwnerReq) (*group.TransferGroupOwnerResp, error) { - oldOwner, err := FindGroupMemberInfoByGroupIdAndUserId(pb.GroupID, pb.OldOwnerUserID) - if err != nil { - return nil, err - } - newOwner, err := FindGroupMemberInfoByGroupIdAndUserId(pb.GroupID, pb.NewOwnerUserID) - if err != nil { - return nil, err - } - - if oldOwner.UserID == newOwner.UserID { - return nil, errors.New("the self") - } - - if err = UpdateTheUserAdministratorLevel(pb.GroupID, pb.OldOwnerUserID, 0); err != nil { - return nil, err - } - - if err = UpdateTheUserAdministratorLevel(pb.GroupID, pb.NewOwnerUserID, 1); err != nil { - UpdateTheUserAdministratorLevel(pb.GroupID, pb.OldOwnerUserID, 1) - return nil, err - } - - return &group.TransferGroupOwnerResp{CommonResp: &group.CommonResp{ErrCode: 0}}, nil -} - -func GroupApplicationResponse(pb *group.GroupApplicationResponseReq) (*group.CommonResp, error) { - - ownerUser, err := FindGroupMemberInfoByGroupIdAndUserId(pb.GroupID, pb.OwnerID) - if err != nil { - log.ErrorByKv("FindGroupMemberInfoByGroupIdAndUserId failed", pb.OperationID, "groupId", pb.GroupID, "ownerID", pb.OwnerID) - return nil, err - } - if ownerUser.AdministratorLevel <= 0 { - return nil, errors.New("insufficient permissions") - } - - dbConn, err := db.DB.MysqlDB.DefaultGormDB() - if err != nil { - return nil, err - } - var groupRequest GroupRequest - err = dbConn.Raw("select * from `group_request` where handled_user = ? and group_id = ? and from_user_id = ? and to_user_id = ?", - "", pb.GroupID, pb.FromUserID, pb.ToUserID).Scan(&groupRequest).Error - if err != nil { - log.ErrorByKv("find group_request info failed", pb.OperationID, "groupId", pb.GroupID, "fromUserId", pb.FromUserID, "toUserId", pb.OwnerID) - return nil, err - } - - if groupRequest.Flag != 0 { - return nil, errors.New("application has already handle") - } - - var saveFlag int - if pb.HandleResult == 0 { - saveFlag = -1 - } else if pb.HandleResult == 1 { - saveFlag = 1 - } else { - return nil, errors.New("parma HandleResult error") - } - err = dbConn.Exec("update `group_request` set flag = ?, handled_msg = ?, handled_user = ? where group_id = ? and from_user_id = ? and to_user_id = ?", - saveFlag, pb.HandledMsg, pb.OwnerID, groupRequest.GroupID, groupRequest.FromUserID, groupRequest.ToUserID).Error - if err != nil { - log.ErrorByKv("update group request failed", pb.OperationID, "groupID", pb.GroupID, "flag", saveFlag, "ownerId", pb.OwnerID, "fromUserId", pb.FromUserID, "toUserID", pb.ToUserID) - return nil, err - } - - if saveFlag == 1 { - if groupRequest.ToUserID == "0" { - err = InsertIntoGroupMember(pb.GroupID, pb.FromUserID, groupRequest.FromUserNickname, groupRequest.FromUserFaceUrl, 0) - if err != nil { - log.ErrorByKv("InsertIntoGroupMember failed", pb.OperationID, "groupID", pb.GroupID, "fromUserId", pb.FromUserID) - return nil, err - } - } else { - err = InsertIntoGroupMember(pb.GroupID, pb.ToUserID, groupRequest.ToUserNickname, groupRequest.ToUserFaceUrl, 0) - if err != nil { - log.ErrorByKv("InsertIntoGroupMember failed", pb.OperationID, "groupID", pb.GroupID, "fromUserId", pb.FromUserID) - return nil, err - } - } - } - - return &group.GroupApplicationResponseResp{}, nil + err = dbConn.Table("friend_request").Where("group_id=?", groupInfo.GroupID).Update(&groupInfo).Error + return err } diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go index da793d331..143cab342 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go @@ -2,15 +2,41 @@ package im_mysql_model import ( "Open_IM/pkg/common/db" + "Open_IM/pkg/common/log" + "Open_IM/pkg/proto/group" "time" ) -func InsertIntoGroupRequest(groupId, fromUserId, toUserId, reqMsg, fromUserNickName, fromUserFaceUrl string) error { +//type GroupRequest struct { +// UserID string `gorm:"column:user_id;primaryKey;"` +// GroupID string `gorm:"column:group_id;primaryKey;"` +// HandleResult int32 `gorm:"column:handle_result"` +// ReqMsg string `gorm:"column:req_msg"` +// HandledMsg string `gorm:"column:handled_msg"` +// ReqTime time.Time `gorm:"column:req_time"` +// HandleUserID string `gorm:"column:handle_user_id"` +// HandledTime time.Time `gorm:"column:handle_time"` +// Ex string `gorm:"column:ex"` +//} + +func UpdateGroupRequest(groupRequest GroupRequest) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return err } - toInsertInfo := GroupRequest{GroupID: groupId, FromUserID: fromUserId, ToUserID: toUserId, ReqMsg: reqMsg, FromUserNickname: fromUserNickName, FromUserFaceUrl: fromUserFaceUrl, CreateTime: time.Now()} + err = dbConn.Table("group_request").Where("group_id=? and user_id=?", groupRequest.GroupID, groupRequest.UserID).Update(&groupRequest).Error + if err != nil { + return err + } + return nil +} + +func InsertIntoGroupRequest(toInsertInfo GroupRequest) error { + dbConn, err := db.DB.MysqlDB.DefaultGormDB() + if err != nil { + return err + } + toInsertInfo.HandledTime = time.Now() err = dbConn.Table("group_request").Create(&toInsertInfo).Error if err != nil { return err @@ -18,45 +44,139 @@ func InsertIntoGroupRequest(groupId, fromUserId, toUserId, reqMsg, fromUserNickN return nil } -func FindGroupRequestUserInfoByGroupIDAndUid(groupId, uid string) (*GroupRequest, error) { +func GetGroupRequestByGroupIDAndUserID(groupID, userID string) (*GroupRequest, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err } - var requestUserInfo GroupRequest - err = dbConn.Table("group_request").Where("from_user_id=? and group_id=?", uid, groupId).Find(&requestUserInfo).Error + var groupRequest GroupRequest + err = dbConn.Table("group_request").Where("user_id=? and group_id=?", userID, groupID).Find(&groupRequest).Error if err != nil { return nil, err } - return &requestUserInfo, nil + return &groupRequest, nil } -func DelGroupRequest(groupId, fromUserId, toUserId string) error { +func DelGroupRequestByGroupIDAndUserID(groupID, userID string) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return err } - err = dbConn.Exec("delete from group_request where group_id=? and from_user_id=? and to_user_id=?", groupId, fromUserId, toUserId).Error + err = dbConn.Table("group_request").Where("group_id=? and user_id=?", groupID, userID).Delete(&GroupRequest{}).Error if err != nil { return err } return nil } -func FindGroupBeInvitedRequestInfoByUidAndGroupID(groupId, uid string) (*GroupRequest, error) { +func GetGroupRequestByGroupID(groupID string) ([]GroupRequest, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err } - var beInvitedRequestUserInfo GroupRequest - err = dbConn.Table("group_request").Where("to_user_id=? and group_id=?", uid, groupId).Find(&beInvitedRequestUserInfo).Error + var groupRequestList []GroupRequest + err = dbConn.Table("group_request").Where("group_id=?", groupID).Find(&groupRequestList).Error if err != nil { return nil, err } - return &beInvitedRequestUserInfo, nil - + return groupRequestList, nil } -func InsertGroupRequest(groupId, fromUser, fromUserNickName, fromUserFaceUrl, toUser, requestMsg, handledMsg string, handleStatus int) error { - return nil +//received +func GetGroupApplicationList(userID string) ([]GroupRequest, error) { + var groupRequestList []GroupRequest + memberList, err := GetGroupMemberListByUserID(userID) + if err != nil { + return nil, err + } + for _, v := range memberList { + if v.RoleLevel > 0 { + list, err := GetGroupRequestByGroupID(v.GroupID) + if err != nil { + continue + } + groupRequestList = append(groupRequestList, list...) + } + } + return groupRequestList, nil } + +// +//func GroupApplicationResponse(pb *group.GroupApplicationResponseReq) (*group.CommonResp, error) { +// +// ownerUser, err := FindGroupMemberInfoByGroupIdAndUserId(pb.GroupID, pb.OwnerID) +// if err != nil { +// log.ErrorByKv("FindGroupMemberInfoByGroupIdAndUserId failed", pb.OperationID, "groupId", pb.GroupID, "ownerID", pb.OwnerID) +// return nil, err +// } +// if ownerUser.AdministratorLevel <= 0 { +// return nil, errors.New("insufficient permissions") +// } +// +// dbConn, err := db.DB.MysqlDB.DefaultGormDB() +// if err != nil { +// return nil, err +// } +// var groupRequest GroupRequest +// err = dbConn.Raw("select * from `group_request` where handled_user = ? and group_id = ? and from_user_id = ? and to_user_id = ?", +// "", pb.GroupID, pb.FromUserID, pb.ToUserID).Scan(&groupRequest).Error +// if err != nil { +// log.ErrorByKv("find group_request info failed", pb.OperationID, "groupId", pb.GroupID, "fromUserId", pb.FromUserID, "toUserId", pb.OwnerID) +// return nil, err +// } +// +// if groupRequest.Flag != 0 { +// return nil, errors.New("application has already handle") +// } +// +// var saveFlag int +// if pb.HandleResult == 0 { +// saveFlag = -1 +// } else if pb.HandleResult == 1 { +// saveFlag = 1 +// } else { +// return nil, errors.New("parma HandleResult error") +// } +// err = dbConn.Exec("update `group_request` set flag = ?, handled_msg = ?, handled_user = ? where group_id = ? and from_user_id = ? and to_user_id = ?", +// saveFlag, pb.HandledMsg, pb.OwnerID, groupRequest.GroupID, groupRequest.FromUserID, groupRequest.ToUserID).Error +// if err != nil { +// log.ErrorByKv("update group request failed", pb.OperationID, "groupID", pb.GroupID, "flag", saveFlag, "ownerId", pb.OwnerID, "fromUserId", pb.FromUserID, "toUserID", pb.ToUserID) +// return nil, err +// } +// +// if saveFlag == 1 { +// if groupRequest.ToUserID == "0" { +// err = InsertIntoGroupMember(pb.GroupID, pb.FromUserID, groupRequest.FromUserNickname, groupRequest.FromUserFaceUrl, 0) +// if err != nil { +// log.ErrorByKv("InsertIntoGroupMember failed", pb.OperationID, "groupID", pb.GroupID, "fromUserId", pb.FromUserID) +// return nil, err +// } +// } else { +// err = InsertIntoGroupMember(pb.GroupID, pb.ToUserID, groupRequest.ToUserNickname, groupRequest.ToUserFaceUrl, 0) +// if err != nil { +// log.ErrorByKv("InsertIntoGroupMember failed", pb.OperationID, "groupID", pb.GroupID, "fromUserId", pb.FromUserID) +// return nil, err +// } +// } +// } +// +// return &group.GroupApplicationResponseResp{}, nil +//} + +//func FindGroupBeInvitedRequestInfoByUidAndGroupID(groupId, uid string) (*GroupRequest, error) { +// dbConn, err := db.DB.MysqlDB.DefaultGormDB() +// if err != nil { +// return nil, err +// } +// var beInvitedRequestUserInfo GroupRequest +// err = dbConn.Table("group_request").Where("to_user_id=? and group_id=?", uid, groupId).Find(&beInvitedRequestUserInfo).Error +// if err != nil { +// return nil, err +// } +// return &beInvitedRequestUserInfo, nil +// +//} + +//func InsertGroupRequest(groupId, fromUser, fromUserNickName, fromUserFaceUrl, toUser, requestMsg, handledMsg string, handleStatus int) error { +// return nil +//} diff --git a/pkg/common/db/mysql_model/im_mysql_model/model_struct.go b/pkg/common/db/mysql_model/im_mysql_model/model_struct.go index 45741797e..f67930e8b 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/model_struct.go +++ b/pkg/common/db/mysql_model/im_mysql_model/model_struct.go @@ -40,7 +40,7 @@ type Group struct { type GroupMember struct { GroupID string `gorm:"column:group_id;primaryKey;"` UserID string `gorm:"column:user_id;primaryKey;"` - NickName string `gorm:"column:nickname"` + Nickname string `gorm:"column:nickname"` FaceUrl string `gorm:"user_group_face_url"` RoleLevel int32 `gorm:"column:role_level"` JoinTime time.Time `gorm:"column:join_time"` @@ -52,7 +52,7 @@ type GroupMember struct { type GroupRequest struct { UserID string `gorm:"column:user_id;primaryKey;"` GroupID string `gorm:"column:group_id;primaryKey;"` - HandleResult string `gorm:"column:handle_result"` + HandleResult int32 `gorm:"column:handle_result"` ReqMsg string `gorm:"column:req_msg"` HandledMsg string `gorm:"column:handled_msg"` ReqTime time.Time `gorm:"column:req_time"` @@ -73,7 +73,7 @@ type User struct { CreateTime time.Time `gorm:"column:create_time"` } -type BlackList struct { +type Black struct { OwnerUserID string `gorm:"column:owner_user_id;primaryKey;"` BlockUserID string `gorm:"column:block_user_id;primaryKey;"` CreateTime time.Time `gorm:"column:create_time"` diff --git a/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go b/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go index 39ad51a13..42a7c2fa9 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go @@ -5,42 +5,52 @@ import ( "time" ) -func InsertInToUserBlackList(ownerID, blockID string) error { +func InsertInToUserBlackList(black Black) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return err } - toInsertInfo := BlackList{OwnerUserID: ownerID, BlockUserID: blockID, CreateTime: time.Now()} - err = dbConn.Table("user_black_list").Create(toInsertInfo).Error + black.CreateTime = time.Now() + err = dbConn.Table("user_black_list").Create(black).Error return err } -func FindRelationshipFromBlackList(ownerID, blockID string) error { +//type Black struct { +// OwnerUserID string `gorm:"column:owner_user_id;primaryKey;"` +// BlockUserID string `gorm:"column:block_user_id;primaryKey;"` +// CreateTime time.Time `gorm:"column:create_time"` +// AddSource int32 `gorm:"column:add_source"` +// OperatorUserID int32 `gorm:"column:operator_user_id"` +// Ex string `gorm:"column:ex"` +//} + +func CheckBlack(ownerUserID, blockUserID string) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return err } - var blackList BlackList - err = dbConn.Table("user_black_list").Where("owner_id=? and block_id=?", ownerID, blockID).Find(&blackList).Error + var black Black + err = dbConn.Table("user_black_list").Where("owner_user_id=? and block_user_id=?", ownerUserID, blockUserID).Find(&black).Error return err } -func RemoveBlackList(ownerID, blockID string) error { +func RemoveBlackList(ownerUserID, blockUserID string) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return err } - err = dbConn.Exec("delete from user_black_list where owner_id=? and block_id=?", ownerID, blockID).Error + + err = dbConn.Table("user_black_list").Where("owner_user_id=? and block_user_id=?", ownerUserID, blockUserID).Delete(&Black{}).Error return err } -func GetBlackListByUID(ownerID string) ([]BlackList, error) { +func GetBlackListByUserID(ownerUserID string) ([]Black, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err } - var blackListUsersInfo []BlackList - err = dbConn.Table("user_black_list").Where("owner_id=?", ownerID).Find(&blackListUsersInfo).Error + var blackListUsersInfo []Black + err = dbConn.Table("user_black_list").Where("owner_user_id=?", ownerUserID).Find(&blackListUsersInfo).Error if err != nil { return nil, err } diff --git a/pkg/common/db/mysql_model/im_mysql_model/user_model.go b/pkg/common/db/mysql_model/im_mysql_model/user_model.go index 98ddcb7fc..4025d2db3 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/user_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/user_model.go @@ -3,7 +3,6 @@ package im_mysql_model import ( "Open_IM/pkg/common/config" "Open_IM/pkg/common/db" - pbAuth "Open_IM/pkg/proto/auth" "Open_IM/pkg/utils" "fmt" _ "github.com/jinzhu/gorm/dialects/mysql" @@ -12,168 +11,101 @@ import ( func init() { //init managers - var pb pbAuth.UserRegisterReq for k, v := range config.Config.Manager.AppManagerUid { - if !IsExistUser(v) { - pb.UID = v - pb.Name = "AppManager" + utils.IntToString(k+1) - err := UserRegister(&pb) - if err != nil { - fmt.Println("AppManager insert error", err.Error()) - } + user, err := GetUserByUserID(v) + if err != nil { + fmt.Println("GetUserByUserID failed ", err.Error(), v, user) + continue } + var appMgr User + appMgr.Nickname = "AppManager" + utils.IntToString(k+1) + err = UserRegister(appMgr) + if err != nil { + fmt.Println("AppManager insert error", err.Error()) + } + } } -func UserRegister(pb *pbAuth.UserRegisterReq) error { + +func UserRegister(user User) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return err } - addUser := User{ - UserID: pb.UID, - Nickname: pb.Name, - FaceUrl: pb.Icon, - Gender: pb.Gender, - Mobile: pb.Mobile, - Birth: pb.Birth, - Email: pb.Email, - Ex: pb.Ex, - CreateTime: time.Now(), - } - err = dbConn.Table("user").Create(&addUser).Error + user.CreateTime = time.Now() + + err = dbConn.Table("user").Create(&user).Error if err != nil { return err } return nil } -func UserDelete(uid string) error { +//type User struct { +// UserID string `gorm:"column:user_id;primaryKey;"` +// Nickname string `gorm:"column:name"` +// FaceUrl string `gorm:"column:icon"` +// Gender int32 `gorm:"column:gender"` +// PhoneNumber string `gorm:"column:phone_number"` +// Birth string `gorm:"column:birth"` +// Email string `gorm:"column:email"` +// Ex string `gorm:"column:ex"` +// CreateTime time.Time `gorm:"column:create_time"` +//} + +func DeleteUser(userID string) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return err } - err = dbConn.Table("user").Where("uid=?", uid).Delete(User{}).Error - if err != nil { - return err - } - return nil + err = dbConn.Table("user").Where("user_id=?", userID).Delete(User{}).Error + return err } -func FindUserByUID(uid string) (*User, error) { + +func GetUserByUserID(userID string) (*User, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err } var user User - err = dbConn.Table("user").Where("uid=?", uid).First(&user).Error + err = dbConn.Table("user").Where("user_id=?", userID).First(&user).Error if err != nil { return nil, err } return &user, nil } -func UpDateUserInfo(uid, name, headUrl, mobilePhoneNum, birth, email, extendInfo string, gender int32) error { +func UpdateUserInfo(user User) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return err } - if name != "" { - if err = dbConn.Exec("update user set name=? where uid=?", name, uid).Error; err != nil { - return err - } - } - if headUrl != "" { - if err = dbConn.Exec("update user set icon=? where uid=?", headUrl, uid).Error; err != nil { - return err - } - } - if mobilePhoneNum != "" { - if err = dbConn.Exec("update user set mobile=? where uid=?", mobilePhoneNum, uid).Error; err != nil { - return err - } - } - if birth != "" { - if err = dbConn.Exec("update user set birth=? where uid=?", birth, uid).Error; err != nil { - return err - } - } - if email != "" { - if err = dbConn.Exec("update user set email=? where uid=?", email, uid).Error; err != nil { - return err - } - } - if extendInfo != "" { - if err = dbConn.Exec("update user set ex=? where uid=?", extendInfo, uid).Error; err != nil { - return err - } - } - if gender != 0 { - if err = dbConn.Exec("update user set gender=? where uid=?", gender, uid).Error; err != nil { - return err - } - } - return nil + err = dbConn.Table("user").Where("user_id=?", user.UserID).Update(&user).Error + return err } -func SelectAllUID() ([]string, error) { - var uid []string - +func SelectAllUserID() ([]string, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { - return uid, err + return nil, err } - rows, err := dbConn.Raw("select uid from user").Rows() + var resultArr []string + err = dbConn.Table("user").Select([]string{"user_id"}).Scan(&resultArr).Error if err != nil { - return uid, err + return nil, err } - defer rows.Close() - var strUID string - for rows.Next() { - rows.Scan(&strUID) - uid = append(uid, strUID) - } - return uid, nil -} -func SelectSomeUID(uids []string) ([]string, error) { - var uid []string - - dbConn, err := db.DB.MysqlDB.DefaultGormDB() - if err != nil { - return uid, err - } - rows, err := dbConn.Raw("select uid from user where uid in (" + sqlStringHandle(uids) + ")").Rows() - if err != nil { - return uid, err - } - defer rows.Close() - var strUID string - for rows.Next() { - rows.Scan(&strUID) - uid = append(uid, strUID) - } - return uid, nil + return resultArr, nil } -func IsExistUser(uid string) bool { +func SelectSomeUserID(userIDList []string) ([]string, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { - return false + return nil, err } - var number int32 - err = dbConn.Raw("select count(*) from `user` where uid = ?", uid).Count(&number).Error + var userList []User + err = dbConn.Table("user").Where("(user_id) IN ? ", userIDList).Find(&userList).Error if err != nil { - return false + return nil, err } - if number != 1 { - return false - } - return true -} -func sqlStringHandle(ss []string) (s string) { - for i := 0; i < len(ss); i++ { - s += "'" + ss[i] + "'" - if i < len(ss)-1 { - s += "," - } - } - return s + return userIDList, nil } diff --git a/pkg/proto/auth/auth.pb.go b/pkg/proto/auth/auth.pb.go index 71ab5fe7a..1bc510860 100644 --- a/pkg/proto/auth/auth.pb.go +++ b/pkg/proto/auth/auth.pb.go @@ -6,6 +6,7 @@ package pbAuth // import "./auth" import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" +import sdk_ws "Open_IM/pkg/proto/sdk_ws" import ( context "golang.org/x/net/context" @@ -23,25 +24,65 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package -type UserRegisterReq struct { - UID string `protobuf:"bytes,1,opt,name=UID" json:"UID,omitempty"` - Name string `protobuf:"bytes,2,opt,name=Name" json:"Name,omitempty"` - Icon string `protobuf:"bytes,3,opt,name=Icon" json:"Icon,omitempty"` - Gender int32 `protobuf:"varint,4,opt,name=Gender" json:"Gender,omitempty"` - Mobile string `protobuf:"bytes,5,opt,name=Mobile" json:"Mobile,omitempty"` - Birth string `protobuf:"bytes,6,opt,name=Birth" json:"Birth,omitempty"` - Email string `protobuf:"bytes,7,opt,name=Email" json:"Email,omitempty"` - Ex string `protobuf:"bytes,8,opt,name=Ex" json:"Ex,omitempty"` +type CommonResp struct { + ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } +func (m *CommonResp) Reset() { *m = CommonResp{} } +func (m *CommonResp) String() string { return proto.CompactTextString(m) } +func (*CommonResp) ProtoMessage() {} +func (*CommonResp) Descriptor() ([]byte, []int) { + return fileDescriptor_auth_6e5d34ffb6edf37a, []int{0} +} +func (m *CommonResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CommonResp.Unmarshal(m, b) +} +func (m *CommonResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CommonResp.Marshal(b, m, deterministic) +} +func (dst *CommonResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_CommonResp.Merge(dst, src) +} +func (m *CommonResp) XXX_Size() int { + return xxx_messageInfo_CommonResp.Size(m) +} +func (m *CommonResp) XXX_DiscardUnknown() { + xxx_messageInfo_CommonResp.DiscardUnknown(m) +} + +var xxx_messageInfo_CommonResp proto.InternalMessageInfo + +func (m *CommonResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *CommonResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + +type UserRegisterReq struct { + UserInfo *sdk_ws.UserInfo `protobuf:"bytes,1,opt,name=UserInfo" json:"UserInfo,omitempty"` + OperationID string `protobuf:"bytes,2,opt,name=OperationID" json:"OperationID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + func (m *UserRegisterReq) Reset() { *m = UserRegisterReq{} } func (m *UserRegisterReq) String() string { return proto.CompactTextString(m) } func (*UserRegisterReq) ProtoMessage() {} func (*UserRegisterReq) Descriptor() ([]byte, []int) { - return fileDescriptor_auth_d2199f7b1388fd2f, []int{0} + return fileDescriptor_auth_6e5d34ffb6edf37a, []int{1} } func (m *UserRegisterReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserRegisterReq.Unmarshal(m, b) @@ -61,74 +102,32 @@ func (m *UserRegisterReq) XXX_DiscardUnknown() { var xxx_messageInfo_UserRegisterReq proto.InternalMessageInfo -func (m *UserRegisterReq) GetUID() string { +func (m *UserRegisterReq) GetUserInfo() *sdk_ws.UserInfo { if m != nil { - return m.UID + return m.UserInfo } - return "" + return nil } -func (m *UserRegisterReq) GetName() string { +func (m *UserRegisterReq) GetOperationID() string { if m != nil { - return m.Name - } - return "" -} - -func (m *UserRegisterReq) GetIcon() string { - if m != nil { - return m.Icon - } - return "" -} - -func (m *UserRegisterReq) GetGender() int32 { - if m != nil { - return m.Gender - } - return 0 -} - -func (m *UserRegisterReq) GetMobile() string { - if m != nil { - return m.Mobile - } - return "" -} - -func (m *UserRegisterReq) GetBirth() string { - if m != nil { - return m.Birth - } - return "" -} - -func (m *UserRegisterReq) GetEmail() string { - if m != nil { - return m.Email - } - return "" -} - -func (m *UserRegisterReq) GetEx() string { - if m != nil { - return m.Ex + return m.OperationID } return "" } type UserRegisterResp struct { - Success bool `protobuf:"varint,1,opt,name=Success" json:"Success,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + CommonResp *CommonResp `protobuf:"bytes,1,opt,name=CommonResp" json:"CommonResp,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *UserRegisterResp) Reset() { *m = UserRegisterResp{} } func (m *UserRegisterResp) String() string { return proto.CompactTextString(m) } func (*UserRegisterResp) ProtoMessage() {} func (*UserRegisterResp) Descriptor() ([]byte, []int) { - return fileDescriptor_auth_d2199f7b1388fd2f, []int{1} + return fileDescriptor_auth_6e5d34ffb6edf37a, []int{2} } func (m *UserRegisterResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserRegisterResp.Unmarshal(m, b) @@ -148,16 +147,18 @@ func (m *UserRegisterResp) XXX_DiscardUnknown() { var xxx_messageInfo_UserRegisterResp proto.InternalMessageInfo -func (m *UserRegisterResp) GetSuccess() bool { +func (m *UserRegisterResp) GetCommonResp() *CommonResp { if m != nil { - return m.Success + return m.CommonResp } - return false + return nil } type UserTokenReq struct { Platform int32 `protobuf:"varint,1,opt,name=Platform" json:"Platform,omitempty"` - UID string `protobuf:"bytes,2,opt,name=UID" json:"UID,omitempty"` + FromUserID string `protobuf:"bytes,2,opt,name=FromUserID" json:"FromUserID,omitempty"` + OpUserID string `protobuf:"bytes,3,opt,name=OpUserID" json:"OpUserID,omitempty"` + OperationID string `protobuf:"bytes,4,opt,name=OperationID" json:"OperationID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -167,7 +168,7 @@ func (m *UserTokenReq) Reset() { *m = UserTokenReq{} } func (m *UserTokenReq) String() string { return proto.CompactTextString(m) } func (*UserTokenReq) ProtoMessage() {} func (*UserTokenReq) Descriptor() ([]byte, []int) { - return fileDescriptor_auth_d2199f7b1388fd2f, []int{2} + return fileDescriptor_auth_6e5d34ffb6edf37a, []int{3} } func (m *UserTokenReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserTokenReq.Unmarshal(m, b) @@ -194,28 +195,41 @@ func (m *UserTokenReq) GetPlatform() int32 { return 0 } -func (m *UserTokenReq) GetUID() string { +func (m *UserTokenReq) GetFromUserID() string { if m != nil { - return m.UID + return m.FromUserID + } + return "" +} + +func (m *UserTokenReq) GetOpUserID() string { + if m != nil { + return m.OpUserID + } + return "" +} + +func (m *UserTokenReq) GetOperationID() string { + if m != nil { + return m.OperationID } return "" } type UserTokenResp struct { - ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` - ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` - Token string `protobuf:"bytes,3,opt,name=Token" json:"Token,omitempty"` - ExpiredTime int64 `protobuf:"varint,4,opt,name=ExpiredTime" json:"ExpiredTime,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + CommonResp *CommonResp `protobuf:"bytes,1,opt,name=CommonResp" json:"CommonResp,omitempty"` + Token string `protobuf:"bytes,2,opt,name=Token" json:"Token,omitempty"` + ExpiredTime int64 `protobuf:"varint,3,opt,name=ExpiredTime" json:"ExpiredTime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *UserTokenResp) Reset() { *m = UserTokenResp{} } func (m *UserTokenResp) String() string { return proto.CompactTextString(m) } func (*UserTokenResp) ProtoMessage() {} func (*UserTokenResp) Descriptor() ([]byte, []int) { - return fileDescriptor_auth_d2199f7b1388fd2f, []int{3} + return fileDescriptor_auth_6e5d34ffb6edf37a, []int{4} } func (m *UserTokenResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserTokenResp.Unmarshal(m, b) @@ -235,18 +249,11 @@ func (m *UserTokenResp) XXX_DiscardUnknown() { var xxx_messageInfo_UserTokenResp proto.InternalMessageInfo -func (m *UserTokenResp) GetErrCode() int32 { +func (m *UserTokenResp) GetCommonResp() *CommonResp { if m != nil { - return m.ErrCode + return m.CommonResp } - return 0 -} - -func (m *UserTokenResp) GetErrMsg() string { - if m != nil { - return m.ErrMsg - } - return "" + return nil } func (m *UserTokenResp) GetToken() string { @@ -264,6 +271,7 @@ func (m *UserTokenResp) GetExpiredTime() int64 { } func init() { + proto.RegisterType((*CommonResp)(nil), "pbAuth.CommonResp") proto.RegisterType((*UserRegisterReq)(nil), "pbAuth.UserRegisterReq") proto.RegisterType((*UserRegisterResp)(nil), "pbAuth.UserRegisterResp") proto.RegisterType((*UserTokenReq)(nil), "pbAuth.UserTokenReq") @@ -375,30 +383,31 @@ var _Auth_serviceDesc = grpc.ServiceDesc{ Metadata: "auth/auth.proto", } -func init() { proto.RegisterFile("auth/auth.proto", fileDescriptor_auth_d2199f7b1388fd2f) } +func init() { proto.RegisterFile("auth/auth.proto", fileDescriptor_auth_6e5d34ffb6edf37a) } -var fileDescriptor_auth_d2199f7b1388fd2f = []byte{ - // 348 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0x41, 0x4f, 0xf2, 0x40, - 0x10, 0x86, 0xd3, 0x42, 0x0b, 0xcc, 0xf7, 0x21, 0x64, 0x82, 0xba, 0xe1, 0x44, 0x7a, 0xe2, 0x60, - 0x6a, 0xa2, 0x17, 0x13, 0xbd, 0x80, 0x36, 0x86, 0x03, 0xc6, 0x54, 0xb8, 0x78, 0x2b, 0xb0, 0x42, - 0x23, 0x65, 0xeb, 0x6e, 0x49, 0xf0, 0xec, 0x8f, 0xf2, 0xef, 0x99, 0x9d, 0xdd, 0x12,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8a, 0xa4, 0xbc, 0x17, 0x0b, 0x6e, 0xab, 0x4b, 0xa9, 0xad, 0x46, 0x52, 0x8e, 0xd5, 0xd2, - 0xd6, 0x5b, 0xa5, 0x4d, 0x51, 0xb9, 0xed, 0x97, 0x11, 0xd8, 0x83, 0x7f, 0xd1, 0x2e, 0x4f, 0x25, - 0x5f, 0x4c, 0xd2, 0x8c, 0x53, 0xd7, 0x2a, 0xf1, 0x21, 0xba, 0xfa, 0x72, 0xa0, 0xaa, 0x27, 0x85, - 0x03, 0xe3, 0xa0, 0xf4, 0x8b, 0xe7, 0xa1, 0x19, 0x61, 0xf8, 0x67, 0x7c, 0x5d, 0x76, 0xfc, 0x40, - 0xe5, 0x78, 0x03, 0x8d, 0xbd, 0x0d, 0xec, 0x1c, 0xa6, 0x95, 0x7d, 0xe9, 0x9e, 0x1e, 0xa1, 0x2a, - 0x1f, 0xb6, 0x5e, 0x9b, 0x21, 0xad, 0xcf, 0xad, 0x39, 0x9e, 0xf9, 0xb4, 0x46, 0xd7, 0x3f, 0x01, - 0x00, 0x00, 0xff, 0xff, 0x15, 0x5d, 0xc8, 0xb6, 0x59, 0x02, 0x00, 0x00, +var fileDescriptor_auth_6e5d34ffb6edf37a = []byte{ + // 362 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x52, 0x4d, 0x4f, 0xc2, 0x40, + 0x14, 0x4c, 0xe5, 0x43, 0x78, 0x48, 0x30, 0x2f, 0xa0, 0x4d, 0x0f, 0x06, 0x7b, 0xe2, 0xd4, 0x46, + 0xbc, 0x98, 0x98, 0x98, 0x20, 0x4a, 0xc2, 0x81, 0x60, 0x1a, 0xbc, 0x78, 0x21, 0x90, 0x2e, 0xd0, + 0xd4, 0x76, 0xd7, 0xdd, 0x12, 0x4c, 0x3c, 0x7a, 0xf1, 0x67, 0x9b, 0xdd, 0x7e, 0xb8, 0x22, 0x27, + 0x2f, 0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 0x23, 0x15, 0x33, 0x4f, 0xa5, 0x31, 0xf2, 0xdb, + 0x29, 0xcb, 0xd4, 0x92, 0x52, 0x0b, 0xbc, 0x5f, 0xa9, 0xfc, 0xb7, 0xd2, 0x07, 0x34, 0xb5, 0x24, + 0xff, 0xeb, 0x83, 0x6d, 0xa8, 0xa8, 0x05, 0x59, 0xba, 0x14, 0x48, 0xf3, 0xc7, 0x77, 0x16, 0x70, + 0xe2, 0xcf, 0x82, 0x88, 0xa8, 0x6c, 0x25, 0x4f, 0xa7, 0xfa, 0x9f, 0x06, 0x94, 0xe5, 0x5e, 0x1c, + 0xa4, 0xe7, 0x91, 0x1f, 0x2c, 0x9e, 0xe7, 0x86, 0x7b, 0xbf, 0xd5, 0x32, 0x0f, 0x0b, 0x82, 0xe1, + 0x0d, 0xd4, 0x8b, 0x22, 0xd8, 0xd6, 0xc7, 0xf2, 0x53, 0xb6, 0x3a, 0x07, 0x58, 0xc1, 0xee, 0x5b, + 0x2f, 0x4d, 0x47, 0x5d, 0xdc, 0xdb, 0x54, 0x5e, 0x56, 0xd5, 0xad, 0xbc, 0xfe, 0x0e, 0x00, 0x00, + 0xff, 0xff, 0x8c, 0xd6, 0x72, 0x1f, 0xd3, 0x02, 0x00, 0x00, } diff --git a/pkg/proto/auth/auth.proto b/pkg/proto/auth/auth.proto index 21b82ff40..592c4987e 100644 --- a/pkg/proto/auth/auth.proto +++ b/pkg/proto/auth/auth.proto @@ -1,33 +1,34 @@ syntax = "proto3"; +import "Open_IM/pkg/proto/sdk_ws/ws.proto"; package pbAuth; option go_package = "./auth;pbAuth"; -message UserRegisterReq { - string UID = 1; - string Name = 2; - string Icon = 3; - int32 Gender = 4; - string Mobile = 5; - string Birth = 6; - string Email = 7; - string Ex = 8; +message CommonResp{ + int32 errCode = 1; + string errMsg = 2; } -message UserRegisterResp { - bool Success = 1; +message UserRegisterReq { + open_im_sdk.UserInfo UserInfo = 1; + string OperationID = 2; } +message UserRegisterResp { + CommonResp CommonResp = 1; +} + message UserTokenReq { int32 Platform = 1; - string UID = 2; + string FromUserID = 2; + string OpUserID = 3; + string OperationID = 4; +} +message UserTokenResp { + CommonResp CommonResp = 1; + string Token = 2; + int64 ExpiredTime = 3; } -message UserTokenResp { - int32 ErrCode = 1; - string ErrMsg = 2; - string Token = 3; - int64 ExpiredTime = 4; -} service Auth { rpc UserRegister(UserRegisterReq) returns(UserRegisterResp); diff --git a/pkg/proto/user/user.pb.go b/pkg/proto/user/user.pb.go index 7a6744c06..e81e474a9 100644 --- a/pkg/proto/user/user.pb.go +++ b/pkg/proto/user/user.pb.go @@ -6,6 +6,7 @@ package user // import "./user" import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" +import sdk_ws "Open_IM/pkg/proto/sdk_ws" import ( context "golang.org/x/net/context" @@ -24,8 +25,8 @@ var _ = math.Inf const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type CommonResp struct { - ErrorCode int32 `protobuf:"varint,1,opt,name=errorCode" json:"errorCode,omitempty"` - ErrorMsg string `protobuf:"bytes,2,opt,name=errorMsg" json:"errorMsg,omitempty"` + ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -35,7 +36,7 @@ func (m *CommonResp) Reset() { *m = CommonResp{} } func (m *CommonResp) String() string { return proto.CompactTextString(m) } func (*CommonResp) ProtoMessage() {} func (*CommonResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_04b52567a288fdb7, []int{0} + return fileDescriptor_user_119cb27841530cfa, []int{0} } func (m *CommonResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CommonResp.Unmarshal(m, b) @@ -55,23 +56,77 @@ func (m *CommonResp) XXX_DiscardUnknown() { var xxx_messageInfo_CommonResp proto.InternalMessageInfo -func (m *CommonResp) GetErrorCode() int32 { +func (m *CommonResp) GetErrCode() int32 { if m != nil { - return m.ErrorCode + return m.ErrCode } return 0 } -func (m *CommonResp) GetErrorMsg() string { +func (m *CommonResp) GetErrMsg() string { if m != nil { - return m.ErrorMsg + return m.ErrMsg + } + return "" +} + +type DeleteUsersReq struct { + DeleteUserIDList []string `protobuf:"bytes,2,rep,name=DeleteUserIDList" json:"DeleteUserIDList,omitempty"` + OpUserID string `protobuf:"bytes,3,opt,name=OpUserID" json:"OpUserID,omitempty"` + OperationID string `protobuf:"bytes,4,opt,name=OperationID" json:"OperationID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeleteUsersReq) Reset() { *m = DeleteUsersReq{} } +func (m *DeleteUsersReq) String() string { return proto.CompactTextString(m) } +func (*DeleteUsersReq) ProtoMessage() {} +func (*DeleteUsersReq) Descriptor() ([]byte, []int) { + return fileDescriptor_user_119cb27841530cfa, []int{1} +} +func (m *DeleteUsersReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeleteUsersReq.Unmarshal(m, b) +} +func (m *DeleteUsersReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeleteUsersReq.Marshal(b, m, deterministic) +} +func (dst *DeleteUsersReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteUsersReq.Merge(dst, src) +} +func (m *DeleteUsersReq) XXX_Size() int { + return xxx_messageInfo_DeleteUsersReq.Size(m) +} +func (m *DeleteUsersReq) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteUsersReq.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteUsersReq proto.InternalMessageInfo + +func (m *DeleteUsersReq) GetDeleteUserIDList() []string { + if m != nil { + return m.DeleteUserIDList + } + return nil +} + +func (m *DeleteUsersReq) GetOpUserID() string { + if m != nil { + return m.OpUserID + } + return "" +} + +func (m *DeleteUsersReq) GetOperationID() string { + if m != nil { + return m.OperationID } return "" } type DeleteUsersResp struct { - CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` - FailedUidList []string `protobuf:"bytes,2,rep,name=failedUidList" json:"failedUidList,omitempty"` + CommonResp *CommonResp `protobuf:"bytes,1,opt,name=CommonResp" json:"CommonResp,omitempty"` + FailedUserIDList []string `protobuf:"bytes,2,rep,name=FailedUserIDList" json:"FailedUserIDList,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -81,7 +136,7 @@ func (m *DeleteUsersResp) Reset() { *m = DeleteUsersResp{} } func (m *DeleteUsersResp) String() string { return proto.CompactTextString(m) } func (*DeleteUsersResp) ProtoMessage() {} func (*DeleteUsersResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_04b52567a288fdb7, []int{1} + return fileDescriptor_user_119cb27841530cfa, []int{2} } func (m *DeleteUsersResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteUsersResp.Unmarshal(m, b) @@ -108,163 +163,109 @@ func (m *DeleteUsersResp) GetCommonResp() *CommonResp { return nil } -func (m *DeleteUsersResp) GetFailedUidList() []string { +func (m *DeleteUsersResp) GetFailedUserIDList() []string { if m != nil { - return m.FailedUidList + return m.FailedUserIDList } return nil } -type DeleteUsersReq struct { - DeleteUidList []string `protobuf:"bytes,2,rep,name=deleteUidList" json:"deleteUidList,omitempty"` - Token string `protobuf:"bytes,3,opt,name=token" json:"token,omitempty"` - OperationID string `protobuf:"bytes,4,opt,name=OperationID" json:"OperationID,omitempty"` +type GetAllUserIDReq struct { + OpUserID string `protobuf:"bytes,1,opt,name=opUserID" json:"opUserID,omitempty"` + OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *DeleteUsersReq) Reset() { *m = DeleteUsersReq{} } -func (m *DeleteUsersReq) String() string { return proto.CompactTextString(m) } -func (*DeleteUsersReq) ProtoMessage() {} -func (*DeleteUsersReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_04b52567a288fdb7, []int{2} +func (m *GetAllUserIDReq) Reset() { *m = GetAllUserIDReq{} } +func (m *GetAllUserIDReq) String() string { return proto.CompactTextString(m) } +func (*GetAllUserIDReq) ProtoMessage() {} +func (*GetAllUserIDReq) Descriptor() ([]byte, []int) { + return fileDescriptor_user_119cb27841530cfa, []int{3} } -func (m *DeleteUsersReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteUsersReq.Unmarshal(m, b) +func (m *GetAllUserIDReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetAllUserIDReq.Unmarshal(m, b) } -func (m *DeleteUsersReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteUsersReq.Marshal(b, m, deterministic) +func (m *GetAllUserIDReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetAllUserIDReq.Marshal(b, m, deterministic) } -func (dst *DeleteUsersReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteUsersReq.Merge(dst, src) +func (dst *GetAllUserIDReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetAllUserIDReq.Merge(dst, src) } -func (m *DeleteUsersReq) XXX_Size() int { - return xxx_messageInfo_DeleteUsersReq.Size(m) +func (m *GetAllUserIDReq) XXX_Size() int { + return xxx_messageInfo_GetAllUserIDReq.Size(m) } -func (m *DeleteUsersReq) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteUsersReq.DiscardUnknown(m) +func (m *GetAllUserIDReq) XXX_DiscardUnknown() { + xxx_messageInfo_GetAllUserIDReq.DiscardUnknown(m) } -var xxx_messageInfo_DeleteUsersReq proto.InternalMessageInfo +var xxx_messageInfo_GetAllUserIDReq proto.InternalMessageInfo -func (m *DeleteUsersReq) GetDeleteUidList() []string { +func (m *GetAllUserIDReq) GetOpUserID() string { if m != nil { - return m.DeleteUidList - } - return nil -} - -func (m *DeleteUsersReq) GetToken() string { - if m != nil { - return m.Token + return m.OpUserID } return "" } -func (m *DeleteUsersReq) GetOperationID() string { +func (m *GetAllUserIDReq) GetOperationID() string { if m != nil { return m.OperationID } return "" } -type GetAllUsersUidReq struct { - Token string `protobuf:"bytes,2,opt,name=token" json:"token,omitempty"` - OperationID string `protobuf:"bytes,3,opt,name=operationID" json:"operationID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetAllUsersUidReq) Reset() { *m = GetAllUsersUidReq{} } -func (m *GetAllUsersUidReq) String() string { return proto.CompactTextString(m) } -func (*GetAllUsersUidReq) ProtoMessage() {} -func (*GetAllUsersUidReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_04b52567a288fdb7, []int{3} -} -func (m *GetAllUsersUidReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetAllUsersUidReq.Unmarshal(m, b) -} -func (m *GetAllUsersUidReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetAllUsersUidReq.Marshal(b, m, deterministic) -} -func (dst *GetAllUsersUidReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetAllUsersUidReq.Merge(dst, src) -} -func (m *GetAllUsersUidReq) XXX_Size() int { - return xxx_messageInfo_GetAllUsersUidReq.Size(m) -} -func (m *GetAllUsersUidReq) XXX_DiscardUnknown() { - xxx_messageInfo_GetAllUsersUidReq.DiscardUnknown(m) -} - -var xxx_messageInfo_GetAllUsersUidReq proto.InternalMessageInfo - -func (m *GetAllUsersUidReq) GetToken() string { - if m != nil { - return m.Token - } - return "" -} - -func (m *GetAllUsersUidReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - -type GetAllUsersUidResp struct { - CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` - UidList []string `protobuf:"bytes,2,rep,name=uidList" json:"uidList,omitempty"` +type GetAllUserIDResp struct { + CommonResp *CommonResp `protobuf:"bytes,1,opt,name=CommonResp" json:"CommonResp,omitempty"` + UserIDList []string `protobuf:"bytes,2,rep,name=UserIDList" json:"UserIDList,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *GetAllUsersUidResp) Reset() { *m = GetAllUsersUidResp{} } -func (m *GetAllUsersUidResp) String() string { return proto.CompactTextString(m) } -func (*GetAllUsersUidResp) ProtoMessage() {} -func (*GetAllUsersUidResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_04b52567a288fdb7, []int{4} +func (m *GetAllUserIDResp) Reset() { *m = GetAllUserIDResp{} } +func (m *GetAllUserIDResp) String() string { return proto.CompactTextString(m) } +func (*GetAllUserIDResp) ProtoMessage() {} +func (*GetAllUserIDResp) Descriptor() ([]byte, []int) { + return fileDescriptor_user_119cb27841530cfa, []int{4} } -func (m *GetAllUsersUidResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetAllUsersUidResp.Unmarshal(m, b) +func (m *GetAllUserIDResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetAllUserIDResp.Unmarshal(m, b) } -func (m *GetAllUsersUidResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetAllUsersUidResp.Marshal(b, m, deterministic) +func (m *GetAllUserIDResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetAllUserIDResp.Marshal(b, m, deterministic) } -func (dst *GetAllUsersUidResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetAllUsersUidResp.Merge(dst, src) +func (dst *GetAllUserIDResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetAllUserIDResp.Merge(dst, src) } -func (m *GetAllUsersUidResp) XXX_Size() int { - return xxx_messageInfo_GetAllUsersUidResp.Size(m) +func (m *GetAllUserIDResp) XXX_Size() int { + return xxx_messageInfo_GetAllUserIDResp.Size(m) } -func (m *GetAllUsersUidResp) XXX_DiscardUnknown() { - xxx_messageInfo_GetAllUsersUidResp.DiscardUnknown(m) +func (m *GetAllUserIDResp) XXX_DiscardUnknown() { + xxx_messageInfo_GetAllUserIDResp.DiscardUnknown(m) } -var xxx_messageInfo_GetAllUsersUidResp proto.InternalMessageInfo +var xxx_messageInfo_GetAllUserIDResp proto.InternalMessageInfo -func (m *GetAllUsersUidResp) GetCommonResp() *CommonResp { +func (m *GetAllUserIDResp) GetCommonResp() *CommonResp { if m != nil { return m.CommonResp } return nil } -func (m *GetAllUsersUidResp) GetUidList() []string { +func (m *GetAllUserIDResp) GetUserIDList() []string { if m != nil { - return m.UidList + return m.UserIDList } return nil } type AccountCheckReq struct { - UidList []string `protobuf:"bytes,1,rep,name=uidList" json:"uidList,omitempty"` - Token string `protobuf:"bytes,2,opt,name=token" json:"token,omitempty"` - OperationID string `protobuf:"bytes,3,opt,name=operationID" json:"operationID,omitempty"` + CheckUserIDList []string `protobuf:"bytes,1,rep,name=CheckUserIDList" json:"CheckUserIDList,omitempty"` + OpUserID string `protobuf:"bytes,2,opt,name=OpUserID" json:"OpUserID,omitempty"` + OperationID string `protobuf:"bytes,3,opt,name=OperationID" json:"OperationID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -274,7 +275,7 @@ func (m *AccountCheckReq) Reset() { *m = AccountCheckReq{} } func (m *AccountCheckReq) String() string { return proto.CompactTextString(m) } func (*AccountCheckReq) ProtoMessage() {} func (*AccountCheckReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_04b52567a288fdb7, []int{5} + return fileDescriptor_user_119cb27841530cfa, []int{5} } func (m *AccountCheckReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AccountCheckReq.Unmarshal(m, b) @@ -294,16 +295,16 @@ func (m *AccountCheckReq) XXX_DiscardUnknown() { var xxx_messageInfo_AccountCheckReq proto.InternalMessageInfo -func (m *AccountCheckReq) GetUidList() []string { +func (m *AccountCheckReq) GetCheckUserIDList() []string { if m != nil { - return m.UidList + return m.CheckUserIDList } return nil } -func (m *AccountCheckReq) GetToken() string { +func (m *AccountCheckReq) GetOpUserID() string { if m != nil { - return m.Token + return m.OpUserID } return "" } @@ -317,7 +318,7 @@ func (m *AccountCheckReq) GetOperationID() string { type AccountCheckResp struct { CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` - Result []*AccountCheckResp_SingleUserStatus `protobuf:"bytes,2,rep,name=result" json:"result,omitempty"` + ResultList []*AccountCheckResp_SingleUserStatus `protobuf:"bytes,2,rep,name=ResultList" json:"ResultList,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -327,7 +328,7 @@ func (m *AccountCheckResp) Reset() { *m = AccountCheckResp{} } func (m *AccountCheckResp) String() string { return proto.CompactTextString(m) } func (*AccountCheckResp) ProtoMessage() {} func (*AccountCheckResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_04b52567a288fdb7, []int{6} + return fileDescriptor_user_119cb27841530cfa, []int{6} } func (m *AccountCheckResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AccountCheckResp.Unmarshal(m, b) @@ -354,9 +355,9 @@ func (m *AccountCheckResp) GetCommonResp() *CommonResp { return nil } -func (m *AccountCheckResp) GetResult() []*AccountCheckResp_SingleUserStatus { +func (m *AccountCheckResp) GetResultList() []*AccountCheckResp_SingleUserStatus { if m != nil { - return m.Result + return m.ResultList } return nil } @@ -373,7 +374,7 @@ func (m *AccountCheckResp_SingleUserStatus) Reset() { *m = AccountCheckR func (m *AccountCheckResp_SingleUserStatus) String() string { return proto.CompactTextString(m) } func (*AccountCheckResp_SingleUserStatus) ProtoMessage() {} func (*AccountCheckResp_SingleUserStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_user_04b52567a288fdb7, []int{6, 0} + return fileDescriptor_user_119cb27841530cfa, []int{6, 0} } func (m *AccountCheckResp_SingleUserStatus) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AccountCheckResp_SingleUserStatus.Unmarshal(m, b) @@ -409,7 +410,7 @@ func (m *AccountCheckResp_SingleUserStatus) GetAccountStatus() string { type GetUserInfoReq struct { UserIDList []string `protobuf:"bytes,1,rep,name=userIDList" json:"userIDList,omitempty"` - Token string `protobuf:"bytes,2,opt,name=token" json:"token,omitempty"` + OpUserID string `protobuf:"bytes,2,opt,name=OpUserID" json:"OpUserID,omitempty"` OperationID string `protobuf:"bytes,3,opt,name=OperationID" json:"OperationID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -420,7 +421,7 @@ func (m *GetUserInfoReq) Reset() { *m = GetUserInfoReq{} } func (m *GetUserInfoReq) String() string { return proto.CompactTextString(m) } func (*GetUserInfoReq) ProtoMessage() {} func (*GetUserInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_04b52567a288fdb7, []int{7} + return fileDescriptor_user_119cb27841530cfa, []int{7} } func (m *GetUserInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUserInfoReq.Unmarshal(m, b) @@ -447,9 +448,9 @@ func (m *GetUserInfoReq) GetUserIDList() []string { return nil } -func (m *GetUserInfoReq) GetToken() string { +func (m *GetUserInfoReq) GetOpUserID() string { if m != nil { - return m.Token + return m.OpUserID } return "" } @@ -462,19 +463,18 @@ func (m *GetUserInfoReq) GetOperationID() string { } type GetUserInfoResp struct { - ErrorCode int32 `protobuf:"varint,1,opt,name=errorCode" json:"errorCode,omitempty"` - ErrorMsg string `protobuf:"bytes,2,opt,name=errorMsg" json:"errorMsg,omitempty"` - Data []*UserInfo `protobuf:"bytes,3,rep,name=Data" json:"Data,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` + UserInfoList []*sdk_ws.UserInfo `protobuf:"bytes,3,rep,name=UserInfoList" json:"UserInfoList,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GetUserInfoResp) Reset() { *m = GetUserInfoResp{} } func (m *GetUserInfoResp) String() string { return proto.CompactTextString(m) } func (*GetUserInfoResp) ProtoMessage() {} func (*GetUserInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_04b52567a288fdb7, []int{8} + return fileDescriptor_user_119cb27841530cfa, []int{8} } func (m *GetUserInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUserInfoResp.Unmarshal(m, b) @@ -494,188 +494,34 @@ func (m *GetUserInfoResp) XXX_DiscardUnknown() { var xxx_messageInfo_GetUserInfoResp proto.InternalMessageInfo -func (m *GetUserInfoResp) GetErrorCode() int32 { +func (m *GetUserInfoResp) GetCommonResp() *CommonResp { if m != nil { - return m.ErrorCode - } - return 0 -} - -func (m *GetUserInfoResp) GetErrorMsg() string { - if m != nil { - return m.ErrorMsg - } - return "" -} - -func (m *GetUserInfoResp) GetData() []*UserInfo { - if m != nil { - return m.Data + return m.CommonResp } return nil } -type UserInfo struct { - Uid string `protobuf:"bytes,1,opt,name=uid" json:"uid,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` - Icon string `protobuf:"bytes,3,opt,name=icon" json:"icon,omitempty"` - Gender int32 `protobuf:"varint,4,opt,name=gender" json:"gender,omitempty"` - Mobile string `protobuf:"bytes,5,opt,name=mobile" json:"mobile,omitempty"` - Birth string `protobuf:"bytes,6,opt,name=birth" json:"birth,omitempty"` - Email string `protobuf:"bytes,7,opt,name=email" json:"email,omitempty"` - Ex string `protobuf:"bytes,8,opt,name=ex" json:"ex,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *UserInfo) Reset() { *m = UserInfo{} } -func (m *UserInfo) String() string { return proto.CompactTextString(m) } -func (*UserInfo) ProtoMessage() {} -func (*UserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_user_04b52567a288fdb7, []int{9} -} -func (m *UserInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UserInfo.Unmarshal(m, b) -} -func (m *UserInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UserInfo.Marshal(b, m, deterministic) -} -func (dst *UserInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_UserInfo.Merge(dst, src) -} -func (m *UserInfo) XXX_Size() int { - return xxx_messageInfo_UserInfo.Size(m) -} -func (m *UserInfo) XXX_DiscardUnknown() { - xxx_messageInfo_UserInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_UserInfo proto.InternalMessageInfo - -func (m *UserInfo) GetUid() string { +func (m *GetUserInfoResp) GetUserInfoList() []*sdk_ws.UserInfo { if m != nil { - return m.Uid + return m.UserInfoList } - return "" -} - -func (m *UserInfo) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *UserInfo) GetIcon() string { - if m != nil { - return m.Icon - } - return "" -} - -func (m *UserInfo) GetGender() int32 { - if m != nil { - return m.Gender - } - return 0 -} - -func (m *UserInfo) GetMobile() string { - if m != nil { - return m.Mobile - } - return "" -} - -func (m *UserInfo) GetBirth() string { - if m != nil { - return m.Birth - } - return "" -} - -func (m *UserInfo) GetEmail() string { - if m != nil { - return m.Email - } - return "" -} - -func (m *UserInfo) GetEx() string { - if m != nil { - return m.Ex - } - return "" -} - -type LogoutReq struct { - OperationID string `protobuf:"bytes,1,opt,name=OperationID" json:"OperationID,omitempty"` - Token string `protobuf:"bytes,2,opt,name=token" json:"token,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LogoutReq) Reset() { *m = LogoutReq{} } -func (m *LogoutReq) String() string { return proto.CompactTextString(m) } -func (*LogoutReq) ProtoMessage() {} -func (*LogoutReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_04b52567a288fdb7, []int{10} -} -func (m *LogoutReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LogoutReq.Unmarshal(m, b) -} -func (m *LogoutReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LogoutReq.Marshal(b, m, deterministic) -} -func (dst *LogoutReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogoutReq.Merge(dst, src) -} -func (m *LogoutReq) XXX_Size() int { - return xxx_messageInfo_LogoutReq.Size(m) -} -func (m *LogoutReq) XXX_DiscardUnknown() { - xxx_messageInfo_LogoutReq.DiscardUnknown(m) -} - -var xxx_messageInfo_LogoutReq proto.InternalMessageInfo - -func (m *LogoutReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - -func (m *LogoutReq) GetToken() string { - if m != nil { - return m.Token - } - return "" + return nil } type UpdateUserInfoReq struct { - Icon string `protobuf:"bytes,1,opt,name=icon" json:"icon,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` - Gender int32 `protobuf:"varint,3,opt,name=gender" json:"gender,omitempty"` - Mobile string `protobuf:"bytes,4,opt,name=mobile" json:"mobile,omitempty"` - Birth string `protobuf:"bytes,5,opt,name=birth" json:"birth,omitempty"` - Email string `protobuf:"bytes,6,opt,name=email" json:"email,omitempty"` - Ex string `protobuf:"bytes,7,opt,name=ex" json:"ex,omitempty"` - Token string `protobuf:"bytes,8,opt,name=token" json:"token,omitempty"` - OperationID string `protobuf:"bytes,9,opt,name=OperationID" json:"OperationID,omitempty"` - Uid string `protobuf:"bytes,10,opt,name=Uid" json:"Uid,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + UserInfo *sdk_ws.UserInfo `protobuf:"bytes,1,opt,name=UserInfo" json:"UserInfo,omitempty"` + OpUserID string `protobuf:"bytes,2,opt,name=OpUserID" json:"OpUserID,omitempty"` + OperationID string `protobuf:"bytes,3,opt,name=operationID" json:"operationID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *UpdateUserInfoReq) Reset() { *m = UpdateUserInfoReq{} } func (m *UpdateUserInfoReq) String() string { return proto.CompactTextString(m) } func (*UpdateUserInfoReq) ProtoMessage() {} func (*UpdateUserInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_04b52567a288fdb7, []int{11} + return fileDescriptor_user_119cb27841530cfa, []int{9} } func (m *UpdateUserInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UpdateUserInfoReq.Unmarshal(m, b) @@ -695,58 +541,16 @@ func (m *UpdateUserInfoReq) XXX_DiscardUnknown() { var xxx_messageInfo_UpdateUserInfoReq proto.InternalMessageInfo -func (m *UpdateUserInfoReq) GetIcon() string { +func (m *UpdateUserInfoReq) GetUserInfo() *sdk_ws.UserInfo { if m != nil { - return m.Icon + return m.UserInfo } - return "" + return nil } -func (m *UpdateUserInfoReq) GetName() string { +func (m *UpdateUserInfoReq) GetOpUserID() string { if m != nil { - return m.Name - } - return "" -} - -func (m *UpdateUserInfoReq) GetGender() int32 { - if m != nil { - return m.Gender - } - return 0 -} - -func (m *UpdateUserInfoReq) GetMobile() string { - if m != nil { - return m.Mobile - } - return "" -} - -func (m *UpdateUserInfoReq) GetBirth() string { - if m != nil { - return m.Birth - } - return "" -} - -func (m *UpdateUserInfoReq) GetEmail() string { - if m != nil { - return m.Email - } - return "" -} - -func (m *UpdateUserInfoReq) GetEx() string { - if m != nil { - return m.Ex - } - return "" -} - -func (m *UpdateUserInfoReq) GetToken() string { - if m != nil { - return m.Token + return m.OpUserID } return "" } @@ -758,18 +562,50 @@ func (m *UpdateUserInfoReq) GetOperationID() string { return "" } -func (m *UpdateUserInfoReq) GetUid() string { +type UpdateUserInfoResp struct { + CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UpdateUserInfoResp) Reset() { *m = UpdateUserInfoResp{} } +func (m *UpdateUserInfoResp) String() string { return proto.CompactTextString(m) } +func (*UpdateUserInfoResp) ProtoMessage() {} +func (*UpdateUserInfoResp) Descriptor() ([]byte, []int) { + return fileDescriptor_user_119cb27841530cfa, []int{10} +} +func (m *UpdateUserInfoResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UpdateUserInfoResp.Unmarshal(m, b) +} +func (m *UpdateUserInfoResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UpdateUserInfoResp.Marshal(b, m, deterministic) +} +func (dst *UpdateUserInfoResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateUserInfoResp.Merge(dst, src) +} +func (m *UpdateUserInfoResp) XXX_Size() int { + return xxx_messageInfo_UpdateUserInfoResp.Size(m) +} +func (m *UpdateUserInfoResp) XXX_DiscardUnknown() { + xxx_messageInfo_UpdateUserInfoResp.DiscardUnknown(m) +} + +var xxx_messageInfo_UpdateUserInfoResp proto.InternalMessageInfo + +func (m *UpdateUserInfoResp) GetCommonResp() *CommonResp { if m != nil { - return m.Uid + return m.CommonResp } - return "" + return nil } type SetReceiveMessageOptReq struct { - UId string `protobuf:"bytes,1,opt,name=uId" json:"uId,omitempty"` + FromUserID string `protobuf:"bytes,1,opt,name=FromUserID" json:"FromUserID,omitempty"` Opt int32 `protobuf:"varint,2,opt,name=opt" json:"opt,omitempty"` - ConversationId []string `protobuf:"bytes,3,rep,name=conversationId" json:"conversationId,omitempty"` + ConversationIDList []string `protobuf:"bytes,3,rep,name=conversationIDList" json:"conversationIDList,omitempty"` OperationID string `protobuf:"bytes,4,opt,name=operationID" json:"operationID,omitempty"` + OpUserID string `protobuf:"bytes,5,opt,name=OpUserID" json:"OpUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -779,7 +615,7 @@ func (m *SetReceiveMessageOptReq) Reset() { *m = SetReceiveMessageOptReq func (m *SetReceiveMessageOptReq) String() string { return proto.CompactTextString(m) } func (*SetReceiveMessageOptReq) ProtoMessage() {} func (*SetReceiveMessageOptReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_04b52567a288fdb7, []int{12} + return fileDescriptor_user_119cb27841530cfa, []int{11} } func (m *SetReceiveMessageOptReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetReceiveMessageOptReq.Unmarshal(m, b) @@ -799,9 +635,9 @@ func (m *SetReceiveMessageOptReq) XXX_DiscardUnknown() { var xxx_messageInfo_SetReceiveMessageOptReq proto.InternalMessageInfo -func (m *SetReceiveMessageOptReq) GetUId() string { +func (m *SetReceiveMessageOptReq) GetFromUserID() string { if m != nil { - return m.UId + return m.FromUserID } return "" } @@ -813,9 +649,9 @@ func (m *SetReceiveMessageOptReq) GetOpt() int32 { return 0 } -func (m *SetReceiveMessageOptReq) GetConversationId() []string { +func (m *SetReceiveMessageOptReq) GetConversationIDList() []string { if m != nil { - return m.ConversationId + return m.ConversationIDList } return nil } @@ -827,110 +663,9 @@ func (m *SetReceiveMessageOptReq) GetOperationID() string { return "" } -type SetReceiveMessageOptResp struct { - ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` - ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` - OptResult []*OptResult `protobuf:"bytes,3,rep,name=optResult" json:"optResult,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SetReceiveMessageOptResp) Reset() { *m = SetReceiveMessageOptResp{} } -func (m *SetReceiveMessageOptResp) String() string { return proto.CompactTextString(m) } -func (*SetReceiveMessageOptResp) ProtoMessage() {} -func (*SetReceiveMessageOptResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_04b52567a288fdb7, []int{13} -} -func (m *SetReceiveMessageOptResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SetReceiveMessageOptResp.Unmarshal(m, b) -} -func (m *SetReceiveMessageOptResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SetReceiveMessageOptResp.Marshal(b, m, deterministic) -} -func (dst *SetReceiveMessageOptResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_SetReceiveMessageOptResp.Merge(dst, src) -} -func (m *SetReceiveMessageOptResp) XXX_Size() int { - return xxx_messageInfo_SetReceiveMessageOptResp.Size(m) -} -func (m *SetReceiveMessageOptResp) XXX_DiscardUnknown() { - xxx_messageInfo_SetReceiveMessageOptResp.DiscardUnknown(m) -} - -var xxx_messageInfo_SetReceiveMessageOptResp proto.InternalMessageInfo - -func (m *SetReceiveMessageOptResp) GetErrCode() int32 { +func (m *SetReceiveMessageOptReq) GetOpUserID() string { if m != nil { - return m.ErrCode - } - return 0 -} - -func (m *SetReceiveMessageOptResp) GetErrMsg() string { - if m != nil { - return m.ErrMsg - } - return "" -} - -func (m *SetReceiveMessageOptResp) GetOptResult() []*OptResult { - if m != nil { - return m.OptResult - } - return nil -} - -type GetReceiveMessageOptReq struct { - UId string `protobuf:"bytes,1,opt,name=uId" json:"uId,omitempty"` - ConversationId []string `protobuf:"bytes,2,rep,name=conversationId" json:"conversationId,omitempty"` - OperationID string `protobuf:"bytes,3,opt,name=operationID" json:"operationID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetReceiveMessageOptReq) Reset() { *m = GetReceiveMessageOptReq{} } -func (m *GetReceiveMessageOptReq) String() string { return proto.CompactTextString(m) } -func (*GetReceiveMessageOptReq) ProtoMessage() {} -func (*GetReceiveMessageOptReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_04b52567a288fdb7, []int{14} -} -func (m *GetReceiveMessageOptReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetReceiveMessageOptReq.Unmarshal(m, b) -} -func (m *GetReceiveMessageOptReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetReceiveMessageOptReq.Marshal(b, m, deterministic) -} -func (dst *GetReceiveMessageOptReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetReceiveMessageOptReq.Merge(dst, src) -} -func (m *GetReceiveMessageOptReq) XXX_Size() int { - return xxx_messageInfo_GetReceiveMessageOptReq.Size(m) -} -func (m *GetReceiveMessageOptReq) XXX_DiscardUnknown() { - xxx_messageInfo_GetReceiveMessageOptReq.DiscardUnknown(m) -} - -var xxx_messageInfo_GetReceiveMessageOptReq proto.InternalMessageInfo - -func (m *GetReceiveMessageOptReq) GetUId() string { - if m != nil { - return m.UId - } - return "" -} - -func (m *GetReceiveMessageOptReq) GetConversationId() []string { - if m != nil { - return m.ConversationId - } - return nil -} - -func (m *GetReceiveMessageOptReq) GetOperationID() string { - if m != nil { - return m.OperationID + return m.OpUserID } return "" } @@ -947,7 +682,7 @@ func (m *OptResult) Reset() { *m = OptResult{} } func (m *OptResult) String() string { return proto.CompactTextString(m) } func (*OptResult) ProtoMessage() {} func (*OptResult) Descriptor() ([]byte, []int) { - return fileDescriptor_user_04b52567a288fdb7, []int{15} + return fileDescriptor_user_119cb27841530cfa, []int{12} } func (m *OptResult) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OptResult.Unmarshal(m, b) @@ -981,20 +716,127 @@ func (m *OptResult) GetResult() int32 { return 0 } +type SetReceiveMessageOptResp struct { + CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` + OptResultList []*OptResult `protobuf:"bytes,2,rep,name=optResultList" json:"optResultList,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SetReceiveMessageOptResp) Reset() { *m = SetReceiveMessageOptResp{} } +func (m *SetReceiveMessageOptResp) String() string { return proto.CompactTextString(m) } +func (*SetReceiveMessageOptResp) ProtoMessage() {} +func (*SetReceiveMessageOptResp) Descriptor() ([]byte, []int) { + return fileDescriptor_user_119cb27841530cfa, []int{13} +} +func (m *SetReceiveMessageOptResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SetReceiveMessageOptResp.Unmarshal(m, b) +} +func (m *SetReceiveMessageOptResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SetReceiveMessageOptResp.Marshal(b, m, deterministic) +} +func (dst *SetReceiveMessageOptResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetReceiveMessageOptResp.Merge(dst, src) +} +func (m *SetReceiveMessageOptResp) XXX_Size() int { + return xxx_messageInfo_SetReceiveMessageOptResp.Size(m) +} +func (m *SetReceiveMessageOptResp) XXX_DiscardUnknown() { + xxx_messageInfo_SetReceiveMessageOptResp.DiscardUnknown(m) +} + +var xxx_messageInfo_SetReceiveMessageOptResp proto.InternalMessageInfo + +func (m *SetReceiveMessageOptResp) GetCommonResp() *CommonResp { + if m != nil { + return m.CommonResp + } + return nil +} + +func (m *SetReceiveMessageOptResp) GetOptResultList() []*OptResult { + if m != nil { + return m.OptResultList + } + return nil +} + +type GetReceiveMessageOptReq struct { + FromUserID string `protobuf:"bytes,1,opt,name=FromUserID" json:"FromUserID,omitempty"` + ConversationId []string `protobuf:"bytes,2,rep,name=conversationId" json:"conversationId,omitempty"` + OperationID string `protobuf:"bytes,3,opt,name=operationID" json:"operationID,omitempty"` + OpUserID string `protobuf:"bytes,4,opt,name=OpUserID" json:"OpUserID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetReceiveMessageOptReq) Reset() { *m = GetReceiveMessageOptReq{} } +func (m *GetReceiveMessageOptReq) String() string { return proto.CompactTextString(m) } +func (*GetReceiveMessageOptReq) ProtoMessage() {} +func (*GetReceiveMessageOptReq) Descriptor() ([]byte, []int) { + return fileDescriptor_user_119cb27841530cfa, []int{14} +} +func (m *GetReceiveMessageOptReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetReceiveMessageOptReq.Unmarshal(m, b) +} +func (m *GetReceiveMessageOptReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetReceiveMessageOptReq.Marshal(b, m, deterministic) +} +func (dst *GetReceiveMessageOptReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetReceiveMessageOptReq.Merge(dst, src) +} +func (m *GetReceiveMessageOptReq) XXX_Size() int { + return xxx_messageInfo_GetReceiveMessageOptReq.Size(m) +} +func (m *GetReceiveMessageOptReq) XXX_DiscardUnknown() { + xxx_messageInfo_GetReceiveMessageOptReq.DiscardUnknown(m) +} + +var xxx_messageInfo_GetReceiveMessageOptReq proto.InternalMessageInfo + +func (m *GetReceiveMessageOptReq) GetFromUserID() string { + if m != nil { + return m.FromUserID + } + return "" +} + +func (m *GetReceiveMessageOptReq) GetConversationId() []string { + if m != nil { + return m.ConversationId + } + return nil +} + +func (m *GetReceiveMessageOptReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +func (m *GetReceiveMessageOptReq) GetOpUserID() string { + if m != nil { + return m.OpUserID + } + return "" +} + type GetReceiveMessageOptResp struct { - ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` - ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` - ConversationOptResult []*OptResult `protobuf:"bytes,3,rep,name=conversationOptResult" json:"conversationOptResult,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` + ConversationOptResultList []*OptResult `protobuf:"bytes,3,rep,name=conversationOptResultList" json:"conversationOptResultList,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GetReceiveMessageOptResp) Reset() { *m = GetReceiveMessageOptResp{} } func (m *GetReceiveMessageOptResp) String() string { return proto.CompactTextString(m) } func (*GetReceiveMessageOptResp) ProtoMessage() {} func (*GetReceiveMessageOptResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_04b52567a288fdb7, []int{16} + return fileDescriptor_user_119cb27841530cfa, []int{15} } func (m *GetReceiveMessageOptResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetReceiveMessageOptResp.Unmarshal(m, b) @@ -1014,30 +856,24 @@ func (m *GetReceiveMessageOptResp) XXX_DiscardUnknown() { var xxx_messageInfo_GetReceiveMessageOptResp proto.InternalMessageInfo -func (m *GetReceiveMessageOptResp) GetErrCode() int32 { +func (m *GetReceiveMessageOptResp) GetCommonResp() *CommonResp { if m != nil { - return m.ErrCode + return m.CommonResp } - return 0 + return nil } -func (m *GetReceiveMessageOptResp) GetErrMsg() string { +func (m *GetReceiveMessageOptResp) GetConversationOptResultList() []*OptResult { if m != nil { - return m.ErrMsg - } - return "" -} - -func (m *GetReceiveMessageOptResp) GetConversationOptResult() []*OptResult { - if m != nil { - return m.ConversationOptResult + return m.ConversationOptResultList } return nil } type GetAllConversationMsgOptReq struct { - UId string `protobuf:"bytes,1,opt,name=uId" json:"uId,omitempty"` + FromUserId string `protobuf:"bytes,1,opt,name=FromUserId" json:"FromUserId,omitempty"` OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` + OpUserID string `protobuf:"bytes,3,opt,name=OpUserID" json:"OpUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1047,7 +883,7 @@ func (m *GetAllConversationMsgOptReq) Reset() { *m = GetAllConversationM func (m *GetAllConversationMsgOptReq) String() string { return proto.CompactTextString(m) } func (*GetAllConversationMsgOptReq) ProtoMessage() {} func (*GetAllConversationMsgOptReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_04b52567a288fdb7, []int{17} + return fileDescriptor_user_119cb27841530cfa, []int{16} } func (m *GetAllConversationMsgOptReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetAllConversationMsgOptReq.Unmarshal(m, b) @@ -1067,9 +903,9 @@ func (m *GetAllConversationMsgOptReq) XXX_DiscardUnknown() { var xxx_messageInfo_GetAllConversationMsgOptReq proto.InternalMessageInfo -func (m *GetAllConversationMsgOptReq) GetUId() string { +func (m *GetAllConversationMsgOptReq) GetFromUserId() string { if m != nil { - return m.UId + return m.FromUserId } return "" } @@ -1081,20 +917,26 @@ func (m *GetAllConversationMsgOptReq) GetOperationID() string { return "" } +func (m *GetAllConversationMsgOptReq) GetOpUserID() string { + if m != nil { + return m.OpUserID + } + return "" +} + type GetAllConversationMsgOptResp struct { - ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` - ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` - ConversationOptResult []*OptResult `protobuf:"bytes,3,rep,name=conversationOptResult" json:"conversationOptResult,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` + ConversationOptResultList []*OptResult `protobuf:"bytes,3,rep,name=conversationOptResultList" json:"conversationOptResultList,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GetAllConversationMsgOptResp) Reset() { *m = GetAllConversationMsgOptResp{} } func (m *GetAllConversationMsgOptResp) String() string { return proto.CompactTextString(m) } func (*GetAllConversationMsgOptResp) ProtoMessage() {} func (*GetAllConversationMsgOptResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_04b52567a288fdb7, []int{18} + return fileDescriptor_user_119cb27841530cfa, []int{17} } func (m *GetAllConversationMsgOptResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetAllConversationMsgOptResp.Unmarshal(m, b) @@ -1114,45 +956,37 @@ func (m *GetAllConversationMsgOptResp) XXX_DiscardUnknown() { var xxx_messageInfo_GetAllConversationMsgOptResp proto.InternalMessageInfo -func (m *GetAllConversationMsgOptResp) GetErrCode() int32 { +func (m *GetAllConversationMsgOptResp) GetCommonResp() *CommonResp { if m != nil { - return m.ErrCode + return m.CommonResp } - return 0 + return nil } -func (m *GetAllConversationMsgOptResp) GetErrMsg() string { +func (m *GetAllConversationMsgOptResp) GetConversationOptResultList() []*OptResult { if m != nil { - return m.ErrMsg - } - return "" -} - -func (m *GetAllConversationMsgOptResp) GetConversationOptResult() []*OptResult { - if m != nil { - return m.ConversationOptResult + return m.ConversationOptResultList } return nil } func init() { proto.RegisterType((*CommonResp)(nil), "user.CommonResp") - proto.RegisterType((*DeleteUsersResp)(nil), "user.DeleteUsersResp") proto.RegisterType((*DeleteUsersReq)(nil), "user.DeleteUsersReq") - proto.RegisterType((*GetAllUsersUidReq)(nil), "user.GetAllUsersUidReq") - proto.RegisterType((*GetAllUsersUidResp)(nil), "user.GetAllUsersUidResp") + proto.RegisterType((*DeleteUsersResp)(nil), "user.DeleteUsersResp") + proto.RegisterType((*GetAllUserIDReq)(nil), "user.GetAllUserIDReq") + proto.RegisterType((*GetAllUserIDResp)(nil), "user.GetAllUserIDResp") proto.RegisterType((*AccountCheckReq)(nil), "user.AccountCheckReq") proto.RegisterType((*AccountCheckResp)(nil), "user.AccountCheckResp") proto.RegisterType((*AccountCheckResp_SingleUserStatus)(nil), "user.AccountCheckResp.SingleUserStatus") proto.RegisterType((*GetUserInfoReq)(nil), "user.GetUserInfoReq") proto.RegisterType((*GetUserInfoResp)(nil), "user.GetUserInfoResp") - proto.RegisterType((*UserInfo)(nil), "user.UserInfo") - proto.RegisterType((*LogoutReq)(nil), "user.LogoutReq") proto.RegisterType((*UpdateUserInfoReq)(nil), "user.UpdateUserInfoReq") + proto.RegisterType((*UpdateUserInfoResp)(nil), "user.UpdateUserInfoResp") proto.RegisterType((*SetReceiveMessageOptReq)(nil), "user.SetReceiveMessageOptReq") + proto.RegisterType((*OptResult)(nil), "user.OptResult") proto.RegisterType((*SetReceiveMessageOptResp)(nil), "user.SetReceiveMessageOptResp") proto.RegisterType((*GetReceiveMessageOptReq)(nil), "user.GetReceiveMessageOptReq") - proto.RegisterType((*OptResult)(nil), "user.OptResult") proto.RegisterType((*GetReceiveMessageOptResp)(nil), "user.GetReceiveMessageOptResp") proto.RegisterType((*GetAllConversationMsgOptReq)(nil), "user.GetAllConversationMsgOptReq") proto.RegisterType((*GetAllConversationMsgOptResp)(nil), "user.GetAllConversationMsgOptResp") @@ -1170,9 +1004,9 @@ const _ = grpc.SupportPackageIsVersion4 type UserClient interface { GetUserInfo(ctx context.Context, in *GetUserInfoReq, opts ...grpc.CallOption) (*GetUserInfoResp, error) - UpdateUserInfo(ctx context.Context, in *UpdateUserInfoReq, opts ...grpc.CallOption) (*CommonResp, error) + UpdateUserInfo(ctx context.Context, in *UpdateUserInfoReq, opts ...grpc.CallOption) (*UpdateUserInfoResp, error) DeleteUsers(ctx context.Context, in *DeleteUsersReq, opts ...grpc.CallOption) (*DeleteUsersResp, error) - GetAllUsersUid(ctx context.Context, in *GetAllUsersUidReq, opts ...grpc.CallOption) (*GetAllUsersUidResp, error) + GetAllUserID(ctx context.Context, in *GetAllUserIDReq, opts ...grpc.CallOption) (*GetAllUserIDResp, error) SetReceiveMessageOpt(ctx context.Context, in *SetReceiveMessageOptReq, opts ...grpc.CallOption) (*SetReceiveMessageOptResp, error) GetReceiveMessageOpt(ctx context.Context, in *GetReceiveMessageOptReq, opts ...grpc.CallOption) (*GetReceiveMessageOptResp, error) GetAllConversationMsgOpt(ctx context.Context, in *GetAllConversationMsgOptReq, opts ...grpc.CallOption) (*GetAllConversationMsgOptResp, error) @@ -1189,15 +1023,15 @@ func NewUserClient(cc *grpc.ClientConn) UserClient { func (c *userClient) GetUserInfo(ctx context.Context, in *GetUserInfoReq, opts ...grpc.CallOption) (*GetUserInfoResp, error) { out := new(GetUserInfoResp) - err := grpc.Invoke(ctx, "/user.user/getUserInfo", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/user.user/GetUserInfo", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } -func (c *userClient) UpdateUserInfo(ctx context.Context, in *UpdateUserInfoReq, opts ...grpc.CallOption) (*CommonResp, error) { - out := new(CommonResp) +func (c *userClient) UpdateUserInfo(ctx context.Context, in *UpdateUserInfoReq, opts ...grpc.CallOption) (*UpdateUserInfoResp, error) { + out := new(UpdateUserInfoResp) err := grpc.Invoke(ctx, "/user.user/UpdateUserInfo", in, out, c.cc, opts...) if err != nil { return nil, err @@ -1214,9 +1048,9 @@ func (c *userClient) DeleteUsers(ctx context.Context, in *DeleteUsersReq, opts . return out, nil } -func (c *userClient) GetAllUsersUid(ctx context.Context, in *GetAllUsersUidReq, opts ...grpc.CallOption) (*GetAllUsersUidResp, error) { - out := new(GetAllUsersUidResp) - err := grpc.Invoke(ctx, "/user.user/GetAllUsersUid", in, out, c.cc, opts...) +func (c *userClient) GetAllUserID(ctx context.Context, in *GetAllUserIDReq, opts ...grpc.CallOption) (*GetAllUserIDResp, error) { + out := new(GetAllUserIDResp) + err := grpc.Invoke(ctx, "/user.user/GetAllUserID", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -1263,9 +1097,9 @@ func (c *userClient) AccountCheck(ctx context.Context, in *AccountCheckReq, opts type UserServer interface { GetUserInfo(context.Context, *GetUserInfoReq) (*GetUserInfoResp, error) - UpdateUserInfo(context.Context, *UpdateUserInfoReq) (*CommonResp, error) + UpdateUserInfo(context.Context, *UpdateUserInfoReq) (*UpdateUserInfoResp, error) DeleteUsers(context.Context, *DeleteUsersReq) (*DeleteUsersResp, error) - GetAllUsersUid(context.Context, *GetAllUsersUidReq) (*GetAllUsersUidResp, error) + GetAllUserID(context.Context, *GetAllUserIDReq) (*GetAllUserIDResp, error) SetReceiveMessageOpt(context.Context, *SetReceiveMessageOptReq) (*SetReceiveMessageOptResp, error) GetReceiveMessageOpt(context.Context, *GetReceiveMessageOptReq) (*GetReceiveMessageOptResp, error) GetAllConversationMsgOpt(context.Context, *GetAllConversationMsgOptReq) (*GetAllConversationMsgOptResp, error) @@ -1330,20 +1164,20 @@ func _User_DeleteUsers_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } -func _User_GetAllUsersUid_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAllUsersUidReq) +func _User_GetAllUserID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAllUserIDReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(UserServer).GetAllUsersUid(ctx, in) + return srv.(UserServer).GetAllUserID(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/user.user/GetAllUsersUid", + FullMethod: "/user.user/GetAllUserID", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServer).GetAllUsersUid(ctx, req.(*GetAllUsersUidReq)) + return srv.(UserServer).GetAllUserID(ctx, req.(*GetAllUserIDReq)) } return interceptor(ctx, in, info, handler) } @@ -1425,7 +1259,7 @@ var _User_serviceDesc = grpc.ServiceDesc{ HandlerType: (*UserServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "getUserInfo", + MethodName: "GetUserInfo", Handler: _User_GetUserInfo_Handler, }, { @@ -1437,8 +1271,8 @@ var _User_serviceDesc = grpc.ServiceDesc{ Handler: _User_DeleteUsers_Handler, }, { - MethodName: "GetAllUsersUid", - Handler: _User_GetAllUsersUid_Handler, + MethodName: "GetAllUserID", + Handler: _User_GetAllUserID_Handler, }, { MethodName: "SetReceiveMessageOpt", @@ -1461,64 +1295,60 @@ var _User_serviceDesc = grpc.ServiceDesc{ Metadata: "user/user.proto", } -func init() { proto.RegisterFile("user/user.proto", fileDescriptor_user_04b52567a288fdb7) } +func init() { proto.RegisterFile("user/user.proto", fileDescriptor_user_119cb27841530cfa) } -var fileDescriptor_user_04b52567a288fdb7 = []byte{ - // 896 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xdd, 0x6e, 0xdb, 0x36, - 0x14, 0x86, 0xfc, 0x17, 0xeb, 0x78, 0xb1, 0x1d, 0x22, 0x3f, 0x82, 0x96, 0x05, 0x1e, 0x31, 0x6c, - 0xb9, 0x99, 0x37, 0x64, 0x77, 0x0b, 0x86, 0x21, 0xb5, 0x5b, 0xc3, 0x48, 0x02, 0xb7, 0x0a, 0x7c, - 0xd3, 0xab, 0x2a, 0x12, 0xe3, 0x08, 0x91, 0x45, 0x45, 0x3f, 0x41, 0x80, 0x3e, 0x40, 0x1f, 0xa0, - 0x17, 0x7d, 0x8d, 0x3e, 0x4a, 0xef, 0xfa, 0x1c, 0x7d, 0x83, 0x82, 0xa4, 0x64, 0x53, 0x3f, 0x76, - 0x82, 0xb4, 0x40, 0x6f, 0x04, 0x9e, 0x43, 0xf2, 0x3b, 0xfc, 0x3e, 0x1e, 0x1e, 0x1d, 0xe8, 0xc4, - 0x21, 0x09, 0xfe, 0x62, 0x9f, 0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0x2c, 0x4c, 0xfe, 0x64, 0x4a, 0x33, 0x09, 0xfd, 0x2a, 0x73, 0x2c, 0xcd, 0x5e, 0x1d, 0x3f, - 0xb4, 0x24, 0xf4, 0xd1, 0x7f, 0xf0, 0x93, 0xdc, 0xa7, 0xa0, 0x9d, 0xb2, 0xde, 0xe5, 0x56, 0xdf, - 0x2d, 0x6f, 0x69, 0x9e, 0x6d, 0xbe, 0x6e, 0xf5, 0x79, 0x3b, 0x7e, 0xcc, 0x3e, 0x97, 0x0d, 0xde, - 0x94, 0xff, 0xf3, 0x35, 0x00, 0x00, 0xff, 0xff, 0x24, 0xd7, 0xfe, 0x0d, 0xa7, 0x0b, 0x00, 0x00, +var fileDescriptor_user_119cb27841530cfa = []byte{ + // 825 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xdf, 0x6e, 0xd3, 0x3e, + 0x14, 0x56, 0xd6, 0x6e, 0xbf, 0xf5, 0x74, 0x6b, 0xfb, 0xb3, 0xf6, 0x27, 0x04, 0x98, 0x3a, 0x0b, + 0x41, 0xb5, 0x8b, 0x14, 0x86, 0xb8, 0x00, 0x04, 0xd2, 0xe8, 0xb4, 0x68, 0x82, 0xaa, 0x28, 0xd3, + 0x6e, 0xb8, 0x99, 0x42, 0x63, 0x4a, 0xd5, 0x36, 0x0e, 0x71, 0xba, 0x09, 0x90, 0xb8, 0x81, 0xb7, + 0xe0, 0x82, 0xe7, 0xe0, 0x35, 0x78, 0x01, 0x5e, 0x05, 0xc5, 0x4e, 0x5a, 0x3b, 0x49, 0x5b, 0x54, + 0xb8, 0xe0, 0xa6, 0xaa, 0x3f, 0x1f, 0x1f, 0x7f, 0xdf, 0xe7, 0x63, 0xe7, 0x40, 0x75, 0xcc, 0x48, + 0xd0, 0x8c, 0x7e, 0x4c, 0x3f, 0xa0, 0x21, 0x45, 0xc5, 0xe8, 0xbf, 0xb1, 0xdf, 0xf1, 0x89, 0x77, + 0x71, 0xda, 0x6e, 0xfa, 0x83, 0x5e, 0x93, 0x4f, 0x34, 0x99, 0x3b, 0xb8, 0xb8, 0x62, 0xcd, 0x2b, + 0x26, 0x02, 0xf1, 0x53, 0x80, 0x16, 0x1d, 0x8d, 0xa8, 0x67, 0x13, 0xe6, 0x23, 0x1d, 0xfe, 0x23, + 0x41, 0xd0, 0xa2, 0x2e, 0xd1, 0xb5, 0xba, 0xd6, 0x58, 0xb5, 0x93, 0x21, 0xda, 0x81, 0x35, 0x12, + 0x04, 0x6d, 0xd6, 0xd3, 0x57, 0xea, 0x5a, 0xa3, 0x64, 0xc7, 0x23, 0xfc, 0x01, 0x2a, 0xc7, 0x64, + 0x48, 0x42, 0x72, 0xce, 0x48, 0xc0, 0x6c, 0xf2, 0x0e, 0x1d, 0x40, 0x6d, 0x8a, 0x9c, 0x1e, 0xbf, + 0xe8, 0xb3, 0x50, 0x5f, 0xa9, 0x17, 0x1a, 0x25, 0x3b, 0x83, 0x23, 0x03, 0xd6, 0x3b, 0xbe, 0x18, + 0xeb, 0x05, 0x9e, 0x77, 0x32, 0x46, 0x75, 0x28, 0x77, 0x7c, 0x12, 0x38, 0x61, 0x9f, 0x7a, 0xa7, + 0xc7, 0x7a, 0x91, 0x4f, 0xcb, 0x10, 0xa6, 0x50, 0x55, 0xf6, 0x66, 0x3e, 0xba, 0x2b, 0xcb, 0xe1, + 0x1a, 0xca, 0x87, 0x35, 0x93, 0x1b, 0x33, 0xc5, 0x6d, 0x59, 0xf2, 0x01, 0xd4, 0x4e, 0x9c, 0xfe, + 0x90, 0xb8, 0x59, 0xba, 0x69, 0x1c, 0x77, 0xa0, 0x6a, 0x91, 0xf0, 0x68, 0x38, 0x14, 0x58, 0xa4, + 0xd6, 0x80, 0x75, 0x9a, 0x28, 0xd0, 0x84, 0x02, 0x2a, 0x29, 0xa0, 0x92, 0x02, 0x61, 0x9c, 0x0c, + 0x61, 0x17, 0x6a, 0x6a, 0xc2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0xf1, 0x17, 0x6b, 0xde, 0x17, 0x3b, 0x3a, 0xbc, 0x1b, 0xb3, 0x77, 0xff, 0x07, + 0xec, 0x39, 0xfc, 0x51, 0x04, 0xde, 0x19, 0xa1, 0x47, 0x50, 0x96, 0x5e, 0x51, 0xb4, 0x25, 0x72, + 0xa8, 0x0f, 0xb9, 0xb1, 0x9d, 0x83, 0x32, 0x1f, 0xb5, 0xa0, 0xa2, 0x3e, 0x3d, 0x68, 0x57, 0x04, + 0x66, 0x9e, 0x45, 0x43, 0xcf, 0x9f, 0x60, 0x7e, 0x44, 0x40, 0xea, 0x5d, 0x12, 0x02, 0x6a, 0x2b, + 0x95, 0x10, 0x48, 0x37, 0x39, 0x4f, 0x60, 0x43, 0xee, 0x1a, 0xd0, 0x94, 0xa7, 0xdc, 0x9a, 0x18, + 0x3b, 0x79, 0x30, 0xf3, 0xd1, 0x39, 0x6c, 0xe5, 0x5d, 0x74, 0x74, 0x53, 0xc4, 0xcf, 0x78, 0x0d, + 0x8d, 0xbd, 0x79, 0xd3, 0x22, 0xad, 0x35, 0x27, 0xad, 0x35, 0x3f, 0xed, 0xcc, 0x2b, 0xe5, 0xf0, + 0xeb, 0x96, 0x5b, 0x53, 0x68, 0x5f, 0x56, 0x98, 0x5b, 0xf1, 0x06, 0x5e, 0x14, 0x22, 0xfc, 0x94, + 0xbb, 0x88, 0xc4, 0xcf, 0x54, 0xcf, 0x94, 0xf8, 0x99, 0x6e, 0x38, 0x9e, 0x6d, 0xbe, 0x2a, 0x9b, + 0xbc, 0xf7, 0x7e, 0x1c, 0xfd, 0xbc, 0x5e, 0xe3, 0x8d, 0xf5, 0xfd, 0x5f, 0x01, 0x00, 0x00, 0xff, + 0xff, 0x24, 0xc8, 0xbf, 0xca, 0x94, 0x0b, 0x00, 0x00, } diff --git a/pkg/proto/user/user.proto b/pkg/proto/user/user.proto index e3c6ddffe..2efd32ae4 100644 --- a/pkg/proto/user/user.proto +++ b/pkg/proto/user/user.proto @@ -1,34 +1,38 @@ syntax = "proto3"; +import "Open_IM/pkg/proto/sdk_ws/ws.proto"; option go_package = "./user;user"; package user; message CommonResp{ - int32 errorCode = 1; - string errorMsg = 2; -} -message DeleteUsersResp{ - CommonResp commonResp = 1; - repeated string failedUidList = 2; + int32 errCode = 1; + string errMsg = 2; } + message DeleteUsersReq{ - repeated string deleteUidList = 2; - string token = 3; + repeated string DeleteUserIDList = 2; + string OpUserID = 3; string OperationID = 4; } -message GetAllUsersUidReq{ - string token = 2; - string operationID = 3; - +message DeleteUsersResp{ + CommonResp CommonResp = 1; + repeated string FailedUserIDList = 2; } -message GetAllUsersUidResp{ - CommonResp commonResp = 1; - repeated string uidList = 2; + +message GetAllUserIDReq{ + string opUserID = 1; + string operationID = 2; } +message GetAllUserIDResp{ + CommonResp CommonResp = 1; + repeated string UserIDList = 2; +} + + message AccountCheckReq{ - repeated string uidList = 1; - string token = 2; - string operationID = 3; + repeated string CheckUserIDList = 1; + string OpUserID = 2; + string OperationID = 3; } message AccountCheckResp{ @@ -37,97 +41,77 @@ message AccountCheckResp{ string userID = 1; string accountStatus = 2; } - repeated SingleUserStatus result = 2; - + repeated SingleUserStatus ResultList = 2; } + + message GetUserInfoReq{ repeated string userIDList = 1; - string token = 2; + string OpUserID = 2; string OperationID = 3; } message GetUserInfoResp{ - int32 errorCode = 1; - string errorMsg = 2; - repeated UserInfo Data = 3; -} -message UserInfo{ - string uid = 1; - string name = 2; - string icon = 3; - int32 gender = 4; - string mobile = 5; - string birth = 6; - string email = 7; - string ex = 8; + CommonResp commonResp = 1; + repeated open_im_sdk.UserInfo UserInfoList = 3; } -message LogoutReq{ - string OperationID = 1; - string token = 2; -} message UpdateUserInfoReq{ - string icon = 1; - string name = 2; - int32 gender = 3; - string mobile = 4; - string birth = 5; - string email = 6; - string ex = 7; - string token = 8; - string OperationID = 9; - string Uid = 10; + open_im_sdk.UserInfo UserInfo = 1; + string OpUserID = 2; + string operationID = 3; } +message UpdateUserInfoResp{ + CommonResp commonResp = 1; +} + message SetReceiveMessageOptReq{ - string uId = 1; - int32 opt = 2; - repeated string conversationId = 3; - string operationID = 4; + string FromUserID = 1; + int32 opt = 2; + repeated string conversationIDList = 3; + string operationID = 4; + string OpUserID = 5; +} +message OptResult{ + string conversationId = 1; + int32 result = 2; //-1: failed; 0:default; 1: not receive ; 2: not jpush } - message SetReceiveMessageOptResp{ - int32 errCode = 1; - string errMsg = 2; - repeated OptResult optResult = 3; + CommonResp commonResp = 1; + repeated OptResult optResultList = 2; } message GetReceiveMessageOptReq{ - string uId = 1; - repeated string conversationId = 2; - string operationID = 3; + string FromUserID = 1; + repeated string conversationId = 2; + string operationID = 3; + string OpUserID = 4; } - -message OptResult{ - string conversationId = 1; - int32 result = 2; //-1: failed; 0:default; 1: not receive ; 2: not jpush -} - message GetReceiveMessageOptResp{ - int32 errCode = 1; - string errMsg = 2; - repeated OptResult conversationOptResult = 3; + CommonResp commonResp = 1; + repeated OptResult conversationOptResultList = 3; } + message GetAllConversationMsgOptReq{ - string uId = 1; - string operationID = 2; + string FromUserId = 1; + string operationID = 2; + string OpUserID = 3; } - message GetAllConversationMsgOptResp{ - int32 errCode = 1; - string errMsg = 2; - repeated OptResult conversationOptResult = 3; + CommonResp commonResp = 1; + repeated OptResult conversationOptResultList = 3; } service user { - rpc getUserInfo(GetUserInfoReq) returns(GetUserInfoResp); - rpc UpdateUserInfo(UpdateUserInfoReq) returns(CommonResp); + rpc GetUserInfo(GetUserInfoReq) returns(GetUserInfoResp); + rpc UpdateUserInfo(UpdateUserInfoReq) returns(UpdateUserInfoResp); rpc DeleteUsers(DeleteUsersReq)returns(DeleteUsersResp); - rpc GetAllUsersUid(GetAllUsersUidReq)returns(GetAllUsersUidResp); + rpc GetAllUserID(GetAllUserIDReq)returns(GetAllUserIDResp); rpc SetReceiveMessageOpt(SetReceiveMessageOptReq)returns(SetReceiveMessageOptResp); rpc GetReceiveMessageOpt(GetReceiveMessageOptReq)returns(GetReceiveMessageOptResp); rpc GetAllConversationMsgOpt(GetAllConversationMsgOptReq)returns(GetAllConversationMsgOptResp); From 30024c981451b6adebce7636dea373c1c01ceb4a Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Mon, 27 Dec 2021 18:22:32 +0800 Subject: [PATCH 031/337] tidy code --- internal/api/auth/auth.go | 81 +++++++++++++++++++++++++ internal/api/auth/user_register.go | 95 ------------------------------ internal/api/auth/user_token.go | 72 ---------------------- internal/api/friend/friend.go | 3 +- internal/api/group/group.go | 3 +- internal/api/user/user.go | 61 ++++++------------- pkg/base_info/auth_api_struct.go | 39 ++++++++++++ pkg/base_info/public_struct.go | 26 +++++++- 8 files changed, 167 insertions(+), 213 deletions(-) create mode 100644 internal/api/auth/auth.go delete mode 100644 internal/api/auth/user_register.go delete mode 100644 internal/api/auth/user_token.go create mode 100644 pkg/base_info/auth_api_struct.go diff --git a/internal/api/auth/auth.go b/internal/api/auth/auth.go new file mode 100644 index 000000000..b31384cf8 --- /dev/null +++ b/internal/api/auth/auth.go @@ -0,0 +1,81 @@ +package apiAuth + +import ( + api "Open_IM/pkg/base_info" + "Open_IM/pkg/common/config" + "Open_IM/pkg/common/log" + "Open_IM/pkg/grpc-etcdv3/getcdv3" + rpc "Open_IM/pkg/proto/auth" + "context" + "github.com/gin-gonic/gin" + "net/http" + "strings" +) + +func UserRegister(c *gin.Context) { + params := api.UserRegisterReq{} + if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) + return + } + + if params.Secret != config.Config.Secret { + log.NewError(params.OperationID, "params.Secret != config.Config.Secret", params.Secret, config.Config.Secret) + c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "not authorized"}) + return + } + req := &rpc.UserRegisterReq{} + log.NewInfo("UserRegister args ", req.String()) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAuthName) + client := rpc.NewAuthClient(etcdConn) + reply, err := client.UserRegister(context.Background(), req) + + if err != nil || reply.CommonResp.ErrCode != 0 { + log.NewError("0", "UserRegister failed ", err.Error(), req.String()) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) + return + } + + pbDataToken := &rpc.UserTokenReq{Platform: params.Platform, FromUserID: params.UserID, OperationID: params.OperationID} + replyToken, err := client.UserToken(context.Background(), pbDataToken) + if err != nil { + log.NewError(req.OperationID, "UserToken failed ", err.Error(), pbDataToken) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) + return + } + resp := api.UserRegisterResp{CommResp: api.CommResp{ErrCode: replyToken.CommonResp.ErrCode, ErrMsg: replyToken.CommonResp.ErrMsg}, + UserToken: api.UserTokenInfo{UserID: req.UserInfo.UserID, Token: replyToken.Token, ExpiredTime: replyToken.ExpiredTime}} + c.JSON(http.StatusOK, resp) + log.NewInfo(req.OperationID, "UserRegister return ", resp) +} + +func UserToken(c *gin.Context) { + params := api.UserTokenReq{} + if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) + return + } + + if params.Secret != config.Config.Secret { + log.NewError(params.OperationID, "params.Secret != config.Config.Secret", params.Secret, config.Config.Secret) + c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "not authorized"}) + return + } + req := &rpc.UserTokenReq{Platform: params.Platform, FromUserID: params.UserID, OperationID: params.OperationID} + log.NewInfo("UserToken args ", req.String()) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAuthName) + client := rpc.NewAuthClient(etcdConn) + reply, err := client.UserToken(context.Background(), req) + if err != nil { + log.NewError(req.OperationID, "UserToken failed ", err.Error(), req.String()) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) + return + } + + resp := api.UserTokenResp{CommResp: api.CommResp{ErrCode: reply.CommonResp.ErrCode, ErrMsg: reply.CommonResp.ErrMsg}, + UserToken: api.UserTokenInfo{UserID: req.FromUserID, Token: reply.Token, ExpiredTime: reply.ExpiredTime}} + c.JSON(http.StatusOK, resp) + log.NewInfo(req.OperationID, "UserRegister return ", resp) +} diff --git a/internal/api/auth/user_register.go b/internal/api/auth/user_register.go deleted file mode 100644 index e0d69eeda..000000000 --- a/internal/api/auth/user_register.go +++ /dev/null @@ -1,95 +0,0 @@ -package apiAuth - -import ( - "Open_IM/pkg/common/config" - "Open_IM/pkg/common/log" - "Open_IM/pkg/grpc-etcdv3/getcdv3" - pbAuth "Open_IM/pkg/proto/auth" - "context" - "github.com/gin-gonic/gin" - "net/http" - "strings" -) - -type paramsUserRegister struct { - Secret string `json:"secret" binding:"required,max=32"` - Platform int32 `json:"platform" binding:"required,min=1,max=7"` - UID string `json:"uid" binding:"required,min=1,max=64"` - Name string `json:"name" binding:"required,min=1,max=64"` - Icon string `json:"icon" binding:"omitempty,max=1024"` - Gender int32 `json:"gender" binding:"omitempty,oneof=0 1 2"` - Mobile string `json:"mobile" binding:"omitempty,max=32"` - Birth string `json:"birth" binding:"omitempty,max=16"` - Email string `json:"email" binding:"omitempty,max=64"` - Ex string `json:"ex" binding:"omitempty,max=1024"` -} - -func newUserRegisterReq(params *paramsUserRegister) *pbAuth.UserRegisterReq { - pbData := pbAuth.UserRegisterReq{ - UID: params.UID, - Name: params.Name, - Icon: params.Icon, - Gender: params.Gender, - Mobile: params.Mobile, - Birth: params.Birth, - Email: params.Email, - Ex: params.Ex, - } - return &pbData -} - -func UserRegister(c *gin.Context) { - log.Info("", "", "api user_register init ....") - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAuthName) - client := pbAuth.NewAuthClient(etcdConn) - //defer etcdConn.Close() - - params := paramsUserRegister{} - if err := c.BindJSON(¶ms); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) - return - } - if params.Secret != config.Config.Secret { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "not authorized"}) - return - } - pbData := newUserRegisterReq(¶ms) - - log.Info("", "", "api user_register is server, [data: %s]", pbData.String()) - reply, err := client.UserRegister(context.Background(), pbData) - if err != nil || !reply.Success { - log.Error("", "", "api user_register call rpc fail, [data: %s] [err: %s]", pbData.String(), err.Error()) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) - return - } - log.Info("", "", "api user_register call rpc success, [data: %s] [reply: %s]", pbData.String(), reply.String()) - - pbDataToken := &pbAuth.UserTokenReq{ - Platform: params.Platform, - UID: params.UID, - } - replyToken, err := client.UserToken(context.Background(), pbDataToken) - if err != nil { - log.Error("", "", "api user_register call rpc fail, [data: %s] [err: %s]", pbData.String(), err.Error()) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) - return - } - log.Info("", "", "api user_register call success, [data: %s] [reply: %s]", pbData.String(), reply.String()) - - if replyToken.ErrCode == 0 { - c.JSON(http.StatusOK, gin.H{ - "errCode": replyToken.ErrCode, - "errMsg": replyToken.ErrMsg, - "data": gin.H{ - "uid": pbData.UID, - "token": replyToken.Token, - "expiredTime": replyToken.ExpiredTime, - }, - }) - } else { - c.JSON(http.StatusOK, gin.H{ - "errCode": replyToken.ErrCode, - "errMsg": replyToken.ErrMsg, - }) - } -} diff --git a/internal/api/auth/user_token.go b/internal/api/auth/user_token.go deleted file mode 100644 index 31839b6b0..000000000 --- a/internal/api/auth/user_token.go +++ /dev/null @@ -1,72 +0,0 @@ -package apiAuth - -import ( - "Open_IM/pkg/common/config" - "Open_IM/pkg/common/log" - "Open_IM/pkg/grpc-etcdv3/getcdv3" - pbAuth "Open_IM/pkg/proto/auth" - "context" - "github.com/gin-gonic/gin" - "net/http" - "strings" -) - -type paramsUserToken struct { - Secret string `json:"secret" binding:"required,max=32"` - Platform int32 `json:"platform" binding:"required,min=1,max=8"` - UID string `json:"uid" binding:"required,min=1,max=64"` -} - -func newUserTokenReq(params *paramsUserToken) *pbAuth.UserTokenReq { - pbData := pbAuth.UserTokenReq{ - Platform: params.Platform, - UID: params.UID, - } - return &pbData -} - -func UserToken(c *gin.Context) { - log.Info("", "", "api user_token init ....") - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAuthName) - client := pbAuth.NewAuthClient(etcdConn) - //defer etcdConn.Close() - - params := paramsUserToken{} - if err := c.BindJSON(¶ms); err != nil { - log.Error("", "", params.UID, params.Platform, params.Secret) - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) - return - } - if params.Secret != config.Config.Secret { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "not authorized"}) - return - } - pbData := newUserTokenReq(¶ms) - - log.Info("", "", "api user_token is server, [data: %s]", pbData.String()) - reply, err := client.UserToken(context.Background(), pbData) - if err != nil { - log.Error("", "", "api user_token call rpc fail, [data: %s] [err: %s]", pbData.String(), err.Error()) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) - return - } - log.Info("", "", "api user_token call rpc success, [data: %s] [reply: %s]", pbData.String(), reply.String()) - - if reply.ErrCode == 0 { - c.JSON(http.StatusOK, gin.H{ - "errCode": reply.ErrCode, - "errMsg": reply.ErrMsg, - "data": gin.H{ - "uid": pbData.UID, - "token": reply.Token, - "expiredTime": reply.ExpiredTime, - }, - }) - } else { - c.JSON(http.StatusOK, gin.H{ - "errCode": reply.ErrCode, - "errMsg": reply.ErrMsg, - }) - } - -} diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go index 2c9f44bf7..55be48d69 100644 --- a/internal/api/friend/friend.go +++ b/internal/api/friend/friend.go @@ -48,6 +48,7 @@ func AddBlacklist(c *gin.Context) { func ImportFriend(c *gin.Context) { params := api.ImportFriendReq{} if err := c.BindJSON(¶ms); err != nil { + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) log.NewError("0", "BindJSON failed ", err.Error()) return @@ -104,7 +105,7 @@ func AddFriend(c *gin.Context) { return } - resp := api.AddFriendResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}} + resp := api.AddFriendResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} c.JSON(http.StatusOK, resp) log.NewInfo(req.CommID.OperationID, "AddFriend api return ", resp) } diff --git a/internal/api/group/group.go b/internal/api/group/group.go index 860350173..b7f04296f 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -66,7 +66,8 @@ func GetGroupMembersInfo(c *gin.Context) { ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) + //c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) + api.SetErrCodeMsg(c, http.StatusInternalServerError) return } log.NewInfo(req.OperationID, "GetGroupMembersInfo args ", req.String()) diff --git a/internal/api/user/user.go b/internal/api/user/user.go index a3d311649..b6d550f1d 100644 --- a/internal/api/user/user.go +++ b/internal/api/user/user.go @@ -1,15 +1,13 @@ package user import ( + api "Open_IM/pkg/base_info" "Open_IM/pkg/common/config" "Open_IM/pkg/common/log" "Open_IM/pkg/common/token_verify" "Open_IM/pkg/grpc-etcdv3/getcdv3" - "Open_IM/pkg/utils" - - // rpc "Open_IM/pkg/proto/relay" - api "Open_IM/pkg/base_info" rpc "Open_IM/pkg/proto/user" + "Open_IM/pkg/utils" "context" "github.com/gin-gonic/gin" "net/http" @@ -77,22 +75,6 @@ import ( // // c.JSON(http.StatusOK, resp) //} -//params := api.AddBlacklistReq{} -// if err := c.BindJSON(¶ms); err != nil { -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) -// log.NewError("0", "BindJSON failed ", err.Error()) -// return -// } -// req := &rpc.AddBlacklistReq{} -// utils.CopyStructFields(req.CommID, params) -// var ok bool -// ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) -// if !ok { -// log.NewError(req.CommID.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) -// return -// } -// log.NewInfo(params.OperationID, "AddBlacklist args ", req.String()) func GetUserInfo(c *gin.Context) { params := api.GetUserInfoReq{} @@ -128,37 +110,30 @@ func GetUserInfo(c *gin.Context) { } func UpdateUserInfo(c *gin.Context) { - log.InfoByKv("api update userinfo init...", "") - - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName) - client := pbUser.NewUserClient(etcdConn) - //defer etcdConn.Close() - - params := paramsStruct{} + params := api.GetUserInfoReq{} if err := c.BindJSON(¶ms); err != nil { c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &pbUser.UpdateUserInfoReq{ - OperationID: params.OperationID, - Token: c.Request.Header.Get("token"), - Name: params.Name, - Icon: params.Icon, - Gender: params.Gender, - Mobile: params.Mobile, - Birth: params.Birth, - Email: params.Email, - Ex: params.Ex, - Uid: params.Uid, + req := &rpc.UpdateUserInfoReq{} + utils.CopyStructFields(&req, params) + var ok bool + ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + if !ok { + log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) + return } - log.InfoByKv("api update user info is server", req.OperationID, req.Token) + log.NewInfo(params.OperationID, "UpdateUserInfo args ", req.String()) + + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName) + client := rpc.NewUserClient(etcdConn) RpcResp, err := client.UpdateUserInfo(context.Background(), req) if err != nil { - log.Error(req.Token, req.OperationID, "err=%s,call get user info rpc server failed", err) + log.NewError(req.OperationID, "UpdateUserInfo failed ", err.Error(), req.String()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) return } - log.InfoByKv("call update user info rpc server success", params.OperationID) - c.JSON(http.StatusOK, gin.H{"errCode": RpcResp.ErrorCode, "errMsg": RpcResp.ErrorMsg}) - log.InfoByKv("api update user info return success", params.OperationID, "args=%s", RpcResp.String()) + c.JSON(http.StatusOK, gin.H{"errCode": RpcResp.CommonResp.ErrCode, "errMsg": RpcResp.CommonResp.ErrMsg}) + log.NewInfo(req.OperationID, "UpdateUserInfo api return ", RpcResp.CommonResp) } diff --git a/pkg/base_info/auth_api_struct.go b/pkg/base_info/auth_api_struct.go new file mode 100644 index 000000000..8dd3923a4 --- /dev/null +++ b/pkg/base_info/auth_api_struct.go @@ -0,0 +1,39 @@ +package base_info + +//UserID string `protobuf:"bytes,1,opt,name=UserID" json:"UserID,omitempty"` +// Nickname string `protobuf:"bytes,2,opt,name=Nickname" json:"Nickname,omitempty"` +// FaceUrl string `protobuf:"bytes,3,opt,name=FaceUrl" json:"FaceUrl,omitempty"` +// Gender int32 `protobuf:"varint,4,opt,name=Gender" json:"Gender,omitempty"` +// PhoneNumber string `protobuf:"bytes,5,opt,name=PhoneNumber" json:"PhoneNumber,omitempty"` +// Birth string `protobuf:"bytes,6,opt,name=Birth" json:"Birth,omitempty"` +// Email string `protobuf:"bytes,7,opt,name=Email" json:"Email,omitempty"` +// Ex string `protobuf:"bytes,8,opt,name=Ex" json:"Ex,omitempty"` + +type UserRegisterReq struct { + Secret string `json:"secret" binding:"required,max=32"` + Platform int32 `json:"platform" binding:"required,min=1,max=7"` + UserInfo + OperationID string `json:"operationID" binding:"required"` +} + +type UserTokenInfo struct { + UserID string `json:"secret"` + Token string `json:"token"` + ExpiredTime int64 `json:"expiredTime"` +} +type UserRegisterResp struct { + CommResp + UserToken UserTokenInfo `json:"data"` +} + +type UserTokenReq struct { + Secret string `json:"secret" binding:"required,max=32"` + Platform int32 `json:"platform" binding:"required,min=1,max=8"` + UserID string `json:"userID" binding:"required,min=1,max=64"` + OperationID string `json:"operationID" binding:"required"` +} + +type UserTokenResp struct { + CommResp + UserToken UserTokenInfo `json:"data"` +} diff --git a/pkg/base_info/public_struct.go b/pkg/base_info/public_struct.go index 3669518e7..dd0689c6b 100644 --- a/pkg/base_info/public_struct.go +++ b/pkg/base_info/public_struct.go @@ -1,4 +1,28 @@ -//package base_info +package base_info + +import ( + "github.com/gin-gonic/gin" + "net/http" +) + +type UserInfo struct { + UserID string `json:"userID" binding:"required,min=1,max=64"` + Nickname string `json:"nickname" binding:"required,min=1,max=64"` + FaceUrl string `json:"faceUrl" binding:"omitempty,max=1024"` + Gender int32 `json:"gender" binding:"omitempty,oneof=0 1 2"` + PhoneNumber string `json:"phoneNumber" binding:"omitempty,max=32"` + Birth string `json:"birth" binding:"omitempty,max=16"` + Email string `json:"email" binding:"omitempty,max=64"` + Ex string `json:"ex" binding:"omitempty,max=1024"` +} + +//c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) +func SetErrCodeMsg(c *gin.Context, status int) *CommResp { + resp := CommResp{ErrCode: int32(status), ErrMsg: http.StatusText(status)} + c.JSON(status, resp) + return &resp +} + // //type GroupInfo struct { // GroupID string `json:"groupID"` From f0f1c54244e78789cfdbc074484f53ed43cebced Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Mon, 27 Dec 2021 21:08:42 +0800 Subject: [PATCH 032/337] tidy code --- internal/api/group/group.go | 10 +- internal/api/user/update_user_info.go | 1 - internal/rpc/friend/firend.go | 58 ++++---- internal/rpc/group/group.go | 136 +++++++++--------- pkg/base_info/public_struct.go | 1 - pkg/base_info/user_api_struct.go | 1 - .../im_mysql_model/friend_model.go | 4 +- .../im_mysql_model/friend_request_model.go | 4 +- .../im_mysql_model/group_member_model.go | 5 +- .../mysql_model/im_mysql_model/group_model.go | 1 - 10 files changed, 113 insertions(+), 108 deletions(-) delete mode 100644 internal/api/user/update_user_info.go diff --git a/internal/api/group/group.go b/internal/api/group/group.go index b7f04296f..62c3ab8df 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -348,7 +348,7 @@ func ApplicationGroupResponse(c *gin.Context) { return } - resp := api.CommResp{ErrCode: reply.ErrCode, ErrMsg: reply.ErrMsg} + resp := api.CommResp{ErrCode: reply.CommonResp.ErrCode, ErrMsg: reply.CommonResp.ErrMsg} c.JSON(http.StatusOK, resp) log.NewInfo(req.OperationID, "ApplicationGroupResponse api return ", resp) } @@ -379,7 +379,7 @@ func JoinGroup(c *gin.Context) { c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) return } - resp := api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg} + resp := api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg} c.JSON(http.StatusOK, resp) log.NewInfo("JoinGroup api return", RpcResp.String()) } @@ -410,7 +410,7 @@ func QuitGroup(c *gin.Context) { c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) return } - resp := api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg} + resp := api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg} c.JSON(http.StatusOK, resp) log.NewInfo("QuitGroup api return", RpcResp.String()) } @@ -441,7 +441,7 @@ func SetGroupInfo(c *gin.Context) { c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) return } - resp := api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg} + resp := api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg} c.JSON(http.StatusOK, resp) log.NewInfo(req.OperationID, "SetGroupInfo api return ", resp) } @@ -473,7 +473,7 @@ func TransferGroupOwner(c *gin.Context) { return } - resp := api.CommResp{ErrCode: reply.ErrCode, ErrMsg: reply.ErrMsg} + resp := api.CommResp{ErrCode: reply.CommonResp.ErrCode, ErrMsg: reply.CommonResp.ErrMsg} c.JSON(http.StatusOK, resp) log.NewInfo(req.OperationID, "TransferGroupOwner api return ", resp) } diff --git a/internal/api/user/update_user_info.go b/internal/api/user/update_user_info.go deleted file mode 100644 index a00006b65..000000000 --- a/internal/api/user/update_user_info.go +++ /dev/null @@ -1 +0,0 @@ -package user diff --git a/internal/rpc/friend/firend.go b/internal/rpc/friend/firend.go index 1b459c49f..ed0d4e5ff 100644 --- a/internal/rpc/friend/firend.go +++ b/internal/rpc/friend/firend.go @@ -113,8 +113,9 @@ func (s *friendServer) AddBlacklist(ctx context.Context, req *pbFriend.AddBlackl if !ok { log.NewError(req.CommID.OperationID, "CheckAccess failed ", req.CommID.OpUserID, req.CommID.FromUserID) } + black := imdb.Black{OwnerUserID: req.CommID.FromUserID, BlockUserID: req.CommID.ToUserID} - err := imdb.InsertInToUserBlackList(req.CommID.FromUserID, req.CommID.ToUserID) + err := imdb.InsertInToUserBlackList(black) if err != nil { log.NewError(req.CommID.OperationID, "InsertInToUserBlackList failed ", err.Error()) return &pbFriend.AddBlacklistResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil @@ -131,15 +132,17 @@ func (s *friendServer) AddFriend(ctx context.Context, req *pbFriend.AddFriendReq log.NewError(req.CommID.OperationID, "CheckAccess failed ", req.CommID.OpUserID, req.CommID.FromUserID) } //Cannot add non-existent users - if _, err := imdb.FindUserByUID(req.CommID.ToUserID); err != nil { - log.NewError(req.CommID.OperationID, "FindUserByUID failed ", err.Error(), req.CommID.ToUserID) + if _, err := imdb.GetUserByUserID(req.CommID.ToUserID); err != nil { + log.NewError(req.CommID.OperationID, "GetUserByUserID failed ", err.Error(), req.CommID.ToUserID) return &pbFriend.AddFriendResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } //Establish a latest relationship in the friend request table - err := imdb.ReplaceIntoFriendReq(req.CommID.FromUserID, req.CommID.ToUserID, constant.ApplicationFriendFlag, req.ReqMsg) + friendRequest := imdb.FriendRequest{ReqMessage: req.ReqMsg} + utils.CopyStructFields(&friendRequest, req.CommID) + err := imdb.UpdateFriendApplication(&friendRequest) if err != nil { - log.NewError(req.CommID.OperationID, "ReplaceIntoFriendReq failed ", err.Error()) + log.NewError(req.CommID.OperationID, "UpdateFriendApplication failed ", err.Error()) return &pbFriend.AddFriendResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } @@ -158,8 +161,7 @@ func (s *friendServer) ImportFriend(ctx context.Context, req *pbFriend.ImportFri c.ErrMsg = constant.ErrAccess.ErrMsg return &pbFriend.ImportFriendResp{CommonResp: &c, FailedFriendUserIDList: req.FriendUserIDList}, nil } - - if _, err := imdb.FindUserByUID(req.FromUserID); err != nil { + if _, err := imdb.GetUserByUserID(req.FromUserID); err != nil { log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), req.FromUserID) c.ErrCode = constant.ErrDB.ErrCode c.ErrMsg = "this user not exists,cant not add friend" @@ -167,14 +169,15 @@ func (s *friendServer) ImportFriend(ctx context.Context, req *pbFriend.ImportFri } for _, v := range req.FriendUserIDList { - if _, fErr := imdb.FindUserByUID(v); fErr != nil { + if _, fErr := imdb.GetUserByUserID(v); fErr != nil { c.ErrMsg = "some uid establish failed" c.ErrCode = 408 resp.FailedFriendUserIDList = append(resp.FailedFriendUserIDList, v) } else { - if _, err := imdb.FindFriendRelationshipFromFriend(req.FromUserID, v); err != nil { + if _, err := imdb.GetFriendRelationshipFromFriend(req.FromUserID, v); err != nil { //Establish two single friendship - err1 := imdb.InsertToFriend(req.FromUserID, v, 1) + toInsertFollow := imdb.Friend{OwnerUserID: req.FromUserID, FriendUserID: v} + err1 := imdb.InsertToFriend(&toInsertFollow) if err1 != nil { resp.FailedFriendUserIDList = append(resp.FailedFriendUserIDList, v) log.NewError(req.OperationID, "InsertToFriend failed", req.FromUserID, v, err1.Error()) @@ -182,7 +185,8 @@ func (s *friendServer) ImportFriend(ctx context.Context, req *pbFriend.ImportFri c.ErrCode = 408 continue } - err2 := imdb.InsertToFriend(v, req.FromUserID, 1) + toInsertFollow = imdb.Friend{OwnerUserID: v, FriendUserID: req.FromUserID} + err2 := imdb.InsertToFriend(&toInsertFollow) if err2 != nil { resp.FailedFriendUserIDList = append(resp.FailedFriendUserIDList, v) log.NewError(req.OperationID, "InsertToFriend failed", v, req.FromUserID, err2.Error()) @@ -193,7 +197,6 @@ func (s *friendServer) ImportFriend(ctx context.Context, req *pbFriend.ImportFri for _, v := range req.FriendUserIDList { chat.FriendAddedNotification(req.OperationID, req.OpUserID, req.FromUserID, v) } - } } } @@ -213,18 +216,21 @@ func (s *friendServer) AddFriendResponse(ctx context.Context, req *pbFriend.AddF //Check there application before agreeing or refuse to a friend's application //req.CommID.FromUserID process req.CommID.ToUserID - if _, err := imdb.FindFriendApplyFromFriendReqByUid(req.CommID.ToUserID, req.CommID.FromUserID); err != nil { - log.NewError(req.CommID.OperationID, "FindFriendApplyFromFriendReqByUid failed ", err.Error(), req.CommID.ToUserID, req.CommID.FromUserID) + friendRequest, err := imdb.GetFriendApplicationByBothUserID(req.CommID.ToUserID, req.CommID.FromUserID) + if err != nil { + log.NewError(req.CommID.OperationID, "GetFriendApplicationByBothUserID failed ", err.Error(), req.CommID.ToUserID, req.CommID.FromUserID) return &pbFriend.AddFriendResponseResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } + friendRequest.HandleResult = req.Flag //Change friend request status flag - err := imdb.UpdateFriendRelationshipToFriendReq(req.CommID.ToUserID, req.CommID.FromUserID, req.Flag) + err = imdb.UpdateFriendApplication(friendRequest) if err != nil { - log.NewError(req.CommID.OperationID, "UpdateFriendRelationshipToFriendReq failed ", err.Error(), req.CommID.ToUserID, req.CommID.FromUserID, req.Flag) + log.NewError(req.CommID.OperationID, "UpdateFriendApplication failed ", err.Error(), friendRequest) return &pbFriend.AddFriendResponseResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } log.NewInfo(req.CommID.OperationID, "rpc AddFriendResponse ok") + //Change the status of the friend request form if req.Flag == constant.FriendFlag { //Establish friendship after find friend relationship not exists @@ -284,7 +290,7 @@ func (s *friendServer) GetBlacklist(ctx context.Context, req *pbFriend.GetBlackl return &pbFriend.GetBlacklistResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } - blackListInfo, err := imdb.GetBlackListByUID(req.CommID.FromUserID) + blackListInfo, err := imdb.GetBlackListByUserID(req.CommID.FromUserID) if err != nil { log.NewError(req.CommID.OperationID, "GetBlackListByUID failed ", err.Error(), req.CommID.FromUserID) return &pbFriend.GetBlacklistResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil @@ -296,7 +302,7 @@ func (s *friendServer) GetBlacklist(ctx context.Context, req *pbFriend.GetBlackl for _, blackUser := range blackListInfo { var blackUserInfo sdkws.PublicUserInfo //Find black user information - us, err := imdb.FindUserByUID(blackUser.BlockUserID) + us, err := imdb.GetUserByUserID(blackUser.BlockUserID) if err != nil { log.NewError(req.CommID.OperationID, "FindUserByUID failed ", err.Error(), blackUser.BlockUserID) continue @@ -322,7 +328,7 @@ func (s *friendServer) SetFriendComment(ctx context.Context, req *pbFriend.SetFr return &pbFriend.SetFriendCommentResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } log.NewInfo(req.CommID.OperationID, "rpc SetFriendComment ok") - chat.FriendInfoChangedNotification(req) + chat.FriendInfoChangedNotification(req.CommID.OperationID, req.CommID.OpUserID, req.CommID.FromUserID, req.CommID.ToUserID) return &pbFriend.SetFriendCommentResp{CommonResp: &pbFriend.CommonResp{}}, nil } @@ -352,7 +358,7 @@ func (s *friendServer) IsInBlackList(ctx context.Context, req *pbFriend.IsInBlac } var isInBlacklist = false - err := imdb.FindRelationshipFromBlackList(req.CommID.FromUserID, req.CommID.ToUserID) + err := imdb.CheckBlack(req.CommID.FromUserID, req.CommID.ToUserID) if err == nil { isInBlacklist = true } @@ -367,7 +373,7 @@ func (s *friendServer) IsFriend(ctx context.Context, req *pbFriend.IsFriendReq) log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID) return &pbFriend.IsFriendResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } - _, err := imdb.FindFriendRelationshipFromFriend(req.CommID.FromUserID, req.CommID.ToUserID) + _, err := imdb.GetFriendRelationshipFromFriend(req.CommID.FromUserID, req.CommID.ToUserID) if err == nil { isFriend = true } else { @@ -386,7 +392,7 @@ func (s *friendServer) GetFriendList(ctx context.Context, req *pbFriend.GetFrien return &pbFriend.GetFriendListResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } - friends, err := imdb.FindUserInfoFromFriend(req.CommID.FromUserID) + friends, err := imdb.GetUserInfoFromFriend(req.CommID.FromUserID) if err != nil { log.NewError(req.CommID.OperationID, "FindUserInfoFromFriend failed", err.Error(), req.CommID.FromUserID) return &pbFriend.GetFriendListResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil @@ -394,14 +400,14 @@ func (s *friendServer) GetFriendList(ctx context.Context, req *pbFriend.GetFrien for _, friendUser := range friends { var friendUserInfo sdkws.FriendInfo //find user is in blackList - err = imdb.FindRelationshipFromBlackList(req.CommID.FromUserID, friendUser.FriendUserID) + // err = imdb.GetRelationshipFromBlackList(req.CommID.FromUserID, friendUser.FriendUserID) //if err == nil { // friendUserInfo.IsBlack = constant.BlackListFlag //} else { // friendUserInfo.IsBlack = 0 //} //Find user information - us, err := imdb.FindUserByUID(friendUser.FriendUserID) + us, err := imdb.GetUserByUserID(friendUser.FriendUserID) if err != nil { log.NewError(req.CommID.OperationID, "FindUserByUID failed", err.Error(), friendUser.FriendUserID) continue @@ -426,7 +432,7 @@ func (s *friendServer) GetFriendApplyList(ctx context.Context, req *pbFriend.Get } // Find the current user friend applications received - ApplyUsersInfo, err := imdb.FindFriendsApplyFromFriendReq(req.CommID.FromUserID) + ApplyUsersInfo, err := imdb.GetReceivedFriendsApplicationListByUserID(req.CommID.FromUserID) if err != nil { log.NewError(req.CommID.OperationID, "FindFriendsApplyFromFriendReq ", err.Error(), req.CommID.FromUserID) return &pbFriend.GetFriendApplyListResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil @@ -453,7 +459,7 @@ func (s *friendServer) GetSelfApplyList(ctx context.Context, req *pbFriend.GetSe } // Find the self add other userinfo - usersInfo, err := imdb.FindSelfApplyFromFriendReq(req.CommID.FromUserID) + usersInfo, err := imdb.GetSendFriendApplicationListByUserID(req.CommID.FromUserID) if err != nil { log.NewError(req.CommID.OperationID, "FindSelfApplyFromFriendReq failed ", err.Error(), req.CommID.FromUserID) return &pbFriend.GetSelfApplyListResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index da9f82709..cf36f01ad 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -39,17 +39,16 @@ func NewGroupServer(port int) *groupServer { } func (s *groupServer) Run() { - log.Info("", "", "rpc group init....") - + log.NewInfo("0", "group rpc start ") ip := utils.ServerIP registerAddress := ip + ":" + strconv.Itoa(s.rpcPort) //listener network listener, err := net.Listen("tcp", registerAddress) if err != nil { - log.InfoByArgs("listen network failed,err=%s", err.Error()) + log.NewError("0", "Listen failed ", err.Error(), registerAddress) return } - log.Info("", "", "listen network success, address = %s", registerAddress) + log.NewInfo("0", "listen network success, ", registerAddress, listener) defer listener.Close() //grpc server srv := grpc.NewServer() @@ -58,15 +57,15 @@ func (s *groupServer) Run() { pbGroup.RegisterGroupServer(srv, s) err = getcdv3.RegisterEtcd(s.etcdSchema, strings.Join(s.etcdAddr, ","), ip, s.rpcPort, s.rpcRegisterName, 10) if err != nil { - log.ErrorByArgs("get etcd failed,err=%s", err.Error()) + log.NewError("0", "RegisterEtcd failed ", err.Error()) return } err = srv.Serve(listener) if err != nil { - log.ErrorByArgs("listen rpc_group error,err=%s", err.Error()) + log.NewError("0", "Serve failed ", err.Error()) return } - log.Info("", "", "rpc create group init success") + log.NewInfo("0", "group rpc success") } func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupReq) (*pbGroup.CreateGroupResp, error) { @@ -79,20 +78,24 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR //Time stamp + MD5 to generate group chat id groupId := utils.Md5(strconv.FormatInt(time.Now().UnixNano(), 10)) //to group - err := im_mysql_model.InsertIntoGroup(groupId, req.GroupInfo.GroupName, req.GroupInfo.Introduction, req.GroupInfo.Notification, req.GroupInfo.FaceUrl, req.GroupInfo.Ex, req.GroupInfo.GroupType) + groupInfo := imdb.Group{} + utils.CopyStructFields(&groupInfo, req.GroupInfo) + err := im_mysql_model.InsertIntoGroup(groupInfo) if err != nil { log.NewError(req.OperationID, "InsertIntoGroup failed, ", err.Error(), groupId, req.GroupInfo.GroupName, req.GroupInfo.Introduction, req.GroupInfo.Notification, req.GroupInfo.FaceUrl, req.GroupInfo.Ex, req.GroupInfo.GroupType) return &pbGroup.CreateGroupResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil } - us, err := im_mysql_model.FindUserByUID(req.OwnerUserID) + us, err := imdb.GetUserByUserID(req.OwnerUserID) if err != nil { log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), req.OwnerUserID) return &pbGroup.CreateGroupResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil } //to group member - err = im_mysql_model.InsertIntoGroupMember(groupId, us.UserID, us.Nickname, us.FaceUrl, constant.GroupOwner) + groupMember := imdb.GroupMember{GroupID: groupId, RoleLevel: 1} + utils.CopyStructFields(&groupMember, us) + err = im_mysql_model.InsertIntoGroupMember(groupMember) if err != nil { log.NewError(req.OperationID, "InsertIntoGroupMember failed ", err.Error()) return &pbGroup.CreateGroupResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil @@ -106,7 +109,7 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR //to group member for _, user := range req.InitMemberList { - us, err := im_mysql_model.FindUserByUID(user.UserID) + us, err := im_mysql_model.GetUserByUserID(user.UserID) if err != nil { log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), user.UserID) continue @@ -115,9 +118,10 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR log.NewError(req.OperationID, "only one owner, failed ", user) continue } - err = im_mysql_model.InsertIntoGroupMember(groupId, user.UserID, us.Nickname, us.FaceUrl, user.RoleLevel) + utils.CopyStructFields(&groupMember, us) + err = im_mysql_model.InsertIntoGroupMember(groupMember) if err != nil { - log.NewError(req.OperationID, "InsertIntoGroupMember failed ", groupId, user.UserID, us.Nickname, us.FaceUrl, user.RoleLevel) + log.NewError(req.OperationID, "InsertIntoGroupMember failed ", err.Error(), groupMember) } okUserIDList = append(okUserIDList, user.UserID) err = db.DB.AddGroupMember(groupId, user.UserID) @@ -127,9 +131,9 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR } resp := &pbGroup.CreateGroupResp{} - group, err := im_mysql_model.FindGroupInfoByGroupId(groupId) + group, err := im_mysql_model.GetGroupInfoByGroupID(groupId) if err != nil { - log.NewError(req.OperationID, "FindGroupInfoByGroupId failed ", err.Error(), groupId) + log.NewError(req.OperationID, "GetGroupInfoByGroupID failed ", err.Error(), groupId) resp.ErrCode = constant.ErrDB.ErrCode resp.ErrMsg = constant.ErrDB.ErrMsg return resp, nil @@ -146,20 +150,19 @@ func (s *groupServer) GetJoinedGroupList(ctx context.Context, req *pbGroup.GetJo log.NewError(req.OperationID, "CheckAccess false ", req.OpUserID, req.FromUserID) return &pbGroup.GetJoinedGroupListResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } - //group list - joinedGroupList, err := imdb.GetJoinedGroupIdListByMemberId(req.FromUserID) + joinedGroupList, err := imdb.GetJoinedGroupIDListByUserID(req.FromUserID) if err != nil { - log.NewError(req.OperationID, "GetJoinedGroupIdListByMemberId failed ", err.Error(), req.FromUserID) + log.NewError(req.OperationID, "GetJoinedGroupIDListByUserID failed ", err.Error(), req.FromUserID) return &pbGroup.GetJoinedGroupListResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil } var resp pbGroup.GetJoinedGroupListResp for _, v := range joinedGroupList { var groupNode open_im_sdk.GroupInfo - num := imdb.GetGroupMemberNumByGroupId(v.GroupID) - owner, err2 := imdb.GetGroupOwnerInfoByGroupId(v.GroupID) - group, err := imdb.FindGroupInfoByGroupId(v.GroupID) + num := imdb.GetGroupMemberNumByGroupID(v) + owner, err2 := imdb.GetGroupOwnerInfoByGroupID(v) + group, err := imdb.GetGroupInfoByGroupID(v) if num > 0 && owner != nil && err2 == nil && group != nil && err == nil { utils.CopyStructFields(&groupNode, group) groupNode.CreateTime = group.CreateTime @@ -184,7 +187,7 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite return &pbGroup.InviteUserToGroupResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } - groupInfoFromMysql, err := imdb.FindGroupInfoByGroupId(req.GroupID) + groupInfoFromMysql, err := imdb.GetGroupInfoByGroupID(req.GroupID) if err != nil || groupInfoFromMysql == nil { log.NewError(req.OperationID, "FindGroupInfoByGroupId failed ", req.GroupID, err) return &pbGroup.InviteUserToGroupResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil @@ -198,7 +201,8 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite var resultNode pbGroup.Id2Result resultNode.UserID = v resultNode.Result = 0 - toUserInfo, err := imdb.FindUserByUID(v) + toUserInfo, err := imdb.GetUserByUserID(v) + if err != nil { log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), v) resultNode.Result = -1 @@ -212,10 +216,13 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite resp.Id2ResultList = append(resp.Id2ResultList, &resultNode) continue } - - err = imdb.InsertGroupMember(req.GroupID, toUserInfo.UserID, toUserInfo.Nickname, toUserInfo.FaceUrl, 0) + var toInsertInfo imdb.GroupMember + utils.CopyStructFields(&toInsertInfo, toUserInfo) + toInsertInfo.GroupID = req.GroupID + toInsertInfo.RoleLevel = 0 + err = imdb.InsertIntoGroupMember(toInsertInfo) if err != nil { - log.NewError(req.OperationID, "InsertGroupMember failed ", req.GroupID, toUserInfo.UserID, toUserInfo.Nickname, toUserInfo.FaceUrl) + log.NewError(req.OperationID, "InsertIntoGroupMember failed ", req.GroupID, toUserInfo.UserID, toUserInfo.Nickname, toUserInfo.FaceUrl) resultNode.Result = -1 resp.Id2ResultList = append(resp.Id2ResultList, &resultNode) continue @@ -238,7 +245,7 @@ func (s *groupServer) GetGroupAllMember(ctx context.Context, req *pbGroup.GetGro log.NewInfo(req.OperationID, "GetGroupAllMember, args ", req.String()) var resp pbGroup.GetGroupAllMemberResp resp.ErrCode = 0 - memberList, err := imdb.FindGroupMemberListByGroupId(req.GroupID) + memberList, err := imdb.GetGroupMemberListByGroupID(req.GroupID) if err != nil { resp.ErrCode = constant.ErrDB.ErrCode resp.ErrMsg = constant.ErrDB.ErrMsg @@ -270,7 +277,7 @@ func (s *groupServer) GetGroupMemberList(ctx context.Context, req *pbGroup.GetGr var resp pbGroup.GetGroupMemberListResp resp.ErrCode = 0 - memberList, err := imdb.GetGroupMemberByGroupId(req.GroupID, req.Filter, req.NextSeq, 30) + memberList, err := imdb.GetGroupMemberByGroupID(req.GroupID, req.Filter, req.NextSeq, 30) if err != nil { resp.ErrCode = constant.ErrDB.ErrCode resp.ErrMsg = err.Error() @@ -297,7 +304,7 @@ func (s *groupServer) GetGroupMemberList(ctx context.Context, req *pbGroup.GetGr func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGroupMemberReq) (*pbGroup.KickGroupMemberResp, error) { log.NewInfo(req.OperationID, "KickGroupMember args ", req.String()) - ownerList, err := imdb.GetOwnerManagerByGroupId(req.GroupID) + ownerList, err := imdb.GetOwnerManagerByGroupID(req.GroupID) if err != nil { log.NewError(req.OperationID, "GetOwnerManagerByGroupId failed ", err.Error(), req.GroupID) return &pbGroup.KickGroupMemberResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil @@ -332,7 +339,7 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou groupOwnerUserID := "" for _, v := range ownerList { - if v.AdministratorLevel == 1 { + if v.RoleLevel == 1 { groupOwnerUserID = v.UserID } } @@ -374,7 +381,7 @@ func (s *groupServer) GetGroupMembersInfo(ctx context.Context, req *pbGroup.GetG for _, v := range req.MemberList { var memberNode open_im_sdk.GroupMemberFullInfo - memberInfo, err := imdb.GetMemberInfoById(req.GroupID, v) + memberInfo, err := imdb.GetMemberInfoByID(req.GroupID, v) memberNode.UserID = v if err != nil { log.NewError(req.OperationID, "GetMemberInfoById failed ", err.Error(), req.GroupID, v) @@ -397,15 +404,21 @@ func (s *groupServer) GetGroupApplicationList(_ context.Context, req *pbGroup.Ge log.NewError(req.OperationID, "GetGroupApplicationList failed ", err.Error(), req.OpUserID) return &pbGroup.GetGroupApplicationListResp{ErrCode: 701, ErrMsg: "GetGroupApplicationList failed"}, nil } - log.NewInfo(req.OperationID, "GetGroupMembersInfo rpc return ", reply) - return reply, nil + + resp := pbGroup.GetGroupApplicationListResp{} + for _, v := range reply { + var node open_im_sdk.GroupRequest + utils.CopyStructFields(&node, v) + } + log.NewInfo(req.OperationID, "GetGroupMembersInfo rpc return ", resp) + return &resp, nil } func (s *groupServer) GetGroupsInfo(ctx context.Context, req *pbGroup.GetGroupsInfoReq) (*pbGroup.GetGroupsInfoResp, error) { log.NewInfo(req.OperationID, "GetGroupsInfo args ", req.String()) groupsInfoList := make([]*open_im_sdk.GroupInfo, 0) for _, groupID := range req.GroupIDList { - groupInfoFromMysql, err := im_mysql_model.FindGroupInfoByGroupId(groupID) + groupInfoFromMysql, err := im_mysql_model.GetGroupInfoByGroupID(groupID) if err != nil { log.NewError(req.OperationID, "FindGroupInfoByGroupId failed ", err.Error(), groupID) continue @@ -439,17 +452,6 @@ func (s *groupServer) GroupApplicationResponse(_ context.Context, req *pbGroup.G chat.ApplicationProcessedNotification(req) if req.HandleResult == 1 { chat.MemberEnterNotification(req) - //if req.ToUserID == "0" { - // err = db.DB.AddGroupMember(req.GroupID, req.FromUserID) - // if err != nil { - // log.NewError(req.OperationID, "AddGroupMember failed ", err.Error(), req.GroupID, req.FromUserID) - // } - //} else { - // err = db.DB.AddGroupMember(req.GroupID, req.ToUserID) - // if err != nil { - // log.NewError(req.OperationID, "AddGroupMember failed ", err.Error(), req.GroupID, req.ToUserID) - // } - //} } log.NewInfo(req.OperationID, "rpc GroupApplicationResponse return ") @@ -458,26 +460,23 @@ func (s *groupServer) GroupApplicationResponse(_ context.Context, req *pbGroup.G func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq) (*pbGroup.JoinGroupResp, error) { log.NewInfo(req.OperationID, "JoinGroup args ", req.String()) - - applicationUserInfo, err := im_mysql_model.FindUserByUID(req.OpUserID) + applicationUserInfo, err := imdb.GetUserByUserID(req.OpUserID) if err != nil { log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), req.OpUserID) return &pbGroup.JoinGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } - _, err = im_mysql_model.FindGroupRequestUserInfoByGroupIDAndUid(req.GroupID, req.OpUserID) - if err == nil { - err = im_mysql_model.DelGroupRequest(req.GroupID, req.OpUserID, "0") - } - - if err = im_mysql_model.InsertIntoGroupRequest(req.GroupID, req.OpUserID, "0", req.ReqMessage, applicationUserInfo.Nickname, applicationUserInfo.FaceUrl); err != nil { - log.NewError(req.OperationID, "InsertIntoGroupRequest ", err.Error(), req.GroupID, req.OpUserID, "0", req.ReqMessage, applicationUserInfo.Nickname, applicationUserInfo.FaceUrl) + var groupRequest imdb.GroupRequest + utils.CopyStructFields(&groupRequest, req) + err = imdb.UpdateGroupRequest(groupRequest) + if err != nil { + log.NewError(req.OperationID, "UpdateGroupRequest ", err.Error(), groupRequest) return &pbGroup.JoinGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } - memberList, err := im_mysql_model.FindGroupMemberListByGroupIdAndFilterInfo(req.GroupID, constant.GroupOwner) - if len(memberList) == 0 { - log.NewError(req.OperationID, "FindGroupMemberListByGroupIdAndFilterInfo failed ", req.GroupID, constant.GroupOwner, err) + _, err = imdb.GetGroupMemberListByGroupIDAndRoleLevel(req.GroupID, constant.GroupOwner) + if err != nil { + log.NewError(req.OperationID, "GetGroupMemberListByGroupIDAndRoleLevel failed ", err.Error(), req.GroupID, constant.GroupOwner) return &pbGroup.JoinGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""}}, nil } @@ -490,13 +489,13 @@ func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq) func (s *groupServer) QuitGroup(ctx context.Context, req *pbGroup.QuitGroupReq) (*pbGroup.QuitGroupResp, error) { log.NewError("QuitGroup args ", req.String()) - _, err := im_mysql_model.FindGroupMemberInfoByGroupIdAndUserId(req.GroupID, req.OpUserID) + _, err := imdb.GetGroupMemberInfoByGroupIDAndUserID(req.GroupID, req.OpUserID) if err != nil { log.NewError(req.OperationID, "FindGroupMemberInfoByGroupIdAndUserId failed", err.Error(), req.GroupID, req.OpUserID) return &pbGroup.QuitGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } - err = im_mysql_model.DeleteGroupMemberByGroupIdAndUserId(req.GroupID, req.OpUserID) + err = imdb.DeleteGroupMemberByGroupIDAndUserID(req.GroupID, req.OpUserID) if err != nil { log.NewError(req.OperationID, "DeleteGroupMemberByGroupIdAndUserId failed ", err.Error(), req.GroupID, req.OpUserID) return &pbGroup.QuitGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil @@ -517,13 +516,13 @@ func hasAccess(req *pbGroup.SetGroupInfoReq) bool { if utils.IsContain(req.OpUserID, config.Config.Manager.AppManagerUid) { return true } - groupUserInfo, err := im_mysql_model.FindGroupMemberInfoByGroupIdAndUserId(req.GroupInfo.GroupID, req.OpUserID) + groupUserInfo, err := im_mysql_model.GetGroupMemberInfoByGroupIDAndUserID(req.GroupInfo.GroupID, req.OpUserID) if err != nil { log.NewError(req.OperationID, "FindGroupMemberInfoByGroupIdAndUserId failed, ", err.Error(), req.GroupInfo.GroupID, req.OpUserID) return false } - if groupUserInfo.AdministratorLevel == constant.OrdinaryMember { + if groupUserInfo.RoleLevel == constant.OrdinaryMember { return true } } @@ -535,9 +534,9 @@ func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInf return &pbGroup.SetGroupInfoResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil } - group, err := im_mysql_model.FindGroupInfoByGroupId(req.GroupInfo.GroupID) + group, err := im_mysql_model.GetGroupInfoByGroupID(req.GroupInfo.GroupID) if err != nil { - log.NewError(req.OperationID, "FindGroupInfoByGroupId failed, ", err.Error(), req.GroupInfo.GroupID) + log.NewError(req.OperationID, "FindGroupInfoByGroupId failed ", err.Error(), req.GroupInfo.GroupID) return &pbGroup.SetGroupInfoResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil } @@ -556,15 +555,18 @@ func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInf changedType = changedType | (1 << 3) } //only administrators can set group information - if err = im_mysql_model.SetGroupInfo(req.GroupInfo.GroupID, req.GroupInfo.GroupName, req.GroupInfo.Introduction, req.GroupInfo.Notification, req.GroupInfo.FaceUrl, ""); err != nil { - return &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil + var groupInfo imdb.Group + utils.CopyStructFields(&groupInfo, req.GroupInfo) + err = imdb.SetGroupInfo(groupInfo) + if err != nil { + return &pbGroup.SetGroupInfoResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil } if changedType != 0 { chat.GroupInfoChangedNotification(req.OperationID, req.OpUserID, req.GroupInfo.GroupID, changedType) } - log.NewInfo("SetGroupInfo rpc return ") - return &pbGroup.CommonResp{}, nil + log.NewInfo("SetGroupInfo rpc return ", pbGroup.SetGroupInfoResp{CommonResp: &pbGroup.CommonResp{}}) + return &pbGroup.SetGroupInfoResp{CommonResp: &pbGroup.CommonResp{}}, nil } func (s *groupServer) TransferGroupOwner(_ context.Context, req *pbGroup.TransferGroupOwnerReq) (*pbGroup.TransferGroupOwnerResp, error) { diff --git a/pkg/base_info/public_struct.go b/pkg/base_info/public_struct.go index dd0689c6b..679b58082 100644 --- a/pkg/base_info/public_struct.go +++ b/pkg/base_info/public_struct.go @@ -16,7 +16,6 @@ type UserInfo struct { Ex string `json:"ex" binding:"omitempty,max=1024"` } -//c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) func SetErrCodeMsg(c *gin.Context, status int) *CommResp { resp := CommResp{ErrCode: int32(status), ErrMsg: http.StatusText(status)} c.JSON(status, resp) diff --git a/pkg/base_info/user_api_struct.go b/pkg/base_info/user_api_struct.go index c129e8c76..2e736e97f 100644 --- a/pkg/base_info/user_api_struct.go +++ b/pkg/base_info/user_api_struct.go @@ -22,7 +22,6 @@ type GetUserInfoReq struct { OperationID string `json:"operationID" binding:"required"` UserIDList []string `json:"userIDList" binding:"required"` } - type GetUserInfoResp struct { CommResp UserInfoList []*open_im_sdk.UserInfo `json:"data"` diff --git a/pkg/common/db/mysql_model/im_mysql_model/friend_model.go b/pkg/common/db/mysql_model/im_mysql_model/friend_model.go index 6f5c5060e..0ef118f14 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/friend_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/friend_model.go @@ -20,7 +20,7 @@ func InsertToFriend(toInsertFollow *Friend) error { return nil } -func FindFriendRelationshipFromFriend(OwnerUserID, FriendUserID string) (*Friend, error) { +func GetFriendRelationshipFromFriend(OwnerUserID, FriendUserID string) (*Friend, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err @@ -33,7 +33,7 @@ func FindFriendRelationshipFromFriend(OwnerUserID, FriendUserID string) (*Friend return &friend, err } -func FindUserInfoFromFriend(OwnerUserID string) ([]Friend, error) { +func GetUserInfoFromFriend(OwnerUserID string) ([]Friend, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err diff --git a/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go b/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go index e2a332364..735380d0b 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go @@ -45,7 +45,7 @@ func GetSendFriendApplicationListByUserID(FromUserID string) ([]FriendRequest, e } //reqId apply to add userId already -func FindFriendApplicationByBothUserID(FromUserId, ToUserID string) (*FriendRequest, error) { +func GetFriendApplicationByBothUserID(FromUserId, ToUserID string) (*FriendRequest, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err @@ -58,7 +58,7 @@ func FindFriendApplicationByBothUserID(FromUserId, ToUserID string) (*FriendRequ return &friendRequest, nil } -func UpdateFriendApplication(friendRequest FriendRequest) error { +func UpdateFriendApplication(friendRequest *FriendRequest) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return err diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go index 888fff2e8..0f159abee 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go @@ -21,6 +21,7 @@ func InsertIntoGroupMember(toInsertInfo GroupMember) error { if err != nil { return err } + toInsertInfo.JoinSource = time.Now() err = dbConn.Table("group_member").Create(toInsertInfo).Error if err != nil { return err @@ -54,13 +55,13 @@ func GetGroupMemberListByGroupID(groupID string) ([]GroupMember, error) { return groupMemberList, nil } -func GetGroupMemberListByGroupIDAndFilter(groupID string, filter int32) ([]GroupMember, error) { +func GetGroupMemberListByGroupIDAndRoleLevel(groupID string, roleLevel int32) ([]GroupMember, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err } var groupMemberList []GroupMember - err = dbConn.Table("group_member").Where("group_id=? and role_level=?", groupID, filter).Find(&groupMemberList).Error + err = dbConn.Table("group_member").Where("group_id=? and role_level=?", groupID, role_level).Find(&groupMemberList).Error if err != nil { return nil, err } diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_model.go index 120815a61..672e2ae93 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_model.go @@ -2,7 +2,6 @@ package im_mysql_model import ( "Open_IM/pkg/common/db" - "Open_IM/pkg/common/log" "Open_IM/pkg/proto/group" "errors" "time" From 292a8620e05a7a3e3102f007f2c19164996598bf Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Tue, 28 Dec 2021 10:59:01 +0800 Subject: [PATCH 033/337] remove invalid token --- internal/api/chat/send_msg.go | 2 +- pkg/common/db/redisModel.go | 9 +++++++-- pkg/common/token_verify/jwt_token.go | 16 ++++++++++++++++ 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/internal/api/chat/send_msg.go b/internal/api/chat/send_msg.go index 8522ae228..3909ac125 100644 --- a/internal/api/chat/send_msg.go +++ b/internal/api/chat/send_msg.go @@ -44,7 +44,7 @@ func newUserSendMsgReq(token string, params *paramsUserSendMsg) *pbChat.SendMsgR GroupID: params.Data.GroupID, ClientMsgID: params.Data.ClientMsgID, SenderPlatformID: params.SenderPlatformID, - SenderNickName: params.SenderNickName, + SenderNickname: params.SenderNickName, SenderFaceURL: params.SenderFaceURL, SessionType: params.Data.SessionType, MsgFrom: params.Data.MsgFrom, diff --git a/pkg/common/db/redisModel.go b/pkg/common/db/redisModel.go index a9d552699..7364d7e68 100644 --- a/pkg/common/db/redisModel.go +++ b/pkg/common/db/redisModel.go @@ -91,10 +91,15 @@ func (d *DataBases) SetTokenMapByUidPid(userID string, platformID int32, m map[s _, err := d.Exec("hmset", key, redis.Args{}.Add().AddFlat(m)...) return err } +func (d *DataBases) DeleteTokenByUidPid(userID string, platformID int32, fields []string) error { + key := uidPidToken + userID + ":" + constant.PlatformIDToName(platformID) + _, err := d.Exec("HDEL", key, redis.Args{}.Add().AddFlat(fields)...) + return err +} func (d *DataBases) SetSingleConversationMsgOpt(userID, conversationID string, opt int) error { key := conversationReceiveMessageOpt + userID - _, err1 := d.Exec("HSet", key, conversationID, opt) - return err1 + _, err := d.Exec("HSet", key, conversationID, opt) + return err } func (d *DataBases) GetSingleConversationMsgOpt(userID, conversationID string) (int, error) { key := conversationReceiveMessageOpt + userID diff --git a/pkg/common/token_verify/jwt_token.go b/pkg/common/token_verify/jwt_token.go index 1f3f444b2..4d33c3a58 100644 --- a/pkg/common/token_verify/jwt_token.go +++ b/pkg/common/token_verify/jwt_token.go @@ -6,6 +6,7 @@ import ( commonDB "Open_IM/pkg/common/db" "Open_IM/pkg/common/log" "Open_IM/pkg/utils" + "github.com/garyburd/redigo/redis" "github.com/golang-jwt/jwt/v4" "time" ) @@ -43,6 +44,21 @@ func CreateToken(userID string, platformID int32) (string, int64, error) { if err != nil { return "", 0, err } + //remove Invalid token + m, err := commonDB.DB.GetTokenMapByUidPid(userID, constant.PlatformIDToName(platformID)) + if err != nil && err != redis.ErrNil { + return "", 0, err + } + var deleteTokenKey []string + for k, v := range m { + if v != constant.NormalToken { + deleteTokenKey = append(deleteTokenKey, k) + } + } + err = commonDB.DB.DeleteTokenByUidPid(userID, platformID, deleteTokenKey) + if err != nil { + return "", 0, err + } err = commonDB.DB.AddTokenFlag(userID, platformID, tokenString, constant.NormalToken) if err != nil { return "", 0, err From 6b1f4e16867e3b38aa24f02202c8928527fb512d Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 28 Dec 2021 11:57:12 +0800 Subject: [PATCH 034/337] tidy code --- internal/rpc/friend/firend.go | 104 ++++++++---------- internal/rpc/group/group.go | 51 ++++----- .../im_mysql_model/friend_model.go | 2 +- .../im_mysql_model/friend_request_model.go | 19 +++- .../im_mysql_model/group_member_model.go | 2 +- pkg/proto/sdk_ws/ws.proto | 1 - 6 files changed, 85 insertions(+), 94 deletions(-) diff --git a/internal/rpc/friend/firend.go b/internal/rpc/friend/firend.go index ed0d4e5ff..eff77a572 100644 --- a/internal/rpc/friend/firend.go +++ b/internal/rpc/friend/firend.go @@ -111,7 +111,8 @@ func (s *friendServer) AddBlacklist(ctx context.Context, req *pbFriend.AddBlackl log.NewInfo(req.CommID.OperationID, "AddBlacklist args ", req.String()) ok := token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) if !ok { - log.NewError(req.CommID.OperationID, "CheckAccess failed ", req.CommID.OpUserID, req.CommID.FromUserID) + log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID) + return &pbFriend.AddBlacklistResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil } black := imdb.Black{OwnerUserID: req.CommID.FromUserID, BlockUserID: req.CommID.ToUserID} @@ -120,7 +121,7 @@ func (s *friendServer) AddBlacklist(ctx context.Context, req *pbFriend.AddBlackl log.NewError(req.CommID.OperationID, "InsertInToUserBlackList failed ", err.Error()) return &pbFriend.AddBlacklistResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } - log.NewInfo(req.CommID.OperationID, "InsertInToUserBlackList ok ", req.CommID.FromUserID, req.CommID.ToUserID) + log.NewInfo(req.CommID.OperationID, "AddBlacklist rpc ok ", req.CommID.FromUserID, req.CommID.ToUserID) chat.BlackAddedNotification(req) return &pbFriend.AddBlacklistResp{CommonResp: &pbFriend.CommonResp{}}, nil } @@ -129,7 +130,8 @@ func (s *friendServer) AddFriend(ctx context.Context, req *pbFriend.AddFriendReq log.NewInfo(req.CommID.OperationID, "AddFriend args ", req.String()) ok := token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) if !ok { - log.NewError(req.CommID.OperationID, "CheckAccess failed ", req.CommID.OpUserID, req.CommID.FromUserID) + log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID) + return &pbFriend.AddFriendResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil } //Cannot add non-existent users if _, err := imdb.GetUserByUserID(req.CommID.ToUserID); err != nil { @@ -142,7 +144,7 @@ func (s *friendServer) AddFriend(ctx context.Context, req *pbFriend.AddFriendReq utils.CopyStructFields(&friendRequest, req.CommID) err := imdb.UpdateFriendApplication(&friendRequest) if err != nil { - log.NewError(req.CommID.OperationID, "UpdateFriendApplication failed ", err.Error()) + log.NewError(req.CommID.OperationID, "UpdateFriendApplication failed ", err.Error(), friendRequest) return &pbFriend.AddFriendResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } @@ -150,19 +152,20 @@ func (s *friendServer) AddFriend(ctx context.Context, req *pbFriend.AddFriendReq return &pbFriend.AddFriendResp{CommonResp: &pbFriend.CommonResp{}}, nil } +//todo func (s *friendServer) ImportFriend(ctx context.Context, req *pbFriend.ImportFriendReq) (*pbFriend.ImportFriendResp, error) { log.NewInfo(req.OperationID, "ImportFriend failed ", req.String()) var resp pbFriend.ImportFriendResp var c pbFriend.CommonResp if !utils.IsContain(req.OpUserID, config.Config.Manager.AppManagerUid) { - log.NewError(req.OperationID, "not authorized", req.OpUserID) + log.NewError(req.OperationID, "not authorized", req.OpUserID, config.Config.Manager.AppManagerUid) c.ErrCode = constant.ErrAccess.ErrCode c.ErrMsg = constant.ErrAccess.ErrMsg return &pbFriend.ImportFriendResp{CommonResp: &c, FailedFriendUserIDList: req.FriendUserIDList}, nil } if _, err := imdb.GetUserByUserID(req.FromUserID); err != nil { - log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), req.FromUserID) + log.NewError(req.OperationID, "GetUserByUserID failed ", err.Error(), req.FromUserID) c.ErrCode = constant.ErrDB.ErrCode c.ErrMsg = "this user not exists,cant not add friend" return &pbFriend.ImportFriendResp{CommonResp: &c, FailedFriendUserIDList: req.FriendUserIDList}, nil @@ -209,8 +212,8 @@ func (s *friendServer) ImportFriend(ctx context.Context, req *pbFriend.ImportFri func (s *friendServer) AddFriendResponse(ctx context.Context, req *pbFriend.AddFriendResponseReq) (*pbFriend.AddFriendResponseResp, error) { log.NewInfo(req.CommID.OperationID, "AddFriendResponse args ", req.String()) - if !token_verify.CheckAccess(req.CommID.FromUserID, req.CommID.ToUserID) { - log.NewError(req.CommID.OperationID, "CheckAccess failed ", req.CommID.FromUserID, req.CommID.ToUserID) + if !token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) { + log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID) return &pbFriend.AddFriendResponseResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil } @@ -221,45 +224,47 @@ func (s *friendServer) AddFriendResponse(ctx context.Context, req *pbFriend.AddF log.NewError(req.CommID.OperationID, "GetFriendApplicationByBothUserID failed ", err.Error(), req.CommID.ToUserID, req.CommID.FromUserID) return &pbFriend.AddFriendResponseResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } - friendRequest.HandleResult = req.Flag - //Change friend request status flag + friendRequest.HandleTime = time.Now() + friendRequest.HandleMsg = req.HandleMsg + friendRequest.HandlerUserID = req.CommID.OpUserID err = imdb.UpdateFriendApplication(friendRequest) if err != nil { log.NewError(req.CommID.OperationID, "UpdateFriendApplication failed ", err.Error(), friendRequest) return &pbFriend.AddFriendResponseResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } - log.NewInfo(req.CommID.OperationID, "rpc AddFriendResponse ok") //Change the status of the friend request form if req.Flag == constant.FriendFlag { //Establish friendship after find friend relationship not exists - _, err := imdb.FindFriendRelationshipFromFriend(req.CommID.FromUserID, req.CommID.ToUserID) + _, err := imdb.GetFriendRelationshipFromFriend(req.CommID.FromUserID, req.CommID.ToUserID) if err == nil { - log.NewWarn(req.CommID.OperationID, "FindFriendRelationshipFromFriend exist", req.CommID.FromUserID, req.CommID.ToUserID) + log.NewWarn(req.CommID.OperationID, "GetFriendRelationshipFromFriend exist", req.CommID.FromUserID, req.CommID.ToUserID) } else { //Establish two single friendship - err = imdb.InsertToFriend(req.CommID.FromUserID, req.CommID.ToUserID, req.Flag) + toInsertFollow := imdb.Friend{OwnerUserID: req.CommID.FromUserID, FriendUserID: req.CommID.ToUserID, OperatorUserID: req.CommID.OpUserID} + err = imdb.InsertToFriend(&toInsertFollow) if err != nil { - log.NewError(req.CommID.OperationID, "InsertToFriend failed ", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID, req.Flag) + log.NewError(req.CommID.OperationID, "InsertToFriend failed ", err.Error(), toInsertFollow) return &pbFriend.AddFriendResponseResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } } - _, err = imdb.FindFriendRelationshipFromFriend(req.CommID.ToUserID, req.CommID.FromUserID) + _, 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) - return &pbFriend.AddFriendResponseResp{CommonResp: &pbFriend.CommonResp{}}, nil } - err = imdb.InsertToFriend(req.CommID.ToUserID, req.CommID.FromUserID, req.Flag) + toInsertFollow := imdb.Friend{OwnerUserID: req.CommID.ToUserID, FriendUserID: req.CommID.FromUserID, OperatorUserID: req.CommID.OpUserID} + err = imdb.InsertToFriend(&toInsertFollow) if err != nil { - log.NewError(req.CommID.OperationID, "InsertToFriend failed ", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID, req.Flag) + log.NewError(req.CommID.OperationID, "InsertToFriend failed ", err.Error(), toInsertFollow) return &pbFriend.AddFriendResponseResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } + chat.FriendAddedNotification(req.CommID.OperationID, req.CommID.OpUserID, req.CommID.FromUserID, req.CommID.ToUserID) } chat.FriendApplicationProcessedNotification(req) - chat.FriendAddedNotification(req.CommID.OperationID, req.CommID.OpUserID, req.CommID.FromUserID, req.CommID.ToUserID) + log.NewInfo(req.CommID.OperationID, "rpc AddFriendResponse ok") return &pbFriend.AddFriendResponseResp{CommonResp: &pbFriend.CommonResp{}}, nil } @@ -286,7 +291,7 @@ func (s *friendServer) GetBlacklist(ctx context.Context, req *pbFriend.GetBlackl //Parse token, to find current user information if !token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) { - log.NewError(req.CommID.OperationID, "CheckAccess failed", req.CommID.OpUserID, req.CommID.FromUserID) + log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID) return &pbFriend.GetBlacklistResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } @@ -304,13 +309,13 @@ func (s *friendServer) GetBlacklist(ctx context.Context, req *pbFriend.GetBlackl //Find black user information us, err := imdb.GetUserByUserID(blackUser.BlockUserID) if err != nil { - log.NewError(req.CommID.OperationID, "FindUserByUID failed ", err.Error(), blackUser.BlockUserID) + log.NewError(req.CommID.OperationID, "GetUserByUserID failed ", err.Error(), blackUser.BlockUserID) continue } utils.CopyStructFields(&blackUserInfo, us) userInfoList = append(userInfoList, &blackUserInfo) } - log.NewInfo(req.CommID.OperationID, "rpc GetBlacklist ok") + log.NewInfo(req.CommID.OperationID, "rpc GetBlacklist ok ", pbFriend.GetBlacklistResp{BlackUserInfoList: userInfoList}) return &pbFriend.GetBlacklistResp{BlackUserInfoList: userInfoList}, nil } @@ -318,13 +323,13 @@ func (s *friendServer) SetFriendComment(ctx context.Context, req *pbFriend.SetFr log.NewInfo(req.CommID.OperationID, "SetFriendComment args ", req.String()) //Parse token, to find current user information if !token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) { - log.NewError(req.CommID.OperationID, "CheckAccess false", req.CommID.OpUserID, req.CommID.FromUserID) + log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID) return &pbFriend.SetFriendCommentResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil } - err := imdb.UpdateFriendComment(req.CommID.FromUserID, req.CommID.OpUserID, req.Remark) + err := imdb.UpdateFriendComment(req.CommID.FromUserID, req.CommID.ToUserID, req.Remark) if err != nil { - log.NewError(req.CommID.OperationID, "UpdateFriendComment failed ", err.Error(), req.CommID.FromUserID, req.CommID.OpUserID, req.Remark) + log.NewError(req.CommID.OperationID, "UpdateFriendComment failed ", req.CommID.FromUserID, req.CommID.ToUserID, req.Remark) return &pbFriend.SetFriendCommentResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } log.NewInfo(req.CommID.OperationID, "rpc SetFriendComment ok") @@ -336,7 +341,7 @@ func (s *friendServer) RemoveBlacklist(ctx context.Context, req *pbFriend.Remove log.NewInfo(req.CommID.OperationID, "RemoveBlacklist args ", req.String()) //Parse token, to find current user information if !token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) { - log.NewError(req.CommID.OperationID, "CheckAccess false", req.CommID.OpUserID, req.CommID.FromUserID) + log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID) return &pbFriend.RemoveBlacklistResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil } err := imdb.RemoveBlackList(req.CommID.FromUserID, req.CommID.ToUserID) @@ -345,7 +350,7 @@ func (s *friendServer) RemoveBlacklist(ctx context.Context, req *pbFriend.Remove return &pbFriend.RemoveBlacklistResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil } - log.NewInfo(req.CommID.OperationID, "rpc RemoveBlacklist ok") + log.NewInfo(req.CommID.OperationID, "rpc RemoveBlacklist ok ") chat.BlackDeletedNotification(req) return &pbFriend.RemoveBlacklistResp{CommonResp: &pbFriend.CommonResp{}}, nil } @@ -353,7 +358,7 @@ func (s *friendServer) RemoveBlacklist(ctx context.Context, req *pbFriend.Remove func (s *friendServer) IsInBlackList(ctx context.Context, req *pbFriend.IsInBlackListReq) (*pbFriend.IsInBlackListResp, error) { log.NewInfo("IsInBlackList args ", req.String()) if !token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) { - log.NewError(req.CommID.OperationID, "CheckAccess false", req.CommID.OpUserID, req.CommID.FromUserID) + log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID) return &pbFriend.IsInBlackListResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } @@ -362,7 +367,7 @@ func (s *friendServer) IsInBlackList(ctx context.Context, req *pbFriend.IsInBlac if err == nil { isInBlacklist = true } - log.NewInfo(req.CommID.OperationID, "IsInBlackList rpc ok") + log.NewInfo(req.CommID.OperationID, "IsInBlackList rpc ok ", pbFriend.IsInBlackListResp{Response: isInBlacklist}) return &pbFriend.IsInBlackListResp{Response: isInBlacklist}, nil } @@ -379,62 +384,45 @@ func (s *friendServer) IsFriend(ctx context.Context, req *pbFriend.IsFriendReq) } else { isFriend = false } - log.NewInfo("IsFriend rpc ok") + log.NewInfo("IsFriend rpc ok ", pbFriend.IsFriendResp{Response: isFriend}) return &pbFriend.IsFriendResp{Response: isFriend}, nil } func (s *friendServer) GetFriendList(ctx context.Context, req *pbFriend.GetFriendListReq) (*pbFriend.GetFriendListResp, error) { log.NewInfo("GetFriendList args ", req.String()) - var userInfoList []*sdkws.FriendInfo - //Parse token, to find current user information if !token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) { log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID) return &pbFriend.GetFriendListResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } - friends, err := imdb.GetUserInfoFromFriend(req.CommID.FromUserID) + friends, err := imdb.GetFriendListByUserID(req.CommID.FromUserID) if err != nil { - log.NewError(req.CommID.OperationID, "FindUserInfoFromFriend failed", err.Error(), req.CommID.FromUserID) + log.NewError(req.CommID.OperationID, "FindUserInfoFromFriend failed ", err.Error(), req.CommID.FromUserID) return &pbFriend.GetFriendListResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil } + var userInfoList []*sdkws.FriendInfo for _, friendUser := range friends { + var friendUserInfo sdkws.FriendInfo - //find user is in blackList - // err = imdb.GetRelationshipFromBlackList(req.CommID.FromUserID, friendUser.FriendUserID) - //if err == nil { - // friendUserInfo.IsBlack = constant.BlackListFlag - //} else { - // friendUserInfo.IsBlack = 0 - //} - //Find user information - us, err := imdb.GetUserByUserID(friendUser.FriendUserID) - if err != nil { - log.NewError(req.CommID.OperationID, "FindUserByUID failed", err.Error(), friendUser.FriendUserID) - continue - } - utils.CopyStructFields(friendUserInfo.FriendUser, us) - friendUserInfo.Remark = friendUser.Remark - friendUserInfo.OwnerUserID = req.CommID.FromUserID - friendUserInfo.CreateTime = friendUser.CreateTime + utils.CopyStructFields(&friendUserInfo, friendUser) userInfoList = append(userInfoList, &friendUserInfo) } log.NewInfo(req.CommID.OperationID, "rpc GetFriendList ok", pbFriend.GetFriendListResp{FriendInfoList: userInfoList}) return &pbFriend.GetFriendListResp{FriendInfoList: userInfoList}, nil } +//received func (s *friendServer) GetFriendApplyList(ctx context.Context, req *pbFriend.GetFriendApplyListReq) (*pbFriend.GetFriendApplyListResp, error) { log.NewInfo(req.CommID.OperationID, "GetFriendApplyList args ", req.String()) - //Parse token, to find current user information if !token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) { log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID) return &pbFriend.GetFriendApplyListResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } - // Find the current user friend applications received ApplyUsersInfo, err := imdb.GetReceivedFriendsApplicationListByUserID(req.CommID.FromUserID) if err != nil { - log.NewError(req.CommID.OperationID, "FindFriendsApplyFromFriendReq ", err.Error(), req.CommID.FromUserID) + log.NewError(req.CommID.OperationID, "GetReceivedFriendsApplicationListByUserID ", err.Error(), req.CommID.FromUserID) return &pbFriend.GetFriendApplyListResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil } @@ -451,19 +439,19 @@ func (s *friendServer) GetFriendApplyList(ctx context.Context, req *pbFriend.Get func (s *friendServer) GetSelfApplyList(ctx context.Context, req *pbFriend.GetSelfApplyListReq) (*pbFriend.GetSelfApplyListResp, error) { log.NewInfo(req.CommID.OperationID, "GetSelfApplyList args ", req.String()) - var selfApplyOtherUserList []*sdkws.FriendRequest + //Parse token, to find current user information if !token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) { log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID) return &pbFriend.GetSelfApplyListResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } - // Find the self add other userinfo usersInfo, err := imdb.GetSendFriendApplicationListByUserID(req.CommID.FromUserID) if err != nil { - log.NewError(req.CommID.OperationID, "FindSelfApplyFromFriendReq failed ", err.Error(), req.CommID.FromUserID) + log.NewError(req.CommID.OperationID, "GetSendFriendApplicationListByUserID failed ", err.Error(), req.CommID.FromUserID) return &pbFriend.GetSelfApplyListResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil } + var selfApplyOtherUserList []*sdkws.FriendRequest for _, selfApplyOtherUserInfo := range usersInfo { var userInfo sdkws.FriendRequest // pbFriend.ApplyUserInfo utils.CopyStructFields(&userInfo, selfApplyOtherUserInfo) diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index cf36f01ad..53ab002d8 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -74,21 +74,22 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR log.NewError(req.OperationID, "CheckAccess false ", req.OpUserID, req.OwnerUserID) return &pbGroup.CreateGroupResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } - var okUserIDList []string + //Time stamp + MD5 to generate group chat id groupId := utils.Md5(strconv.FormatInt(time.Now().UnixNano(), 10)) //to group - groupInfo := imdb.Group{} + groupInfo := imdb.Group{GroupID: groupId} utils.CopyStructFields(&groupInfo, req.GroupInfo) + groupInfo.CreatorUserID = req.OpUserID err := im_mysql_model.InsertIntoGroup(groupInfo) if err != nil { - log.NewError(req.OperationID, "InsertIntoGroup failed, ", err.Error(), groupId, req.GroupInfo.GroupName, req.GroupInfo.Introduction, req.GroupInfo.Notification, req.GroupInfo.FaceUrl, req.GroupInfo.Ex, req.GroupInfo.GroupType) + log.NewError(req.OperationID, "InsertIntoGroup failed, ", err.Error(), groupInfo) return &pbGroup.CreateGroupResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil } us, err := imdb.GetUserByUserID(req.OwnerUserID) if err != nil { - log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), req.OwnerUserID) + log.NewError(req.OperationID, "GetUserByUserID failed ", err.Error(), req.OwnerUserID) return &pbGroup.CreateGroupResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil } @@ -97,16 +98,15 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR utils.CopyStructFields(&groupMember, us) err = im_mysql_model.InsertIntoGroupMember(groupMember) if err != nil { - log.NewError(req.OperationID, "InsertIntoGroupMember failed ", err.Error()) + log.NewError(req.OperationID, "InsertIntoGroupMember failed ", err.Error(), groupMember) return &pbGroup.CreateGroupResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil } err = db.DB.AddGroupMember(groupId, req.OwnerUserID) if err != nil { log.NewError(req.OperationID, "AddGroupMember failed ", err.Error(), groupId, req.OwnerUserID) - // return &pbGroup.CreateGroupResp{ErrCode: constant.ErrCreateGroup.ErrCode, ErrMsg: constant.ErrCreateGroup.ErrMsg}, nil } - + var okUserIDList []string //to group member for _, user := range req.InitMemberList { us, err := im_mysql_model.GetUserByUserID(user.UserID) @@ -118,11 +118,14 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR log.NewError(req.OperationID, "only one owner, failed ", user) continue } + groupMember.RoleLevel = user.RoleLevel utils.CopyStructFields(&groupMember, us) err = im_mysql_model.InsertIntoGroupMember(groupMember) if err != nil { log.NewError(req.OperationID, "InsertIntoGroupMember failed ", err.Error(), groupMember) + continue } + okUserIDList = append(okUserIDList, user.UserID) err = db.DB.AddGroupMember(groupId, user.UserID) if err != nil { @@ -140,6 +143,9 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR } chat.GroupCreatedNotification(req.OperationID, req.OpUserID, req.OwnerUserID, groupId, okUserIDList) utils.CopyStructFields(resp.GroupInfo, group) + resp.GroupInfo.MemberCount = uint32(imdb.GetGroupMemberNumByGroupID(groupId)) + resp.GroupInfo.OwnerUserID = req.OwnerUserID + log.NewInfo(req.OperationID, "rpc CreateGroup return ", resp.String()) return resp, nil } @@ -167,6 +173,7 @@ func (s *groupServer) GetJoinedGroupList(ctx context.Context, req *pbGroup.GetJo utils.CopyStructFields(&groupNode, group) groupNode.CreateTime = group.CreateTime groupNode.MemberCount = uint32(num) + groupNode.OwnerUserID = owner.UserID resp.GroupList = append(resp.GroupList, &groupNode) } else { log.NewError(req.OperationID, "check nil ", num, owner, err, group) @@ -174,8 +181,7 @@ func (s *groupServer) GetJoinedGroupList(ctx context.Context, req *pbGroup.GetJo } log.NewDebug(req.OperationID, "joinedGroup ", groupNode) } - resp.ErrCode = 0 - log.NewInfo(req.OperationID, "GetJoinedGroupList return ", resp.String()) + log.NewInfo(req.OperationID, "GetJoinedGroupList rpc return ", resp.String()) return &resp, nil } @@ -187,8 +193,8 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite return &pbGroup.InviteUserToGroupResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } - groupInfoFromMysql, err := imdb.GetGroupInfoByGroupID(req.GroupID) - if err != nil || groupInfoFromMysql == nil { + _, err := imdb.GetGroupInfoByGroupID(req.GroupID) + if err != nil { log.NewError(req.OperationID, "FindGroupInfoByGroupId failed ", req.GroupID, err) return &pbGroup.InviteUserToGroupResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } @@ -202,7 +208,6 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite resultNode.UserID = v resultNode.Result = 0 toUserInfo, err := imdb.GetUserByUserID(v) - if err != nil { log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), v) resultNode.Result = -1 @@ -244,7 +249,6 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite func (s *groupServer) GetGroupAllMember(ctx context.Context, req *pbGroup.GetGroupAllMemberReq) (*pbGroup.GetGroupAllMemberResp, error) { log.NewInfo(req.OperationID, "GetGroupAllMember, args ", req.String()) var resp pbGroup.GetGroupAllMemberResp - resp.ErrCode = 0 memberList, err := imdb.GetGroupMemberListByGroupID(req.GroupID) if err != nil { resp.ErrCode = constant.ErrDB.ErrCode @@ -252,35 +256,23 @@ func (s *groupServer) GetGroupAllMember(ctx context.Context, req *pbGroup.GetGro log.NewError(req.OperationID, "FindGroupMemberListByGroupId failed,", err.Error(), req.GroupID) return &resp, nil } - m := token_verify.IsMangerUserID(req.OpUserID) - in := false - if m { - in = true - } + for _, v := range memberList { var node open_im_sdk.GroupMemberFullInfo utils.CopyStructFields(node, v) resp.MemberList = append(resp.MemberList, &node) - if !m && req.OpUserID == v.UserID { - in = true - } } - if !in { - - } - resp.ErrCode = 0 + log.NewInfo(req.OperationID, "GetGroupAllMember rpc return ", resp.String()) return &resp, nil } func (s *groupServer) GetGroupMemberList(ctx context.Context, req *pbGroup.GetGroupMemberListReq) (*pbGroup.GetGroupMemberListResp, error) { log.NewInfo(req.OperationID, "GetGroupMemberList, args ", req.String()) - var resp pbGroup.GetGroupMemberListResp - resp.ErrCode = 0 memberList, err := imdb.GetGroupMemberByGroupID(req.GroupID, req.Filter, req.NextSeq, 30) if err != nil { resp.ErrCode = constant.ErrDB.ErrCode - resp.ErrMsg = err.Error() + resp.ErrMsg = constant.ErrDB.ErrMsg log.NewError(req.OperationID, "GetGroupMemberByGroupId failed,", req.GroupID, req.Filter, req.NextSeq, 30) return &resp, nil } @@ -328,7 +320,7 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou } if flag != 1 { - log.NewError(req.OperationID, "failed, no access kick ") + log.NewError(req.OperationID, "failed, no access kick ", req.OpUserID) return &pbGroup.KickGroupMemberResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } @@ -369,7 +361,6 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou } } chat.MemberKickedNotification(req, okUserIDList) - resp.ErrCode = 0 log.NewInfo(req.OperationID, "GetGroupMemberList rpc return ", resp.String()) return &resp, nil } diff --git a/pkg/common/db/mysql_model/im_mysql_model/friend_model.go b/pkg/common/db/mysql_model/im_mysql_model/friend_model.go index 0ef118f14..a5e6a5de2 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/friend_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/friend_model.go @@ -33,7 +33,7 @@ func GetFriendRelationshipFromFriend(OwnerUserID, FriendUserID string) (*Friend, return &friend, err } -func GetUserInfoFromFriend(OwnerUserID string) ([]Friend, error) { +func GetFriendListByUserID(OwnerUserID string) ([]Friend, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err diff --git a/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go b/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go index 735380d0b..dd8164521 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go @@ -44,14 +44,14 @@ func GetSendFriendApplicationListByUserID(FromUserID string) ([]FriendRequest, e return usersInfo, nil } -//reqId apply to add userId already -func GetFriendApplicationByBothUserID(FromUserId, ToUserID string) (*FriendRequest, error) { +//FromUserId apply to add ToUserID +func GetFriendApplicationByBothUserID(FromUserID, ToUserID string) (*FriendRequest, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err } var friendRequest FriendRequest - err = dbConn.Table("friend_request").Where("from_user_id=? and to_user_id=?", FromUserId, ToUserID).Find(&friendRequest).Error + err = dbConn.Table("friend_request").Where("from_user_id=? and to_user_id=?", FromUserID, ToUserID).Find(&friendRequest).Error if err != nil { return nil, err } @@ -63,9 +63,22 @@ func UpdateFriendApplication(friendRequest *FriendRequest) error { if err != nil { return err } + friendRequest.CreateTime = time.Now() err = dbConn.Table("friend_request").Where("from_user_id=? and to_user_id=?", friendRequest.FromUserID, friendRequest.ToUserID).Update(&friendRequest).Error if err != nil { return err } return nil } + +func InsertFriendApplication(friendRequest *FriendRequest) error { + dbConn, err := db.DB.MysqlDB.DefaultGormDB() + if err != nil { + return err + } + err = dbConn.Table("friend_request").Create(friendRequest).Error + if err != nil { + return err + } + return nil +} diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go index 0f159abee..5845b5ef5 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go @@ -172,7 +172,7 @@ func GetGroupMemberByGroupID(groupID string, filter int32, begin int32, maxNumbe var memberList []GroupMember var err error if filter >= 0 { - memberList, err = GetGroupMemberListByGroupIDAndFilter(groupID, filter) //sorted by join time + memberList, err = GetGroupMemberListByGroupIDAndRoleLevel(groupID, filter) //sorted by join time } else { memberList, err = GetGroupMemberListByGroupID(groupID) } diff --git a/pkg/proto/sdk_ws/ws.proto b/pkg/proto/sdk_ws/ws.proto index 1921ef694..60dfb0ee6 100644 --- a/pkg/proto/sdk_ws/ws.proto +++ b/pkg/proto/sdk_ws/ws.proto @@ -27,7 +27,6 @@ message GroupMemberFullInfo { int64 JoinTime = 4; string NickName = 5; string FaceUrl = 6; - string FriendRemark = 7; int32 AppMangerLevel = 8; //if >0 int32 JoinSource = 9; string OperatorUserID = 10; From c0db257e9bbdfa9d4b6e317158161a06d63c9aea Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 28 Dec 2021 14:07:06 +0800 Subject: [PATCH 035/337] tidy code --- internal/rpc/friend/firend.go | 4 +- internal/rpc/msg/send_msg.go | 2 +- .../im_mysql_model/group_member_model.go | 4 +- .../im_mysql_model/model_struct.go | 121 +++++- pkg/proto/sdk_ws/ws.pb.go | 363 +++++++++--------- pkg/proto/sdk_ws/ws.proto | 19 +- pkg/utils/utils.go | 82 ++++ 7 files changed, 386 insertions(+), 209 deletions(-) diff --git a/internal/rpc/friend/firend.go b/internal/rpc/friend/firend.go index eff77a572..b18ee0d1b 100644 --- a/internal/rpc/friend/firend.go +++ b/internal/rpc/friend/firend.go @@ -140,7 +140,7 @@ func (s *friendServer) AddFriend(ctx context.Context, req *pbFriend.AddFriendReq } //Establish a latest relationship in the friend request table - friendRequest := imdb.FriendRequest{ReqMessage: req.ReqMsg} + friendRequest := imdb.FriendRequest{ReqMsg: req.ReqMsg} utils.CopyStructFields(&friendRequest, req.CommID) err := imdb.UpdateFriendApplication(&friendRequest) if err != nil { @@ -454,7 +454,7 @@ func (s *friendServer) GetSelfApplyList(ctx context.Context, req *pbFriend.GetSe var selfApplyOtherUserList []*sdkws.FriendRequest for _, selfApplyOtherUserInfo := range usersInfo { var userInfo sdkws.FriendRequest // pbFriend.ApplyUserInfo - utils.CopyStructFields(&userInfo, selfApplyOtherUserInfo) + utils.FriendRequestDBCopyOpenIM(&userInfo, selfApplyOtherUserInfo) selfApplyOtherUserList = append(selfApplyOtherUserList, &userInfo) } log.NewInfo(req.CommID.OperationID, "rpc GetSelfApplyList ok", pbFriend.GetSelfApplyListResp{FriendRequestList: selfApplyOtherUserList}) diff --git a/internal/rpc/msg/send_msg.go b/internal/rpc/msg/send_msg.go index 4643628fb..6242dfee4 100644 --- a/internal/rpc/msg/send_msg.go +++ b/internal/rpc/msg/send_msg.go @@ -311,7 +311,7 @@ func Notification(n *NotificationMsg, onlineUserOnly bool) { func setOpUserInfo(operationID, opUserID, groupID string, groupMemberInfo *open_im_sdk.GroupMemberFullInfo) { if token_verify.IsMangerUserID(opUserID) { - u, err := imdb.FindUserByUID(opUserID) + u, err := imdb.GetUserByUserID(opUserID) if err != nil { log.NewError(operationID, "FindUserByUID failed ", err.Error(), opUserID) return diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go index 5845b5ef5..0601f4a6e 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go @@ -118,12 +118,12 @@ func GetOwnerManagerByGroupID(groupID string) ([]GroupMember, error) { return groupMemberList, nil } -func GetGroupMemberNumByGroupID(groupID string) int32 { +func GetGroupMemberNumByGroupID(groupID string) uint32 { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return 0 } - var number int32 + var number uint32 err = dbConn.Table("group_member").Where("group_id=?", groupID).Count(&number).Error if err != nil { return 0 diff --git a/pkg/common/db/mysql_model/im_mysql_model/model_struct.go b/pkg/common/db/mysql_model/im_mysql_model/model_struct.go index f67930e8b..4ee23bfe0 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/model_struct.go +++ b/pkg/common/db/mysql_model/im_mysql_model/model_struct.go @@ -2,21 +2,44 @@ package im_mysql_model import "time" +// +//message FriendInfo{ +//string OwnerUserID = 1; +//string Remark = 2; +//int64 CreateTime = 3; +//UserInfo FriendUser = 4; +//int32 AddSource = 5; +//string OperatorUserID = 6; +//string Ex = 7; +//} +//open_im_sdk.FriendInfo(FriendUser) != imdb.Friend(FriendUserID) type Friend struct { OwnerUserID string `gorm:"column:owner_user_id;primaryKey;"` - FriendUserID string `gorm:"column:friend_user_id;primaryKey;"` Remark string `gorm:"column:remark"` CreateTime time.Time `gorm:"column:create_time"` + FriendUserID string `gorm:"column:friend_user_id;primaryKey;"` AddSource int32 `gorm:"column:add_source"` OperatorUserID string `gorm:"column:operator_user_id"` Ex string `gorm:"column:ex"` } +//message FriendRequest{ +//string FromUserID = 1; +//string ToUserID = 2; +//int32 HandleResult = 3; +//string ReqMsg = 4; +//int64 CreateTime = 5; +//string HandlerUserID = 6; +//string HandleMsg = 7; +//int64 HandleTime = 8; +//string Ex = 9; +//} +//open_im_sdk.FriendRequest == imdb.FriendRequest type FriendRequest struct { FromUserID string `gorm:"column:from_user_id;primaryKey;"` ToUserID string `gorm:"column:to_user_id;primaryKey;"` HandleResult int32 `gorm:"column:handle_result"` - ReqMessage string `gorm:"column:req_message"` + ReqMsg string `gorm:"column:req_msg"` CreateTime time.Time `gorm:"column:create_time"` HandlerUserID string `gorm:"column:handler_user_id"` HandleMsg string `gorm:"column:handle_msg"` @@ -24,12 +47,28 @@ type FriendRequest struct { Ex string `gorm:"column:ex"` } +//message GroupInfo{ +// string GroupID = 1; +// string GroupName = 2; +// string Notification = 3; +// string Introduction = 4; +// string FaceUrl = 5; +// string OwnerUserID = 6; +// uint32 MemberCount = 8; +// int64 CreateTime = 7; +// string Ex = 9; +// int32 Status = 10; +// string CreatorUserID = 11; +// int32 GroupType = 12; +//} +// open_im_sdk.GroupInfo (OwnerUserID , MemberCount )> imdb.Group type Group struct { - GroupID string `gorm:"column:group_id;primaryKey;"` - GroupName string `gorm:"column:name"` - Introduction string `gorm:"column:introduction"` - Notification string `gorm:"column:notification"` - FaceUrl string `gorm:"column:face_url"` + GroupID string `gorm:"column:group_id;primaryKey;"` + GroupName string `gorm:"column:name"` + Notification string `gorm:"column:notification"` + Introduction string `gorm:"column:introduction"` + FaceUrl string `gorm:"column:face_url"` + CreateTime time.Time `gorm:"column:create_time"` Status int32 `gorm:"column:status"` CreatorUserID string `gorm:"column:creator_user_id"` @@ -37,18 +76,41 @@ type Group struct { Ex string `gorm:"column:ex"` } +//message GroupMemberFullInfo { +//string GroupID = 1 ; +//string UserID = 2 ; +//int32 roleLevel = 3; +//int64 JoinTime = 4; +//string NickName = 5; +//string FaceUrl = 6; +//int32 JoinSource = 8; +//string OperatorUserID = 9; +//string Ex = 10; +//int32 AppMangerLevel = 7; //if >0 +//} open_im_sdk.GroupMemberFullInfo(AppMangerLevel) > imdb.GroupMember type GroupMember struct { GroupID string `gorm:"column:group_id;primaryKey;"` UserID string `gorm:"column:user_id;primaryKey;"` - Nickname string `gorm:"column:nickname"` - FaceUrl string `gorm:"user_group_face_url"` RoleLevel int32 `gorm:"column:role_level"` JoinTime time.Time `gorm:"column:join_time"` + Nickname string `gorm:"column:nickname"` + FaceUrl string `gorm:"user_group_face_url"` JoinSource int32 `gorm:"column:join_source"` OperatorUserID string `gorm:"column:operator_user_id"` Ex string `gorm:"column:ex"` } +//message GroupRequest{ +//string UserID = 1; +//string GroupID = 2; +//string HandleResult = 3; +//string ReqMsg = 4; +//string HandleMsg = 5; +//int64 ReqTime = 6; +//string HandleUserID = 7; +//int64 HandleTime = 8; +//string Ex = 9; +//}open_im_sdk.GroupRequest == imdb.GroupRequest type GroupRequest struct { UserID string `gorm:"column:user_id;primaryKey;"` GroupID string `gorm:"column:group_id;primaryKey;"` @@ -61,22 +123,43 @@ type GroupRequest struct { Ex string `gorm:"column:ex"` } +//string UserID = 1; +//string Nickname = 2; +//string FaceUrl = 3; +//int32 Gender = 4; +//string PhoneNumber = 5; +//string Birth = 6; +//string Email = 7; +//string Ex = 8; +//int64 CreateTime = 9; +//int32 AppMangerLevel = 10; +//open_im_sdk.User == imdb.User type User struct { - UserID string `gorm:"column:user_id;primaryKey;"` - Nickname string `gorm:"column:name"` - FaceUrl string `gorm:"column:icon"` - Gender int32 `gorm:"column:gender"` - PhoneNumber string `gorm:"column:phone_number"` - Birth string `gorm:"column:birth"` - Email string `gorm:"column:email"` - Ex string `gorm:"column:ex"` - CreateTime time.Time `gorm:"column:create_time"` + UserID string `gorm:"column:user_id;primaryKey;"` + Nickname string `gorm:"column:name"` + FaceUrl string `gorm:"column:icon"` + Gender int32 `gorm:"column:gender"` + PhoneNumber string `gorm:"column:phone_number"` + Birth string `gorm:"column:birth"` + Email string `gorm:"column:email"` + Ex string `gorm:"column:ex"` + CreateTime time.Time `gorm:"column:create_time"` + AppMangerLevel int32 `gorm:"column:app_manger_level"` } +//message BlackInfo{ +//string OwnerUserID = 1; +//int64 CreateTime = 2; +//PublicUserInfo BlackUserInfo = 4; +//int32 AddSource = 5; +//string OperatorUserID = 6; +//string Ex = 7; +//} +// open_im_sdk.BlackInfo(BlackUserInfo) != imdb.Black (BlockUserID) type Black struct { OwnerUserID string `gorm:"column:owner_user_id;primaryKey;"` - BlockUserID string `gorm:"column:block_user_id;primaryKey;"` CreateTime time.Time `gorm:"column:create_time"` + BlockUserID string `gorm:"column:block_user_id;primaryKey;"` AddSource int32 `gorm:"column:add_source"` OperatorUserID int32 `gorm:"column:operator_user_id"` Ex string `gorm:"column:ex"` diff --git a/pkg/proto/sdk_ws/ws.pb.go b/pkg/proto/sdk_ws/ws.pb.go index e4fa4ca6a..3b087bdde 100644 --- a/pkg/proto/sdk_ws/ws.pb.go +++ b/pkg/proto/sdk_ws/ws.pb.go @@ -40,7 +40,7 @@ func (m *GroupInfo) Reset() { *m = GroupInfo{} } func (m *GroupInfo) String() string { return proto.CompactTextString(m) } func (*GroupInfo) ProtoMessage() {} func (*GroupInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a1fbf2797043d7f3, []int{0} + return fileDescriptor_ws_b7876bd3c094d103, []int{0} } func (m *GroupInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfo.Unmarshal(m, b) @@ -151,11 +151,10 @@ type GroupMemberFullInfo struct { JoinTime int64 `protobuf:"varint,4,opt,name=JoinTime" json:"JoinTime,omitempty"` NickName string `protobuf:"bytes,5,opt,name=NickName" json:"NickName,omitempty"` FaceUrl string `protobuf:"bytes,6,opt,name=FaceUrl" json:"FaceUrl,omitempty"` - FriendRemark string `protobuf:"bytes,7,opt,name=FriendRemark" json:"FriendRemark,omitempty"` - AppMangerLevel int32 `protobuf:"varint,8,opt,name=AppMangerLevel" json:"AppMangerLevel,omitempty"` - JoinSource int32 `protobuf:"varint,9,opt,name=JoinSource" json:"JoinSource,omitempty"` - OperatorUserID string `protobuf:"bytes,10,opt,name=OperatorUserID" json:"OperatorUserID,omitempty"` - Ex string `protobuf:"bytes,11,opt,name=Ex" json:"Ex,omitempty"` + AppMangerLevel int32 `protobuf:"varint,7,opt,name=AppMangerLevel" json:"AppMangerLevel,omitempty"` + JoinSource int32 `protobuf:"varint,8,opt,name=JoinSource" json:"JoinSource,omitempty"` + OperatorUserID string `protobuf:"bytes,9,opt,name=OperatorUserID" json:"OperatorUserID,omitempty"` + Ex string `protobuf:"bytes,10,opt,name=Ex" json:"Ex,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -165,7 +164,7 @@ func (m *GroupMemberFullInfo) Reset() { *m = GroupMemberFullInfo{} } func (m *GroupMemberFullInfo) String() string { return proto.CompactTextString(m) } func (*GroupMemberFullInfo) ProtoMessage() {} func (*GroupMemberFullInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a1fbf2797043d7f3, []int{1} + return fileDescriptor_ws_b7876bd3c094d103, []int{1} } func (m *GroupMemberFullInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupMemberFullInfo.Unmarshal(m, b) @@ -227,13 +226,6 @@ func (m *GroupMemberFullInfo) GetFaceUrl() string { return "" } -func (m *GroupMemberFullInfo) GetFriendRemark() string { - if m != nil { - return m.FriendRemark - } - return "" -} - func (m *GroupMemberFullInfo) GetAppMangerLevel() int32 { if m != nil { return m.AppMangerLevel @@ -277,7 +269,7 @@ func (m *PublicUserInfo) Reset() { *m = PublicUserInfo{} } func (m *PublicUserInfo) String() string { return proto.CompactTextString(m) } func (*PublicUserInfo) ProtoMessage() {} func (*PublicUserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a1fbf2797043d7f3, []int{2} + return fileDescriptor_ws_b7876bd3c094d103, []int{2} } func (m *PublicUserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PublicUserInfo.Unmarshal(m, b) @@ -341,6 +333,8 @@ type UserInfo struct { Birth string `protobuf:"bytes,6,opt,name=Birth" json:"Birth,omitempty"` Email string `protobuf:"bytes,7,opt,name=Email" json:"Email,omitempty"` Ex string `protobuf:"bytes,8,opt,name=Ex" json:"Ex,omitempty"` + CreateTime int64 `protobuf:"varint,9,opt,name=CreateTime" json:"CreateTime,omitempty"` + AppMangerLevel int32 `protobuf:"varint,10,opt,name=AppMangerLevel" json:"AppMangerLevel,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -350,7 +344,7 @@ func (m *UserInfo) Reset() { *m = UserInfo{} } func (m *UserInfo) String() string { return proto.CompactTextString(m) } func (*UserInfo) ProtoMessage() {} func (*UserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a1fbf2797043d7f3, []int{3} + return fileDescriptor_ws_b7876bd3c094d103, []int{3} } func (m *UserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserInfo.Unmarshal(m, b) @@ -426,6 +420,20 @@ func (m *UserInfo) GetEx() string { return "" } +func (m *UserInfo) GetCreateTime() int64 { + if m != nil { + return m.CreateTime + } + return 0 +} + +func (m *UserInfo) GetAppMangerLevel() int32 { + if m != nil { + return m.AppMangerLevel + } + return 0 +} + type FriendInfo struct { OwnerUserID string `protobuf:"bytes,1,opt,name=OwnerUserID" json:"OwnerUserID,omitempty"` Remark string `protobuf:"bytes,2,opt,name=Remark" json:"Remark,omitempty"` @@ -443,7 +451,7 @@ func (m *FriendInfo) Reset() { *m = FriendInfo{} } func (m *FriendInfo) String() string { return proto.CompactTextString(m) } func (*FriendInfo) ProtoMessage() {} func (*FriendInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a1fbf2797043d7f3, []int{4} + return fileDescriptor_ws_b7876bd3c094d103, []int{4} } func (m *FriendInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfo.Unmarshal(m, b) @@ -515,10 +523,10 @@ func (m *FriendInfo) GetEx() string { type BlackInfo struct { OwnerUserID string `protobuf:"bytes,1,opt,name=OwnerUserID" json:"OwnerUserID,omitempty"` CreateTime int64 `protobuf:"varint,2,opt,name=CreateTime" json:"CreateTime,omitempty"` - BlackUserInfo *PublicUserInfo `protobuf:"bytes,4,opt,name=BlackUserInfo" json:"BlackUserInfo,omitempty"` - AddSource int32 `protobuf:"varint,5,opt,name=AddSource" json:"AddSource,omitempty"` - OperatorUserID string `protobuf:"bytes,6,opt,name=OperatorUserID" json:"OperatorUserID,omitempty"` - Ex string `protobuf:"bytes,7,opt,name=Ex" json:"Ex,omitempty"` + BlackUserInfo *PublicUserInfo `protobuf:"bytes,3,opt,name=BlackUserInfo" json:"BlackUserInfo,omitempty"` + AddSource int32 `protobuf:"varint,4,opt,name=AddSource" json:"AddSource,omitempty"` + OperatorUserID string `protobuf:"bytes,5,opt,name=OperatorUserID" json:"OperatorUserID,omitempty"` + Ex string `protobuf:"bytes,6,opt,name=Ex" json:"Ex,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -528,7 +536,7 @@ func (m *BlackInfo) Reset() { *m = BlackInfo{} } func (m *BlackInfo) String() string { return proto.CompactTextString(m) } func (*BlackInfo) ProtoMessage() {} func (*BlackInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a1fbf2797043d7f3, []int{5} + return fileDescriptor_ws_b7876bd3c094d103, []int{5} } func (m *BlackInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackInfo.Unmarshal(m, b) @@ -609,7 +617,7 @@ func (m *GroupRequest) Reset() { *m = GroupRequest{} } func (m *GroupRequest) String() string { return proto.CompactTextString(m) } func (*GroupRequest) ProtoMessage() {} func (*GroupRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a1fbf2797043d7f3, []int{6} + return fileDescriptor_ws_b7876bd3c094d103, []int{6} } func (m *GroupRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupRequest.Unmarshal(m, b) @@ -711,7 +719,7 @@ func (m *FriendRequest) Reset() { *m = FriendRequest{} } func (m *FriendRequest) String() string { return proto.CompactTextString(m) } func (*FriendRequest) ProtoMessage() {} func (*FriendRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a1fbf2797043d7f3, []int{7} + return fileDescriptor_ws_b7876bd3c094d103, []int{7} } func (m *FriendRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendRequest.Unmarshal(m, b) @@ -810,7 +818,7 @@ func (m *PullMessageBySeqListResp) Reset() { *m = PullMessageBySeqListRe func (m *PullMessageBySeqListResp) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListResp) ProtoMessage() {} func (*PullMessageBySeqListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a1fbf2797043d7f3, []int{8} + return fileDescriptor_ws_b7876bd3c094d103, []int{8} } func (m *PullMessageBySeqListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListResp.Unmarshal(m, b) @@ -885,7 +893,7 @@ func (m *PullMessageBySeqListReq) Reset() { *m = PullMessageBySeqListReq func (m *PullMessageBySeqListReq) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListReq) ProtoMessage() {} func (*PullMessageBySeqListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a1fbf2797043d7f3, []int{9} + return fileDescriptor_ws_b7876bd3c094d103, []int{9} } func (m *PullMessageBySeqListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListReq.Unmarshal(m, b) @@ -940,7 +948,7 @@ func (m *PullMessageReq) Reset() { *m = PullMessageReq{} } func (m *PullMessageReq) String() string { return proto.CompactTextString(m) } func (*PullMessageReq) ProtoMessage() {} func (*PullMessageReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a1fbf2797043d7f3, []int{10} + return fileDescriptor_ws_b7876bd3c094d103, []int{10} } func (m *PullMessageReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageReq.Unmarshal(m, b) @@ -1004,7 +1012,7 @@ func (m *PullMessageResp) Reset() { *m = PullMessageResp{} } func (m *PullMessageResp) String() string { return proto.CompactTextString(m) } func (*PullMessageResp) ProtoMessage() {} func (*PullMessageResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a1fbf2797043d7f3, []int{11} + return fileDescriptor_ws_b7876bd3c094d103, []int{11} } func (m *PullMessageResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageResp.Unmarshal(m, b) @@ -1076,7 +1084,7 @@ func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} } func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqReq) ProtoMessage() {} func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a1fbf2797043d7f3, []int{12} + return fileDescriptor_ws_b7876bd3c094d103, []int{12} } func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) @@ -1108,7 +1116,7 @@ func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} } func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqResp) ProtoMessage() {} func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a1fbf2797043d7f3, []int{13} + return fileDescriptor_ws_b7876bd3c094d103, []int{13} } func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) @@ -1156,7 +1164,7 @@ func (m *GatherFormat) Reset() { *m = GatherFormat{} } func (m *GatherFormat) String() string { return proto.CompactTextString(m) } func (*GatherFormat) ProtoMessage() {} func (*GatherFormat) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a1fbf2797043d7f3, []int{14} + return fileDescriptor_ws_b7876bd3c094d103, []int{14} } func (m *GatherFormat) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GatherFormat.Unmarshal(m, b) @@ -1203,7 +1211,7 @@ func (m *UserSendMsgResp) Reset() { *m = UserSendMsgResp{} } func (m *UserSendMsgResp) String() string { return proto.CompactTextString(m) } func (*UserSendMsgResp) ProtoMessage() {} func (*UserSendMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a1fbf2797043d7f3, []int{15} + return fileDescriptor_ws_b7876bd3c094d103, []int{15} } func (m *UserSendMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserSendMsgResp.Unmarshal(m, b) @@ -1272,7 +1280,7 @@ func (m *MsgData) Reset() { *m = MsgData{} } func (m *MsgData) String() string { return proto.CompactTextString(m) } func (*MsgData) ProtoMessage() {} func (*MsgData) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a1fbf2797043d7f3, []int{16} + return fileDescriptor_ws_b7876bd3c094d103, []int{16} } func (m *MsgData) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgData.Unmarshal(m, b) @@ -1433,7 +1441,7 @@ func (m *OfflinePushInfo) Reset() { *m = OfflinePushInfo{} } func (m *OfflinePushInfo) String() string { return proto.CompactTextString(m) } func (*OfflinePushInfo) ProtoMessage() {} func (*OfflinePushInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a1fbf2797043d7f3, []int{17} + return fileDescriptor_ws_b7876bd3c094d103, []int{17} } func (m *OfflinePushInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OfflinePushInfo.Unmarshal(m, b) @@ -1500,7 +1508,7 @@ func (m *TipsComm) Reset() { *m = TipsComm{} } func (m *TipsComm) String() string { return proto.CompactTextString(m) } func (*TipsComm) ProtoMessage() {} func (*TipsComm) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a1fbf2797043d7f3, []int{18} + return fileDescriptor_ws_b7876bd3c094d103, []int{18} } func (m *TipsComm) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TipsComm.Unmarshal(m, b) @@ -1549,7 +1557,7 @@ func (m *MemberEnterTips) Reset() { *m = MemberEnterTips{} } func (m *MemberEnterTips) String() string { return proto.CompactTextString(m) } func (*MemberEnterTips) ProtoMessage() {} func (*MemberEnterTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a1fbf2797043d7f3, []int{19} + return fileDescriptor_ws_b7876bd3c094d103, []int{19} } func (m *MemberEnterTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberEnterTips.Unmarshal(m, b) @@ -1604,7 +1612,7 @@ func (m *MemberLeaveTips) Reset() { *m = MemberLeaveTips{} } func (m *MemberLeaveTips) String() string { return proto.CompactTextString(m) } func (*MemberLeaveTips) ProtoMessage() {} func (*MemberLeaveTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a1fbf2797043d7f3, []int{20} + return fileDescriptor_ws_b7876bd3c094d103, []int{20} } func (m *MemberLeaveTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberLeaveTips.Unmarshal(m, b) @@ -1659,7 +1667,7 @@ func (m *MemberInvitedTips) Reset() { *m = MemberInvitedTips{} } func (m *MemberInvitedTips) String() string { return proto.CompactTextString(m) } func (*MemberInvitedTips) ProtoMessage() {} func (*MemberInvitedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a1fbf2797043d7f3, []int{21} + return fileDescriptor_ws_b7876bd3c094d103, []int{21} } func (m *MemberInvitedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInvitedTips.Unmarshal(m, b) @@ -1721,7 +1729,7 @@ func (m *MemberKickedTips) Reset() { *m = MemberKickedTips{} } func (m *MemberKickedTips) String() string { return proto.CompactTextString(m) } func (*MemberKickedTips) ProtoMessage() {} func (*MemberKickedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a1fbf2797043d7f3, []int{22} + return fileDescriptor_ws_b7876bd3c094d103, []int{22} } func (m *MemberKickedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberKickedTips.Unmarshal(m, b) @@ -1784,7 +1792,7 @@ func (m *MemberInfoChangedTips) Reset() { *m = MemberInfoChangedTips{} } func (m *MemberInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*MemberInfoChangedTips) ProtoMessage() {} func (*MemberInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a1fbf2797043d7f3, []int{23} + return fileDescriptor_ws_b7876bd3c094d103, []int{23} } func (m *MemberInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInfoChangedTips.Unmarshal(m, b) @@ -1853,7 +1861,7 @@ func (m *GroupCreatedTips) Reset() { *m = GroupCreatedTips{} } func (m *GroupCreatedTips) String() string { return proto.CompactTextString(m) } func (*GroupCreatedTips) ProtoMessage() {} func (*GroupCreatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a1fbf2797043d7f3, []int{24} + return fileDescriptor_ws_b7876bd3c094d103, []int{24} } func (m *GroupCreatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupCreatedTips.Unmarshal(m, b) @@ -1914,7 +1922,7 @@ func (m *GroupInfoChangedTips) Reset() { *m = GroupInfoChangedTips{} } func (m *GroupInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*GroupInfoChangedTips) ProtoMessage() {} func (*GroupInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a1fbf2797043d7f3, []int{25} + return fileDescriptor_ws_b7876bd3c094d103, []int{25} } func (m *GroupInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfoChangedTips.Unmarshal(m, b) @@ -1968,7 +1976,7 @@ func (m *JoinGroupApplicationTips) Reset() { *m = JoinGroupApplicationTi func (m *JoinGroupApplicationTips) String() string { return proto.CompactTextString(m) } func (*JoinGroupApplicationTips) ProtoMessage() {} func (*JoinGroupApplicationTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a1fbf2797043d7f3, []int{26} + return fileDescriptor_ws_b7876bd3c094d103, []int{26} } func (m *JoinGroupApplicationTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JoinGroupApplicationTips.Unmarshal(m, b) @@ -2023,7 +2031,7 @@ func (m *ApplicationProcessedTips) Reset() { *m = ApplicationProcessedTi func (m *ApplicationProcessedTips) String() string { return proto.CompactTextString(m) } func (*ApplicationProcessedTips) ProtoMessage() {} func (*ApplicationProcessedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a1fbf2797043d7f3, []int{27} + return fileDescriptor_ws_b7876bd3c094d103, []int{27} } func (m *ApplicationProcessedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ApplicationProcessedTips.Unmarshal(m, b) @@ -2084,7 +2092,7 @@ func (m *FriendApplication) Reset() { *m = FriendApplication{} } func (m *FriendApplication) String() string { return proto.CompactTextString(m) } func (*FriendApplication) ProtoMessage() {} func (*FriendApplication) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a1fbf2797043d7f3, []int{28} + return fileDescriptor_ws_b7876bd3c094d103, []int{28} } func (m *FriendApplication) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplication.Unmarshal(m, b) @@ -2137,7 +2145,7 @@ func (m *FromToUserID) Reset() { *m = FromToUserID{} } func (m *FromToUserID) String() string { return proto.CompactTextString(m) } func (*FromToUserID) ProtoMessage() {} func (*FromToUserID) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a1fbf2797043d7f3, []int{29} + return fileDescriptor_ws_b7876bd3c094d103, []int{29} } func (m *FromToUserID) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FromToUserID.Unmarshal(m, b) @@ -2183,7 +2191,7 @@ func (m *FriendApplicationAddedTips) Reset() { *m = FriendApplicationAdd func (m *FriendApplicationAddedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationAddedTips) ProtoMessage() {} func (*FriendApplicationAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a1fbf2797043d7f3, []int{30} + return fileDescriptor_ws_b7876bd3c094d103, []int{30} } func (m *FriendApplicationAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationAddedTips.Unmarshal(m, b) @@ -2222,7 +2230,7 @@ func (m *FriendApplicationProcessedTips) Reset() { *m = FriendApplicatio func (m *FriendApplicationProcessedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationProcessedTips) ProtoMessage() {} func (*FriendApplicationProcessedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a1fbf2797043d7f3, []int{31} + return fileDescriptor_ws_b7876bd3c094d103, []int{31} } func (m *FriendApplicationProcessedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationProcessedTips.Unmarshal(m, b) @@ -2263,7 +2271,7 @@ func (m *FriendAddedTips) Reset() { *m = FriendAddedTips{} } func (m *FriendAddedTips) String() string { return proto.CompactTextString(m) } func (*FriendAddedTips) ProtoMessage() {} func (*FriendAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a1fbf2797043d7f3, []int{32} + return fileDescriptor_ws_b7876bd3c094d103, []int{32} } func (m *FriendAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendAddedTips.Unmarshal(m, b) @@ -2316,7 +2324,7 @@ func (m *FriendDeletedTips) Reset() { *m = FriendDeletedTips{} } func (m *FriendDeletedTips) String() string { return proto.CompactTextString(m) } func (*FriendDeletedTips) ProtoMessage() {} func (*FriendDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a1fbf2797043d7f3, []int{33} + return fileDescriptor_ws_b7876bd3c094d103, []int{33} } func (m *FriendDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendDeletedTips.Unmarshal(m, b) @@ -2354,7 +2362,7 @@ func (m *BlackAddedTips) Reset() { *m = BlackAddedTips{} } func (m *BlackAddedTips) String() string { return proto.CompactTextString(m) } func (*BlackAddedTips) ProtoMessage() {} func (*BlackAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a1fbf2797043d7f3, []int{34} + return fileDescriptor_ws_b7876bd3c094d103, []int{34} } func (m *BlackAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackAddedTips.Unmarshal(m, b) @@ -2392,7 +2400,7 @@ func (m *BlackDeletedTips) Reset() { *m = BlackDeletedTips{} } func (m *BlackDeletedTips) String() string { return proto.CompactTextString(m) } func (*BlackDeletedTips) ProtoMessage() {} func (*BlackDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a1fbf2797043d7f3, []int{35} + return fileDescriptor_ws_b7876bd3c094d103, []int{35} } func (m *BlackDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackDeletedTips.Unmarshal(m, b) @@ -2430,7 +2438,7 @@ func (m *FriendInfoChangedTips) Reset() { *m = FriendInfoChangedTips{} } func (m *FriendInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*FriendInfoChangedTips) ProtoMessage() {} func (*FriendInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a1fbf2797043d7f3, []int{36} + return fileDescriptor_ws_b7876bd3c094d103, []int{36} } func (m *FriendInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfoChangedTips.Unmarshal(m, b) @@ -2469,7 +2477,7 @@ func (m *SelfInfoUpdatedTips) Reset() { *m = SelfInfoUpdatedTips{} } func (m *SelfInfoUpdatedTips) String() string { return proto.CompactTextString(m) } func (*SelfInfoUpdatedTips) ProtoMessage() {} func (*SelfInfoUpdatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a1fbf2797043d7f3, []int{37} + return fileDescriptor_ws_b7876bd3c094d103, []int{37} } func (m *SelfInfoUpdatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SelfInfoUpdatedTips.Unmarshal(m, b) @@ -2538,128 +2546,129 @@ func init() { proto.RegisterType((*SelfInfoUpdatedTips)(nil), "open_im_sdk.SelfInfoUpdatedTips") } -func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_a1fbf2797043d7f3) } +func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_b7876bd3c094d103) } -var fileDescriptor_ws_a1fbf2797043d7f3 = []byte{ - // 1916 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x59, 0x4f, 0x8f, 0x1b, 0x49, - 0x15, 0x57, 0xb7, 0xc7, 0x1e, 0xcf, 0xb3, 0x67, 0x3c, 0xe9, 0x24, 0xb3, 0x4d, 0x58, 0x45, 0xa6, - 0xb5, 0x42, 0x23, 0x04, 0x59, 0x29, 0x2b, 0xa4, 0x25, 0x68, 0x81, 0xf9, 0x9b, 0x3f, 0xc4, 0xf1, - 0xd0, 0x9e, 0xc0, 0x81, 0x43, 0xd4, 0x71, 0x97, 0x3d, 0x2d, 0xb7, 0xab, 0xed, 0xae, 0xee, 0x49, - 0x72, 0xe1, 0xcc, 0x17, 0xe0, 0xb4, 0x02, 0x71, 0x43, 0x5c, 0x39, 0xf0, 0x31, 0xf8, 0x02, 0x5c, - 0x11, 0x07, 0x24, 0x4e, 0x88, 0x13, 0x1c, 0xd0, 0x7b, 0x55, 0xdd, 0x5d, 0x65, 0x3b, 0x59, 0x4f, - 0x12, 0x72, 0xd9, 0x9b, 0xdf, 0xaf, 0xdf, 0x7b, 0xf5, 0xfe, 0xd5, 0xab, 0x57, 0x65, 0xe8, 0x88, - 0x70, 0xf2, 0xec, 0x85, 0xf8, 0xf4, 0x85, 0xb8, 0x33, 0x4b, 0x93, 0x2c, 0x71, 0x5a, 0xc9, 0x8c, - 0xf1, 0x67, 0xd1, 0xf4, 0x99, 0x08, 0x27, 0xde, 0xbf, 0x6d, 0xd8, 0xba, 0x9f, 0x26, 0xf9, 0xec, - 0x21, 0x1f, 0x25, 0x8e, 0x0b, 0x9b, 0x92, 0x38, 0x76, 0xad, 0xae, 0xb5, 0x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, 0xec, 0xde, 0x33, 0xb8, 0xbd, 0xa4, 0xdc, 0xcc, 0xe7, 0x3b, 0x2e, 0xf0, 0x5b, - 0x0b, 0x3a, 0x6a, 0x85, 0xd2, 0xe6, 0x4f, 0xa1, 0x21, 0x21, 0xa5, 0xec, 0xa3, 0x05, 0x65, 0xc5, - 0x7b, 0xa2, 0xaf, 0xd8, 0x96, 0xf7, 0xb5, 0xbd, 0x62, 0x5f, 0x3b, 0x9f, 0x2d, 0x6c, 0xb7, 0x37, - 0x96, 0x79, 0xb1, 0xd3, 0xfc, 0xa2, 0x2c, 0x8e, 0x59, 0xcc, 0xb2, 0xf7, 0xe3, 0x73, 0x1f, 0x76, - 0xe8, 0x75, 0xee, 0xbd, 0x65, 0xe9, 0x67, 0xb0, 0x4b, 0x0a, 0xdf, 0xa3, 0x8d, 0x3f, 0x87, 0x9b, - 0x55, 0xa0, 0xf5, 0x26, 0xf8, 0x8e, 0x7a, 0xbf, 0x07, 0xd7, 0x07, 0x2c, 0x1e, 0xa1, 0xd6, 0xa7, - 0xb3, 0xb0, 0x3c, 0x45, 0x5e, 0xf3, 0x70, 0xf8, 0xbc, 0x41, 0x7f, 0x4e, 0x7d, 0xf6, 0xbf, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x1c, 0xbd, 0xfd, 0xa5, 0xaf, 0x1a, 0x00, 0x00, +var fileDescriptor_ws_b7876bd3c094d103 = []byte{ + // 1922 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x59, 0xcd, 0x8f, 0x1b, 0x49, + 0x15, 0x57, 0xb7, 0xdd, 0xfe, 0x78, 0xf6, 0x8c, 0x27, 0x9d, 0x64, 0xb6, 0x09, 0xab, 0xc8, 0xb4, + 0x56, 0x68, 0x84, 0x20, 0x2b, 0x65, 0x85, 0xb4, 0x04, 0x2d, 0xe0, 0x19, 0xcf, 0xe4, 0x83, 0x38, + 0x1e, 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 0x10, 0xc6, 0xfc, 0x29, + 0x39, 0x7c, 0x33, 0x22, 0xcb, 0xa7, 0x21, 0x4b, 0x3d, 0xc2, 0x16, 0x98, 0x28, 0x92, 0x24, 0x47, + 0x71, 0x40, 0x78, 0x94, 0x2c, 0x2f, 0x27, 0xd1, 0x45, 0x92, 0x24, 0x68, 0x81, 0xec, 0x06, 0x82, + 0x42, 0x7c, 0xee, 0xbf, 0x1e, 0x91, 0xa5, 0xec, 0x04, 0x92, 0xe2, 0x78, 0x48, 0x11, 0xaf, 0x4a, + 0x9c, 0x53, 0xf6, 0x8f, 0x61, 0x87, 0x85, 0x74, 0x2a, 0x92, 0x2b, 0x8a, 0xa5, 0x72, 0xd0, 0xba, + 0xff, 0x0d, 0x6d, 0x03, 0x3d, 0xf4, 0xd3, 0x73, 0x92, 0x9c, 0xc4, 0xc9, 0xdc, 0x4f, 0x3d, 0x9d, + 0xdf, 0xfe, 0x0a, 0xda, 0x53, 0x2c, 0xd8, 0x7c, 0x7d, 0xed, 0x5d, 0xeb, 0x35, 0x76, 0x77, 0x0e, + 0x9f, 0x6c, 0xf6, 0x9e, 0x9b, 0x9c, 0x69, 0x3b, 0x46, 0x50, 0xd8, 0x35, 0x62, 0xbe, 0xf9, 0xc2, + 0x98, 0x16, 0x05, 0xa2, 0x42, 0x18, 0x36, 0x26, 0xe4, 0x38, 0x95, 0x6e, 0x05, 0xeb, 0x5b, 0x92, + 0xee, 0xaf, 0xf0, 0xb8, 0x2c, 0xd4, 0x5d, 0xa6, 0xe5, 0x0e, 0x34, 0x18, 0x59, 0x1e, 0x92, 0x69, + 0x48, 0x65, 0xdf, 0x29, 0x68, 0x5c, 0xc3, 0xc8, 0xf2, 0x98, 0x06, 0x79, 0x90, 0x05, 0xb5, 0x6a, + 0x59, 0x75, 0xcd, 0x32, 0xec, 0xfa, 0x1d, 0xcd, 0x80, 0xff, 0x8b, 0x24, 0xdf, 0x02, 0xfb, 0x21, + 0x49, 0x07, 0xfe, 0xeb, 0x1e, 0x0d, 0x06, 0xdc, 0x24, 0x8f, 0x2c, 0xdd, 0x63, 0xb8, 0xb9, 0x86, + 0xb2, 0x85, 0xe2, 0x9c, 0xf1, 0x16, 0xe7, 0x4c, 0xd5, 0x39, 0xf7, 0x11, 0xb4, 0x55, 0xd5, 0xb8, + 0xc1, 0xc2, 0x40, 0x26, 0xd3, 0x0c, 0x03, 0xfb, 0x00, 0xaa, 0x11, 0x56, 0x82, 0xc9, 0x6d, 0xbe, + 0xa5, 0xd9, 0x3c, 0x60, 0xd3, 0xbe, 0x9f, 0xfa, 0x1e, 0xe7, 0x70, 0x97, 0xd0, 0x41, 0x8b, 0x47, + 0x84, 0x06, 0x03, 0x36, 0xe5, 0xc6, 0x74, 0xa1, 0x35, 0x22, 0xc9, 0x05, 0x77, 0xa3, 0x3c, 0xa1, + 0x14, 0x08, 0x39, 0x8e, 0xa2, 0x90, 0xd0, 0x54, 0x70, 0xc8, 0x6a, 0x54, 0x20, 0x51, 0x49, 0x34, + 0x50, 0x8e, 0xe7, 0x82, 0x76, 0xff, 0x62, 0x41, 0x5d, 0x1a, 0x21, 0xaa, 0x8a, 0x06, 0x65, 0x25, + 0x0a, 0x0a, 0xf1, 0x84, 0x8c, 0x2f, 0xca, 0x59, 0x57, 0x50, 0x58, 0x37, 0x53, 0x79, 0x72, 0xc8, + 0xc9, 0x48, 0x92, 0x68, 0xd3, 0x58, 0xb1, 0x49, 0xd6, 0xa1, 0x02, 0x21, 0x07, 0x53, 0xfc, 0x92, + 0x33, 0x92, 0x02, 0xd9, 0xdf, 0x81, 0x3d, 0xc6, 0xe7, 0xa9, 0xd3, 0xc8, 0x4f, 0x27, 0x71, 0x32, + 0x97, 0xed, 0xd0, 0xf2, 0xd6, 0x70, 0x3c, 0x24, 0x05, 0x56, 0x4c, 0x71, 0xa2, 0x2d, 0xae, 0xa0, + 0xd8, 0x5f, 0x05, 0xc2, 0x47, 0x38, 0xef, 0xa9, 0x1c, 0xab, 0x74, 0x50, 0xd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02, + 0x3f, 0xa0, 0x8d, 0x3f, 0x87, 0xdb, 0x65, 0xa0, 0xd5, 0x26, 0x78, 0x4d, 0xb9, 0xdf, 0x83, 0x9b, + 0x23, 0x12, 0x4d, 0x50, 0xea, 0xf3, 0x45, 0x50, 0x9c, 0x22, 0x6f, 0x79, 0x38, 0x7c, 0x59, 0xe3, + 0x7f, 0x60, 0x7d, 0xf1, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x97, 0x0c, 0x33, 0xae, 0xd3, 0x1a, + 0x00, 0x00, } diff --git a/pkg/proto/sdk_ws/ws.proto b/pkg/proto/sdk_ws/ws.proto index 60dfb0ee6..0dfde946b 100644 --- a/pkg/proto/sdk_ws/ws.proto +++ b/pkg/proto/sdk_ws/ws.proto @@ -20,6 +20,7 @@ message GroupInfo{ int32 GroupType = 12; } + message GroupMemberFullInfo { string GroupID = 1 ; string UserID = 2 ; @@ -27,10 +28,10 @@ message GroupMemberFullInfo { int64 JoinTime = 4; string NickName = 5; string FaceUrl = 6; - int32 AppMangerLevel = 8; //if >0 - int32 JoinSource = 9; - string OperatorUserID = 10; - string Ex = 11; + int32 AppMangerLevel = 7; //if >0 + int32 JoinSource = 8; + string OperatorUserID = 9; + string Ex = 10; } message PublicUserInfo{ @@ -50,6 +51,8 @@ message UserInfo{ string Birth = 6; string Email = 7; string Ex = 8; + int64 CreateTime = 9; + int32 AppMangerLevel = 10; } message FriendInfo{ @@ -65,10 +68,10 @@ message FriendInfo{ message BlackInfo{ string OwnerUserID = 1; int64 CreateTime = 2; - PublicUserInfo BlackUserInfo = 4; - int32 AddSource = 5; - string OperatorUserID = 6; - string Ex = 7; + PublicUserInfo BlackUserInfo = 3; + int32 AddSource = 4; + string OperatorUserID = 5; + string Ex = 6; } message GroupRequest{ diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index 074712bc8..2c393d337 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -1,6 +1,9 @@ package utils import ( + imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" + "Open_IM/pkg/common/token_verify" + open_im_sdk "Open_IM/pkg/proto/sdk_ws" "fmt" "math/rand" "reflect" @@ -50,3 +53,82 @@ func CopyStructFields(a interface{}, b interface{}, fields ...string) (err error func OperationIDGenerator() string { return strconv.FormatInt(time.Now().UnixNano()+int64(rand.Uint32()), 10) } + +func FriendOpenIMCopyDB(dst *imdb.Friend, src open_im_sdk.FriendInfo) { + CopyStructFields(dst, src) + dst.FriendUserID = src.FriendUser.UserID +} + +func FriendDBCopyOpenIM(dst *open_im_sdk.FriendInfo, src imdb.Friend) { + CopyStructFields(dst, src) + user, _ := imdb.GetUserByUserID(src.FriendUserID) + if user != nil { + CopyStructFields(dst.FriendUser, user) + } +} + +// +func FriendRequestOpenIMCopyDB(dst *imdb.FriendRequest, src open_im_sdk.FriendRequest) { + CopyStructFields(dst, src) +} + +func FriendRequestDBCopyOpenIM(dst *open_im_sdk.FriendRequest, src imdb.FriendRequest) { + CopyStructFields(dst, src) +} + +func GroupOpenIMCopyDB(dst *imdb.Group, src open_im_sdk.GroupInfo) { + CopyStructFields(dst, src) +} + +func GroupDBCopyOpenIM(dst *open_im_sdk.GroupInfo, src imdb.Group) { + CopyStructFields(dst, src) + user, _ := imdb.GetGroupOwnerInfoByGroupID(src.GroupID) + if user != nil { + dst.OwnerUserID = user.UserID + } + dst.MemberCount = imdb.GetGroupMemberNumByGroupID(src.GroupID) +} + +func GroupMemberOpenIMCopyDB(dst *imdb.GroupMember, src open_im_sdk.GroupMemberFullInfo) { + CopyStructFields(dst, src) +} + +func GroupMemberDBCopyOpenIM(dst *open_im_sdk.GroupMemberFullInfo, src imdb.GroupMember) { + CopyStructFields(dst, src) + if token_verify.IsMangerUserID(src.UserID) { + u, _ := imdb.GetUserByUserID(src.UserID) + if u != nil { + CopyStructFields(dst, u) + } + dst.AppMangerLevel = 1 + } +} + +func GroupRequestOpenIMCopyDB(dst *imdb.GroupRequest, src open_im_sdk.GroupRequest) { + CopyStructFields(dst, src) +} + +func GroupRequestDBCopyOpenIM(dst *open_im_sdk.GroupRequest, src imdb.GroupRequest) { + CopyStructFields(dst, src) +} + +func UserOpenIMCopyDB(dst *imdb.User, src open_im_sdk.UserInfo) { + CopyStructFields(dst, src) +} + +func UserDBCopyOpenIM(dst *open_im_sdk.UserInfo, src imdb.User) { + CopyStructFields(dst, src) +} + +func BlackOpenIMCopyDB(dst *imdb.Black, src open_im_sdk.BlackInfo) { + CopyStructFields(dst, src) + dst.BlockUserID = src.BlackUserInfo.UserID +} + +func BlackDBCopyOpenIM(dst *open_im_sdk.BlackInfo, src imdb.Black) { + CopyStructFields(dst, src) + user, _ := imdb.GetUserByUserID(src.BlockUserID) + if user != nil { + CopyStructFields(dst.BlackUserInfo, user) + } +} From 38542f9888075f9e36bbfb4c4e729ce4734becc8 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 28 Dec 2021 14:23:14 +0800 Subject: [PATCH 036/337] tidy code --- internal/rpc/msg/notification.go | 595 +++++++++++++++++++++++++++++++ internal/rpc/msg/send_msg.go | 586 ------------------------------ 2 files changed, 595 insertions(+), 586 deletions(-) create mode 100644 internal/rpc/msg/notification.go diff --git a/internal/rpc/msg/notification.go b/internal/rpc/msg/notification.go new file mode 100644 index 000000000..fc88bf05d --- /dev/null +++ b/internal/rpc/msg/notification.go @@ -0,0 +1,595 @@ +package msg + +import ( + "Open_IM/pkg/common/constant" + imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" + "Open_IM/pkg/common/log" + "Open_IM/pkg/common/token_verify" + pbFriend "Open_IM/pkg/proto/friend" + pbGroup "Open_IM/pkg/proto/group" + open_im_sdk "Open_IM/pkg/proto/sdk_ws" + "Open_IM/pkg/utils" + "encoding/json" +) + +//message GroupCreatedTips{ +// GroupInfo Group = 1; +// GroupMemberFullInfo Creator = 2; +// repeated GroupMemberFullInfo MemberList = 3; +// uint64 OperationTime = 4; +//} creator->group + +func setOpUserInfo(operationID, opUserID, groupID string, groupMemberInfo *open_im_sdk.GroupMemberFullInfo) { + if token_verify.IsMangerUserID(opUserID) { + u, err := imdb.GetUserByUserID(opUserID) + if err != nil { + log.NewError(operationID, "FindUserByUID failed ", err.Error(), opUserID) + return + } + utils.CopyStructFields(groupMemberInfo, u) + groupMemberInfo.AppMangerLevel = 1 + } else { + u, err := imdb.GetGroupMemberInfoByGroupIDAndUserID(groupID, opUserID) + if err != nil { + log.NewError(operationID, "FindGroupMemberInfoByGroupIdAndUserId failed ", err.Error(), groupID, opUserID) + return + } + utils.CopyStructFields(groupMemberInfo, u) + } +} + +func setGroupInfo(operationID, groupID string, groupInfo *open_im_sdk.GroupInfo, ownerUserID string) { + group, err := imdb.GetGroupInfoByGroupID(groupID) + if err != nil { + log.NewError(operationID, "FindGroupInfoByGroupId failed ", err.Error(), groupID) + return + } + utils.CopyStructFields(groupInfo, group) + + if ownerUserID != "" { + groupInfo.OwnerUserID = ownerUserID + // setGroupPublicUserInfo(operationID, groupID, ownerUserID, groupInfo.Owner) + } +} + +func setGroupMemberInfo(operationID, groupID, userID string, groupMemberInfo *open_im_sdk.GroupMemberFullInfo) { + group, err := imdb.GetGroupMemberInfoByGroupIDAndUserID(groupID, userID) + if err != nil { + log.NewError(operationID, "FindGroupMemberInfoByGroupIdAndUserId failed ", err.Error(), groupID, userID) + return + } + utils.CopyStructFields(groupMemberInfo, group) +} + +//func setGroupPublicUserInfo(operationID, groupID, userID string, publicUserInfo *open_im_sdk.PublicUserInfo) { +// group, err := imdb.GetGroupMemberInfoByGroupIDAndUserID(groupID, userID) +// if err != nil { +// log.NewError(operationID, "FindGroupMemberInfoByGroupIdAndUserId failed ", err.Error(), groupID, userID) +// return +// } +// utils.CopyStructFields(publicUserInfo, group) +//} + +//创建群后调用 +func GroupCreatedNotification(operationID, opUserID, OwnerUserID, groupID string, initMemberList []string) { + var n NotificationMsg + n.SendID = opUserID + n.RecvID = groupID + n.ContentType = constant.GroupCreatedNotification + n.SessionType = constant.GroupChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = operationID + + GroupCreatedTips := open_im_sdk.GroupCreatedTips{Group: &open_im_sdk.GroupInfo{}, + Creator: &open_im_sdk.GroupMemberFullInfo{}} + setOpUserInfo(operationID, GroupCreatedTips.Creator.UserID, groupID, GroupCreatedTips.Creator) + + setGroupInfo(operationID, groupID, GroupCreatedTips.Group, OwnerUserID) + + for _, v := range initMemberList { + var groupMemberInfo open_im_sdk.GroupMemberFullInfo + setGroupMemberInfo(operationID, groupID, v, &groupMemberInfo) + GroupCreatedTips.MemberList = append(GroupCreatedTips.MemberList, &groupMemberInfo) + } + + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(GroupCreatedTips) + tips.DefaultTips = config.Config.Notification.GroupCreated.DefaultTips.Tips + n.Content, _ = json.Marshal(tips) + Notification(&n, false) +} + +//message ReceiveJoinApplicationTips{ +// GroupInfo Group = 1; +// PublicUserInfo Applicant = 2; +// string Reason = 3; +//} apply->all managers GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` +// ReqMessage string `protobuf:"bytes,2,opt,name=ReqMessage" json:"ReqMessage,omitempty"` +// OpUserID string `protobuf:"bytes,3,opt,name=OpUserID" json:"OpUserID,omitempty"` +// OperationID string `protobuf:"bytes,4,opt,name=OperationID" json:"OperationID,omitempty"` +//申请进群后调用 +func JoinApplicationNotification(req *pbGroup.JoinGroupReq) { + managerList, err := imdb.GetOwnerManagerByGroupID(req.GroupID) + if err != nil { + log.NewError(req.OperationID, "GetOwnerManagerByGroupId failed ", err.Error(), req.GroupID) + return + } + + var n NotificationMsg + n.SendID = req.OpUserID + n.ContentType = constant.JoinApplicationNotification + n.SessionType = constant.SingleChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = req.OperationID + + JoinGroupApplicationTips := open_im_sdk.JoinGroupApplicationTips{Group: &open_im_sdk.GroupInfo{}, Applicant: &open_im_sdk.PublicUserInfo{}} + setGroupInfo(req.OperationID, req.GroupID, JoinGroupApplicationTips.Group, "") + + apply, err := imdb.GetUserByUserID(req.OpUserID) + if err != nil { + log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), req.OpUserID) + return + } + utils.CopyStructFields(JoinGroupApplicationTips.Applicant, apply) + JoinGroupApplicationTips.Reason = req.ReqMessage + + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(JoinGroupApplicationTips) + tips.DefaultTips = "JoinGroupApplicationTips" + n.Content, _ = json.Marshal(tips) + for _, v := range managerList { + n.RecvID = v.UserID + Notification(&n, true) + } +} + +//message ApplicationProcessedTips{ +// GroupInfo Group = 1; +// GroupMemberFullInfo OpUser = 2; +// int32 Result = 3; +// string Reason = 4; +//} +//处理进群请求后调用 +func ApplicationProcessedNotification(req *pbGroup.GroupApplicationResponseReq) { + var n NotificationMsg + n.SendID = req.OpUserID + n.ContentType = constant.ApplicationProcessedNotification + n.SessionType = constant.SingleChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = req.OperationID + n.RecvID = req.FromUserID + + ApplicationProcessedTips := open_im_sdk.ApplicationProcessedTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}} + setGroupInfo(req.OperationID, req.GroupID, ApplicationProcessedTips.Group, "") + setOpUserInfo(req.OperationID, req.OpUserID, req.GroupID, ApplicationProcessedTips.OpUser) + ApplicationProcessedTips.Reason = req.HandledMsg + ApplicationProcessedTips.Result = req.HandleResult + + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(ApplicationProcessedTips) + tips.DefaultTips = "ApplicationProcessedNotification" + n.Content, _ = json.Marshal(tips) + + Notification(&n, true) +} + +//message MemberInvitedTips{ +// GroupInfo Group = 1; +// GroupMemberFullInfo OpUser = 2; +// GroupMemberFullInfo InvitedUser = 3; +// uint64 OperationTime = 4; +//} +//被邀请进群后调用 +func MemberInvitedNotification(operationID, groupID, opUserID, reason string, invitedUserIDList []string) { + var n NotificationMsg + n.SendID = opUserID + n.ContentType = constant.MemberInvitedNotification + n.SessionType = constant.GroupChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = operationID + + ApplicationProcessedTips := open_im_sdk.MemberInvitedTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}} + setGroupInfo(operationID, groupID, ApplicationProcessedTips.Group, "") + setOpUserInfo(operationID, opUserID, groupID, ApplicationProcessedTips.OpUser) + for _, v := range invitedUserIDList { + var groupMemberInfo open_im_sdk.GroupMemberFullInfo + setGroupMemberInfo(operationID, groupID, v, &groupMemberInfo) + ApplicationProcessedTips.InvitedUserList = append(ApplicationProcessedTips.InvitedUserList, &groupMemberInfo) + } + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(ApplicationProcessedTips) + tips.DefaultTips = "MemberInvitedNotification" + n.Content, _ = json.Marshal(tips) + n.RecvID = groupID + Notification(&n, true) +} + +//message MemberKickedTips{ +// GroupInfo Group = 1; +// GroupMemberFullInfo OpUser = 2; +// GroupMemberFullInfo KickedUser = 3; +// uint64 OperationTime = 4; +//} +//被踢后调用 +func MemberKickedNotification(req *pbGroup.KickGroupMemberReq, kickedUserIDList []string) { + var n NotificationMsg + n.SendID = req.OpUserID + n.ContentType = constant.MemberKickedNotification + n.SessionType = constant.GroupChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = req.OperationID + + MemberKickedTips := open_im_sdk.MemberKickedTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}} + setGroupInfo(req.OperationID, req.GroupID, MemberKickedTips.Group, "") + setOpUserInfo(req.OperationID, req.OpUserID, req.GroupID, MemberKickedTips.OpUser) + for _, v := range kickedUserIDList { + var groupMemberInfo open_im_sdk.GroupMemberFullInfo + setGroupMemberInfo(req.OperationID, req.GroupID, v, &groupMemberInfo) + MemberKickedTips.KickedUserList = append(MemberKickedTips.KickedUserList, &groupMemberInfo) + } + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(MemberKickedTips) + tips.DefaultTips = "MemberKickedNotification" + n.Content, _ = json.Marshal(tips) + n.RecvID = req.GroupID + Notification(&n, true) + + for _, v := range kickedUserIDList { + n.SessionType = constant.SingleChatType + n.RecvID = v + Notification(&n, true) + } +} + +//message GroupInfoChangedTips{ +// int32 ChangedType = 1; //bitwise operators: 1:groupName; 10:Notification 100:Introduction; 1000:FaceUrl +// GroupInfo Group = 2; +// GroupMemberFullInfo OpUser = 3; +//} + +//群信息改变后掉用 +func GroupInfoChangedNotification(operationID, opUserID, groupID string, changedType int32) { + var n NotificationMsg + n.SendID = opUserID + n.ContentType = constant.GroupInfoChangedNotification + n.SessionType = constant.GroupChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = operationID + + GroupInfoChangedTips := open_im_sdk.GroupInfoChangedTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}} + setGroupInfo(operationID, groupID, GroupInfoChangedTips.Group, opUserID) + setOpUserInfo(operationID, opUserID, groupID, GroupInfoChangedTips.OpUser) + GroupInfoChangedTips.ChangedType = changedType + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(GroupInfoChangedTips) + tips.DefaultTips = "GroupInfoChangedNotification" + n.Content, _ = json.Marshal(tips) + n.RecvID = groupID + Notification(&n, false) +} + +/* +func GroupInfoChangedNotification(operationID string, changedType int32, group *immysql.Group, opUser *immysql.GroupMember) { + var n NotificationMsg + n.SendID = opUser.UserID + n.RecvID = group.GroupID + n.ContentType = constant.ChangeGroupInfoTip + n.SessionType = constant.GroupChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = operationID + + var groupInfoChanged open_im_sdk.GroupInfoChangedTips + groupInfoChanged.Group = &open_im_sdk.GroupInfo{} + utils.CopyStructFields(groupInfoChanged.Group, group) + groupInfoChanged.OpUser = &open_im_sdk.GroupMemberFullInfo{} + utils.CopyStructFields(groupInfoChanged.OpUser, opUser) + groupInfoChanged.ChangedType = changedType + + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(groupInfoChanged) + tips.DefaultTips = config.Config.Notification.GroupInfoChanged.DefaultTips.Tips + n.Content, _ = json.Marshal(tips) + Notification(&n, false) +} +*/ + +//message MemberLeaveTips{ +// GroupInfo Group = 1; +// GroupMemberFullInfo LeaverUser = 2; +// uint64 OperationTime = 3; +//} + +//群成员退群后调用 +func MemberLeaveNotification(req *pbGroup.QuitGroupReq) { + var n NotificationMsg + n.SendID = req.OpUserID + n.ContentType = constant.MemberLeaveNotification + n.SessionType = constant.GroupChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = req.OperationID + + MemberLeaveTips := open_im_sdk.MemberLeaveTips{Group: &open_im_sdk.GroupInfo{}, LeaverUser: &open_im_sdk.GroupMemberFullInfo{}} + setGroupInfo(req.OperationID, req.GroupID, MemberLeaveTips.Group, "") + setOpUserInfo(req.OperationID, req.OpUserID, req.GroupID, MemberLeaveTips.LeaverUser) + + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(MemberLeaveTips) + tips.DefaultTips = "MemberLeaveNotification" + n.Content, _ = json.Marshal(tips) + n.RecvID = req.GroupID + Notification(&n, true) + + n.SessionType = constant.SingleChatType + n.RecvID = req.OpUserID + Notification(&n, true) +} + +//message MemberEnterTips{ +// GroupInfo Group = 1; +// GroupMemberFullInfo EntrantUser = 2; +// uint64 OperationTime = 3; +//} +//群成员主动申请进群,管理员同意后调用, +func MemberEnterNotification(req *pbGroup.GroupApplicationResponseReq) { + var n NotificationMsg + n.SendID = req.OpUserID + n.ContentType = constant.MemberEnterNotification + n.SessionType = constant.GroupChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = req.OperationID + + MemberLeaveTips := open_im_sdk.MemberEnterTips{Group: &open_im_sdk.GroupInfo{}, EntrantUser: &open_im_sdk.GroupMemberFullInfo{}} + setGroupInfo(req.OperationID, req.GroupID, MemberLeaveTips.Group, "") + setOpUserInfo(req.OperationID, req.OpUserID, req.GroupID, MemberLeaveTips.EntrantUser) + + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(MemberLeaveTips) + tips.DefaultTips = "MemberEnterNotification" + n.Content, _ = json.Marshal(tips) + n.RecvID = req.GroupID + Notification(&n, true) + +} + +//message MemberInfoChangedTips{ +// int32 ChangeType = 1; //1:info changed; 2:mute +// GroupMemberFullInfo OpUser = 2; //who do this +// GroupMemberFullInfo FinalInfo = 3; // +// uint64 MuteTime = 4; +// GroupInfo Group = 5; +//} +//func MemberInfoChangedNotification(operationID string, group *immysql.Group, opUser *immysql.GroupMember, userFinalInfo *immysql.GroupMember) { + +//} + +//message FriendApplicationAddedTips{ +// PublicUserInfo OpUser = 1; //user1 +// FriendApplication Application = 2; +// PublicUserInfo OpedUser = 3; //user2 +//} + +func getFromToUserNickname(operationID, fromUserID, toUserID string) (string, string) { + from, err1 := imdb.GetUserByUserID(fromUserID) + to, err2 := imdb.GetUserByUserID(toUserID) + if err1 != nil || err2 != nil { + log.NewError("FindUserByUID failed ", err1, err2, fromUserID, toUserID) + } + fromNickname, toNickname := "", "" + if from != nil { + fromNickname = from.Nickname + } + if to != nil { + toNickname = to.Nickname + } + return fromNickname, toNickname +} + +func FriendApplicationAddedNotification(req *pbFriend.AddFriendReq) { + var n NotificationMsg + n.SendID = req.CommID.FromUserID + n.RecvID = req.CommID.ToUserID + n.ContentType = constant.FriendApplicationAddedNotification + n.SessionType = constant.SingleChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = req.CommID.OperationID + + var FriendApplicationAddedTips open_im_sdk.FriendApplicationAddedTips + FriendApplicationAddedTips.FromToUserID.FromUserID = req.CommID.FromUserID + FriendApplicationAddedTips.FromToUserID.ToUserID = req.CommID.ToUserID + fromUserNickname, toUserNickname := getFromToUserNickname(req.CommID.OperationID, req.CommID.FromUserID, req.CommID.ToUserID) + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(FriendApplicationAddedTips) + tips.DefaultTips = fromUserNickname + " FriendApplicationAddedNotification " + toUserNickname + n.Content, _ = json.Marshal(tips) + Notification(&n, true) +} + +func FriendApplicationProcessedNotification(req *pbFriend.AddFriendResponseReq) { + var n NotificationMsg + n.SendID = req.CommID.FromUserID + n.RecvID = req.CommID.ToUserID + n.ContentType = constant.FriendApplicationProcessedNotification + n.SessionType = constant.SingleChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = req.CommID.OperationID + + var FriendApplicationProcessedTips open_im_sdk.FriendApplicationProcessedTips + FriendApplicationProcessedTips.FromToUserID.FromUserID = req.CommID.FromUserID + FriendApplicationProcessedTips.FromToUserID.ToUserID = req.CommID.ToUserID + fromUserNickname, toUserNickname := getFromToUserNickname(req.CommID.OperationID, req.CommID.FromUserID, req.CommID.ToUserID) + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(FriendApplicationProcessedTips) + tips.DefaultTips = fromUserNickname + " FriendApplicationProcessedNotification " + toUserNickname + n.Content, _ = json.Marshal(tips) + Notification(&n, true) +} + +func FriendAddedNotification(operationID, opUserID, fromUserID, toUserID string) { + var n NotificationMsg + n.SendID = fromUserID + n.RecvID = toUserID + n.ContentType = constant.FriendAddedNotification + n.SessionType = constant.SingleChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = operationID + + var FriendAddedTips open_im_sdk.FriendAddedTips + + user, err := imdb.GetUserByUserID(opUserID) + if err != nil { + log.NewError(operationID, "FindUserByUID failed ", err.Error(), opUserID) + + } else { + utils.CopyStructFields(FriendAddedTips.OpUser, user) + } + + friend, err := imdb.GetFriendRelationshipFromFriend(fromUserID, toUserID) + if err != nil { + log.NewError(operationID, "FindUserByUID failed ", err.Error(), fromUserID, toUserID) + } else { + FriendAddedTips.Friend.Remark = friend.Remark + } + + from, err := imdb.GetUserByUserID(fromUserID) + if err != nil { + log.NewError(operationID, "FindUserByUID failed ", err.Error(), fromUserID) + + } else { + utils.CopyStructFields(FriendAddedTips.Friend, from) + } + + to, err := imdb.GetUserByUserID(toUserID) + if err != nil { + log.NewError(operationID, "FindUserByUID failed ", err.Error(), toUserID) + + } else { + utils.CopyStructFields(FriendAddedTips.Friend.FriendUser, to) + } + + fromUserNickname, toUserNickname := from.Nickname, to.Nickname + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(FriendAddedTips) + tips.DefaultTips = fromUserNickname + " FriendAddedNotification " + toUserNickname + n.Content, _ = json.Marshal(tips) + Notification(&n, true) +} + +//message FriendDeletedTips{ +// FriendInfo Friend = 1; +//} +func FriendDeletedNotification(req *pbFriend.DeleteFriendReq) { + var n NotificationMsg + n.SendID = req.CommID.FromUserID + n.RecvID = req.CommID.ToUserID + n.ContentType = constant.FriendDeletedNotification + n.SessionType = constant.SingleChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = req.CommID.OperationID + + var FriendDeletedTips open_im_sdk.FriendDeletedTips + FriendDeletedTips.FromToUserID.FromUserID = req.CommID.FromUserID + FriendDeletedTips.FromToUserID.ToUserID = req.CommID.ToUserID + fromUserNickname, toUserNickname := getFromToUserNickname(req.CommID.OperationID, req.CommID.FromUserID, req.CommID.ToUserID) + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(FriendDeletedTips) + tips.DefaultTips = fromUserNickname + " FriendDeletedNotification " + toUserNickname + n.Content, _ = json.Marshal(tips) + Notification(&n, true) +} + +//message FriendInfoChangedTips{ +// FriendInfo Friend = 1; +// PublicUserInfo OpUser = 2; +// uint64 OperationTime = 3; +//} +func FriendInfoChangedNotification(operationID, opUserID, fromUserID, toUserID string) { + var n NotificationMsg + n.SendID = fromUserID + n.RecvID = toUserID + n.ContentType = constant.FriendInfoChangedNotification + n.SessionType = constant.SingleChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = operationID + + var FriendInfoChangedTips open_im_sdk.FriendInfoChangedTips + FriendInfoChangedTips.FromToUserID.FromUserID = fromUserID + FriendInfoChangedTips.FromToUserID.ToUserID = toUserID + fromUserNickname, toUserNickname := getFromToUserNickname(operationID, fromUserID, toUserID) + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(FriendInfoChangedTips) + tips.DefaultTips = fromUserNickname + " FriendDeletedNotification " + toUserNickname + n.Content, _ = json.Marshal(tips) + Notification(&n, true) +} + +func BlackAddedNotification(req *pbFriend.AddBlacklistReq) { + var n NotificationMsg + n.SendID = req.CommID.FromUserID + n.RecvID = req.CommID.ToUserID + n.ContentType = constant.BlackAddedNotification + n.SessionType = constant.SingleChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = req.CommID.OperationID + + var BlackAddedTips open_im_sdk.BlackAddedTips + BlackAddedTips.FromToUserID.FromUserID = req.CommID.FromUserID + BlackAddedTips.FromToUserID.ToUserID = req.CommID.ToUserID + fromUserNickname, toUserNickname := getFromToUserNickname(req.CommID.OperationID, req.CommID.FromUserID, req.CommID.ToUserID) + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(BlackAddedTips) + tips.DefaultTips = fromUserNickname + " BlackAddedNotification " + toUserNickname + n.Content, _ = json.Marshal(tips) + Notification(&n, true) +} + +//message BlackDeletedTips{ +// BlackInfo Black = 1; +//} +func BlackDeletedNotification(req *pbFriend.RemoveBlacklistReq) { + var n NotificationMsg + n.SendID = req.CommID.FromUserID + n.RecvID = req.CommID.ToUserID + n.ContentType = constant.BlackDeletedNotification + n.SessionType = constant.SingleChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = req.CommID.OperationID + + var BlackDeletedTips open_im_sdk.BlackDeletedTips + BlackDeletedTips.FromToUserID.FromUserID = req.CommID.FromUserID + BlackDeletedTips.FromToUserID.ToUserID = req.CommID.ToUserID + fromUserNickname, toUserNickname := getFromToUserNickname(req.CommID.OperationID, req.CommID.FromUserID, req.CommID.ToUserID) + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(BlackDeletedTips) + tips.DefaultTips = fromUserNickname + " BlackDeletedNotification " + toUserNickname + n.Content, _ = json.Marshal(tips) + Notification(&n, true) +} + +//message SelfInfoUpdatedTips{ +// UserInfo SelfUserInfo = 1; +// PublicUserInfo OpUser = 2; +// uint64 OperationTime = 3; +//} +func SelfInfoUpdatedNotification(operationID, userID string) { + var n NotificationMsg + n.SendID = userID + n.RecvID = userID + n.ContentType = constant.SelfInfoUpdatedNotification + n.SessionType = constant.SingleChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = operationID + + var SelfInfoUpdatedTips open_im_sdk.SelfInfoUpdatedTips + SelfInfoUpdatedTips.UserID = userID + + var tips open_im_sdk.TipsComm + u, err := imdb.GetUserByUserID(userID) + if err != nil { + log.NewError(operationID, "FindUserByUID failed ", err.Error(), userID) + } + + tips.Detail, _ = json.Marshal(SelfInfoUpdatedTips) + tips.DefaultTips = u.Nickname + " SelfInfoUpdatedNotification " + n.Content, _ = json.Marshal(tips) + Notification(&n, true) +} diff --git a/internal/rpc/msg/send_msg.go b/internal/rpc/msg/send_msg.go index 6242dfee4..4c0c3ad2d 100644 --- a/internal/rpc/msg/send_msg.go +++ b/internal/rpc/msg/send_msg.go @@ -4,15 +4,11 @@ import ( "Open_IM/pkg/common/config" "Open_IM/pkg/common/constant" "Open_IM/pkg/common/db" - imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" http2 "Open_IM/pkg/common/http" "Open_IM/pkg/common/log" - "Open_IM/pkg/common/token_verify" "Open_IM/pkg/grpc-etcdv3/getcdv3" pbChat "Open_IM/pkg/proto/chat" - pbFriend "Open_IM/pkg/proto/friend" pbGroup "Open_IM/pkg/proto/group" - open_im_sdk "Open_IM/pkg/proto/sdk_ws" sdk_ws "Open_IM/pkg/proto/sdk_ws" "Open_IM/pkg/utils" "context" @@ -301,585 +297,3 @@ func Notification(n *NotificationMsg, onlineUserOnly bool) { log.NewError(req.OperationID, "SendMsg rpc failed, ", req.String()) } } - -//message GroupCreatedTips{ -// GroupInfo Group = 1; -// GroupMemberFullInfo Creator = 2; -// repeated GroupMemberFullInfo MemberList = 3; -// uint64 OperationTime = 4; -//} creator->group - -func setOpUserInfo(operationID, opUserID, groupID string, groupMemberInfo *open_im_sdk.GroupMemberFullInfo) { - if token_verify.IsMangerUserID(opUserID) { - u, err := imdb.GetUserByUserID(opUserID) - if err != nil { - log.NewError(operationID, "FindUserByUID failed ", err.Error(), opUserID) - return - } - utils.CopyStructFields(groupMemberInfo, u) - groupMemberInfo.AppMangerLevel = 1 - } else { - u, err := imdb.FindGroupMemberInfoByGroupIdAndUserId(groupID, opUserID) - if err != nil { - log.NewError(operationID, "FindGroupMemberInfoByGroupIdAndUserId failed ", err.Error(), groupID, opUserID) - return - } - utils.CopyStructFields(groupMemberInfo, u) - } -} - -func setGroupInfo(operationID, groupID string, groupInfo *open_im_sdk.GroupInfo, ownerUserID string) { - group, err := imdb.FindGroupInfoByGroupId(groupID) - if err != nil { - log.NewError(operationID, "FindGroupInfoByGroupId failed ", err.Error(), groupID) - return - } - utils.CopyStructFields(groupInfo, group) - - if ownerUserID != "" { - groupInfo.Owner = &open_im_sdk.PublicUserInfo{} - setGroupPublicUserInfo(operationID, groupID, ownerUserID, groupInfo.Owner) - } -} - -func setGroupMemberInfo(operationID, groupID, userID string, groupMemberInfo *open_im_sdk.GroupMemberFullInfo) { - group, err := imdb.FindGroupMemberInfoByGroupIdAndUserId(groupID, userID) - if err != nil { - log.NewError(operationID, "FindGroupMemberInfoByGroupIdAndUserId failed ", err.Error(), groupID, userID) - return - } - utils.CopyStructFields(groupMemberInfo, group) -} - -func setGroupPublicUserInfo(operationID, groupID, userID string, publicUserInfo *open_im_sdk.PublicUserInfo) { - group, err := imdb.FindGroupMemberInfoByGroupIdAndUserId(groupID, userID) - if err != nil { - log.NewError(operationID, "FindGroupMemberInfoByGroupIdAndUserId failed ", err.Error(), groupID, userID) - return - } - utils.CopyStructFields(publicUserInfo, group) -} - -//创建群后调用 -func GroupCreatedNotification(operationID, opUserID, OwnerUserID, groupID string, initMemberList []string) { - var n NotificationMsg - n.SendID = opUserID - n.RecvID = groupID - n.ContentType = constant.GroupCreatedNotification - n.SessionType = constant.GroupChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = operationID - - GroupCreatedTips := open_im_sdk.GroupCreatedTips{Group: &open_im_sdk.GroupInfo{}, - Creator: &open_im_sdk.GroupMemberFullInfo{}} - setOpUserInfo(operationID, GroupCreatedTips.Creator.UserID, groupID, GroupCreatedTips.Creator) - - setGroupInfo(operationID, groupID, GroupCreatedTips.Group, OwnerUserID) - - for _, v := range initMemberList { - var groupMemberInfo open_im_sdk.GroupMemberFullInfo - setGroupMemberInfo(operationID, groupID, v, &groupMemberInfo) - GroupCreatedTips.MemberList = append(GroupCreatedTips.MemberList, &groupMemberInfo) - } - - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(GroupCreatedTips) - tips.DefaultTips = config.Config.Notification.GroupCreated.DefaultTips.Tips - n.Content, _ = json.Marshal(tips) - Notification(&n, false) -} - -//message ReceiveJoinApplicationTips{ -// GroupInfo Group = 1; -// PublicUserInfo Applicant = 2; -// string Reason = 3; -//} apply->all managers GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` -// ReqMessage string `protobuf:"bytes,2,opt,name=ReqMessage" json:"ReqMessage,omitempty"` -// OpUserID string `protobuf:"bytes,3,opt,name=OpUserID" json:"OpUserID,omitempty"` -// OperationID string `protobuf:"bytes,4,opt,name=OperationID" json:"OperationID,omitempty"` -//申请进群后调用 -func JoinApplicationNotification(req *pbGroup.JoinGroupReq) { - managerList, err := imdb.GetOwnerManagerByGroupId(req.GroupID) - if err != nil { - log.NewError(req.OperationID, "GetOwnerManagerByGroupId failed ", err.Error(), req.GroupID) - return - } - - var n NotificationMsg - n.SendID = req.OpUserID - n.ContentType = constant.JoinApplicationNotification - n.SessionType = constant.SingleChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = req.OperationID - - JoinGroupApplicationTips := open_im_sdk.JoinGroupApplicationTips{Group: &open_im_sdk.GroupInfo{}, Applicant: &open_im_sdk.PublicUserInfo{}} - setGroupInfo(req.OperationID, req.GroupID, JoinGroupApplicationTips.Group, "") - - apply, err := imdb.FindUserByUID(req.OpUserID) - if err != nil { - log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), req.OpUserID) - return - } - utils.CopyStructFields(JoinGroupApplicationTips.Applicant, apply) - JoinGroupApplicationTips.Reason = req.ReqMessage - - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(JoinGroupApplicationTips) - tips.DefaultTips = "JoinGroupApplicationTips" - n.Content, _ = json.Marshal(tips) - for _, v := range managerList { - n.RecvID = v.UserID - Notification(&n, true) - } -} - -//message ApplicationProcessedTips{ -// GroupInfo Group = 1; -// GroupMemberFullInfo OpUser = 2; -// int32 Result = 3; -// string Reason = 4; -//} -//处理进群请求后调用 -func ApplicationProcessedNotification(req *pbGroup.GroupApplicationResponseReq) { - var n NotificationMsg - n.SendID = req.OpUserID - n.ContentType = constant.ApplicationProcessedNotification - n.SessionType = constant.SingleChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = req.OperationID - n.RecvID = req.ToUserID - - ApplicationProcessedTips := open_im_sdk.ApplicationProcessedTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}} - setGroupInfo(req.OperationID, req.GroupID, ApplicationProcessedTips.Group, "") - setOpUserInfo(req.OperationID, req.OpUserID, req.GroupID, ApplicationProcessedTips.OpUser) - ApplicationProcessedTips.Reason = req.HandledMsg - ApplicationProcessedTips.Result = req.HandleResult - - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(ApplicationProcessedTips) - tips.DefaultTips = "ApplicationProcessedNotification" - n.Content, _ = json.Marshal(tips) - - Notification(&n, true) -} - -//message MemberInvitedTips{ -// GroupInfo Group = 1; -// GroupMemberFullInfo OpUser = 2; -// GroupMemberFullInfo InvitedUser = 3; -// uint64 OperationTime = 4; -//} -//被邀请进群后调用 -func MemberInvitedNotification(operationID, groupID, opUserID, reason string, invitedUserIDList []string) { - var n NotificationMsg - n.SendID = opUserID - n.ContentType = constant.MemberInvitedNotification - n.SessionType = constant.GroupChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = operationID - - ApplicationProcessedTips := open_im_sdk.MemberInvitedTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}} - setGroupInfo(operationID, groupID, ApplicationProcessedTips.Group, "") - setOpUserInfo(operationID, opUserID, groupID, ApplicationProcessedTips.OpUser) - for _, v := range invitedUserIDList { - var groupMemberInfo open_im_sdk.GroupMemberFullInfo - setGroupMemberInfo(operationID, groupID, v, &groupMemberInfo) - ApplicationProcessedTips.InvitedUserList = append(ApplicationProcessedTips.InvitedUserList, &groupMemberInfo) - } - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(ApplicationProcessedTips) - tips.DefaultTips = "MemberInvitedNotification" - n.Content, _ = json.Marshal(tips) - n.RecvID = groupID - Notification(&n, true) -} - -//message MemberKickedTips{ -// GroupInfo Group = 1; -// GroupMemberFullInfo OpUser = 2; -// GroupMemberFullInfo KickedUser = 3; -// uint64 OperationTime = 4; -//} -//被踢后调用 -func MemberKickedNotification(req *pbGroup.KickGroupMemberReq, kickedUserIDList []string) { - var n NotificationMsg - n.SendID = req.OpUserID - n.ContentType = constant.MemberKickedNotification - n.SessionType = constant.GroupChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = req.OperationID - - MemberKickedTips := open_im_sdk.MemberKickedTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}} - setGroupInfo(req.OperationID, req.GroupID, MemberKickedTips.Group, "") - setOpUserInfo(req.OperationID, req.OpUserID, req.GroupID, MemberKickedTips.OpUser) - for _, v := range kickedUserIDList { - var groupMemberInfo open_im_sdk.GroupMemberFullInfo - setGroupMemberInfo(req.OperationID, req.GroupID, v, &groupMemberInfo) - MemberKickedTips.KickedUserList = append(MemberKickedTips.KickedUserList, &groupMemberInfo) - } - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(MemberKickedTips) - tips.DefaultTips = "MemberKickedNotification" - n.Content, _ = json.Marshal(tips) - n.RecvID = req.GroupID - Notification(&n, true) - - for _, v := range kickedUserIDList { - n.SessionType = constant.SingleChatType - n.RecvID = v - Notification(&n, true) - } -} - -//message GroupInfoChangedTips{ -// int32 ChangedType = 1; //bitwise operators: 1:groupName; 10:Notification 100:Introduction; 1000:FaceUrl -// GroupInfo Group = 2; -// GroupMemberFullInfo OpUser = 3; -//} - -//群信息改变后掉用 -func GroupInfoChangedNotification(operationID, opUserID, groupID string, changedType int32) { - var n NotificationMsg - n.SendID = opUserID - n.ContentType = constant.GroupInfoChangedNotification - n.SessionType = constant.GroupChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = operationID - - GroupInfoChangedTips := open_im_sdk.GroupInfoChangedTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}} - setGroupInfo(operationID, groupID, GroupInfoChangedTips.Group, opUserID) - setOpUserInfo(operationID, opUserID, groupID, GroupInfoChangedTips.OpUser) - GroupInfoChangedTips.ChangedType = changedType - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(GroupInfoChangedTips) - tips.DefaultTips = "GroupInfoChangedNotification" - n.Content, _ = json.Marshal(tips) - n.RecvID = groupID - Notification(&n, false) -} - -/* -func GroupInfoChangedNotification(operationID string, changedType int32, group *immysql.Group, opUser *immysql.GroupMember) { - var n NotificationMsg - n.SendID = opUser.UserID - n.RecvID = group.GroupID - n.ContentType = constant.ChangeGroupInfoTip - n.SessionType = constant.GroupChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = operationID - - var groupInfoChanged open_im_sdk.GroupInfoChangedTips - groupInfoChanged.Group = &open_im_sdk.GroupInfo{} - utils.CopyStructFields(groupInfoChanged.Group, group) - groupInfoChanged.OpUser = &open_im_sdk.GroupMemberFullInfo{} - utils.CopyStructFields(groupInfoChanged.OpUser, opUser) - groupInfoChanged.ChangedType = changedType - - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(groupInfoChanged) - tips.DefaultTips = config.Config.Notification.GroupInfoChanged.DefaultTips.Tips - n.Content, _ = json.Marshal(tips) - Notification(&n, false) -} -*/ - -//message MemberLeaveTips{ -// GroupInfo Group = 1; -// GroupMemberFullInfo LeaverUser = 2; -// uint64 OperationTime = 3; -//} - -//群成员退群后调用 -func MemberLeaveNotification(req *pbGroup.QuitGroupReq) { - var n NotificationMsg - n.SendID = req.OpUserID - n.ContentType = constant.MemberLeaveNotification - n.SessionType = constant.GroupChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = req.OperationID - - MemberLeaveTips := open_im_sdk.MemberLeaveTips{Group: &open_im_sdk.GroupInfo{}, LeaverUser: &open_im_sdk.GroupMemberFullInfo{}} - setGroupInfo(req.OperationID, req.GroupID, MemberLeaveTips.Group, "") - setOpUserInfo(req.OperationID, req.OpUserID, req.GroupID, MemberLeaveTips.LeaverUser) - - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(MemberLeaveTips) - tips.DefaultTips = "MemberLeaveNotification" - n.Content, _ = json.Marshal(tips) - n.RecvID = req.GroupID - Notification(&n, true) - - n.SessionType = constant.SingleChatType - n.RecvID = req.OpUserID - Notification(&n, true) -} - -//message MemberEnterTips{ -// GroupInfo Group = 1; -// GroupMemberFullInfo EntrantUser = 2; -// uint64 OperationTime = 3; -//} -//群成员主动申请进群,管理员同意后调用, -func MemberEnterNotification(req *pbGroup.GroupApplicationResponseReq) { - var n NotificationMsg - n.SendID = req.OpUserID - n.ContentType = constant.MemberEnterNotification - n.SessionType = constant.GroupChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = req.OperationID - - MemberLeaveTips := open_im_sdk.MemberEnterTips{Group: &open_im_sdk.GroupInfo{}, EntrantUser: &open_im_sdk.GroupMemberFullInfo{}} - setGroupInfo(req.OperationID, req.GroupID, MemberLeaveTips.Group, "") - setOpUserInfo(req.OperationID, req.OpUserID, req.GroupID, MemberLeaveTips.EntrantUser) - - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(MemberLeaveTips) - tips.DefaultTips = "MemberEnterNotification" - n.Content, _ = json.Marshal(tips) - n.RecvID = req.GroupID - Notification(&n, true) - -} - -//message MemberInfoChangedTips{ -// int32 ChangeType = 1; //1:info changed; 2:mute -// GroupMemberFullInfo OpUser = 2; //who do this -// GroupMemberFullInfo FinalInfo = 3; // -// uint64 MuteTime = 4; -// GroupInfo Group = 5; -//} -//func MemberInfoChangedNotification(operationID string, group *immysql.Group, opUser *immysql.GroupMember, userFinalInfo *immysql.GroupMember) { - -//} - -//message FriendApplicationAddedTips{ -// PublicUserInfo OpUser = 1; //user1 -// FriendApplication Application = 2; -// PublicUserInfo OpedUser = 3; //user2 -//} - -func getFromToUserNickname(operationID, fromUserID, toUserID string) (string, string) { - from, err1 := imdb.FindUserByUID(fromUserID) - to, err2 := imdb.FindUserByUID(toUserID) - if err1 != nil || err2 != nil { - log.NewError("FindUserByUID failed ", err1, err2, fromUserID, toUserID) - } - fromNickname, toNickname := "", "" - if from != nil { - fromNickname = from.Nickname - } - if to != nil { - toNickname = to.Nickname - } - return fromNickname, toNickname -} - -func FriendApplicationAddedNotification(req *pbFriend.AddFriendReq) { - var n NotificationMsg - n.SendID = req.CommID.FromUserID - n.RecvID = req.CommID.ToUserID - n.ContentType = constant.FriendApplicationAddedNotification - n.SessionType = constant.SingleChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = req.CommID.OperationID - - var FriendApplicationAddedTips open_im_sdk.FriendApplicationAddedTips - FriendApplicationAddedTips.FromToUserID.FromUserID = req.CommID.FromUserID - FriendApplicationAddedTips.FromToUserID.ToUserID = req.CommID.ToUserID - fromUserNickname, toUserNickname := getFromToUserNickname(req.CommID.OperationID, req.CommID.FromUserID, req.CommID.ToUserID) - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(FriendApplicationAddedTips) - tips.DefaultTips = fromUserNickname + " FriendApplicationAddedNotification " + toUserNickname - n.Content, _ = json.Marshal(tips) - Notification(&n, true) -} - -func FriendApplicationProcessedNotification(req *pbFriend.AddFriendResponseReq) { - var n NotificationMsg - n.SendID = req.CommID.FromUserID - n.RecvID = req.CommID.ToUserID - n.ContentType = constant.FriendApplicationProcessedNotification - n.SessionType = constant.SingleChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = req.CommID.OperationID - - var FriendApplicationProcessedTips open_im_sdk.FriendApplicationProcessedTips - FriendApplicationProcessedTips.FromToUserID.FromUserID = req.CommID.FromUserID - FriendApplicationProcessedTips.FromToUserID.ToUserID = req.CommID.ToUserID - fromUserNickname, toUserNickname := getFromToUserNickname(req.CommID.OperationID, req.CommID.FromUserID, req.CommID.ToUserID) - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(FriendApplicationProcessedTips) - tips.DefaultTips = fromUserNickname + " FriendApplicationProcessedNotification " + toUserNickname - n.Content, _ = json.Marshal(tips) - Notification(&n, true) -} - -func FriendAddedNotification(operationID, opUserID, fromUserID, toUserID string) { - var n NotificationMsg - n.SendID = fromUserID - n.RecvID = toUserID - n.ContentType = constant.FriendAddedNotification - n.SessionType = constant.SingleChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = operationID - - var FriendAddedTips open_im_sdk.FriendAddedTips - - user, err := imdb.FindUserByUID(opUserID) - if err != nil { - log.NewError(operationID, "FindUserByUID failed ", err.Error(), opUserID) - - } else { - utils.CopyStructFields(FriendAddedTips.OpUser, user) - } - - friend, err := imdb.FindFriendRelationshipFromFriend(fromUserID, toUserID) - if err != nil { - log.NewError(operationID, "FindUserByUID failed ", err.Error(), fromUserID, toUserID) - } else { - FriendAddedTips.Friend.Remark = friend.Remark - } - - from, err := imdb.FindUserByUID(fromUserID) - if err != nil { - log.NewError(operationID, "FindUserByUID failed ", err.Error(), fromUserID) - - } else { - utils.CopyStructFields(FriendAddedTips.Friend.OwnerUser, from) - } - - to, err := imdb.FindUserByUID(toUserID) - if err != nil { - log.NewError(operationID, "FindUserByUID failed ", err.Error(), toUserID) - - } else { - utils.CopyStructFields(FriendAddedTips.Friend.FriendUser, to) - } - - fromUserNickname, toUserNickname := FriendAddedTips.Friend.OwnerUser.Nickname, FriendAddedTips.Friend.FriendUser.Nickname - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(FriendAddedTips) - tips.DefaultTips = fromUserNickname + " FriendAddedNotification " + toUserNickname - n.Content, _ = json.Marshal(tips) - Notification(&n, true) -} - -//message FriendDeletedTips{ -// FriendInfo Friend = 1; -//} -func FriendDeletedNotification(req *pbFriend.DeleteFriendReq) { - var n NotificationMsg - n.SendID = req.CommID.FromUserID - n.RecvID = req.CommID.ToUserID - n.ContentType = constant.FriendDeletedNotification - n.SessionType = constant.SingleChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = req.CommID.OperationID - - var FriendDeletedTips open_im_sdk.FriendDeletedTips - FriendDeletedTips.FromToUserID.FromUserID = req.CommID.FromUserID - FriendDeletedTips.FromToUserID.ToUserID = req.CommID.ToUserID - fromUserNickname, toUserNickname := getFromToUserNickname(req.CommID.OperationID, req.CommID.FromUserID, req.CommID.ToUserID) - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(FriendDeletedTips) - tips.DefaultTips = fromUserNickname + " FriendDeletedNotification " + toUserNickname - n.Content, _ = json.Marshal(tips) - Notification(&n, true) -} - -//message FriendInfoChangedTips{ -// FriendInfo Friend = 1; -// PublicUserInfo OpUser = 2; -// uint64 OperationTime = 3; -//} -func FriendInfoChangedNotification(operationID, opUserID, fromUserID, toUserID string) { - var n NotificationMsg - n.SendID = fromUserID - n.RecvID = toUserID - n.ContentType = constant.FriendInfoChangedNotification - n.SessionType = constant.SingleChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = operationID - - var FriendInfoChangedTips open_im_sdk.FriendInfoChangedTips - FriendInfoChangedTips.FromToUserID.FromUserID = fromUserID - FriendInfoChangedTips.FromToUserID.ToUserID = toUserID - fromUserNickname, toUserNickname := getFromToUserNickname(operationID, fromUserID, toUserID) - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(FriendInfoChangedTips) - tips.DefaultTips = fromUserNickname + " FriendDeletedNotification " + toUserNickname - n.Content, _ = json.Marshal(tips) - Notification(&n, true) -} - -func BlackAddedNotification(req *pbFriend.AddBlacklistReq) { - var n NotificationMsg - n.SendID = req.CommID.FromUserID - n.RecvID = req.CommID.ToUserID - n.ContentType = constant.BlackAddedNotification - n.SessionType = constant.SingleChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = req.CommID.OperationID - - var BlackAddedTips open_im_sdk.BlackAddedTips - BlackAddedTips.FromToUserID.FromUserID = req.CommID.FromUserID - BlackAddedTips.FromToUserID.ToUserID = req.CommID.ToUserID - fromUserNickname, toUserNickname := getFromToUserNickname(req.CommID.OperationID, req.CommID.FromUserID, req.CommID.ToUserID) - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(BlackAddedTips) - tips.DefaultTips = fromUserNickname + " BlackAddedNotification " + toUserNickname - n.Content, _ = json.Marshal(tips) - Notification(&n, true) -} - -//message BlackDeletedTips{ -// BlackInfo Black = 1; -//} -func BlackDeletedNotification(req *pbFriend.RemoveBlacklistReq) { - var n NotificationMsg - n.SendID = req.CommID.FromUserID - n.RecvID = req.CommID.ToUserID - n.ContentType = constant.BlackDeletedNotification - n.SessionType = constant.SingleChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = req.CommID.OperationID - - var BlackDeletedTips open_im_sdk.BlackDeletedTips - BlackDeletedTips.FromToUserID.FromUserID = req.CommID.FromUserID - BlackDeletedTips.FromToUserID.ToUserID = req.CommID.ToUserID - fromUserNickname, toUserNickname := getFromToUserNickname(req.CommID.OperationID, req.CommID.FromUserID, req.CommID.ToUserID) - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(BlackDeletedTips) - tips.DefaultTips = fromUserNickname + " BlackDeletedNotification " + toUserNickname - n.Content, _ = json.Marshal(tips) - Notification(&n, true) -} - -//message SelfInfoUpdatedTips{ -// UserInfo SelfUserInfo = 1; -// PublicUserInfo OpUser = 2; -// uint64 OperationTime = 3; -//} -func SelfInfoUpdatedNotification(operationID, userID string) { - var n NotificationMsg - n.SendID = userID - n.RecvID = userID - n.ContentType = constant.SelfInfoUpdatedNotification - n.SessionType = constant.SingleChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = operationID - - var SelfInfoUpdatedTips open_im_sdk.SelfInfoUpdatedTips - SelfInfoUpdatedTips.UserID = userID - - var tips open_im_sdk.TipsComm - u, err := imdb.FindUserByUID(userID) - if err != nil { - log.NewError(operationID, "FindUserByUID failed ", err.Error(), userID) - } - - tips.Detail, _ = json.Marshal(SelfInfoUpdatedTips) - tips.DefaultTips = u.Nickname + " SelfInfoUpdatedNotification " - n.Content, _ = json.Marshal(tips) - Notification(&n, true) -} From b6944c430853f97ed4222df7256ba22e56d99419 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 28 Dec 2021 15:33:47 +0800 Subject: [PATCH 037/337] tidy code --- cmd/open_im_api/main.go | 12 +- internal/api/conversation/conversation.go | 364 +++++++++-------- internal/api/manage/management_chat.go | 381 +++++++----------- internal/api/manage/management_user.go | 316 +++++++-------- internal/rpc/friend/firend.go | 5 +- internal/rpc/group/group.go | 9 +- internal/rpc/msg/notification.go | 21 + internal/rpc/user/user.go | 48 +-- pkg/base_info/conversation_api_struct.go | 1 + pkg/base_info/manage_api_struct.go | 98 +++++ .../im_mysql_model/friend_request_model.go | 1 + .../im_mysql_model/group_member_model.go | 3 +- .../mysql_model/im_mysql_model/group_model.go | 2 - .../im_mysql_model/group_request_model.go | 2 - .../im_mysql_model/model_struct.go | 2 +- pkg/common/utils/utils.go | 95 +++++ pkg/utils/utils.go | 89 ---- 17 files changed, 732 insertions(+), 717 deletions(-) create mode 100644 pkg/base_info/conversation_api_struct.go create mode 100644 pkg/base_info/manage_api_struct.go create mode 100644 pkg/common/utils/utils.go diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index 23a4c0ec0..1730812bb 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -26,12 +26,12 @@ func main() { { userRouterGroup.POST("/update_user_info", user.UpdateUserInfo) userRouterGroup.POST("/get_user_info", user.GetUserInfo) - userRouterGroup.POST("/get_users_online_status", user.GetUsersOnlineStatus) + //userRouterGroup.POST("/get_users_online_status", user.GetUsersOnlineStatus) } //friend routing group friendRouterGroup := r.Group("/friend") { - friendRouterGroup.POST("/get_friends_info", friend.GetFriendsInfo) + // friendRouterGroup.POST("/get_friends_info", friend.GetFriendsInfo) friendRouterGroup.POST("/add_friend", friend.AddFriend) friendRouterGroup.POST("/get_friend_apply_list", friend.GetFriendApplyList) friendRouterGroup.POST("/get_self_apply_list", friend.GetSelfApplyList) @@ -87,15 +87,15 @@ func main() { { managementGroup.POST("/delete_user", manage.DeleteUser) managementGroup.POST("/send_msg", manage.ManagementSendMsg) - managementGroup.POST("/get_all_users_uid", manage.GetAllUsersUid) - managementGroup.POST("/account_check", manage.AccountCheck) - managementGroup.POST("/get_users_online_status", manage.GetUsersOnlineStatus) + // managementGroup.POST("/get_all_users_uid", manage.GetAllUsersUid) + // managementGroup.POST("/account_check", manage.AccountCheck) + // managementGroup.POST("/get_users_online_status", manage.GetUsersOnlineStatus) } //Conversation conversationGroup := r.Group("/conversation") { conversationGroup.POST("/set_receive_message_opt", conversation.SetReceiveMessageOpt) - conversationGroup.POST("/get_receive_message_opt", conversation.GetReceiveMessageOpt) + // conversationGroup.POST("/get_receive_message_opt", conversation.GetReceiveMessageOpt) conversationGroup.POST("/get_all_conversation_message_opt", conversation.GetAllConversationMessageOpt) } diff --git a/internal/api/conversation/conversation.go b/internal/api/conversation/conversation.go index 4e4316b05..1d47c2c70 100644 --- a/internal/api/conversation/conversation.go +++ b/internal/api/conversation/conversation.go @@ -1,194 +1,192 @@ package conversation -import ( - "Open_IM/pkg/common/config" - "Open_IM/pkg/common/log" - "Open_IM/pkg/common/token_verify" - "Open_IM/pkg/grpc-etcdv3/getcdv3" - "Open_IM/pkg/proto/user" - "Open_IM/pkg/utils" - "context" - "github.com/gin-gonic/gin" - "net/http" - "strings" -) +import "github.com/gin-gonic/gin" -type paramsSetReceiveMessageOpt struct { - OperationID string `json:"operationID" binding:"required"` - Option *int32 `json:"option" binding:"required"` - ConversationIdList []string `json:"conversationIdList" binding:"required"` -} - -type OptResult struct { - ConversationId string `json:"conversationId" binding:"required"` - Result int32 `json:"result" binding:"required"` -} - -type SetReceiveMessageOptResp struct { - ErrCode int32 `json:"errCode"` - ErrMsg string `json:"errMsg"` - Data []OptResult `json:"data"` -} - -type paramGetReceiveMessageOpt struct { - ConversationIdList []string `json:"conversationIdList" binding:"required"` - OperationID string `json:"operationID" binding:"required"` -} - -type GetReceiveMessageOptResp struct { - SetReceiveMessageOptResp -} - -type paramGetAllConversationMessageOpt struct { - OperationID string `json:"operationID" binding:"required"` -} - -type GetAllConversationMessageOptResp struct { - SetReceiveMessageOptResp -} - -//CopyStructFields +// +//type paramsSetReceiveMessageOpt struct { +// OperationID string `json:"operationID" binding:"required"` +// Option *int32 `json:"option" binding:"required"` +// ConversationIdList []string `json:"conversationIdList" binding:"required"` +//} +// +//type OptResult struct { +// ConversationId string `json:"conversationId" binding:"required"` +// Result int32 `json:"result" binding:"required"` +//} +// +//type SetReceiveMessageOptResp struct { +// ErrCode int32 `json:"errCode"` +// ErrMsg string `json:"errMsg"` +// Data []OptResult `json:"data"` +//} +// +//type paramGetReceiveMessageOpt struct { +// ConversationIdList []string `json:"conversationIdList" binding:"required"` +// OperationID string `json:"operationID" binding:"required"` +//} +// +//type GetReceiveMessageOptResp struct { +// SetReceiveMessageOptResp +//} +// +//type paramGetAllConversationMessageOpt struct { +// OperationID string `json:"operationID" binding:"required"` +//} +// +//type GetAllConversationMessageOptResp struct { +// SetReceiveMessageOptResp +//} +// +////CopyStructFields func GetAllConversationMessageOpt(c *gin.Context) { - params := paramGetAllConversationMessageOpt{} - if err := c.BindJSON(¶ms); err != nil { - log.NewError(params.OperationID, "bind json failed ", err.Error(), c) - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()}) - return - } - claims, err := token_verify.ParseToken(c.Request.Header.Get("token")) - if err != nil { - log.NewError(params.OperationID, "ParseToken failed, ", err.Error(), c.Request.Header.Get("token")) - c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "ParseToken failed, " + err.Error()}) - return - } - - req := &user.GetAllConversationMsgOptReq{ - UId: claims.UID, - OperationID: params.OperationID, - } - log.NewInfo(req.OperationID, "GetAllConversationMsgOpt req: ", req) - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName) - client := user.NewUserClient(etcdConn) - resp, err := client.GetAllConversationMsgOpt(context.Background(), req) - if err != nil { - log.NewError(params.OperationID, "GetAllConversationMsgOpt rpc failed, ", req, err.Error()) - c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "GetAllConversationMsgOpt rpc failed, " + err.Error()}) - return - } - var ginResp GetAllConversationMessageOptResp - ginResp.ErrCode = resp.ErrCode - ginResp.ErrMsg = resp.ErrMsg - for _, v := range resp.ConversationOptResult { - var opt OptResult - err := utils.CopyStructFields(&opt, *v, "ConversationId", "Result") - if err != nil { - log.NewError(req.OperationID, "CopyStructFields failed ", err.Error()) - continue - } - ginResp.Data = append(ginResp.Data, opt) - } - log.NewInfo(req.OperationID, "GetAllConversationMsgOpt resp: ", ginResp, req) - c.JSON(http.StatusOK, ginResp) -} - -func GetReceiveMessageOpt(c *gin.Context) { - params := paramGetReceiveMessageOpt{} - if err := c.BindJSON(¶ms); err != nil { - log.NewError(params.OperationID, "bind json failed ", err.Error(), c) - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()}) - return - } - - claims, err := token_verify.ParseToken(c.Request.Header.Get("token")) - if err != nil { - log.NewError(params.OperationID, "ParseToken failed, ", err.Error(), c.Request.Header.Get("token")) - c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "ParseToken failed, " + err.Error()}) - return - } - - req := &user.GetReceiveMessageOptReq{ - UId: claims.UID, - ConversationId: params.ConversationIdList, - OperationID: params.OperationID, - } - log.NewInfo(req.OperationID, "GetReceiveMessageOptReq req: ", req) - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName) - client := user.NewUserClient(etcdConn) - resp, err := client.GetReceiveMessageOpt(context.Background(), req) - if err != nil { - log.NewError(params.OperationID, "GetReceiveMessageOpt rpc failed, ", req, err.Error()) - c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "GetReceiveMessageOpt rpc failed, " + err.Error()}) - return - } - log.NewInfo(req.OperationID, "GetReceiveMessageOptReq req: ", req, resp) - var ginResp GetReceiveMessageOptResp - ginResp.ErrCode = resp.ErrCode - ginResp.ErrMsg = resp.ErrMsg - - for _, v := range resp.ConversationOptResult { - var opt OptResult - log.NewInfo("CopyStructFields begin ", v, req.OperationID) - err := utils.CopyStructFields(&opt, *v, "ConversationId", "Result") - log.NewInfo("CopyStructFields end ", v, req.OperationID) - if err != nil { - log.NewError(req.OperationID, "CopyStructFields failed ", err.Error()) - continue - } - ginResp.Data = append(ginResp.Data, opt) - } - log.NewInfo(req.OperationID, "GetReceiveMessageOpt resp: ", ginResp) - c.JSON(http.StatusOK, ginResp) } +//func GetAllConversationMessageOpt(c *gin.Context) { +// params := paramGetAllConversationMessageOpt{} +// if err := c.BindJSON(¶ms); err != nil { +// log.NewError(params.OperationID, "bind json failed ", err.Error(), c) +// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()}) +// return +// } +// +// claims, err := token_verify.ParseToken(c.Request.Header.Get("token")) +// if err != nil { +// log.NewError(params.OperationID, "ParseToken failed, ", err.Error(), c.Request.Header.Get("token")) +// c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "ParseToken failed, " + err.Error()}) +// return +// } +// +// req := &user.GetAllConversationMsgOptReq{ +// UId: claims.UID, +// OperationID: params.OperationID, +// } +// log.NewInfo(req.OperationID, "GetAllConversationMsgOpt req: ", req) +// etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName) +// client := user.NewUserClient(etcdConn) +// resp, err := client.GetAllConversationMsgOpt(context.Background(), req) +// if err != nil { +// log.NewError(params.OperationID, "GetAllConversationMsgOpt rpc failed, ", req, err.Error()) +// c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "GetAllConversationMsgOpt rpc failed, " + err.Error()}) +// return +// } +// var ginResp GetAllConversationMessageOptResp +// ginResp.ErrCode = resp.ErrCode +// ginResp.ErrMsg = resp.ErrMsg +// for _, v := range resp.ConversationOptResult { +// var opt OptResult +// err := utils.CopyStructFields(&opt, *v, "ConversationId", "Result") +// if err != nil { +// log.NewError(req.OperationID, "CopyStructFields failed ", err.Error()) +// continue +// } +// ginResp.Data = append(ginResp.Data, opt) +// } +// log.NewInfo(req.OperationID, "GetAllConversationMsgOpt resp: ", ginResp, req) +// c.JSON(http.StatusOK, ginResp) +//} +// +//func GetReceiveMessageOpt(c *gin.Context) { +// params := paramGetReceiveMessageOpt{} +// if err := c.BindJSON(¶ms); err != nil { +// log.NewError(params.OperationID, "bind json failed ", err.Error(), c) +// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()}) +// return +// } +// +// claims, err := token_verify.ParseToken(c.Request.Header.Get("token")) +// if err != nil { +// log.NewError(params.OperationID, "ParseToken failed, ", err.Error(), c.Request.Header.Get("token")) +// c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "ParseToken failed, " + err.Error()}) +// return +// } +// +// req := &user.GetReceiveMessageOptReq{ +// UId: claims.UID, +// ConversationId: params.ConversationIdList, +// OperationID: params.OperationID, +// } +// log.NewInfo(req.OperationID, "GetReceiveMessageOptReq req: ", req) +// etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName) +// client := user.NewUserClient(etcdConn) +// resp, err := client.GetReceiveMessageOpt(context.Background(), req) +// if err != nil { +// log.NewError(params.OperationID, "GetReceiveMessageOpt rpc failed, ", req, err.Error()) +// c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "GetReceiveMessageOpt rpc failed, " + err.Error()}) +// return +// } +// log.NewInfo(req.OperationID, "GetReceiveMessageOptReq req: ", req, resp) +// var ginResp GetReceiveMessageOptResp +// ginResp.ErrCode = resp.ErrCode +// ginResp.ErrMsg = resp.ErrMsg +// +// for _, v := range resp.ConversationOptResult { +// var opt OptResult +// log.NewInfo("CopyStructFields begin ", v, req.OperationID) +// err := utils.CopyStructFields(&opt, *v, "ConversationId", "Result") +// log.NewInfo("CopyStructFields end ", v, req.OperationID) +// if err != nil { +// log.NewError(req.OperationID, "CopyStructFields failed ", err.Error()) +// continue +// } +// ginResp.Data = append(ginResp.Data, opt) +// } +// log.NewInfo(req.OperationID, "GetReceiveMessageOpt resp: ", ginResp) +// c.JSON(http.StatusOK, ginResp) +//} +// func SetReceiveMessageOpt(c *gin.Context) { - params := paramsSetReceiveMessageOpt{} - if err := c.BindJSON(¶ms); err != nil { - log.NewError(params.OperationID, "bind json failed ", err.Error(), c) - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()}) - return - } - claims, err := token_verify.ParseToken(c.Request.Header.Get("token")) - if err != nil { - log.NewError(params.OperationID, "ParseToken failed, ", err.Error(), c.Request.Header.Get("token")) - c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "ParseToken failed, " + err.Error()}) - return - } - - req := &user.SetReceiveMessageOptReq{ - UId: claims.UID, - Opt: *params.Option, - ConversationId: params.ConversationIdList, - OperationID: params.OperationID, - } - log.NewInfo(req.OperationID, "SetReceiveMessageOpt req: ", req) - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName) - client := user.NewUserClient(etcdConn) - resp, err := client.SetReceiveMessageOpt(context.Background(), req) - if err != nil { - log.NewError(params.OperationID, "SetReceiveMessageOpt rpc failed, ", req, err.Error()) - c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "SetReceiveMessageOpt rpc failed, " + err.Error()}) - return - } - log.NewInfo(req.OperationID, "SetReceiveMessageOpt req: ", req, resp) - ginResp := SetReceiveMessageOptResp{ - ErrCode: resp.ErrCode, - ErrMsg: resp.ErrMsg, - } - - for _, v := range resp.OptResult { - var opt OptResult - log.NewDebug("CopyStructFields begin ", v, req.OperationID) - err := utils.CopyStructFields(&opt, *v, "ConversationId", "Result") - log.NewDebug("CopyStructFields end ", v, req.OperationID) - if err != nil { - log.NewError(req.OperationID, "CopyStructFields failed ", err.Error()) - continue - } - ginResp.Data = append(ginResp.Data, opt) - } - log.NewInfo(req.OperationID, "SetReceiveMessageOpt resp: ", ginResp) - c.JSON(http.StatusOK, ginResp) } + +//func SetReceiveMessageOpt(c *gin.Context) { +// params := paramsSetReceiveMessageOpt{} +// if err := c.BindJSON(¶ms); err != nil { +// log.NewError(params.OperationID, "bind json failed ", err.Error(), c) +// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()}) +// return +// } +// +// claims, err := token_verify.ParseToken(c.Request.Header.Get("token")) +// if err != nil { +// log.NewError(params.OperationID, "ParseToken failed, ", err.Error(), c.Request.Header.Get("token")) +// c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "ParseToken failed, " + err.Error()}) +// return +// } +// +// req := &user.SetReceiveMessageOptReq{ +// UId: claims.UID, +// Opt: *params.Option, +// ConversationId: params.ConversationIdList, +// OperationID: params.OperationID, +// } +// log.NewInfo(req.OperationID, "SetReceiveMessageOpt req: ", req) +// etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName) +// client := user.NewUserClient(etcdConn) +// resp, err := client.SetReceiveMessageOpt(context.Background(), req) +// if err != nil { +// log.NewError(params.OperationID, "SetReceiveMessageOpt rpc failed, ", req, err.Error()) +// c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "SetReceiveMessageOpt rpc failed, " + err.Error()}) +// return +// } +// log.NewInfo(req.OperationID, "SetReceiveMessageOpt req: ", req, resp) +// ginResp := SetReceiveMessageOptResp{ +// ErrCode: resp.ErrCode, +// ErrMsg: resp.ErrMsg, +// } +// +// for _, v := range resp.OptResult { +// var opt OptResult +// log.NewDebug("CopyStructFields begin ", v, req.OperationID) +// err := utils.CopyStructFields(&opt, *v, "ConversationId", "Result") +// log.NewDebug("CopyStructFields end ", v, req.OperationID) +// if err != nil { +// log.NewError(req.OperationID, "CopyStructFields failed ", err.Error()) +// continue +// } +// ginResp.Data = append(ginResp.Data, opt) +// } +// log.NewInfo(req.OperationID, "SetReceiveMessageOpt resp: ", ginResp) +// c.JSON(http.StatusOK, ginResp) +//} diff --git a/internal/api/manage/management_chat.go b/internal/api/manage/management_chat.go index 298b53836..1bb2a9961 100644 --- a/internal/api/manage/management_chat.go +++ b/internal/api/manage/management_chat.go @@ -6,251 +6,164 @@ */ package manage -import ( - "Open_IM/pkg/common/config" - "Open_IM/pkg/common/constant" - "Open_IM/pkg/common/log" - "Open_IM/pkg/common/token_verify" - "Open_IM/pkg/grpc-etcdv3/getcdv3" - pbChat "Open_IM/pkg/proto/chat" - "Open_IM/pkg/proto/sdk_ws" - "Open_IM/pkg/utils" - "context" - "github.com/gin-gonic/gin" - "github.com/go-playground/validator/v10" - "github.com/mitchellh/mapstructure" - "net/http" - "strings" -) +import "github.com/gin-gonic/gin" -var validate *validator.Validate - -type paramsManagementSendMsg struct { - OperationID string `json:"operationID" binding:"required"` - SendID string `json:"sendID" binding:"required"` - RecvID string `json:"recvID" ` - GroupID string `json:"groupID" ` - SenderNickName string `json:"senderNickName" ` - SenderFaceURL string `json:"senderFaceURL" ` - SenderPlatformID int32 `json:"senderPlatformID"` - ForceList []string `json:"forceList" ` - Content map[string]interface{} `json:"content" binding:"required"` - ContentType int32 `json:"contentType" binding:"required"` - SessionType int32 `json:"sessionType" binding:"required"` - IsOnlineOnly bool `json:"isOnlineOnly"` - OfflinePushInfo *open_im_sdk.OfflinePushInfo `json:"offlinePushInfo"` -} - -func newUserSendMsgReq(params *paramsManagementSendMsg) *pbChat.SendMsgReq { - var newContent string - switch params.ContentType { - case constant.Text: - newContent = params.Content["text"].(string) - case constant.Picture: - fallthrough - case constant.Custom: - fallthrough - case constant.Voice: - fallthrough - case constant.File: - newContent = utils.StructToJsonString(params.Content) - default: - } - options := make(map[string]bool, 2) - if params.IsOnlineOnly { - utils.SetSwitchFromOptions(options, constant.IsOfflinePush, false) - utils.SetSwitchFromOptions(options, constant.IsHistory, false) - utils.SetSwitchFromOptions(options, constant.IsPersistent, false) - } - pbData := pbChat.SendMsgReq{ - OperationID: params.OperationID, - MsgData: &open_im_sdk.MsgData{ - SendID: params.SendID, - RecvID: params.RecvID, - GroupID: params.GroupID, - ClientMsgID: utils.GetMsgID(params.SendID), - SenderPlatformID: params.SenderPlatformID, - SenderNickName: params.SenderNickName, - SenderFaceURL: params.SenderFaceURL, - SessionType: params.SessionType, - MsgFrom: constant.SysMsgType, - ContentType: params.ContentType, - Content: []byte(newContent), - ForceList: params.ForceList, - CreateTime: utils.GetCurrentTimestampByNano(), - Options: options, - OfflinePushInfo: params.OfflinePushInfo, - }, - } - return &pbData -} -func init() { - validate = validator.New() -} +// +//var validate *validator.Validate +// +// +//func newUserSendMsgReq(params *paramsManagementSendMsg) *pbChat.SendMsgReq { +// var newContent string +// switch params.ContentType { +// case constant.Text: +// newContent = params.Content["text"].(string) +// case constant.Picture: +// fallthrough +// case constant.Custom: +// fallthrough +// case constant.Voice: +// fallthrough +// case constant.File: +// newContent = utils.StructToJsonString(params.Content) +// default: +// } +// options := make(map[string]bool, 2) +// if params.IsOnlineOnly { +// utils.SetSwitchFromOptions(options, constant.IsOfflinePush, false) +// utils.SetSwitchFromOptions(options, constant.IsHistory, false) +// utils.SetSwitchFromOptions(options, constant.IsPersistent, false) +// } +// pbData := pbChat.SendMsgReq{ +// OperationID: params.OperationID, +// MsgData: &open_im_sdk.MsgData{ +// SendID: params.SendID, +// RecvID: params.RecvID, +// GroupID: params.GroupID, +// ClientMsgID: utils.GetMsgID(params.SendID), +// SenderPlatformID: params.SenderPlatformID, +// SenderNickName: params.SenderNickName, +// SenderFaceURL: params.SenderFaceURL, +// SessionType: params.SessionType, +// MsgFrom: constant.SysMsgType, +// ContentType: params.ContentType, +// Content: []byte(newContent), +// ForceList: params.ForceList, +// CreateTime: utils.GetCurrentTimestampByNano(), +// Options: options, +// OfflinePushInfo: params.OfflinePushInfo, +// }, +// } +// return &pbData +//} +//func init() { +// validate = validator.New() +//} func ManagementSendMsg(c *gin.Context) { - var data interface{} - params := paramsManagementSendMsg{} - if err := c.BindJSON(¶ms); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) - log.ErrorByKv("json unmarshal err", c.PostForm("operationID"), "err", err.Error(), "content", c.PostForm("content")) - return - } - switch params.ContentType { - case constant.Text: - data = TextElem{} - case constant.Picture: - data = PictureElem{} - case constant.Voice: - data = SoundElem{} - case constant.Video: - data = VideoElem{} - case constant.File: - data = FileElem{} - //case constant.AtText: - // data = AtElem{} - //case constant.Merger: - // data = - //case constant.Card: - //case constant.Location: - case constant.Custom: - data = CustomElem{} - //case constant.Revoke: - //case constant.HasReadReceipt: - //case constant.Typing: - //case constant.Quote: - default: - c.JSON(http.StatusBadRequest, gin.H{"errCode": 404, "errMsg": "contentType err"}) - log.ErrorByKv("contentType err", c.PostForm("operationID"), "content", c.PostForm("content")) - return - } - if err := mapstructure.WeakDecode(params.Content, &data); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": err.Error()}) - log.ErrorByKv("content to Data struct err", "", "err", err.Error()) - return - } else if err := validate.Struct(data); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 403, "errMsg": err.Error()}) - log.ErrorByKv("data args validate err", "", "err", err.Error()) - return - } - - token := c.Request.Header.Get("token") - claims, err := token_verify.ParseToken(token) - if err != nil { - log.NewError(params.OperationID, "parse token failed", err.Error()) - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "parse token failed", "sendTime": 0, "MsgID": ""}) - } - if !utils.IsContain(claims.UID, config.Config.Manager.AppManagerUid) { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "not authorized", "sendTime": 0, "MsgID": ""}) - return - - } - switch params.SessionType { - case constant.SingleChatType: - if len(params.RecvID) == 0 { - log.NewError(params.OperationID, "recvID is a null string") - c.JSON(http.StatusBadRequest, gin.H{"errCode": 405, "errMsg": "recvID is a null string", "sendTime": 0, "MsgID": ""}) - } - case constant.GroupChatType: - if len(params.GroupID) == 0 { - log.NewError(params.OperationID, "groupID is a null string") - c.JSON(http.StatusBadRequest, gin.H{"errCode": 405, "errMsg": "groupID is a null string", "sendTime": 0, "MsgID": ""}) - } - - } - log.InfoByKv("Ws call success to ManagementSendMsgReq", params.OperationID, "Parameters", params) - - pbData := newUserSendMsgReq(¶ms) - log.Info("", "", "api ManagementSendMsg call start..., [data: %s]", pbData.String()) - - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfflineMessageName) - client := pbChat.NewChatClient(etcdConn) - - log.Info("", "", "api ManagementSendMsg call, api call rpc...") - - reply, err := client.SendMsg(context.Background(), pbData) - if err != nil { - log.NewError(params.OperationID, "call delete UserSendMsg rpc server failed", err.Error()) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call UserSendMsg rpc server failed"}) - return - } - log.Info("", "", "api ManagementSendMsg call end..., [data: %s] [reply: %s]", pbData.String(), reply.String()) - - c.JSON(http.StatusOK, gin.H{ - "errCode": reply.ErrCode, - "errMsg": reply.ErrMsg, - "sendTime": reply.SendTime, - "msgID": reply.ClientMsgID, - }) } -type PictureBaseInfo struct { - UUID string `mapstructure:"uuid"` - Type string `mapstructure:"type" validate:"required"` - Size int64 `mapstructure:"size" validate:"required"` - Width int32 `mapstructure:"width" validate:"required"` - Height int32 `mapstructure:"height" validate:"required"` - Url string `mapstructure:"url" validate:"required"` -} - -type PictureElem struct { - SourcePath string `mapstructure:"sourcePath"` - SourcePicture PictureBaseInfo `mapstructure:"sourcePicture" validate:"required"` - BigPicture PictureBaseInfo `mapstructure:"bigPicture" ` - SnapshotPicture PictureBaseInfo `mapstructure:"snapshotPicture"` -} -type SoundElem struct { - UUID string `mapstructure:"uuid"` - SoundPath string `mapstructure:"soundPath"` - SourceURL string `mapstructure:"sourceUrl"` - DataSize int64 `mapstructure:"dataSize"` - Duration int64 `mapstructure:"duration"` -} -type VideoElem struct { - VideoPath string `mapstructure:"videoPath"` - VideoUUID string `mapstructure:"videoUUID"` - VideoURL string `mapstructure:"videoUrl"` - VideoType string `mapstructure:"videoType"` - VideoSize int64 `mapstructure:"videoSize"` - Duration int64 `mapstructure:"duration"` - SnapshotPath string `mapstructure:"snapshotPath"` - SnapshotUUID string `mapstructure:"snapshotUUID"` - SnapshotSize int64 `mapstructure:"snapshotSize"` - SnapshotURL string `mapstructure:"snapshotUrl"` - SnapshotWidth int32 `mapstructure:"snapshotWidth"` - SnapshotHeight int32 `mapstructure:"snapshotHeight"` -} -type FileElem struct { - FilePath string `mapstructure:"filePath"` - UUID string `mapstructure:"uuid"` - SourceURL string `mapstructure:"sourceUrl"` - FileName string `mapstructure:"fileName"` - FileSize int64 `mapstructure:"fileSize"` -} +//func ManagementSendMsg(c *gin.Context) { +// var data interface{} +// params := paramsManagementSendMsg{} +// if err := c.BindJSON(¶ms); err != nil { +// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) +// log.ErrorByKv("json unmarshal err", c.PostForm("operationID"), "err", err.Error(), "content", c.PostForm("content")) +// return +// } +// switch params.ContentType { +// case constant.Text: +// data = TextElem{} +// case constant.Picture: +// data = PictureElem{} +// case constant.Voice: +// data = SoundElem{} +// case constant.Video: +// data = VideoElem{} +// case constant.File: +// data = FileElem{} +// //case constant.AtText: +// // data = AtElem{} +// //case constant.Merger: +// // data = +// //case constant.Card: +// //case constant.Location: +// case constant.Custom: +// data = CustomElem{} +// //case constant.Revoke: +// //case constant.HasReadReceipt: +// //case constant.Typing: +// //case constant.Quote: +// default: +// c.JSON(http.StatusBadRequest, gin.H{"errCode": 404, "errMsg": "contentType err"}) +// log.ErrorByKv("contentType err", c.PostForm("operationID"), "content", c.PostForm("content")) +// return +// } +// if err := mapstructure.WeakDecode(params.Content, &data); err != nil { +// c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": err.Error()}) +// log.ErrorByKv("content to Data struct err", "", "err", err.Error()) +// return +// } else if err := validate.Struct(data); err != nil { +// c.JSON(http.StatusBadRequest, gin.H{"errCode": 403, "errMsg": err.Error()}) +// log.ErrorByKv("data args validate err", "", "err", err.Error()) +// return +// } +// +// token := c.Request.Header.Get("token") +// claims, err := token_verify.ParseToken(token) +// if err != nil { +// log.NewError(params.OperationID, "parse token failed", err.Error()) +// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "parse token failed", "sendTime": 0, "MsgID": ""}) +// } +// if !utils.IsContain(claims.UID, config.Config.Manager.AppManagerUid) { +// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "not authorized", "sendTime": 0, "MsgID": ""}) +// return +// +// } +// switch params.SessionType { +// case constant.SingleChatType: +// if len(params.RecvID) == 0 { +// log.NewError(params.OperationID, "recvID is a null string") +// c.JSON(http.StatusBadRequest, gin.H{"errCode": 405, "errMsg": "recvID is a null string", "sendTime": 0, "MsgID": ""}) +// } +// case constant.GroupChatType: +// if len(params.GroupID) == 0 { +// log.NewError(params.OperationID, "groupID is a null string") +// c.JSON(http.StatusBadRequest, gin.H{"errCode": 405, "errMsg": "groupID is a null string", "sendTime": 0, "MsgID": ""}) +// } +// +// } +// log.InfoByKv("Ws call success to ManagementSendMsgReq", params.OperationID, "Parameters", params) +// +// pbData := newUserSendMsgReq(¶ms) +// log.Info("", "", "api ManagementSendMsg call start..., [data: %s]", pbData.String()) +// +// etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfflineMessageName) +// client := pbChat.NewChatClient(etcdConn) +// +// log.Info("", "", "api ManagementSendMsg call, api call rpc...") +// +// reply, err := client.SendMsg(context.Background(), pbData) +// if err != nil { +// log.NewError(params.OperationID, "call delete UserSendMsg rpc server failed", err.Error()) +// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call UserSendMsg rpc server failed"}) +// return +// } +// log.Info("", "", "api ManagementSendMsg call end..., [data: %s] [reply: %s]", pbData.String(), reply.String()) +// +// c.JSON(http.StatusOK, gin.H{ +// "errCode": reply.ErrCode, +// "errMsg": reply.ErrMsg, +// "sendTime": reply.SendTime, +// "msgID": reply.ClientMsgID, +// }) +// +//} //type MergeElem struct { // Title string `json:"title"` // AbstractList []string `json:"abstractList"` // MultiMessage []*MsgStruct `json:"multiMessage"` //} -type AtElem struct { - Text string `mapstructure:"text"` - AtUserList []string `mapstructure:"atUserList"` - IsAtSelf bool `mapstructure:"isAtSelf"` -} -type LocationElem struct { - Description string `mapstructure:"description"` - Longitude float64 `mapstructure:"longitude"` - Latitude float64 `mapstructure:"latitude"` -} -type CustomElem struct { - Data string `mapstructure:"data" validate:"required"` - Description string `mapstructure:"description"` - Extension string `mapstructure:"extension"` -} -type TextElem struct { - Text string `mapstructure:"text" validate:"required"` -} //type QuoteElem struct { // Text string `json:"text"` diff --git a/internal/api/manage/management_user.go b/internal/api/manage/management_user.go index b911935c2..1cf8585a1 100644 --- a/internal/api/manage/management_user.go +++ b/internal/api/manage/management_user.go @@ -6,178 +6,154 @@ */ package manage -import ( - "Open_IM/pkg/common/config" - "Open_IM/pkg/common/constant" - "Open_IM/pkg/common/log" - "Open_IM/pkg/common/token_verify" - "Open_IM/pkg/grpc-etcdv3/getcdv3" - pbRelay "Open_IM/pkg/proto/relay" - pbUser "Open_IM/pkg/proto/user" - "Open_IM/pkg/utils" - "context" - "github.com/gin-gonic/gin" - "net/http" - "strings" -) - -type paramsDeleteUsers struct { - OperationID string `json:"operationID" binding:"required"` - DeleteUidList []string `json:"deleteUidList" binding:"required"` -} -type paramsGetAllUsersUid struct { - OperationID string `json:"operationID" binding:"required"` -} -type paramsGetUsersOnlineStatus struct { - OperationID string `json:"operationID" binding:"required"` - UserIDList []string `json:"userIDList" binding:"required,lte=200"` -} -type paramsAccountCheck struct { - OperationID string `json:"operationID" binding:"required"` - UserIDList []string `json:"userIDList" binding:"required,lte=100"` -} +import "github.com/gin-gonic/gin" func DeleteUser(c *gin.Context) { - params := paramsDeleteUsers{} - if err := c.BindJSON(¶ms); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) - return - } - log.InfoByKv("DeleteUser req come here", params.OperationID, "DeleteUidList", params.DeleteUidList) - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName) - client := pbUser.NewUserClient(etcdConn) - //defer etcdConn.Close() - - req := &pbUser.DeleteUsersReq{ - OperationID: params.OperationID, - DeleteUidList: params.DeleteUidList, - Token: c.Request.Header.Get("token"), - } - RpcResp, err := client.DeleteUsers(context.Background(), req) - if err != nil { - log.NewError(req.OperationID, "call delete users rpc server failed", err.Error()) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call delete users rpc server failed"}) - return - } - failedUidList := make([]string, 0) - for _, v := range RpcResp.FailedUidList { - failedUidList = append(failedUidList, v) - } - log.InfoByKv("call delete user rpc server is success", params.OperationID, "resp args", RpcResp.String()) - resp := gin.H{"errCode": RpcResp.CommonResp.ErrorCode, "errMsg": RpcResp.CommonResp.ErrorMsg, "failedUidList": RpcResp.FailedUidList} - c.JSON(http.StatusOK, resp) -} -func GetAllUsersUid(c *gin.Context) { - params := paramsGetAllUsersUid{} - if err := c.BindJSON(¶ms); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) - return - } - log.InfoByKv("GetAllUsersUid req come here", params.OperationID) - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName) - client := pbUser.NewUserClient(etcdConn) - //defer etcdConn.Close() - - req := &pbUser.GetAllUsersUidReq{ - OperationID: params.OperationID, - Token: c.Request.Header.Get("token"), - } - RpcResp, err := client.GetAllUsersUid(context.Background(), req) - if err != nil { - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error(), "uidList": []string{}}) - return - } - log.InfoByKv("call GetAllUsersUid rpc server is success", params.OperationID, "resp args", RpcResp.String()) - resp := gin.H{"errCode": RpcResp.CommonResp.ErrorCode, "errMsg": RpcResp.CommonResp.ErrorMsg, "uidList": RpcResp.UidList} - c.JSON(http.StatusOK, resp) } -func AccountCheck(c *gin.Context) { - params := paramsAccountCheck{} - if err := c.BindJSON(¶ms); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) - return - } - log.InfoByKv("AccountCheck req come here", params.OperationID, params.UserIDList) - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName) - client := pbUser.NewUserClient(etcdConn) - //defer etcdConn.Close() - req := &pbUser.AccountCheckReq{ - OperationID: params.OperationID, - Token: c.Request.Header.Get("token"), - UidList: params.UserIDList, - } - RpcResp, err := client.AccountCheck(context.Background(), req) - if err != nil { - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) - return - } - log.InfoByKv("call AccountCheck rpc server is success", params.OperationID, "resp args", RpcResp.String()) - resp := gin.H{"errCode": RpcResp.CommonResp.ErrorCode, "errMsg": RpcResp.CommonResp.ErrorMsg, "result": RpcResp.Result} - c.JSON(http.StatusOK, resp) - -} -func GetUsersOnlineStatus(c *gin.Context) { - params := paramsGetUsersOnlineStatus{} - if err := c.BindJSON(¶ms); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) - return - } - claims, err := token_verify.ParseToken(c.Request.Header.Get("token")) - if err != nil { - log.ErrorByKv("parse token failed", params.OperationID, "err", err.Error()) - c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": err.Error()}) - return - } - if !utils.IsContain(claims.UID, config.Config.Manager.AppManagerUid) { - log.ErrorByKv(" Authentication failed", params.OperationID, "args", c) - c.JSON(http.StatusBadRequest, gin.H{"errCode": 402, "errMsg": "not authorized"}) - return - } - req := &pbRelay.GetUsersOnlineStatusReq{ - OperationID: params.OperationID, - UserIDList: params.UserIDList, - } - var wsResult []*pbRelay.GetUsersOnlineStatusResp_SuccessResult - var respResult []*pbRelay.GetUsersOnlineStatusResp_SuccessResult - flag := false - log.NewDebug(params.OperationID, "GetUsersOnlineStatus req come here", params.UserIDList) - grpcCons := getcdv3.GetConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOnlineMessageRelayName) - for _, v := range grpcCons { - client := pbRelay.NewOnlineMessageRelayServiceClient(v) - reply, err := client.GetUsersOnlineStatus(context.Background(), req) - if err != nil { - log.NewError(params.OperationID, "GetUsersOnlineStatus rpc err", req.String(), err.Error()) - continue - } else { - if reply.ErrCode == 0 { - wsResult = append(wsResult, reply.SuccessResult...) - } - } - } - log.NewDebug(params.OperationID, "call GetUsersOnlineStatus rpc server is success", wsResult) - //Online data merge of each node - for _, v1 := range params.UserIDList { - flag = false - temp := new(pbRelay.GetUsersOnlineStatusResp_SuccessResult) - for _, v2 := range wsResult { - if v2.UserID == v1 { - flag = true - temp.UserID = v1 - temp.Status = constant.OnlineStatus - temp.DetailPlatformStatus = append(temp.DetailPlatformStatus, v2.DetailPlatformStatus...) - } - - } - if !flag { - temp.UserID = v1 - temp.Status = constant.OfflineStatus - } - respResult = append(respResult, temp) - } - log.NewDebug(params.OperationID, "Finished merged data", respResult) - resp := gin.H{"errCode": 0, "errMsg": "", "successResult": respResult} - c.JSON(http.StatusOK, resp) - -} +// +//func DeleteUser(c *gin.Context) { +// params := paramsDeleteUsers{} +// if err := c.BindJSON(¶ms); err != nil { +// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) +// return +// } +// log.InfoByKv("DeleteUser req come here", params.OperationID, "DeleteUidList", params.DeleteUidList) +// etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName) +// client := pbUser.NewUserClient(etcdConn) +// //defer etcdConn.Close() +// +// req := &pbUser.DeleteUsersReq{ +// OperationID: params.OperationID, +// DeleteUidList: params.DeleteUidList, +// Token: c.Request.Header.Get("token"), +// } +// RpcResp, err := client.DeleteUsers(context.Background(), req) +// if err != nil { +// log.NewError(req.OperationID, "call delete users rpc server failed", err.Error()) +// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call delete users rpc server failed"}) +// return +// } +// failedUidList := make([]string, 0) +// for _, v := range RpcResp.FailedUidList { +// failedUidList = append(failedUidList, v) +// } +// log.InfoByKv("call delete user rpc server is success", params.OperationID, "resp args", RpcResp.String()) +// resp := gin.H{"errCode": RpcResp.CommonResp.ErrorCode, "errMsg": RpcResp.CommonResp.ErrorMsg, "failedUidList": RpcResp.FailedUidList} +// c.JSON(http.StatusOK, resp) +//} +//func GetAllUsersUid(c *gin.Context) { +// params := paramsGetAllUsersUid{} +// if err := c.BindJSON(¶ms); err != nil { +// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) +// return +// } +// log.InfoByKv("GetAllUsersUid req come here", params.OperationID) +// etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName) +// client := pbUser.NewUserClient(etcdConn) +// //defer etcdConn.Close() +// +// req := &pbUser.GetAllUsersUidReq{ +// OperationID: params.OperationID, +// Token: c.Request.Header.Get("token"), +// } +// RpcResp, err := client.GetAllUsersUid(context.Background(), req) +// if err != nil { +// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error(), "uidList": []string{}}) +// return +// } +// log.InfoByKv("call GetAllUsersUid rpc server is success", params.OperationID, "resp args", RpcResp.String()) +// resp := gin.H{"errCode": RpcResp.CommonResp.ErrorCode, "errMsg": RpcResp.CommonResp.ErrorMsg, "uidList": RpcResp.UidList} +// c.JSON(http.StatusOK, resp) +// +//} +//func AccountCheck(c *gin.Context) { +// params := paramsAccountCheck{} +// if err := c.BindJSON(¶ms); err != nil { +// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) +// return +// } +// log.InfoByKv("AccountCheck req come here", params.OperationID, params.UserIDList) +// etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName) +// client := pbUser.NewUserClient(etcdConn) +// //defer etcdConn.Close() +// +// req := &pbUser.AccountCheckReq{ +// OperationID: params.OperationID, +// Token: c.Request.Header.Get("token"), +// UidList: params.UserIDList, +// } +// RpcResp, err := client.AccountCheck(context.Background(), req) +// if err != nil { +// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) +// return +// } +// log.InfoByKv("call AccountCheck rpc server is success", params.OperationID, "resp args", RpcResp.String()) +// resp := gin.H{"errCode": RpcResp.CommonResp.ErrorCode, "errMsg": RpcResp.CommonResp.ErrorMsg, "result": RpcResp.Result} +// c.JSON(http.StatusOK, resp) +// +//} +//func GetUsersOnlineStatus(c *gin.Context) { +// params := paramsGetUsersOnlineStatus{} +// if err := c.BindJSON(¶ms); err != nil { +// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) +// return +// } +// claims, err := token_verify.ParseToken(c.Request.Header.Get("token")) +// if err != nil { +// log.ErrorByKv("parse token failed", params.OperationID, "err", err.Error()) +// c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": err.Error()}) +// return +// } +// if !utils.IsContain(claims.UID, config.Config.Manager.AppManagerUid) { +// log.ErrorByKv(" Authentication failed", params.OperationID, "args", c) +// c.JSON(http.StatusBadRequest, gin.H{"errCode": 402, "errMsg": "not authorized"}) +// return +// } +// req := &pbRelay.GetUsersOnlineStatusReq{ +// OperationID: params.OperationID, +// UserIDList: params.UserIDList, +// } +// var wsResult []*pbRelay.GetUsersOnlineStatusResp_SuccessResult +// var respResult []*pbRelay.GetUsersOnlineStatusResp_SuccessResult +// flag := false +// log.NewDebug(params.OperationID, "GetUsersOnlineStatus req come here", params.UserIDList) +// grpcCons := getcdv3.GetConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOnlineMessageRelayName) +// for _, v := range grpcCons { +// client := pbRelay.NewOnlineMessageRelayServiceClient(v) +// reply, err := client.GetUsersOnlineStatus(context.Background(), req) +// if err != nil { +// log.NewError(params.OperationID, "GetUsersOnlineStatus rpc err", req.String(), err.Error()) +// continue +// } else { +// if reply.ErrCode == 0 { +// wsResult = append(wsResult, reply.SuccessResult...) +// } +// } +// } +// log.NewDebug(params.OperationID, "call GetUsersOnlineStatus rpc server is success", wsResult) +// //Online data merge of each node +// for _, v1 := range params.UserIDList { +// flag = false +// temp := new(pbRelay.GetUsersOnlineStatusResp_SuccessResult) +// for _, v2 := range wsResult { +// if v2.UserID == v1 { +// flag = true +// temp.UserID = v1 +// temp.Status = constant.OnlineStatus +// temp.DetailPlatformStatus = append(temp.DetailPlatformStatus, v2.DetailPlatformStatus...) +// } +// +// } +// if !flag { +// temp.UserID = v1 +// temp.Status = constant.OfflineStatus +// } +// respResult = append(respResult, temp) +// } +// log.NewDebug(params.OperationID, "Finished merged data", respResult) +// resp := gin.H{"errCode": 0, "errMsg": "", "successResult": respResult} +// c.JSON(http.StatusOK, resp) +// +//} diff --git a/internal/rpc/friend/firend.go b/internal/rpc/friend/firend.go index b18ee0d1b..8836bf40e 100644 --- a/internal/rpc/friend/firend.go +++ b/internal/rpc/friend/firend.go @@ -7,6 +7,7 @@ import ( imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" "Open_IM/pkg/common/log" "Open_IM/pkg/common/token_verify" + cp "Open_IM/pkg/common/utils" "Open_IM/pkg/grpc-etcdv3/getcdv3" pbFriend "Open_IM/pkg/proto/friend" sdkws "Open_IM/pkg/proto/sdk_ws" @@ -16,6 +17,7 @@ import ( "net" "strconv" "strings" + "time" ) type friendServer struct { @@ -226,6 +228,7 @@ func (s *friendServer) AddFriendResponse(ctx context.Context, req *pbFriend.AddF } friendRequest.HandleResult = req.Flag friendRequest.HandleTime = time.Now() + //friendRequest.HandleTime.Unix() friendRequest.HandleMsg = req.HandleMsg friendRequest.HandlerUserID = req.CommID.OpUserID err = imdb.UpdateFriendApplication(friendRequest) @@ -454,7 +457,7 @@ func (s *friendServer) GetSelfApplyList(ctx context.Context, req *pbFriend.GetSe var selfApplyOtherUserList []*sdkws.FriendRequest for _, selfApplyOtherUserInfo := range usersInfo { var userInfo sdkws.FriendRequest // pbFriend.ApplyUserInfo - utils.FriendRequestDBCopyOpenIM(&userInfo, selfApplyOtherUserInfo) + cp.FriendRequestDBCopyOpenIM(&userInfo, selfApplyOtherUserInfo) selfApplyOtherUserList = append(selfApplyOtherUserList, &userInfo) } log.NewInfo(req.CommID.OperationID, "rpc GetSelfApplyList ok", pbFriend.GetSelfApplyListResp{FriendRequestList: selfApplyOtherUserList}) diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 53ab002d8..1192155ea 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -171,7 +171,7 @@ func (s *groupServer) GetJoinedGroupList(ctx context.Context, req *pbGroup.GetJo group, err := imdb.GetGroupInfoByGroupID(v) if num > 0 && owner != nil && err2 == nil && group != nil && err == nil { utils.CopyStructFields(&groupNode, group) - groupNode.CreateTime = group.CreateTime + groupNode.CreateTime = group.CreateTime.Unix() groupNode.MemberCount = uint32(num) groupNode.OwnerUserID = owner.UserID resp.GroupList = append(resp.GroupList, &groupNode) @@ -379,7 +379,7 @@ func (s *groupServer) GetGroupMembersInfo(ctx context.Context, req *pbGroup.GetG continue } else { utils.CopyStructFields(&memberNode, memberInfo) - memberNode.JoinTime = memberInfo.JoinTime + memberNode.JoinTime = memberInfo.JoinTime.Unix() resp.MemberList = append(resp.MemberList, &memberNode) } } @@ -416,7 +416,7 @@ func (s *groupServer) GetGroupsInfo(ctx context.Context, req *pbGroup.GetGroupsI } var groupInfo open_im_sdk.GroupInfo utils.CopyStructFields(&groupInfo, groupInfoFromMysql) - groupInfo.CreateTime = groupInfoFromMysql.CreateTime + groupInfo.CreateTime = groupInfoFromMysql.CreateTime.Unix() groupsInfoList = append(groupsInfoList, &groupInfo) } @@ -451,7 +451,7 @@ func (s *groupServer) GroupApplicationResponse(_ context.Context, req *pbGroup.G func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq) (*pbGroup.JoinGroupResp, error) { log.NewInfo(req.OperationID, "JoinGroup args ", req.String()) - applicationUserInfo, err := imdb.GetUserByUserID(req.OpUserID) + _, err := imdb.GetUserByUserID(req.OpUserID) if err != nil { log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), req.OpUserID) return &pbGroup.JoinGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil @@ -516,6 +516,7 @@ func hasAccess(req *pbGroup.SetGroupInfoReq) bool { if groupUserInfo.RoleLevel == constant.OrdinaryMember { return true } + return false } func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInfoReq) (*pbGroup.SetGroupInfoResp, error) { diff --git a/internal/rpc/msg/notification.go b/internal/rpc/msg/notification.go index fc88bf05d..76023b851 100644 --- a/internal/rpc/msg/notification.go +++ b/internal/rpc/msg/notification.go @@ -1,6 +1,7 @@ package msg import ( + "Open_IM/pkg/common/config" "Open_IM/pkg/common/constant" imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" "Open_IM/pkg/common/log" @@ -20,6 +21,7 @@ import ( //} creator->group func setOpUserInfo(operationID, opUserID, groupID string, groupMemberInfo *open_im_sdk.GroupMemberFullInfo) { + return if token_verify.IsMangerUserID(opUserID) { u, err := imdb.GetUserByUserID(opUserID) if err != nil { @@ -39,6 +41,7 @@ func setOpUserInfo(operationID, opUserID, groupID string, groupMemberInfo *open_ } func setGroupInfo(operationID, groupID string, groupInfo *open_im_sdk.GroupInfo, ownerUserID string) { + return group, err := imdb.GetGroupInfoByGroupID(groupID) if err != nil { log.NewError(operationID, "FindGroupInfoByGroupId failed ", err.Error(), groupID) @@ -53,6 +56,7 @@ func setGroupInfo(operationID, groupID string, groupInfo *open_im_sdk.GroupInfo, } func setGroupMemberInfo(operationID, groupID, userID string, groupMemberInfo *open_im_sdk.GroupMemberFullInfo) { + return group, err := imdb.GetGroupMemberInfoByGroupIDAndUserID(groupID, userID) if err != nil { log.NewError(operationID, "FindGroupMemberInfoByGroupIdAndUserId failed ", err.Error(), groupID, userID) @@ -72,6 +76,7 @@ func setGroupMemberInfo(operationID, groupID, userID string, groupMemberInfo *op //创建群后调用 func GroupCreatedNotification(operationID, opUserID, OwnerUserID, groupID string, initMemberList []string) { + return var n NotificationMsg n.SendID = opUserID n.RecvID = groupID @@ -109,6 +114,7 @@ func GroupCreatedNotification(operationID, opUserID, OwnerUserID, groupID string // OperationID string `protobuf:"bytes,4,opt,name=OperationID" json:"OperationID,omitempty"` //申请进群后调用 func JoinApplicationNotification(req *pbGroup.JoinGroupReq) { + return managerList, err := imdb.GetOwnerManagerByGroupID(req.GroupID) if err != nil { log.NewError(req.OperationID, "GetOwnerManagerByGroupId failed ", err.Error(), req.GroupID) @@ -151,6 +157,7 @@ func JoinApplicationNotification(req *pbGroup.JoinGroupReq) { //} //处理进群请求后调用 func ApplicationProcessedNotification(req *pbGroup.GroupApplicationResponseReq) { + return var n NotificationMsg n.SendID = req.OpUserID n.ContentType = constant.ApplicationProcessedNotification @@ -181,6 +188,7 @@ func ApplicationProcessedNotification(req *pbGroup.GroupApplicationResponseReq) //} //被邀请进群后调用 func MemberInvitedNotification(operationID, groupID, opUserID, reason string, invitedUserIDList []string) { + return var n NotificationMsg n.SendID = opUserID n.ContentType = constant.MemberInvitedNotification @@ -212,6 +220,7 @@ func MemberInvitedNotification(operationID, groupID, opUserID, reason string, in //} //被踢后调用 func MemberKickedNotification(req *pbGroup.KickGroupMemberReq, kickedUserIDList []string) { + return var n NotificationMsg n.SendID = req.OpUserID n.ContentType = constant.MemberKickedNotification @@ -249,6 +258,7 @@ func MemberKickedNotification(req *pbGroup.KickGroupMemberReq, kickedUserIDList //群信息改变后掉用 func GroupInfoChangedNotification(operationID, opUserID, groupID string, changedType int32) { + return var n NotificationMsg n.SendID = opUserID n.ContentType = constant.GroupInfoChangedNotification @@ -301,6 +311,7 @@ func GroupInfoChangedNotification(operationID string, changedType int32, group * //群成员退群后调用 func MemberLeaveNotification(req *pbGroup.QuitGroupReq) { + return var n NotificationMsg n.SendID = req.OpUserID n.ContentType = constant.MemberLeaveNotification @@ -331,6 +342,7 @@ func MemberLeaveNotification(req *pbGroup.QuitGroupReq) { //} //群成员主动申请进群,管理员同意后调用, func MemberEnterNotification(req *pbGroup.GroupApplicationResponseReq) { + return var n NotificationMsg n.SendID = req.OpUserID n.ContentType = constant.MemberEnterNotification @@ -369,6 +381,7 @@ func MemberEnterNotification(req *pbGroup.GroupApplicationResponseReq) { //} func getFromToUserNickname(operationID, fromUserID, toUserID string) (string, string) { + return from, err1 := imdb.GetUserByUserID(fromUserID) to, err2 := imdb.GetUserByUserID(toUserID) if err1 != nil || err2 != nil { @@ -385,6 +398,7 @@ func getFromToUserNickname(operationID, fromUserID, toUserID string) (string, st } func FriendApplicationAddedNotification(req *pbFriend.AddFriendReq) { + return var n NotificationMsg n.SendID = req.CommID.FromUserID n.RecvID = req.CommID.ToUserID @@ -405,6 +419,7 @@ func FriendApplicationAddedNotification(req *pbFriend.AddFriendReq) { } func FriendApplicationProcessedNotification(req *pbFriend.AddFriendResponseReq) { + return var n NotificationMsg n.SendID = req.CommID.FromUserID n.RecvID = req.CommID.ToUserID @@ -425,6 +440,7 @@ func FriendApplicationProcessedNotification(req *pbFriend.AddFriendResponseReq) } func FriendAddedNotification(operationID, opUserID, fromUserID, toUserID string) { + return var n NotificationMsg n.SendID = fromUserID n.RecvID = toUserID @@ -478,6 +494,7 @@ func FriendAddedNotification(operationID, opUserID, fromUserID, toUserID string) // FriendInfo Friend = 1; //} func FriendDeletedNotification(req *pbFriend.DeleteFriendReq) { + return var n NotificationMsg n.SendID = req.CommID.FromUserID n.RecvID = req.CommID.ToUserID @@ -503,6 +520,7 @@ func FriendDeletedNotification(req *pbFriend.DeleteFriendReq) { // uint64 OperationTime = 3; //} func FriendInfoChangedNotification(operationID, opUserID, fromUserID, toUserID string) { + return var n NotificationMsg n.SendID = fromUserID n.RecvID = toUserID @@ -523,6 +541,7 @@ func FriendInfoChangedNotification(operationID, opUserID, fromUserID, toUserID s } func BlackAddedNotification(req *pbFriend.AddBlacklistReq) { + return var n NotificationMsg n.SendID = req.CommID.FromUserID n.RecvID = req.CommID.ToUserID @@ -546,6 +565,7 @@ func BlackAddedNotification(req *pbFriend.AddBlacklistReq) { // BlackInfo Black = 1; //} func BlackDeletedNotification(req *pbFriend.RemoveBlacklistReq) { + return var n NotificationMsg n.SendID = req.CommID.FromUserID n.RecvID = req.CommID.ToUserID @@ -571,6 +591,7 @@ func BlackDeletedNotification(req *pbFriend.RemoveBlacklistReq) { // uint64 OperationTime = 3; //} func SelfInfoUpdatedNotification(operationID, userID string) { + return var n NotificationMsg n.SendID = userID n.RecvID = userID diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index e9407d8bf..e0bb07d3c 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -10,6 +10,7 @@ import ( "Open_IM/pkg/common/token_verify" "Open_IM/pkg/grpc-etcdv3/getcdv3" pbFriend "Open_IM/pkg/proto/friend" + sdkws "Open_IM/pkg/proto/sdk_ws" pbUser "Open_IM/pkg/proto/user" "Open_IM/pkg/utils" "context" @@ -17,7 +18,6 @@ import ( "net" "strconv" "strings" - sdkws "Open_IM/pkg/proto/sdk_ws" ) type userServer struct { @@ -27,6 +27,16 @@ type userServer struct { etcdAddr []string } +func NewUserServer(port int) *userServer { + log.NewPrivateLog("user") + return &userServer{ + rpcPort: port, + rpcRegisterName: config.Config.RpcRegisterName.OpenImUserName, + etcdSchema: config.Config.Etcd.EtcdSchema, + etcdAddr: config.Config.Etcd.EtcdAddr, + } +} + func (s *userServer) Run() { log.NewInfo("0", "", "rpc user start...") @@ -38,7 +48,7 @@ func (s *userServer) Run() { log.NewError("0", "listen network failed ", err.Error(), registerAddress) return } - log.NewInfo("0", "listen network success, address ", registerAddress, listener) + log.NewInfo("0", "listen network success, address ", registerAddress, listener) defer listener.Close() //grpc server srv := grpc.NewServer() @@ -55,7 +65,7 @@ func (s *userServer) Run() { log.NewError("0", "Serve failed ", err.Error()) return } - log.NewInfo("0", "rpc user success") + log.NewInfo("0", "rpc user success") } func (s *userServer) GetUserInfo(ctx context.Context, req *pbUser.GetUserInfoReq) (*pbUser.GetUserInfoResp, error) { @@ -76,12 +86,10 @@ func (s *userServer) GetUserInfo(ctx context.Context, req *pbUser.GetUserInfoReq return &pbUser.GetUserInfoResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrArgs.ErrCode, ErrMsg: constant.ErrArgs.ErrMsg}}, nil } - log.NewInfo(req.OperationID, "GetUserInfo rpc return ", pbUser.GetUserInfoResp{CommonResp: &pbUser.CommonResp{}, UserInfoList:userInfoList}) - return &pbUser.GetUserInfoResp{CommonResp: &pbUser.CommonResp{}, UserInfoList:userInfoList}, nil + log.NewInfo(req.OperationID, "GetUserInfo rpc return ", pbUser.GetUserInfoResp{CommonResp: &pbUser.CommonResp{}, UserInfoList: userInfoList}) + return &pbUser.GetUserInfoResp{CommonResp: &pbUser.CommonResp{}, UserInfoList: userInfoList}, nil } - - func (s *userServer) SetReceiveMessageOpt(ctx context.Context, req *pbUser.SetReceiveMessageOptReq) (*pbUser.SetReceiveMessageOptResp, error) { log.NewInfo(req.OperationID, "SetReceiveMessageOpt args ", req.String()) m := make(map[string]int, len(req.ConversationIDList)) @@ -132,10 +140,9 @@ func (s *userServer) GetAllConversationMsgOpt(ctx context.Context, req *pbUser.G return &resp, nil } - func (s *userServer) DeleteUsers(_ context.Context, req *pbUser.DeleteUsersReq) (*pbUser.DeleteUsersResp, error) { log.NewInfo(req.OperationID, "DeleteUsers args ", req.String()) - if token_verify.IsMangerUserID(req.OpUserID){ + if token_verify.IsMangerUserID(req.OpUserID) { log.NewError(req.OperationID, "IsMangerUserID false ", req.OpUserID) return &pbUser.DeleteUsersResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, FailedUserIDList: req.DeleteUserIDList}, nil } @@ -154,8 +161,8 @@ func (s *userServer) DeleteUsers(_ context.Context, req *pbUser.DeleteUsersReq) } func (s *userServer) GetAllUserID(_ context.Context, req *pbUser.GetAllUserIDReq) (*pbUser.GetAllUserIDResp, error) { - log.NewInfo(req.OperationID,"GetAllUserID args ", req.String()) - if token_verify.IsMangerUserID(req.OpUserID){ + log.NewInfo(req.OperationID, "GetAllUserID args ", req.String()) + if token_verify.IsMangerUserID(req.OpUserID) { log.NewError(req.OperationID, "IsMangerUserID false ", req.OpUserID) return &pbUser.GetAllUserIDResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil } @@ -169,10 +176,9 @@ func (s *userServer) GetAllUserID(_ context.Context, req *pbUser.GetAllUserIDReq } } - func (s *userServer) AccountCheck(_ context.Context, req *pbUser.AccountCheckReq) (*pbUser.AccountCheckResp, error) { - log.NewInfo(req.OperationID,"AccountCheck args ", req.String()) - if token_verify.IsMangerUserID(req.OpUserID){ + log.NewInfo(req.OperationID, "AccountCheck args ", req.String()) + if token_verify.IsMangerUserID(req.OpUserID) { log.NewError(req.OperationID, "IsMangerUserID false ", req.OpUserID) return &pbUser.AccountCheckResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil } @@ -199,12 +205,9 @@ func (s *userServer) AccountCheck(_ context.Context, req *pbUser.AccountCheckReq } - - - func (s *userServer) UpdateUserInfo(ctx context.Context, req *pbUser.UpdateUserInfoReq) (*pbUser.UpdateUserInfoResp, error) { - log.NewInfo(req.OperationID,"UpdateUserInfo args ", req.String()) - if !token_verify.CheckAccess(req.OpUserID, req.UserInfo.UserID){ + log.NewInfo(req.OperationID, "UpdateUserInfo args ", req.String()) + if !token_verify.CheckAccess(req.OpUserID, req.UserInfo.UserID) { log.NewError(req.OperationID, "CheckAccess false ", req.OpUserID, req.UserInfo.UserID) return &pbUser.UpdateUserInfoResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil } @@ -219,7 +222,7 @@ func (s *userServer) UpdateUserInfo(ctx context.Context, req *pbUser.UpdateUserI etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) client := pbFriend.NewFriendClient(etcdConn) newReq := &pbFriend.GetFriendListReq{ - CommID: &pbFriend.CommID{OperationID: req.OperationID, FromUserID: req.UserInfo.UserID, OpUserID: req.OpUserID} + CommID: &pbFriend.CommID{OperationID: req.OperationID, FromUserID: req.UserInfo.UserID, OpUserID: req.OpUserID}, } RpcResp, err := client.GetFriendList(context.Background(), newReq) @@ -227,12 +230,9 @@ func (s *userServer) UpdateUserInfo(ctx context.Context, req *pbUser.UpdateUserI log.NewError(req.OperationID, "GetFriendList failed ", err.Error(), newReq) return &pbUser.UpdateUserInfoResp{CommonResp: &pbUser.CommonResp{}}, nil } - for _, v := range RpcResp.FriendInfoList{ + for _, v := range RpcResp.FriendInfoList { chat.FriendInfoChangedNotification(req.OperationID, req.OpUserID, req.UserInfo.UserID, v.FriendUser.UserID) } chat.SelfInfoUpdatedNotification(req.OperationID, req.UserInfo.UserID) return &pbUser.UpdateUserInfoResp{CommonResp: &pbUser.CommonResp{}}, nil } - - - diff --git a/pkg/base_info/conversation_api_struct.go b/pkg/base_info/conversation_api_struct.go new file mode 100644 index 000000000..7775a2f42 --- /dev/null +++ b/pkg/base_info/conversation_api_struct.go @@ -0,0 +1 @@ +package base_info diff --git a/pkg/base_info/manage_api_struct.go b/pkg/base_info/manage_api_struct.go new file mode 100644 index 000000000..3a00437a7 --- /dev/null +++ b/pkg/base_info/manage_api_struct.go @@ -0,0 +1,98 @@ +package base_info + +import open_im_sdk "Open_IM/pkg/proto/sdk_ws" + +type paramsManagementSendMsg struct { + OperationID string `json:"operationID" binding:"required"` + SendID string `json:"sendID" binding:"required"` + RecvID string `json:"recvID" ` + GroupID string `json:"groupID" ` + SenderNickName string `json:"senderNickName" ` + SenderFaceURL string `json:"senderFaceURL" ` + SenderPlatformID int32 `json:"senderPlatformID"` + ForceList []string `json:"forceList" ` + Content map[string]interface{} `json:"content" binding:"required"` + ContentType int32 `json:"contentType" binding:"required"` + SessionType int32 `json:"sessionType" binding:"required"` + IsOnlineOnly bool `json:"isOnlineOnly"` + OfflinePushInfo *open_im_sdk.OfflinePushInfo `json:"offlinePushInfo"` +} + +type PictureBaseInfo struct { + UUID string `mapstructure:"uuid"` + Type string `mapstructure:"type" validate:"required"` + Size int64 `mapstructure:"size" validate:"required"` + Width int32 `mapstructure:"width" validate:"required"` + Height int32 `mapstructure:"height" validate:"required"` + Url string `mapstructure:"url" validate:"required"` +} + +type PictureElem struct { + SourcePath string `mapstructure:"sourcePath"` + SourcePicture PictureBaseInfo `mapstructure:"sourcePicture" validate:"required"` + BigPicture PictureBaseInfo `mapstructure:"bigPicture" ` + SnapshotPicture PictureBaseInfo `mapstructure:"snapshotPicture"` +} +type SoundElem struct { + UUID string `mapstructure:"uuid"` + SoundPath string `mapstructure:"soundPath"` + SourceURL string `mapstructure:"sourceUrl"` + DataSize int64 `mapstructure:"dataSize"` + Duration int64 `mapstructure:"duration"` +} +type VideoElem struct { + VideoPath string `mapstructure:"videoPath"` + VideoUUID string `mapstructure:"videoUUID"` + VideoURL string `mapstructure:"videoUrl"` + VideoType string `mapstructure:"videoType"` + VideoSize int64 `mapstructure:"videoSize"` + Duration int64 `mapstructure:"duration"` + SnapshotPath string `mapstructure:"snapshotPath"` + SnapshotUUID string `mapstructure:"snapshotUUID"` + SnapshotSize int64 `mapstructure:"snapshotSize"` + SnapshotURL string `mapstructure:"snapshotUrl"` + SnapshotWidth int32 `mapstructure:"snapshotWidth"` + SnapshotHeight int32 `mapstructure:"snapshotHeight"` +} +type FileElem struct { + FilePath string `mapstructure:"filePath"` + UUID string `mapstructure:"uuid"` + SourceURL string `mapstructure:"sourceUrl"` + FileName string `mapstructure:"fileName"` + FileSize int64 `mapstructure:"fileSize"` +} + +type paramsDeleteUsers struct { + OperationID string `json:"operationID" binding:"required"` + DeleteUidList []string `json:"deleteUidList" binding:"required"` +} +type paramsGetAllUsersUid struct { + OperationID string `json:"operationID" binding:"required"` +} +type paramsGetUsersOnlineStatus struct { + OperationID string `json:"operationID" binding:"required"` + UserIDList []string `json:"userIDList" binding:"required,lte=200"` +} +type paramsAccountCheck struct { + OperationID string `json:"operationID" binding:"required"` + UserIDList []string `json:"userIDList" binding:"required,lte=100"` +} + +type AtElem struct { + Text string `mapstructure:"text"` + AtUserList []string `mapstructure:"atUserList"` + IsAtSelf bool `mapstructure:"isAtSelf"` +} +type LocationElem struct { + Description string `mapstructure:"description"` + Longitude float64 `mapstructure:"longitude"` + Latitude float64 `mapstructure:"latitude"` +} +type CustomElem struct { + Data string `mapstructure:"data" validate:"required"` + Description string `mapstructure:"description"` + Extension string `mapstructure:"extension"` +} +type TextElem struct { + Text string `mapstructure:"text" validate:"required"` +} diff --git a/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go b/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go index dd8164521..891020ec0 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go @@ -2,6 +2,7 @@ package im_mysql_model import ( "Open_IM/pkg/common/db" + "time" ) //type FriendRequest struct { diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go index 0601f4a6e..84175c0a1 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go @@ -2,6 +2,7 @@ package im_mysql_model import ( "Open_IM/pkg/common/db" + "time" ) //type GroupMember struct { @@ -61,7 +62,7 @@ func GetGroupMemberListByGroupIDAndRoleLevel(groupID string, roleLevel int32) ([ return nil, err } var groupMemberList []GroupMember - err = dbConn.Table("group_member").Where("group_id=? and role_level=?", groupID, role_level).Find(&groupMemberList).Error + err = dbConn.Table("group_member").Where("group_id=? and role_level=?", groupID, roleLevel).Find(&groupMemberList).Error if err != nil { return nil, err } diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_model.go index 672e2ae93..cc53a8036 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_model.go @@ -2,8 +2,6 @@ package im_mysql_model import ( "Open_IM/pkg/common/db" - "Open_IM/pkg/proto/group" - "errors" "time" ) diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go index 143cab342..e8f64208b 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go @@ -2,8 +2,6 @@ package im_mysql_model import ( "Open_IM/pkg/common/db" - "Open_IM/pkg/common/log" - "Open_IM/pkg/proto/group" "time" ) diff --git a/pkg/common/db/mysql_model/im_mysql_model/model_struct.go b/pkg/common/db/mysql_model/im_mysql_model/model_struct.go index 4ee23bfe0..150aedd70 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/model_struct.go +++ b/pkg/common/db/mysql_model/im_mysql_model/model_struct.go @@ -95,7 +95,7 @@ type GroupMember struct { JoinTime time.Time `gorm:"column:join_time"` Nickname string `gorm:"column:nickname"` FaceUrl string `gorm:"user_group_face_url"` - JoinSource int32 `gorm:"column:join_source"` + JoinSource time.Time `gorm:"column:join_source"` OperatorUserID string `gorm:"column:operator_user_id"` Ex string `gorm:"column:ex"` } diff --git a/pkg/common/utils/utils.go b/pkg/common/utils/utils.go new file mode 100644 index 000000000..ba5d3257b --- /dev/null +++ b/pkg/common/utils/utils.go @@ -0,0 +1,95 @@ +package utils + +import ( + imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" + "Open_IM/pkg/common/token_verify" + open_im_sdk "Open_IM/pkg/proto/sdk_ws" + "Open_IM/pkg/utils" + "math/rand" + "strconv" + "time" +) + +func OperationIDGenerator() string { + return strconv.FormatInt(time.Now().UnixNano()+int64(rand.Uint32()), 10) +} + +func FriendOpenIMCopyDB(dst *imdb.Friend, src open_im_sdk.FriendInfo) { + utils.CopyStructFields(dst, src) + dst.FriendUserID = src.FriendUser.UserID +} + +func FriendDBCopyOpenIM(dst *open_im_sdk.FriendInfo, src imdb.Friend) { + utils.CopyStructFields(dst, src) + user, _ := imdb.GetUserByUserID(src.FriendUserID) + if user != nil { + utils.CopyStructFields(dst.FriendUser, user) + } +} + +// +func FriendRequestOpenIMCopyDB(dst *imdb.FriendRequest, src open_im_sdk.FriendRequest) { + utils.CopyStructFields(dst, src) +} + +func FriendRequestDBCopyOpenIM(dst *open_im_sdk.FriendRequest, src imdb.FriendRequest) { + utils.CopyStructFields(dst, src) +} + +func GroupOpenIMCopyDB(dst *imdb.Group, src open_im_sdk.GroupInfo) { + utils.CopyStructFields(dst, src) +} + +func GroupDBCopyOpenIM(dst *open_im_sdk.GroupInfo, src imdb.Group) { + utils.CopyStructFields(dst, src) + user, _ := imdb.GetGroupOwnerInfoByGroupID(src.GroupID) + if user != nil { + dst.OwnerUserID = user.UserID + } + dst.MemberCount = imdb.GetGroupMemberNumByGroupID(src.GroupID) +} + +func GroupMemberOpenIMCopyDB(dst *imdb.GroupMember, src open_im_sdk.GroupMemberFullInfo) { + utils.CopyStructFields(dst, src) +} + +func GroupMemberDBCopyOpenIM(dst *open_im_sdk.GroupMemberFullInfo, src imdb.GroupMember) { + utils.CopyStructFields(dst, src) + if token_verify.IsMangerUserID(src.UserID) { + u, _ := imdb.GetUserByUserID(src.UserID) + if u != nil { + utils.CopyStructFields(dst, u) + } + dst.AppMangerLevel = 1 + } +} + +func GroupRequestOpenIMCopyDB(dst *imdb.GroupRequest, src open_im_sdk.GroupRequest) { + utils.CopyStructFields(dst, src) +} + +func GroupRequestDBCopyOpenIM(dst *open_im_sdk.GroupRequest, src imdb.GroupRequest) { + utils.CopyStructFields(dst, src) +} + +func UserOpenIMCopyDB(dst *imdb.User, src open_im_sdk.UserInfo) { + utils.CopyStructFields(dst, src) +} + +func UserDBCopyOpenIM(dst *open_im_sdk.UserInfo, src imdb.User) { + utils.CopyStructFields(dst, src) +} + +func BlackOpenIMCopyDB(dst *imdb.Black, src open_im_sdk.BlackInfo) { + utils.CopyStructFields(dst, src) + dst.BlockUserID = src.BlackUserInfo.UserID +} + +func BlackDBCopyOpenIM(dst *open_im_sdk.BlackInfo, src imdb.Black) { + utils.CopyStructFields(dst, src) + dst.CreateTime = src.CreateTime.Unix() + user, _ := imdb.GetUserByUserID(src.BlockUserID) + if user != nil { + utils.CopyStructFields(dst.BlackUserInfo, user) + } +} diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index 2c393d337..9953227a1 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -1,14 +1,8 @@ package utils import ( - imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" - "Open_IM/pkg/common/token_verify" - open_im_sdk "Open_IM/pkg/proto/sdk_ws" "fmt" - "math/rand" "reflect" - "strconv" - "time" ) // copy a by b b->a @@ -49,86 +43,3 @@ func CopyStructFields(a interface{}, b interface{}, fields ...string) (err error } return nil } - -func OperationIDGenerator() string { - return strconv.FormatInt(time.Now().UnixNano()+int64(rand.Uint32()), 10) -} - -func FriendOpenIMCopyDB(dst *imdb.Friend, src open_im_sdk.FriendInfo) { - CopyStructFields(dst, src) - dst.FriendUserID = src.FriendUser.UserID -} - -func FriendDBCopyOpenIM(dst *open_im_sdk.FriendInfo, src imdb.Friend) { - CopyStructFields(dst, src) - user, _ := imdb.GetUserByUserID(src.FriendUserID) - if user != nil { - CopyStructFields(dst.FriendUser, user) - } -} - -// -func FriendRequestOpenIMCopyDB(dst *imdb.FriendRequest, src open_im_sdk.FriendRequest) { - CopyStructFields(dst, src) -} - -func FriendRequestDBCopyOpenIM(dst *open_im_sdk.FriendRequest, src imdb.FriendRequest) { - CopyStructFields(dst, src) -} - -func GroupOpenIMCopyDB(dst *imdb.Group, src open_im_sdk.GroupInfo) { - CopyStructFields(dst, src) -} - -func GroupDBCopyOpenIM(dst *open_im_sdk.GroupInfo, src imdb.Group) { - CopyStructFields(dst, src) - user, _ := imdb.GetGroupOwnerInfoByGroupID(src.GroupID) - if user != nil { - dst.OwnerUserID = user.UserID - } - dst.MemberCount = imdb.GetGroupMemberNumByGroupID(src.GroupID) -} - -func GroupMemberOpenIMCopyDB(dst *imdb.GroupMember, src open_im_sdk.GroupMemberFullInfo) { - CopyStructFields(dst, src) -} - -func GroupMemberDBCopyOpenIM(dst *open_im_sdk.GroupMemberFullInfo, src imdb.GroupMember) { - CopyStructFields(dst, src) - if token_verify.IsMangerUserID(src.UserID) { - u, _ := imdb.GetUserByUserID(src.UserID) - if u != nil { - CopyStructFields(dst, u) - } - dst.AppMangerLevel = 1 - } -} - -func GroupRequestOpenIMCopyDB(dst *imdb.GroupRequest, src open_im_sdk.GroupRequest) { - CopyStructFields(dst, src) -} - -func GroupRequestDBCopyOpenIM(dst *open_im_sdk.GroupRequest, src imdb.GroupRequest) { - CopyStructFields(dst, src) -} - -func UserOpenIMCopyDB(dst *imdb.User, src open_im_sdk.UserInfo) { - CopyStructFields(dst, src) -} - -func UserDBCopyOpenIM(dst *open_im_sdk.UserInfo, src imdb.User) { - CopyStructFields(dst, src) -} - -func BlackOpenIMCopyDB(dst *imdb.Black, src open_im_sdk.BlackInfo) { - CopyStructFields(dst, src) - dst.BlockUserID = src.BlackUserInfo.UserID -} - -func BlackDBCopyOpenIM(dst *open_im_sdk.BlackInfo, src imdb.Black) { - CopyStructFields(dst, src) - user, _ := imdb.GetUserByUserID(src.BlockUserID) - if user != nil { - CopyStructFields(dst.BlackUserInfo, user) - } -} From 1e3cad4b2034a349669bc8f3a8e453d901964cd0 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 28 Dec 2021 15:47:20 +0800 Subject: [PATCH 038/337] tidy code --- pkg/common/utils/utils.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg/common/utils/utils.go b/pkg/common/utils/utils.go index ba5d3257b..ca67f33e2 100644 --- a/pkg/common/utils/utils.go +++ b/pkg/common/utils/utils.go @@ -25,6 +25,8 @@ func FriendDBCopyOpenIM(dst *open_im_sdk.FriendInfo, src imdb.Friend) { if user != nil { utils.CopyStructFields(dst.FriendUser, user) } + dst.CreateTime = src.CreateTime.Unix() + dst.FriendUser.CreateTime = user.CreateTime.Unix() } // @@ -34,6 +36,8 @@ func FriendRequestOpenIMCopyDB(dst *imdb.FriendRequest, src open_im_sdk.FriendRe func FriendRequestDBCopyOpenIM(dst *open_im_sdk.FriendRequest, src imdb.FriendRequest) { utils.CopyStructFields(dst, src) + dst.CreateTime = src.CreateTime.Unix() + dst.HandleTime = src.HandleTime.Unix() } func GroupOpenIMCopyDB(dst *imdb.Group, src open_im_sdk.GroupInfo) { @@ -47,6 +51,7 @@ func GroupDBCopyOpenIM(dst *open_im_sdk.GroupInfo, src imdb.Group) { dst.OwnerUserID = user.UserID } dst.MemberCount = imdb.GetGroupMemberNumByGroupID(src.GroupID) + dst.CreateTime = src.CreateTime.Unix() } func GroupMemberOpenIMCopyDB(dst *imdb.GroupMember, src open_im_sdk.GroupMemberFullInfo) { @@ -62,6 +67,7 @@ func GroupMemberDBCopyOpenIM(dst *open_im_sdk.GroupMemberFullInfo, src imdb.Grou } dst.AppMangerLevel = 1 } + dst.JoinTime = src.JoinTime.Unix() } func GroupRequestOpenIMCopyDB(dst *imdb.GroupRequest, src open_im_sdk.GroupRequest) { @@ -70,6 +76,8 @@ func GroupRequestOpenIMCopyDB(dst *imdb.GroupRequest, src open_im_sdk.GroupReque func GroupRequestDBCopyOpenIM(dst *open_im_sdk.GroupRequest, src imdb.GroupRequest) { utils.CopyStructFields(dst, src) + dst.ReqTime = src.ReqTime.Unix() + dst.HandleTime = src.HandledTime.Unix() } func UserOpenIMCopyDB(dst *imdb.User, src open_im_sdk.UserInfo) { @@ -78,6 +86,7 @@ func UserOpenIMCopyDB(dst *imdb.User, src open_im_sdk.UserInfo) { func UserDBCopyOpenIM(dst *open_im_sdk.UserInfo, src imdb.User) { utils.CopyStructFields(dst, src) + dst.CreateTime = src.CreateTime.Unix() } func BlackOpenIMCopyDB(dst *imdb.Black, src open_im_sdk.BlackInfo) { From 28cfc2a9c14a389de64d62c39542144bccebe23f Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 28 Dec 2021 16:01:57 +0800 Subject: [PATCH 039/337] tidy code --- internal/api/auth/auth.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/api/auth/auth.go b/internal/api/auth/auth.go index b31384cf8..51e1c7614 100644 --- a/internal/api/auth/auth.go +++ b/internal/api/auth/auth.go @@ -26,7 +26,7 @@ func UserRegister(c *gin.Context) { return } req := &rpc.UserRegisterReq{} - log.NewInfo("UserRegister args ", req.String()) + log.NewInfo(req.OperationID, "UserRegister args ", req.String()) etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAuthName) client := rpc.NewAuthClient(etcdConn) reply, err := client.UserRegister(context.Background(), req) @@ -64,7 +64,7 @@ func UserToken(c *gin.Context) { return } req := &rpc.UserTokenReq{Platform: params.Platform, FromUserID: params.UserID, OperationID: params.OperationID} - log.NewInfo("UserToken args ", req.String()) + log.NewInfo(req.OperationID, "UserToken args ", req.String()) etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAuthName) client := rpc.NewAuthClient(etcdConn) reply, err := client.UserToken(context.Background(), req) From 12c2d18325f944cbba8c54caa3518443fa13923d Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 28 Dec 2021 16:03:47 +0800 Subject: [PATCH 040/337] tidy code --- internal/api/auth/auth.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/api/auth/auth.go b/internal/api/auth/auth.go index 51e1c7614..649b97f66 100644 --- a/internal/api/auth/auth.go +++ b/internal/api/auth/auth.go @@ -6,6 +6,7 @@ import ( "Open_IM/pkg/common/log" "Open_IM/pkg/grpc-etcdv3/getcdv3" rpc "Open_IM/pkg/proto/auth" + "Open_IM/pkg/utils" "context" "github.com/gin-gonic/gin" "net/http" @@ -26,6 +27,8 @@ func UserRegister(c *gin.Context) { return } req := &rpc.UserRegisterReq{} + utils.CopyStructFields(req.UserInfo, params) + req.OperationID = params.OperationID log.NewInfo(req.OperationID, "UserRegister args ", req.String()) etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAuthName) client := rpc.NewAuthClient(etcdConn) From 8286c10406970d968d123159ca05d903b761e886 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 28 Dec 2021 16:06:06 +0800 Subject: [PATCH 041/337] tidy code --- internal/rpc/msg/notification.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/rpc/msg/notification.go b/internal/rpc/msg/notification.go index 76023b851..5bb11b21e 100644 --- a/internal/rpc/msg/notification.go +++ b/internal/rpc/msg/notification.go @@ -381,7 +381,7 @@ func MemberEnterNotification(req *pbGroup.GroupApplicationResponseReq) { //} func getFromToUserNickname(operationID, fromUserID, toUserID string) (string, string) { - return + return "", "" from, err1 := imdb.GetUserByUserID(fromUserID) to, err2 := imdb.GetUserByUserID(toUserID) if err1 != nil || err2 != nil { From 817a5e4b648ab2e9549a2f37deb02dca57f4e813 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 28 Dec 2021 16:23:14 +0800 Subject: [PATCH 042/337] tidy code --- pkg/utils/utils.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index 9953227a1..42ae68820 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -2,11 +2,13 @@ package utils import ( "fmt" + "github.com/jinzhu/copier" "reflect" ) // copy a by b b->a func CopyStructFields(a interface{}, b interface{}, fields ...string) (err error) { + copier.Copy(&a, &b) at := reflect.TypeOf(a) av := reflect.ValueOf(a) bt := reflect.TypeOf(b) @@ -34,6 +36,7 @@ func CopyStructFields(a interface{}, b interface{}, fields ...string) (err error for i := 0; i < len(_fields); i++ { name := _fields[i] + f := av.Elem().FieldByName(name) bValue := bv.FieldByName(name) From 1cb7b6a67e3fab53318d8be01ebd5915e53cccee Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 28 Dec 2021 16:24:45 +0800 Subject: [PATCH 043/337] tidy code --- go.mod | 5 +++-- go.sum | 6 ++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 663b8e84c..911f68c00 100644 --- a/go.mod +++ b/go.mod @@ -18,17 +18,19 @@ require ( github.com/garyburd/redigo v1.6.2 github.com/gin-gonic/gin v1.7.0 github.com/go-playground/validator/v10 v10.4.1 + github.com/go-sql-driver/mysql v1.6.0 // indirect github.com/golang-jwt/jwt/v4 v4.1.0 github.com/golang/protobuf v1.5.2 github.com/golang/snappy v0.0.4 // indirect github.com/gorilla/websocket v1.4.2 + github.com/jinzhu/copier v0.3.4 github.com/jinzhu/gorm v1.9.16 + github.com/jinzhu/now v1.1.3 // indirect github.com/jonboulle/clockwork v0.2.2 // indirect github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible github.com/lestrrat-go/strftime v1.0.4 // indirect github.com/lib/pq v1.2.0 // indirect github.com/mattn/go-sqlite3 v1.14.6 // indirect - github.com/mitchellh/mapstructure v1.4.2 github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 github.com/olivere/elastic/v7 v7.0.23 github.com/pierrec/lz4 v2.6.1+incompatible // indirect @@ -47,7 +49,6 @@ require ( gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b - gorm.io/driver/mysql v1.2.2 sigs.k8s.io/yaml v1.2.0 // indirect ) diff --git a/go.sum b/go.sum index 3a6600edb..a708e28db 100644 --- a/go.sum +++ b/go.sum @@ -279,6 +279,8 @@ github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKEN github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jinzhu/copier v0.3.4 h1:mfU6jI9PtCeUjkjQ322dlff9ELjGDu975C2p/nrubVI= +github.com/jinzhu/copier v0.3.4/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg= github.com/jinzhu/gorm v1.9.16 h1:+IyIjPEABKRpsu/F8OvDPy9fyQlgsg2luMV2ZIH5i5o= github.com/jinzhu/gorm v1.9.16/go.mod h1:G3LB3wezTOWM2ITLzPxEXgSkOXAntiLHS7UdBefADcs= github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= @@ -878,10 +880,6 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gorm.io/driver/mysql v1.2.2 h1:2qoqhOun1maoJOfLtnzJwq+bZlHkEF34rGntgySqp48= -gorm.io/driver/mysql v1.2.2/go.mod h1:qsiz+XcAyMrS6QY+X3M9R6b/lKM1imKmcuK9kac5LTo= -gorm.io/gorm v1.22.4 h1:8aPcyEJhY0MAt8aY6Dc524Pn+pO29K+ydu+e/cXSpQM= -gorm.io/gorm v1.22.4/go.mod h1:1aeVC+pe9ZmvKZban/gW4QPra7PRoTEssyc922qCAkk= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= From 2293253d528bf13f8e719ab7d118c9d0720fa245 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 28 Dec 2021 16:26:59 +0800 Subject: [PATCH 044/337] tidy code --- pkg/utils/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index 42ae68820..fac9f4365 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -8,7 +8,7 @@ import ( // copy a by b b->a func CopyStructFields(a interface{}, b interface{}, fields ...string) (err error) { - copier.Copy(&a, &b) + copier.Copy(a, &b) at := reflect.TypeOf(a) av := reflect.ValueOf(a) bt := reflect.TypeOf(b) From 6f92fa006983c32a7e4334bea2e075d57f89598b Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 28 Dec 2021 16:30:00 +0800 Subject: [PATCH 045/337] tidy code --- internal/api/auth/auth.go | 2 +- pkg/utils/utils.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/api/auth/auth.go b/internal/api/auth/auth.go index 649b97f66..9836cd853 100644 --- a/internal/api/auth/auth.go +++ b/internal/api/auth/auth.go @@ -27,7 +27,7 @@ func UserRegister(c *gin.Context) { return } req := &rpc.UserRegisterReq{} - utils.CopyStructFields(req.UserInfo, params) + utils.CopyStructFields(*req.UserInfo, params) req.OperationID = params.OperationID log.NewInfo(req.OperationID, "UserRegister args ", req.String()) etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAuthName) diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index fac9f4365..42ae68820 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -8,7 +8,7 @@ import ( // copy a by b b->a func CopyStructFields(a interface{}, b interface{}, fields ...string) (err error) { - copier.Copy(a, &b) + copier.Copy(&a, &b) at := reflect.TypeOf(a) av := reflect.ValueOf(a) bt := reflect.TypeOf(b) From 508ccf4f9c9dbf2c47cb503e00a6cbfc212b3af1 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 28 Dec 2021 16:31:38 +0800 Subject: [PATCH 046/337] tidy code --- pkg/utils/utils.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index 42ae68820..dacdb012d 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -9,6 +9,7 @@ import ( // copy a by b b->a func CopyStructFields(a interface{}, b interface{}, fields ...string) (err error) { copier.Copy(&a, &b) + return nil at := reflect.TypeOf(a) av := reflect.ValueOf(a) bt := reflect.TypeOf(b) From f43e1a10181804ffac781df401957df652e0274d Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 28 Dec 2021 16:36:02 +0800 Subject: [PATCH 047/337] tidy code --- internal/api/auth/auth.go | 3 ++- pkg/utils/utils.go | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/api/auth/auth.go b/internal/api/auth/auth.go index 9836cd853..d56390a77 100644 --- a/internal/api/auth/auth.go +++ b/internal/api/auth/auth.go @@ -6,6 +6,7 @@ import ( "Open_IM/pkg/common/log" "Open_IM/pkg/grpc-etcdv3/getcdv3" rpc "Open_IM/pkg/proto/auth" + open_im_sdk "Open_IM/pkg/proto/sdk_ws" "Open_IM/pkg/utils" "context" "github.com/gin-gonic/gin" @@ -26,7 +27,7 @@ func UserRegister(c *gin.Context) { c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "not authorized"}) return } - req := &rpc.UserRegisterReq{} + req := &rpc.UserRegisterReq{UserInfo: &open_im_sdk.UserInfo{}} utils.CopyStructFields(*req.UserInfo, params) req.OperationID = params.OperationID log.NewInfo(req.OperationID, "UserRegister args ", req.String()) diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index dacdb012d..3d4a595fe 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -8,8 +8,8 @@ import ( // copy a by b b->a func CopyStructFields(a interface{}, b interface{}, fields ...string) (err error) { - copier.Copy(&a, &b) - return nil + return copier.Copy(&a, &b) + at := reflect.TypeOf(a) av := reflect.ValueOf(a) bt := reflect.TypeOf(b) From 8e4f3b4f0619b536a0faaf4261b8b2b1ed8416a5 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 28 Dec 2021 16:48:20 +0800 Subject: [PATCH 048/337] tidy code --- internal/api/auth/auth.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/api/auth/auth.go b/internal/api/auth/auth.go index d56390a77..912dc2157 100644 --- a/internal/api/auth/auth.go +++ b/internal/api/auth/auth.go @@ -7,9 +7,9 @@ import ( "Open_IM/pkg/grpc-etcdv3/getcdv3" rpc "Open_IM/pkg/proto/auth" open_im_sdk "Open_IM/pkg/proto/sdk_ws" - "Open_IM/pkg/utils" "context" "github.com/gin-gonic/gin" + "github.com/jinzhu/copier" "net/http" "strings" ) @@ -28,7 +28,8 @@ func UserRegister(c *gin.Context) { return } req := &rpc.UserRegisterReq{UserInfo: &open_im_sdk.UserInfo{}} - utils.CopyStructFields(*req.UserInfo, params) + //utils.CopyStructFields(*req.UserInfo, params) + copier.Copy(req.UserInfo, ¶ms) req.OperationID = params.OperationID log.NewInfo(req.OperationID, "UserRegister args ", req.String()) etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAuthName) From 166ec71a288772dd48394c07fa77fde058cd9a0f Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 28 Dec 2021 16:50:05 +0800 Subject: [PATCH 049/337] tidy code --- internal/api/auth/auth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/api/auth/auth.go b/internal/api/auth/auth.go index 912dc2157..5dde76778 100644 --- a/internal/api/auth/auth.go +++ b/internal/api/auth/auth.go @@ -37,7 +37,7 @@ func UserRegister(c *gin.Context) { reply, err := client.UserRegister(context.Background(), req) if err != nil || reply.CommonResp.ErrCode != 0 { - log.NewError("0", "UserRegister failed ", err.Error(), req.String()) + log.NewError("0", "UserRegister failed ", err, reply.CommonResp.ErrCode) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) return } From eb640157f2c5f277b7284ea6a47916e4c55e66e6 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 28 Dec 2021 16:58:01 +0800 Subject: [PATCH 050/337] tidy code --- internal/api/auth/auth.go | 6 +++--- pkg/utils/utils.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/api/auth/auth.go b/internal/api/auth/auth.go index 5dde76778..4ab27e3f4 100644 --- a/internal/api/auth/auth.go +++ b/internal/api/auth/auth.go @@ -7,6 +7,7 @@ import ( "Open_IM/pkg/grpc-etcdv3/getcdv3" rpc "Open_IM/pkg/proto/auth" open_im_sdk "Open_IM/pkg/proto/sdk_ws" + "Open_IM/pkg/utils" "context" "github.com/gin-gonic/gin" "github.com/jinzhu/copier" @@ -28,16 +29,15 @@ func UserRegister(c *gin.Context) { return } req := &rpc.UserRegisterReq{UserInfo: &open_im_sdk.UserInfo{}} - //utils.CopyStructFields(*req.UserInfo, params) + utils.CopyStructFields(*req.UserInfo, params) copier.Copy(req.UserInfo, ¶ms) req.OperationID = params.OperationID log.NewInfo(req.OperationID, "UserRegister args ", req.String()) etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAuthName) client := rpc.NewAuthClient(etcdConn) reply, err := client.UserRegister(context.Background(), req) - if err != nil || reply.CommonResp.ErrCode != 0 { - log.NewError("0", "UserRegister failed ", err, reply.CommonResp.ErrCode) + log.NewError(req.OperationID, "UserRegister failed ", err, reply.CommonResp.ErrCode) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) return } diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index 3d4a595fe..d5dc0254a 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -8,7 +8,7 @@ import ( // copy a by b b->a func CopyStructFields(a interface{}, b interface{}, fields ...string) (err error) { - return copier.Copy(&a, &b) + return copier.Copy(a, b) at := reflect.TypeOf(a) av := reflect.ValueOf(a) From dbd3ed49ed2cc41795a248f99483b74f04b5707a Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 28 Dec 2021 16:59:17 +0800 Subject: [PATCH 051/337] tidy code --- internal/api/auth/auth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/api/auth/auth.go b/internal/api/auth/auth.go index 4ab27e3f4..5e77ea9de 100644 --- a/internal/api/auth/auth.go +++ b/internal/api/auth/auth.go @@ -38,7 +38,7 @@ func UserRegister(c *gin.Context) { reply, err := client.UserRegister(context.Background(), req) if err != nil || reply.CommonResp.ErrCode != 0 { log.NewError(req.OperationID, "UserRegister failed ", err, reply.CommonResp.ErrCode) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": reply.CommonResp.ErrMsg}) return } From 2b60430c55336de2f75949d8c95738b72cf71991 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 28 Dec 2021 17:03:37 +0800 Subject: [PATCH 052/337] tidy code --- pkg/common/db/mysql_model/im_mysql_model/model_struct.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/db/mysql_model/im_mysql_model/model_struct.go b/pkg/common/db/mysql_model/im_mysql_model/model_struct.go index 150aedd70..ac6ea4f86 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/model_struct.go +++ b/pkg/common/db/mysql_model/im_mysql_model/model_struct.go @@ -137,7 +137,7 @@ type GroupRequest struct { type User struct { UserID string `gorm:"column:user_id;primaryKey;"` Nickname string `gorm:"column:name"` - FaceUrl string `gorm:"column:icon"` + FaceUrl string `gorm:"column:face_url"` Gender int32 `gorm:"column:gender"` PhoneNumber string `gorm:"column:phone_number"` Birth string `gorm:"column:birth"` From 3ec1d1a965d65b00a9c452fe97fb3e1b3a1d8996 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Tue, 28 Dec 2021 17:12:07 +0800 Subject: [PATCH 053/337] token modify --- pkg/common/token_verify/jwt_token.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkg/common/token_verify/jwt_token.go b/pkg/common/token_verify/jwt_token.go index 4d33c3a58..519ecad63 100644 --- a/pkg/common/token_verify/jwt_token.go +++ b/pkg/common/token_verify/jwt_token.go @@ -55,9 +55,11 @@ func CreateToken(userID string, platformID int32) (string, int64, error) { deleteTokenKey = append(deleteTokenKey, k) } } - err = commonDB.DB.DeleteTokenByUidPid(userID, platformID, deleteTokenKey) - if err != nil { - return "", 0, err + if len(deleteTokenKey) != 0 { + err = commonDB.DB.DeleteTokenByUidPid(userID, platformID, deleteTokenKey) + if err != nil { + return "", 0, err + } } err = commonDB.DB.AddTokenFlag(userID, platformID, tokenString, constant.NormalToken) if err != nil { From eeee9a54d78ec5239675a5a5b950fa1672a5fce6 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 28 Dec 2021 17:13:31 +0800 Subject: [PATCH 054/337] tidy code --- internal/api/auth/auth.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/api/auth/auth.go b/internal/api/auth/auth.go index 5e77ea9de..2b3420d90 100644 --- a/internal/api/auth/auth.go +++ b/internal/api/auth/auth.go @@ -10,7 +10,6 @@ import ( "Open_IM/pkg/utils" "context" "github.com/gin-gonic/gin" - "github.com/jinzhu/copier" "net/http" "strings" ) @@ -30,7 +29,7 @@ func UserRegister(c *gin.Context) { } req := &rpc.UserRegisterReq{UserInfo: &open_im_sdk.UserInfo{}} utils.CopyStructFields(*req.UserInfo, params) - copier.Copy(req.UserInfo, ¶ms) + // copier.Copy(req.UserInfo, ¶ms) req.OperationID = params.OperationID log.NewInfo(req.OperationID, "UserRegister args ", req.String()) etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAuthName) From 62d0a7e6ffd149c6646bab74c6f8474a04002a9d Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 28 Dec 2021 17:15:51 +0800 Subject: [PATCH 055/337] tidy code --- internal/api/auth/auth.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/api/auth/auth.go b/internal/api/auth/auth.go index 2b3420d90..8881e27b1 100644 --- a/internal/api/auth/auth.go +++ b/internal/api/auth/auth.go @@ -7,9 +7,9 @@ import ( "Open_IM/pkg/grpc-etcdv3/getcdv3" rpc "Open_IM/pkg/proto/auth" open_im_sdk "Open_IM/pkg/proto/sdk_ws" - "Open_IM/pkg/utils" "context" "github.com/gin-gonic/gin" + "github.com/jinzhu/copier" "net/http" "strings" ) @@ -28,8 +28,8 @@ func UserRegister(c *gin.Context) { return } req := &rpc.UserRegisterReq{UserInfo: &open_im_sdk.UserInfo{}} - utils.CopyStructFields(*req.UserInfo, params) - // copier.Copy(req.UserInfo, ¶ms) + // utils.CopyStructFields(*req.UserInfo, params) + copier.Copy(req.UserInfo, ¶ms) req.OperationID = params.OperationID log.NewInfo(req.OperationID, "UserRegister args ", req.String()) etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAuthName) From 16e276d08ea8a600f9ad3dc5d8a67e3d0f6248af Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 28 Dec 2021 17:45:57 +0800 Subject: [PATCH 056/337] tidy code --- internal/api/auth/auth.go | 3 ++- pkg/utils/utils.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/api/auth/auth.go b/internal/api/auth/auth.go index 8881e27b1..5e77ea9de 100644 --- a/internal/api/auth/auth.go +++ b/internal/api/auth/auth.go @@ -7,6 +7,7 @@ import ( "Open_IM/pkg/grpc-etcdv3/getcdv3" rpc "Open_IM/pkg/proto/auth" open_im_sdk "Open_IM/pkg/proto/sdk_ws" + "Open_IM/pkg/utils" "context" "github.com/gin-gonic/gin" "github.com/jinzhu/copier" @@ -28,7 +29,7 @@ func UserRegister(c *gin.Context) { return } req := &rpc.UserRegisterReq{UserInfo: &open_im_sdk.UserInfo{}} - // utils.CopyStructFields(*req.UserInfo, params) + utils.CopyStructFields(*req.UserInfo, params) copier.Copy(req.UserInfo, ¶ms) req.OperationID = params.OperationID log.NewInfo(req.OperationID, "UserRegister args ", req.String()) diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index d5dc0254a..3d4a595fe 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -8,7 +8,7 @@ import ( // copy a by b b->a func CopyStructFields(a interface{}, b interface{}, fields ...string) (err error) { - return copier.Copy(a, b) + return copier.Copy(&a, &b) at := reflect.TypeOf(a) av := reflect.ValueOf(a) From 848510d4ca50d87b58721ac144c67aa989b1c2cc Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 28 Dec 2021 17:48:21 +0800 Subject: [PATCH 057/337] tidy code --- internal/api/auth/auth.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/api/auth/auth.go b/internal/api/auth/auth.go index 5e77ea9de..813ff34de 100644 --- a/internal/api/auth/auth.go +++ b/internal/api/auth/auth.go @@ -10,7 +10,6 @@ import ( "Open_IM/pkg/utils" "context" "github.com/gin-gonic/gin" - "github.com/jinzhu/copier" "net/http" "strings" ) @@ -30,7 +29,7 @@ func UserRegister(c *gin.Context) { } req := &rpc.UserRegisterReq{UserInfo: &open_im_sdk.UserInfo{}} utils.CopyStructFields(*req.UserInfo, params) - copier.Copy(req.UserInfo, ¶ms) + //copier.Copy(req.UserInfo, ¶ms) req.OperationID = params.OperationID log.NewInfo(req.OperationID, "UserRegister args ", req.String()) etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImAuthName) From ec95f0a7af0d26be51f510ac49121480cea6db75 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 28 Dec 2021 17:49:52 +0800 Subject: [PATCH 058/337] tidy code --- internal/api/auth/auth.go | 2 +- pkg/utils/utils.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/api/auth/auth.go b/internal/api/auth/auth.go index 813ff34de..4b218f263 100644 --- a/internal/api/auth/auth.go +++ b/internal/api/auth/auth.go @@ -28,7 +28,7 @@ func UserRegister(c *gin.Context) { return } req := &rpc.UserRegisterReq{UserInfo: &open_im_sdk.UserInfo{}} - utils.CopyStructFields(*req.UserInfo, params) + utils.CopyStructFields(req.UserInfo, ¶ms) //copier.Copy(req.UserInfo, ¶ms) req.OperationID = params.OperationID log.NewInfo(req.OperationID, "UserRegister args ", req.String()) diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index 3d4a595fe..d5dc0254a 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -8,7 +8,7 @@ import ( // copy a by b b->a func CopyStructFields(a interface{}, b interface{}, fields ...string) (err error) { - return copier.Copy(&a, &b) + return copier.Copy(a, b) at := reflect.TypeOf(a) av := reflect.ValueOf(a) From 188a90f97d0f670bf5d91fb5b54418239a2dbfcc Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 28 Dec 2021 18:01:40 +0800 Subject: [PATCH 059/337] tidy code --- internal/api/auth/auth.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/api/auth/auth.go b/internal/api/auth/auth.go index 4b218f263..315849aa2 100644 --- a/internal/api/auth/auth.go +++ b/internal/api/auth/auth.go @@ -36,8 +36,9 @@ func UserRegister(c *gin.Context) { client := rpc.NewAuthClient(etcdConn) reply, err := client.UserRegister(context.Background(), req) if err != nil || reply.CommonResp.ErrCode != 0 { - log.NewError(req.OperationID, "UserRegister failed ", err, reply.CommonResp.ErrCode) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": reply.CommonResp.ErrMsg}) + log.NewError(req.OperationID, "UserRegister failed ", err, reply.CommonResp.ErrCode) return } From 141936e609917a6e398029fed98627be4d17981e Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 28 Dec 2021 18:03:51 +0800 Subject: [PATCH 060/337] tidy code --- internal/api/auth/auth.go | 6 +++--- pkg/base_info/auth_api_struct.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/api/auth/auth.go b/internal/api/auth/auth.go index 315849aa2..4a912beca 100644 --- a/internal/api/auth/auth.go +++ b/internal/api/auth/auth.go @@ -36,9 +36,8 @@ func UserRegister(c *gin.Context) { client := rpc.NewAuthClient(etcdConn) reply, err := client.UserRegister(context.Background(), req) if err != nil || reply.CommonResp.ErrCode != 0 { - - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": reply.CommonResp.ErrMsg}) log.NewError(req.OperationID, "UserRegister failed ", err, reply.CommonResp.ErrCode) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": reply.CommonResp.ErrMsg}) return } @@ -51,8 +50,9 @@ func UserRegister(c *gin.Context) { } resp := api.UserRegisterResp{CommResp: api.CommResp{ErrCode: replyToken.CommonResp.ErrCode, ErrMsg: replyToken.CommonResp.ErrMsg}, UserToken: api.UserTokenInfo{UserID: req.UserInfo.UserID, Token: replyToken.Token, ExpiredTime: replyToken.ExpiredTime}} - c.JSON(http.StatusOK, resp) log.NewInfo(req.OperationID, "UserRegister return ", resp) + c.JSON(http.StatusOK, resp) + } func UserToken(c *gin.Context) { diff --git a/pkg/base_info/auth_api_struct.go b/pkg/base_info/auth_api_struct.go index 8dd3923a4..a4db08f84 100644 --- a/pkg/base_info/auth_api_struct.go +++ b/pkg/base_info/auth_api_struct.go @@ -17,7 +17,7 @@ type UserRegisterReq struct { } type UserTokenInfo struct { - UserID string `json:"secret"` + UserID string `json:"userID"` Token string `json:"token"` ExpiredTime int64 `json:"expiredTime"` } From 7ee703f0773b0ecfd47be5cae4ebfb4fc0204dd1 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Tue, 28 Dec 2021 18:05:25 +0800 Subject: [PATCH 061/337] token modify --- pkg/common/log/file_line_hk.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/log/file_line_hk.go b/pkg/common/log/file_line_hk.go index 7eeb6ea82..9ffa7806e 100644 --- a/pkg/common/log/file_line_hk.go +++ b/pkg/common/log/file_line_hk.go @@ -24,7 +24,7 @@ func (f *fileHook) Levels() []logrus.Level { } func (f *fileHook) Fire(entry *logrus.Entry) error { - entry.Data["FilePath"] = findCaller(5) + entry.Data["FilePath"] = findCaller(6) return nil } From 6d589a1204c54e88de272b1f7909e4a64b02868d Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 28 Dec 2021 18:18:35 +0800 Subject: [PATCH 062/337] tidy code --- internal/api/auth/auth.go | 2 +- internal/api/user/user.go | 19 ++++++++++--------- internal/rpc/friend/firend.go | 1 - pkg/base_info/user_api_struct.go | 9 +++++++++ 4 files changed, 20 insertions(+), 11 deletions(-) diff --git a/internal/api/auth/auth.go b/internal/api/auth/auth.go index 4a912beca..76effddf2 100644 --- a/internal/api/auth/auth.go +++ b/internal/api/auth/auth.go @@ -81,6 +81,6 @@ func UserToken(c *gin.Context) { resp := api.UserTokenResp{CommResp: api.CommResp{ErrCode: reply.CommonResp.ErrCode, ErrMsg: reply.CommonResp.ErrMsg}, UserToken: api.UserTokenInfo{UserID: req.FromUserID, Token: reply.Token, ExpiredTime: reply.ExpiredTime}} - c.JSON(http.StatusOK, resp) log.NewInfo(req.OperationID, "UserRegister return ", resp) + c.JSON(http.StatusOK, resp) } diff --git a/internal/api/user/user.go b/internal/api/user/user.go index b6d550f1d..3ddc95353 100644 --- a/internal/api/user/user.go +++ b/internal/api/user/user.go @@ -79,11 +79,12 @@ import ( func GetUserInfo(c *gin.Context) { params := api.GetUserInfoReq{} if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": http.StatusBadRequest, "errMsg": err.Error()}) return } req := &rpc.GetUserInfoReq{} - utils.CopyStructFields(&req, params) + utils.CopyStructFields(req, ¶ms) var ok bool ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { @@ -102,21 +103,20 @@ func GetUserInfo(c *gin.Context) { return } - resp := api.GetUserInfoResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} - resp.UserInfoList = RpcResp.UserInfoList - c.JSON(http.StatusOK, resp) - + resp := api.GetUserInfoResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, UserInfoList: RpcResp.UserInfoList} log.NewInfo(req.OperationID, "GetUserInfo api return ", resp) + c.JSON(http.StatusOK, resp) } func UpdateUserInfo(c *gin.Context) { - params := api.GetUserInfoReq{} + params := api.UpdateUserInfoReq{} if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } req := &rpc.UpdateUserInfoReq{} - utils.CopyStructFields(&req, params) + utils.CopyStructFields(req, ¶ms) var ok bool ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { @@ -134,6 +134,7 @@ func UpdateUserInfo(c *gin.Context) { c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) return } - c.JSON(http.StatusOK, gin.H{"errCode": RpcResp.CommonResp.ErrCode, "errMsg": RpcResp.CommonResp.ErrMsg}) - log.NewInfo(req.OperationID, "UpdateUserInfo api return ", RpcResp.CommonResp) + resp := api.UpdateUserInfoResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} + log.NewInfo(req.OperationID, "UpdateUserInfo api return ", resp) + c.JSON(http.StatusOK, resp) } diff --git a/internal/rpc/friend/firend.go b/internal/rpc/friend/firend.go index 8836bf40e..b334cb1e3 100644 --- a/internal/rpc/friend/firend.go +++ b/internal/rpc/friend/firend.go @@ -434,7 +434,6 @@ func (s *friendServer) GetFriendApplyList(ctx context.Context, req *pbFriend.Get var userInfo sdkws.FriendRequest utils.CopyStructFields(&userInfo, applyUserInfo) appleUserList = append(appleUserList, &userInfo) - } log.NewInfo(req.CommID.OperationID, "rpc GetFriendApplyList ok", pbFriend.GetFriendApplyListResp{FriendRequestList: appleUserList}) return &pbFriend.GetFriendApplyListResp{FriendRequestList: appleUserList}, nil diff --git a/pkg/base_info/user_api_struct.go b/pkg/base_info/user_api_struct.go index 2e736e97f..113cf10ca 100644 --- a/pkg/base_info/user_api_struct.go +++ b/pkg/base_info/user_api_struct.go @@ -26,3 +26,12 @@ type GetUserInfoResp struct { CommResp UserInfoList []*open_im_sdk.UserInfo `json:"data"` } + +type UpdateUserInfoReq struct { + UserInfo + OperationID string `json:"operationID" binding:"required"` +} + +type UpdateUserInfoResp struct { + CommResp +} From 05ee76b0a9c954fe0f52abf7bdd14b7444beaf56 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 28 Dec 2021 18:33:36 +0800 Subject: [PATCH 063/337] tidy code --- internal/api/friend/friend.go | 35 ++++++++++++++++-------------- pkg/base_info/friend_api_struct.go | 4 ++-- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go index 55be48d69..e120b84c1 100644 --- a/internal/api/friend/friend.go +++ b/internal/api/friend/friend.go @@ -17,12 +17,12 @@ import ( func AddBlacklist(c *gin.Context) { params := api.AddBlacklistReq{} if err := c.BindJSON(¶ms); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) log.NewError("0", "BindJSON failed ", err.Error()) + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } req := &rpc.AddBlacklistReq{} - utils.CopyStructFields(req.CommID, params) + utils.CopyStructFields(req.CommID, ¶ms) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { @@ -41,20 +41,19 @@ func AddBlacklist(c *gin.Context) { return } resp := api.AddBlacklistResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} - c.JSON(http.StatusOK, resp) log.NewInfo(req.CommID.OperationID, "AddBlacklist api return ", resp) + c.JSON(http.StatusOK, resp) } func ImportFriend(c *gin.Context) { params := api.ImportFriendReq{} if err := c.BindJSON(¶ms); err != nil { - - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) log.NewError("0", "BindJSON failed ", err.Error()) + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } req := &rpc.ImportFriendReq{} - utils.CopyStructFields(req, params) + utils.CopyStructFields(req, ¶ms) var ok bool ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { @@ -74,8 +73,8 @@ func ImportFriend(c *gin.Context) { } resp := api.ImportFriendResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, Data: RpcResp.FailedFriendUserIDList} - c.JSON(http.StatusOK, resp) log.NewInfo(req.OperationID, "ImportFriend api return ", resp) + c.JSON(http.StatusOK, resp) } func AddFriend(c *gin.Context) { @@ -106,8 +105,8 @@ func AddFriend(c *gin.Context) { } resp := api.AddFriendResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} - c.JSON(http.StatusOK, resp) log.NewInfo(req.CommID.OperationID, "AddFriend api return ", resp) + c.JSON(http.StatusOK, resp) } func AddFriendResponse(c *gin.Context) { @@ -118,7 +117,7 @@ func AddFriendResponse(c *gin.Context) { return } req := &rpc.AddFriendResponseReq{} - utils.CopyStructFields(req.CommID, params) + utils.CopyStructFields(req.CommID, ¶ms) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { @@ -126,7 +125,7 @@ func AddFriendResponse(c *gin.Context) { c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) return } - utils.CopyStructFields(&req, params) + utils.CopyStructFields(&req, ¶ms) log.NewInfo(req.CommID.OperationID, "AddFriendResponse args ", req.String()) etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) @@ -139,8 +138,8 @@ func AddFriendResponse(c *gin.Context) { } resp := api.AddFriendResponseResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} - c.JSON(http.StatusOK, resp) log.NewInfo(req.CommID.OperationID, "AddFriendResponse api return ", resp) + c.JSON(http.StatusOK, resp) } func DeleteFriend(c *gin.Context) { @@ -151,7 +150,7 @@ func DeleteFriend(c *gin.Context) { return } req := &rpc.DeleteFriendReq{} - utils.CopyStructFields(req.CommID, params) + utils.CopyStructFields(req.CommID, ¶ms) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { @@ -171,8 +170,8 @@ func DeleteFriend(c *gin.Context) { } resp := api.DeleteFriendResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} - c.JSON(http.StatusOK, resp) log.NewInfo(req.CommID.OperationID, "DeleteFriend api return ", resp) + c.JSON(http.StatusOK, resp) } func GetBlacklist(c *gin.Context) { @@ -183,7 +182,7 @@ func GetBlacklist(c *gin.Context) { return } req := &rpc.GetBlacklistReq{} - utils.CopyStructFields(req.CommID, params) + utils.CopyStructFields(req.CommID, ¶ms) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { @@ -203,9 +202,13 @@ func GetBlacklist(c *gin.Context) { } resp := api.GetBlackListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}} - utils.CopyStructFields(&resp.BlackUserInfoList, RpcResp.BlackUserInfoList) + for _, v := range RpcResp.BlackUserInfoList { + black := api.BlackUserInfo{} + utils.CopyStructFields(&black, v) + resp.BlackUserInfoList = append(resp.BlackUserInfoList, &black) + } log.NewInfo(req.CommID.OperationID, "GetBlacklist api return ", resp) - + c.JSON(http.StatusOK, resp) } func SetFriendComment(c *gin.Context) { diff --git a/pkg/base_info/friend_api_struct.go b/pkg/base_info/friend_api_struct.go index 94a48662b..b5cee09e5 100644 --- a/pkg/base_info/friend_api_struct.go +++ b/pkg/base_info/friend_api_struct.go @@ -54,7 +54,7 @@ type GetBlackListReq struct { } type GetBlackListResp struct { CommResp - BlackUserInfoList []*blackUserInfo `json:"data"` + BlackUserInfoList []*BlackUserInfo `json:"data"` } //type PublicUserInfo struct { @@ -64,7 +64,7 @@ type GetBlackListResp struct { // Gender int32 `json:"gender"` //} -type blackUserInfo struct { +type BlackUserInfo struct { open_im_sdk.PublicUserInfo } From 12ebf232d50a0896824441bb9bbbe229ccbdd441 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 28 Dec 2021 18:37:16 +0800 Subject: [PATCH 064/337] tidy code --- internal/api/friend/friend.go | 3 ++- internal/rpc/auth/auth.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go index e120b84c1..85ec67e5e 100644 --- a/internal/api/friend/friend.go +++ b/internal/api/friend/friend.go @@ -239,8 +239,9 @@ func SetFriendComment(c *gin.Context) { return } resp := api.SetFriendCommentResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} - c.JSON(http.StatusOK, resp) + log.NewInfo(req.CommID.OperationID, "SetFriendComment api return ", resp) + c.JSON(http.StatusOK, resp) } func RemoveBlacklist(c *gin.Context) { diff --git a/internal/rpc/auth/auth.go b/internal/rpc/auth/auth.go index 166df967a..70ebfcbc0 100644 --- a/internal/rpc/auth/auth.go +++ b/internal/rpc/auth/auth.go @@ -48,7 +48,7 @@ func (rpc *rpcAuth) UserToken(_ context.Context, req *pbAuth.UserTokenReq) (*pbA } log.NewInfo(req.OperationID, "rpc UserToken return ") - return &pbAuth.UserTokenResp{Token: tokens, ExpiredTime: expTime}, nil + return &pbAuth.UserTokenResp{CommonResp: &pbAuth.CommonResp{}, Token: tokens, ExpiredTime: expTime}, nil } type rpcAuth struct { From 5c509ee85a380c5a7cd17c48e9ae64e9540c1d65 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 28 Dec 2021 19:28:33 +0800 Subject: [PATCH 065/337] tidy code --- internal/api/user/user.go | 5 +++-- pkg/base_info/public_struct.go | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/api/user/user.go b/internal/api/user/user.go index 3ddc95353..9ebc46a26 100644 --- a/internal/api/user/user.go +++ b/internal/api/user/user.go @@ -6,6 +6,7 @@ import ( "Open_IM/pkg/common/log" "Open_IM/pkg/common/token_verify" "Open_IM/pkg/grpc-etcdv3/getcdv3" + open_im_sdk "Open_IM/pkg/proto/sdk_ws" rpc "Open_IM/pkg/proto/user" "Open_IM/pkg/utils" "context" @@ -115,8 +116,8 @@ func UpdateUserInfo(c *gin.Context) { c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &rpc.UpdateUserInfoReq{} - utils.CopyStructFields(req, ¶ms) + req := &rpc.UpdateUserInfoReq{UserInfo: &open_im_sdk.UserInfo{}} + utils.CopyStructFields(req.UserInfo, ¶ms) var ok bool ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { diff --git a/pkg/base_info/public_struct.go b/pkg/base_info/public_struct.go index 679b58082..1becfe0ab 100644 --- a/pkg/base_info/public_struct.go +++ b/pkg/base_info/public_struct.go @@ -7,7 +7,7 @@ import ( type UserInfo struct { UserID string `json:"userID" binding:"required,min=1,max=64"` - Nickname string `json:"nickname" binding:"required,min=1,max=64"` + Nickname string `json:"nickname" binding:"omitempty,min=1,max=64"` FaceUrl string `json:"faceUrl" binding:"omitempty,max=1024"` Gender int32 `json:"gender" binding:"omitempty,oneof=0 1 2"` PhoneNumber string `json:"phoneNumber" binding:"omitempty,max=32"` From f4c3c86dd1b7a0b44e456d2c1d744a92ca209c71 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 28 Dec 2021 20:03:20 +0800 Subject: [PATCH 066/337] tidy code --- internal/api/user/user.go | 1 + pkg/base_info/public_struct.go | 2 +- .../im_mysql_model/model_struct.go | 2 +- pkg/proto/sdk_ws/ws.pb.go | 270 +++++++++--------- pkg/proto/sdk_ws/ws.proto | 2 +- 5 files changed, 139 insertions(+), 138 deletions(-) diff --git a/internal/api/user/user.go b/internal/api/user/user.go index 9ebc46a26..f55460cc0 100644 --- a/internal/api/user/user.go +++ b/internal/api/user/user.go @@ -118,6 +118,7 @@ func UpdateUserInfo(c *gin.Context) { } req := &rpc.UpdateUserInfoReq{UserInfo: &open_im_sdk.UserInfo{}} utils.CopyStructFields(req.UserInfo, ¶ms) + req.OperationID = params.OperationID var ok bool ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { diff --git a/pkg/base_info/public_struct.go b/pkg/base_info/public_struct.go index 1becfe0ab..40f92e822 100644 --- a/pkg/base_info/public_struct.go +++ b/pkg/base_info/public_struct.go @@ -11,7 +11,7 @@ type UserInfo struct { FaceUrl string `json:"faceUrl" binding:"omitempty,max=1024"` Gender int32 `json:"gender" binding:"omitempty,oneof=0 1 2"` PhoneNumber string `json:"phoneNumber" binding:"omitempty,max=32"` - Birth string `json:"birth" binding:"omitempty,max=16"` + Birth int64 `json:"birth" binding:"omitempty,max=16"` Email string `json:"email" binding:"omitempty,max=64"` Ex string `json:"ex" binding:"omitempty,max=1024"` } diff --git a/pkg/common/db/mysql_model/im_mysql_model/model_struct.go b/pkg/common/db/mysql_model/im_mysql_model/model_struct.go index ac6ea4f86..ae2d9dc43 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/model_struct.go +++ b/pkg/common/db/mysql_model/im_mysql_model/model_struct.go @@ -140,7 +140,7 @@ type User struct { FaceUrl string `gorm:"column:face_url"` Gender int32 `gorm:"column:gender"` PhoneNumber string `gorm:"column:phone_number"` - Birth string `gorm:"column:birth"` + Birth time.Time `gorm:"column:birth"` Email string `gorm:"column:email"` Ex string `gorm:"column:ex"` CreateTime time.Time `gorm:"column:create_time"` diff --git a/pkg/proto/sdk_ws/ws.pb.go b/pkg/proto/sdk_ws/ws.pb.go index 3b087bdde..b9857aad1 100644 --- a/pkg/proto/sdk_ws/ws.pb.go +++ b/pkg/proto/sdk_ws/ws.pb.go @@ -40,7 +40,7 @@ func (m *GroupInfo) Reset() { *m = GroupInfo{} } func (m *GroupInfo) String() string { return proto.CompactTextString(m) } func (*GroupInfo) ProtoMessage() {} func (*GroupInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_b7876bd3c094d103, []int{0} + return fileDescriptor_ws_c6aceb61f76d5c8d, []int{0} } func (m *GroupInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfo.Unmarshal(m, b) @@ -164,7 +164,7 @@ func (m *GroupMemberFullInfo) Reset() { *m = GroupMemberFullInfo{} } func (m *GroupMemberFullInfo) String() string { return proto.CompactTextString(m) } func (*GroupMemberFullInfo) ProtoMessage() {} func (*GroupMemberFullInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_b7876bd3c094d103, []int{1} + return fileDescriptor_ws_c6aceb61f76d5c8d, []int{1} } func (m *GroupMemberFullInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupMemberFullInfo.Unmarshal(m, b) @@ -269,7 +269,7 @@ func (m *PublicUserInfo) Reset() { *m = PublicUserInfo{} } func (m *PublicUserInfo) String() string { return proto.CompactTextString(m) } func (*PublicUserInfo) ProtoMessage() {} func (*PublicUserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_b7876bd3c094d103, []int{2} + return fileDescriptor_ws_c6aceb61f76d5c8d, []int{2} } func (m *PublicUserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PublicUserInfo.Unmarshal(m, b) @@ -330,7 +330,7 @@ type UserInfo struct { FaceUrl string `protobuf:"bytes,3,opt,name=FaceUrl" json:"FaceUrl,omitempty"` Gender int32 `protobuf:"varint,4,opt,name=Gender" json:"Gender,omitempty"` PhoneNumber string `protobuf:"bytes,5,opt,name=PhoneNumber" json:"PhoneNumber,omitempty"` - Birth string `protobuf:"bytes,6,opt,name=Birth" json:"Birth,omitempty"` + Birth int64 `protobuf:"varint,6,opt,name=Birth" json:"Birth,omitempty"` Email string `protobuf:"bytes,7,opt,name=Email" json:"Email,omitempty"` Ex string `protobuf:"bytes,8,opt,name=Ex" json:"Ex,omitempty"` CreateTime int64 `protobuf:"varint,9,opt,name=CreateTime" json:"CreateTime,omitempty"` @@ -344,7 +344,7 @@ func (m *UserInfo) Reset() { *m = UserInfo{} } func (m *UserInfo) String() string { return proto.CompactTextString(m) } func (*UserInfo) ProtoMessage() {} func (*UserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_b7876bd3c094d103, []int{3} + return fileDescriptor_ws_c6aceb61f76d5c8d, []int{3} } func (m *UserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserInfo.Unmarshal(m, b) @@ -399,11 +399,11 @@ func (m *UserInfo) GetPhoneNumber() string { return "" } -func (m *UserInfo) GetBirth() string { +func (m *UserInfo) GetBirth() int64 { if m != nil { return m.Birth } - return "" + return 0 } func (m *UserInfo) GetEmail() string { @@ -451,7 +451,7 @@ func (m *FriendInfo) Reset() { *m = FriendInfo{} } func (m *FriendInfo) String() string { return proto.CompactTextString(m) } func (*FriendInfo) ProtoMessage() {} func (*FriendInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_b7876bd3c094d103, []int{4} + return fileDescriptor_ws_c6aceb61f76d5c8d, []int{4} } func (m *FriendInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfo.Unmarshal(m, b) @@ -536,7 +536,7 @@ func (m *BlackInfo) Reset() { *m = BlackInfo{} } func (m *BlackInfo) String() string { return proto.CompactTextString(m) } func (*BlackInfo) ProtoMessage() {} func (*BlackInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_b7876bd3c094d103, []int{5} + return fileDescriptor_ws_c6aceb61f76d5c8d, []int{5} } func (m *BlackInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackInfo.Unmarshal(m, b) @@ -617,7 +617,7 @@ func (m *GroupRequest) Reset() { *m = GroupRequest{} } func (m *GroupRequest) String() string { return proto.CompactTextString(m) } func (*GroupRequest) ProtoMessage() {} func (*GroupRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_b7876bd3c094d103, []int{6} + return fileDescriptor_ws_c6aceb61f76d5c8d, []int{6} } func (m *GroupRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupRequest.Unmarshal(m, b) @@ -719,7 +719,7 @@ func (m *FriendRequest) Reset() { *m = FriendRequest{} } func (m *FriendRequest) String() string { return proto.CompactTextString(m) } func (*FriendRequest) ProtoMessage() {} func (*FriendRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_b7876bd3c094d103, []int{7} + return fileDescriptor_ws_c6aceb61f76d5c8d, []int{7} } func (m *FriendRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendRequest.Unmarshal(m, b) @@ -818,7 +818,7 @@ func (m *PullMessageBySeqListResp) Reset() { *m = PullMessageBySeqListRe func (m *PullMessageBySeqListResp) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListResp) ProtoMessage() {} func (*PullMessageBySeqListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_b7876bd3c094d103, []int{8} + return fileDescriptor_ws_c6aceb61f76d5c8d, []int{8} } func (m *PullMessageBySeqListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListResp.Unmarshal(m, b) @@ -893,7 +893,7 @@ func (m *PullMessageBySeqListReq) Reset() { *m = PullMessageBySeqListReq func (m *PullMessageBySeqListReq) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListReq) ProtoMessage() {} func (*PullMessageBySeqListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_b7876bd3c094d103, []int{9} + return fileDescriptor_ws_c6aceb61f76d5c8d, []int{9} } func (m *PullMessageBySeqListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListReq.Unmarshal(m, b) @@ -948,7 +948,7 @@ func (m *PullMessageReq) Reset() { *m = PullMessageReq{} } func (m *PullMessageReq) String() string { return proto.CompactTextString(m) } func (*PullMessageReq) ProtoMessage() {} func (*PullMessageReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_b7876bd3c094d103, []int{10} + return fileDescriptor_ws_c6aceb61f76d5c8d, []int{10} } func (m *PullMessageReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageReq.Unmarshal(m, b) @@ -1012,7 +1012,7 @@ func (m *PullMessageResp) Reset() { *m = PullMessageResp{} } func (m *PullMessageResp) String() string { return proto.CompactTextString(m) } func (*PullMessageResp) ProtoMessage() {} func (*PullMessageResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_b7876bd3c094d103, []int{11} + return fileDescriptor_ws_c6aceb61f76d5c8d, []int{11} } func (m *PullMessageResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageResp.Unmarshal(m, b) @@ -1084,7 +1084,7 @@ func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} } func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqReq) ProtoMessage() {} func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_b7876bd3c094d103, []int{12} + return fileDescriptor_ws_c6aceb61f76d5c8d, []int{12} } func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) @@ -1116,7 +1116,7 @@ func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} } func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqResp) ProtoMessage() {} func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_b7876bd3c094d103, []int{13} + return fileDescriptor_ws_c6aceb61f76d5c8d, []int{13} } func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) @@ -1164,7 +1164,7 @@ func (m *GatherFormat) Reset() { *m = GatherFormat{} } func (m *GatherFormat) String() string { return proto.CompactTextString(m) } func (*GatherFormat) ProtoMessage() {} func (*GatherFormat) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_b7876bd3c094d103, []int{14} + return fileDescriptor_ws_c6aceb61f76d5c8d, []int{14} } func (m *GatherFormat) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GatherFormat.Unmarshal(m, b) @@ -1211,7 +1211,7 @@ func (m *UserSendMsgResp) Reset() { *m = UserSendMsgResp{} } func (m *UserSendMsgResp) String() string { return proto.CompactTextString(m) } func (*UserSendMsgResp) ProtoMessage() {} func (*UserSendMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_b7876bd3c094d103, []int{15} + return fileDescriptor_ws_c6aceb61f76d5c8d, []int{15} } func (m *UserSendMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserSendMsgResp.Unmarshal(m, b) @@ -1280,7 +1280,7 @@ func (m *MsgData) Reset() { *m = MsgData{} } func (m *MsgData) String() string { return proto.CompactTextString(m) } func (*MsgData) ProtoMessage() {} func (*MsgData) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_b7876bd3c094d103, []int{16} + return fileDescriptor_ws_c6aceb61f76d5c8d, []int{16} } func (m *MsgData) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgData.Unmarshal(m, b) @@ -1441,7 +1441,7 @@ func (m *OfflinePushInfo) Reset() { *m = OfflinePushInfo{} } func (m *OfflinePushInfo) String() string { return proto.CompactTextString(m) } func (*OfflinePushInfo) ProtoMessage() {} func (*OfflinePushInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_b7876bd3c094d103, []int{17} + return fileDescriptor_ws_c6aceb61f76d5c8d, []int{17} } func (m *OfflinePushInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OfflinePushInfo.Unmarshal(m, b) @@ -1508,7 +1508,7 @@ func (m *TipsComm) Reset() { *m = TipsComm{} } func (m *TipsComm) String() string { return proto.CompactTextString(m) } func (*TipsComm) ProtoMessage() {} func (*TipsComm) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_b7876bd3c094d103, []int{18} + return fileDescriptor_ws_c6aceb61f76d5c8d, []int{18} } func (m *TipsComm) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TipsComm.Unmarshal(m, b) @@ -1557,7 +1557,7 @@ func (m *MemberEnterTips) Reset() { *m = MemberEnterTips{} } func (m *MemberEnterTips) String() string { return proto.CompactTextString(m) } func (*MemberEnterTips) ProtoMessage() {} func (*MemberEnterTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_b7876bd3c094d103, []int{19} + return fileDescriptor_ws_c6aceb61f76d5c8d, []int{19} } func (m *MemberEnterTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberEnterTips.Unmarshal(m, b) @@ -1612,7 +1612,7 @@ func (m *MemberLeaveTips) Reset() { *m = MemberLeaveTips{} } func (m *MemberLeaveTips) String() string { return proto.CompactTextString(m) } func (*MemberLeaveTips) ProtoMessage() {} func (*MemberLeaveTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_b7876bd3c094d103, []int{20} + return fileDescriptor_ws_c6aceb61f76d5c8d, []int{20} } func (m *MemberLeaveTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberLeaveTips.Unmarshal(m, b) @@ -1667,7 +1667,7 @@ func (m *MemberInvitedTips) Reset() { *m = MemberInvitedTips{} } func (m *MemberInvitedTips) String() string { return proto.CompactTextString(m) } func (*MemberInvitedTips) ProtoMessage() {} func (*MemberInvitedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_b7876bd3c094d103, []int{21} + return fileDescriptor_ws_c6aceb61f76d5c8d, []int{21} } func (m *MemberInvitedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInvitedTips.Unmarshal(m, b) @@ -1729,7 +1729,7 @@ func (m *MemberKickedTips) Reset() { *m = MemberKickedTips{} } func (m *MemberKickedTips) String() string { return proto.CompactTextString(m) } func (*MemberKickedTips) ProtoMessage() {} func (*MemberKickedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_b7876bd3c094d103, []int{22} + return fileDescriptor_ws_c6aceb61f76d5c8d, []int{22} } func (m *MemberKickedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberKickedTips.Unmarshal(m, b) @@ -1792,7 +1792,7 @@ func (m *MemberInfoChangedTips) Reset() { *m = MemberInfoChangedTips{} } func (m *MemberInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*MemberInfoChangedTips) ProtoMessage() {} func (*MemberInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_b7876bd3c094d103, []int{23} + return fileDescriptor_ws_c6aceb61f76d5c8d, []int{23} } func (m *MemberInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInfoChangedTips.Unmarshal(m, b) @@ -1861,7 +1861,7 @@ func (m *GroupCreatedTips) Reset() { *m = GroupCreatedTips{} } func (m *GroupCreatedTips) String() string { return proto.CompactTextString(m) } func (*GroupCreatedTips) ProtoMessage() {} func (*GroupCreatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_b7876bd3c094d103, []int{24} + return fileDescriptor_ws_c6aceb61f76d5c8d, []int{24} } func (m *GroupCreatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupCreatedTips.Unmarshal(m, b) @@ -1922,7 +1922,7 @@ func (m *GroupInfoChangedTips) Reset() { *m = GroupInfoChangedTips{} } func (m *GroupInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*GroupInfoChangedTips) ProtoMessage() {} func (*GroupInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_b7876bd3c094d103, []int{25} + return fileDescriptor_ws_c6aceb61f76d5c8d, []int{25} } func (m *GroupInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfoChangedTips.Unmarshal(m, b) @@ -1976,7 +1976,7 @@ func (m *JoinGroupApplicationTips) Reset() { *m = JoinGroupApplicationTi func (m *JoinGroupApplicationTips) String() string { return proto.CompactTextString(m) } func (*JoinGroupApplicationTips) ProtoMessage() {} func (*JoinGroupApplicationTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_b7876bd3c094d103, []int{26} + return fileDescriptor_ws_c6aceb61f76d5c8d, []int{26} } func (m *JoinGroupApplicationTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JoinGroupApplicationTips.Unmarshal(m, b) @@ -2031,7 +2031,7 @@ func (m *ApplicationProcessedTips) Reset() { *m = ApplicationProcessedTi func (m *ApplicationProcessedTips) String() string { return proto.CompactTextString(m) } func (*ApplicationProcessedTips) ProtoMessage() {} func (*ApplicationProcessedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_b7876bd3c094d103, []int{27} + return fileDescriptor_ws_c6aceb61f76d5c8d, []int{27} } func (m *ApplicationProcessedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ApplicationProcessedTips.Unmarshal(m, b) @@ -2092,7 +2092,7 @@ func (m *FriendApplication) Reset() { *m = FriendApplication{} } func (m *FriendApplication) String() string { return proto.CompactTextString(m) } func (*FriendApplication) ProtoMessage() {} func (*FriendApplication) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_b7876bd3c094d103, []int{28} + return fileDescriptor_ws_c6aceb61f76d5c8d, []int{28} } func (m *FriendApplication) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplication.Unmarshal(m, b) @@ -2145,7 +2145,7 @@ func (m *FromToUserID) Reset() { *m = FromToUserID{} } func (m *FromToUserID) String() string { return proto.CompactTextString(m) } func (*FromToUserID) ProtoMessage() {} func (*FromToUserID) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_b7876bd3c094d103, []int{29} + return fileDescriptor_ws_c6aceb61f76d5c8d, []int{29} } func (m *FromToUserID) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FromToUserID.Unmarshal(m, b) @@ -2191,7 +2191,7 @@ func (m *FriendApplicationAddedTips) Reset() { *m = FriendApplicationAdd func (m *FriendApplicationAddedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationAddedTips) ProtoMessage() {} func (*FriendApplicationAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_b7876bd3c094d103, []int{30} + return fileDescriptor_ws_c6aceb61f76d5c8d, []int{30} } func (m *FriendApplicationAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationAddedTips.Unmarshal(m, b) @@ -2230,7 +2230,7 @@ func (m *FriendApplicationProcessedTips) Reset() { *m = FriendApplicatio func (m *FriendApplicationProcessedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationProcessedTips) ProtoMessage() {} func (*FriendApplicationProcessedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_b7876bd3c094d103, []int{31} + return fileDescriptor_ws_c6aceb61f76d5c8d, []int{31} } func (m *FriendApplicationProcessedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationProcessedTips.Unmarshal(m, b) @@ -2271,7 +2271,7 @@ func (m *FriendAddedTips) Reset() { *m = FriendAddedTips{} } func (m *FriendAddedTips) String() string { return proto.CompactTextString(m) } func (*FriendAddedTips) ProtoMessage() {} func (*FriendAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_b7876bd3c094d103, []int{32} + return fileDescriptor_ws_c6aceb61f76d5c8d, []int{32} } func (m *FriendAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendAddedTips.Unmarshal(m, b) @@ -2324,7 +2324,7 @@ func (m *FriendDeletedTips) Reset() { *m = FriendDeletedTips{} } func (m *FriendDeletedTips) String() string { return proto.CompactTextString(m) } func (*FriendDeletedTips) ProtoMessage() {} func (*FriendDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_b7876bd3c094d103, []int{33} + return fileDescriptor_ws_c6aceb61f76d5c8d, []int{33} } func (m *FriendDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendDeletedTips.Unmarshal(m, b) @@ -2362,7 +2362,7 @@ func (m *BlackAddedTips) Reset() { *m = BlackAddedTips{} } func (m *BlackAddedTips) String() string { return proto.CompactTextString(m) } func (*BlackAddedTips) ProtoMessage() {} func (*BlackAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_b7876bd3c094d103, []int{34} + return fileDescriptor_ws_c6aceb61f76d5c8d, []int{34} } func (m *BlackAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackAddedTips.Unmarshal(m, b) @@ -2400,7 +2400,7 @@ func (m *BlackDeletedTips) Reset() { *m = BlackDeletedTips{} } func (m *BlackDeletedTips) String() string { return proto.CompactTextString(m) } func (*BlackDeletedTips) ProtoMessage() {} func (*BlackDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_b7876bd3c094d103, []int{35} + return fileDescriptor_ws_c6aceb61f76d5c8d, []int{35} } func (m *BlackDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackDeletedTips.Unmarshal(m, b) @@ -2438,7 +2438,7 @@ func (m *FriendInfoChangedTips) Reset() { *m = FriendInfoChangedTips{} } func (m *FriendInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*FriendInfoChangedTips) ProtoMessage() {} func (*FriendInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_b7876bd3c094d103, []int{36} + return fileDescriptor_ws_c6aceb61f76d5c8d, []int{36} } func (m *FriendInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfoChangedTips.Unmarshal(m, b) @@ -2477,7 +2477,7 @@ func (m *SelfInfoUpdatedTips) Reset() { *m = SelfInfoUpdatedTips{} } func (m *SelfInfoUpdatedTips) String() string { return proto.CompactTextString(m) } func (*SelfInfoUpdatedTips) ProtoMessage() {} func (*SelfInfoUpdatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_b7876bd3c094d103, []int{37} + return fileDescriptor_ws_c6aceb61f76d5c8d, []int{37} } func (m *SelfInfoUpdatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SelfInfoUpdatedTips.Unmarshal(m, b) @@ -2546,10 +2546,10 @@ func init() { proto.RegisterType((*SelfInfoUpdatedTips)(nil), "open_im_sdk.SelfInfoUpdatedTips") } -func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_b7876bd3c094d103) } +func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_c6aceb61f76d5c8d) } -var fileDescriptor_ws_b7876bd3c094d103 = []byte{ - // 1922 bytes of a gzipped FileDescriptorProto +var fileDescriptor_ws_c6aceb61f76d5c8d = []byte{ + // 1923 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x59, 0xcd, 0x8f, 0x1b, 0x49, 0x15, 0x57, 0xb7, 0xdd, 0xfe, 0x78, 0xf6, 0x8c, 0x27, 0x9d, 0x64, 0xb6, 0x09, 0xab, 0xc8, 0xb4, 0x56, 0x68, 0x84, 0x20, 0x2b, 0x65, 0x85, 0xb4, 0x04, 0x2d, 0xe0, 0x19, 0xcf, 0xe4, 0x83, 0x38, @@ -2580,95 +2580,95 @@ var fileDescriptor_ws_b7876bd3c094d103 = []byte{ 0x68, 0x65, 0x68, 0x0c, 0x2d, 0x34, 0xd2, 0x41, 0x5a, 0xd6, 0x6c, 0x41, 0xab, 0x0e, 0x56, 0x74, 0x07, 0xf7, 0xa1, 0xf6, 0x90, 0xd0, 0x80, 0x24, 0x3c, 0x60, 0x96, 0x27, 0xa9, 0x0d, 0x8e, 0x5b, 0x9b, 0x1c, 0x77, 0x7f, 0x6b, 0x42, 0xe3, 0x23, 0x9b, 0xd6, 0x85, 0xd6, 0xe9, 0x79, 0x4c, 0xc9, - 0xb3, 0x0c, 0x8b, 0x49, 0x26, 0x53, 0x85, 0xec, 0x5b, 0x60, 0x1d, 0x86, 0x49, 0x7a, 0x2e, 0xb3, - 0x29, 0x08, 0x44, 0x8f, 0xe7, 0x7e, 0x28, 0x52, 0xd8, 0xf4, 0x04, 0x21, 0x23, 0xde, 0x28, 0xf6, - 0x81, 0xbe, 0xb3, 0x9a, 0x6b, 0x3b, 0x6b, 0x3d, 0x30, 0xb0, 0x31, 0x30, 0xff, 0x32, 0x00, 0x4e, - 0x92, 0x90, 0xd0, 0x80, 0x87, 0x66, 0x65, 0x4b, 0x1b, 0xeb, 0x5b, 0x7a, 0x1f, 0x6a, 0x1e, 0x99, - 0xfb, 0xc9, 0x2c, 0x2f, 0x79, 0x41, 0xad, 0x18, 0x54, 0x59, 0x33, 0xe8, 0xfb, 0xb9, 0x1e, 0x94, - 0xc3, 0x43, 0xd5, 0xba, 0x7f, 0xfb, 0x9e, 0xd2,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, 0xc3, 0xc8, 0xf2, 0x98, 0x06, 0x79, 0x90, 0x05, 0xb5, 0x6a, - 0x59, 0x75, 0xcd, 0x32, 0xec, 0xfa, 0x1d, 0xcd, 0x80, 0xff, 0x8b, 0x24, 0xdf, 0x02, 0xfb, 0x21, - 0x49, 0x07, 0xfe, 0xeb, 0x1e, 0x0d, 0x06, 0xdc, 0x24, 0x8f, 0x2c, 0xdd, 0x63, 0xb8, 0xb9, 0x86, - 0xb2, 0x85, 0xe2, 0x9c, 0xf1, 0x16, 0xe7, 0x4c, 0xd5, 0x39, 0xf7, 0x11, 0xb4, 0x55, 0xd5, 0xb8, - 0xc1, 0xc2, 0x40, 0x26, 0xd3, 0x0c, 0x03, 0xfb, 0x00, 0xaa, 0x11, 0x56, 0x82, 0xc9, 0x6d, 0xbe, - 0xa5, 0xd9, 0x3c, 0x60, 0xd3, 0xbe, 0x9f, 0xfa, 0x1e, 0xe7, 0x70, 0x97, 0xd0, 0x41, 0x8b, 0x47, - 0x84, 0x06, 0x03, 0x36, 0xe5, 0xc6, 0x74, 0xa1, 0x35, 0x22, 0xc9, 0x05, 0x77, 0xa3, 0x3c, 0xa1, - 0x14, 0x08, 0x39, 0x8e, 0xa2, 0x90, 0xd0, 0x54, 0x70, 0xc8, 0x6a, 0x54, 0x20, 0x51, 0x49, 0x34, - 0x50, 0x8e, 0xe7, 0x82, 0x76, 0xff, 0x62, 0x41, 0x5d, 0x1a, 0x21, 0xaa, 0x8a, 0x06, 0x65, 0x25, - 0x0a, 0x0a, 0xf1, 0x84, 0x8c, 0x2f, 0xca, 0x59, 0x57, 0x50, 0x58, 0x37, 0x53, 0x79, 0x72, 0xc8, - 0xc9, 0x48, 0x92, 0x68, 0xd3, 0x58, 0xb1, 0x49, 0xd6, 0xa1, 0x02, 0x21, 0x07, 0x53, 0xfc, 0x92, - 0x33, 0x92, 0x02, 0xd9, 0xdf, 0x81, 0x3d, 0xc6, 0xe7, 0xa9, 0xd3, 0xc8, 0x4f, 0x27,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, 0x50, 0x8f, 0x6d, + 0x7d, 0x35, 0xb6, 0x57, 0x8d, 0xce, 0x7f, 0x0d, 0x70, 0x4e, 0xb3, 0x28, 0x1a, 0x10, 0xc6, 0xfc, + 0x29, 0x39, 0x7c, 0x33, 0x22, 0xcb, 0xa7, 0x21, 0x4b, 0x3d, 0xc2, 0x16, 0x98, 0x28, 0x92, 0x24, + 0x47, 0x71, 0x40, 0x78, 0x94, 0x2c, 0x2f, 0x27, 0xd1, 0x45, 0x92, 0x24, 0x68, 0x81, 0xec, 0x06, + 0x82, 0x42, 0x7c, 0xee, 0xbf, 0x1e, 0x91, 0xa5, 0xec, 0x04, 0x92, 0xe2, 0x78, 0x48, 0x11, 0xaf, + 0x4a, 0x9c, 0x53, 0xf6, 0x8f, 0x61, 0x87, 0x85, 0x74, 0x2a, 0x92, 0x2b, 0x8a, 0xa5, 0x72, 0xd0, + 0xba, 0xff, 0x0d, 0x6d, 0x03, 0x3d, 0xf4, 0xd3, 0x73, 0x92, 0x9c, 0xc4, 0xc9, 0xdc, 0x4f, 0x3d, + 0x9d, 0xdf, 0xfe, 0x0a, 0xda, 0x53, 0x2c, 0xd8, 0x7c, 0x7d, 0xed, 0x5d, 0xeb, 0x35, 0x76, 0x77, + 0x0e, 0x9f, 0x6c, 0xf6, 0x9e, 0x9b, 0x9c, 0x69, 0x3b, 0x46, 0x50, 0xd8, 0x35, 0x62, 0xbe, 0xf9, + 0xc2, 0x98, 0x16, 0x05, 0xa2, 0x42, 0x18, 0x36, 0x26, 0xe4, 0x38, 0x95, 0x6e, 0x05, 0xeb, 0x5b, + 0x92, 0xee, 0xaf, 0xf0, 0xb8, 0x2c, 0xd4, 0x5d, 0xa6, 0xe5, 0x0e, 0x34, 0x18, 0x59, 0x1e, 0x92, + 0x69, 0x48, 0x65, 0xdf, 0x29, 0x68, 0x5c, 0xc3, 0xc8, 0xf2, 0x98, 0x06, 0x79, 0x90, 0x05, 0xb5, + 0x6a, 0x59, 0x75, 0xcd, 0x32, 0xec, 0xfa, 0x1d, 0xcd, 0x80, 0xff, 0x8b, 0x24, 0xdf, 0x02, 0xfb, + 0x21, 0x49, 0x07, 0xfe, 0xeb, 0x1e, 0x0d, 0x06, 0xdc, 0x24, 0x8f, 0x2c, 0xdd, 0x63, 0xb8, 0xb9, + 0x86, 0xb2, 0x85, 0xe2, 0x9c, 0xf1, 0x16, 0xe7, 0x4c, 0xd5, 0x39, 0xf7, 0x11, 0xb4, 0x55, 0xd5, + 0xb8, 0xc1, 0xc2, 0x40, 0x26, 0xd3, 0x0c, 0x03, 0xfb, 0x00, 0xaa, 0x11, 0x56, 0x82, 0xc9, 0x6d, + 0xbe, 0xa5, 0xd9, 0x3c, 0x60, 0xd3, 0xbe, 0x9f, 0xfa, 0x1e, 0xe7, 0x70, 0x97, 0xd0, 0x41, 0x8b, + 0x47, 0x84, 0x06, 0x03, 0x36, 0xe5, 0xc6, 0x74, 0xa1, 0x35, 0x22, 0xc9, 0x05, 0x77, 0xa3, 0x3c, + 0xa1, 0x14, 0x08, 0x39, 0x8e, 0xa2, 0x90, 0xd0, 0x54, 0x70, 0xc8, 0x6a, 0x54, 0x20, 0x51, 0x49, + 0x34, 0x50, 0x8e, 0xe7, 0x82, 0x76, 0xff, 0x62, 0x41, 0x5d, 0x1a, 0x21, 0xaa, 0x8a, 0x06, 0x65, + 0x25, 0x0a, 0x0a, 0xf1, 0x84, 0x8c, 0x2f, 0xca, 0x59, 0x57, 0x50, 0x58, 0x37, 0x53, 0x79, 0x72, + 0xc8, 0xc9, 0x48, 0x92, 0x68, 0xd3, 0x58, 0xb1, 0x49, 0xd6, 0xa1, 0x02, 0x21, 0x07, 0x53, 0xfc, + 0x92, 0x33, 0x92, 0x02, 0xd9, 0xdf, 0x81, 0x3d, 0xc6, 0xe7, 0xa9, 0xd3, 0xc8, 0x4f, 0x27, 0x71, + 0x32, 0x97, 0xed, 0xd0, 0xf2, 0xd6, 0x70, 0x3c, 0x24, 0x05, 0x56, 0x4c, 0x71, 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, 0xf4, 0xc3, 0xf8, 0x3c, 0x84, 0x5d, 0xfe, 0x3a, 0xf7, 0xc1, 0xb2, 0xf4, 0x33, 0xd8, 0xe3, + 0x02, 0x3f, 0xa0, 0x8d, 0x3f, 0x87, 0xdb, 0x65, 0xa0, 0xd5, 0x26, 0x78, 0x4d, 0xb9, 0xdf, 0x83, + 0x9b, 0x23, 0x12, 0x4d, 0x50, 0xea, 0xf3, 0x45, 0x50, 0x9c, 0x22, 0x6f, 0x79, 0x38, 0x7c, 0x59, + 0xe3, 0x7f, 0x60, 0x7d, 0xf1, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd4, 0x0b, 0x22, 0x82, 0xd3, + 0x1a, 0x00, 0x00, } diff --git a/pkg/proto/sdk_ws/ws.proto b/pkg/proto/sdk_ws/ws.proto index 0dfde946b..d757cc41f 100644 --- a/pkg/proto/sdk_ws/ws.proto +++ b/pkg/proto/sdk_ws/ws.proto @@ -48,7 +48,7 @@ message UserInfo{ string FaceUrl = 3; int32 Gender = 4; string PhoneNumber = 5; - string Birth = 6; + int64 Birth = 6; string Email = 7; string Ex = 8; int64 CreateTime = 9; From e26c3d946226a2956b89dc06f1f2c0e98209d1ca Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 28 Dec 2021 20:21:09 +0800 Subject: [PATCH 067/337] tidy code --- pkg/base_info/public_struct.go | 2 +- pkg/common/db/mysql_model/im_mysql_model/user_model.go | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pkg/base_info/public_struct.go b/pkg/base_info/public_struct.go index 40f92e822..8993cb0a9 100644 --- a/pkg/base_info/public_struct.go +++ b/pkg/base_info/public_struct.go @@ -11,7 +11,7 @@ type UserInfo struct { FaceUrl string `json:"faceUrl" binding:"omitempty,max=1024"` Gender int32 `json:"gender" binding:"omitempty,oneof=0 1 2"` PhoneNumber string `json:"phoneNumber" binding:"omitempty,max=32"` - Birth int64 `json:"birth" binding:"omitempty,max=16"` + Birth int64 `json:"birth" binding:"omitempty"` Email string `json:"email" binding:"omitempty,max=64"` Ex string `json:"ex" binding:"omitempty,max=1024"` } diff --git a/pkg/common/db/mysql_model/im_mysql_model/user_model.go b/pkg/common/db/mysql_model/im_mysql_model/user_model.go index 4025d2db3..376a4b267 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/user_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/user_model.go @@ -33,6 +33,9 @@ func UserRegister(user User) error { return err } user.CreateTime = time.Now() + if user.Birth != 0 { + user.Birth = utils.UnixSecondToTime(user.Birth) + } err = dbConn.Table("user").Create(&user).Error if err != nil { @@ -80,6 +83,9 @@ func UpdateUserInfo(user User) error { if err != nil { return err } + if user.Birth != 0 { + user.Birth = utils.UnixSecondToTime(user.Birth) + } err = dbConn.Table("user").Where("user_id=?", user.UserID).Update(&user).Error return err } From da73347231dca83348962011896fc6026b4e28c5 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 28 Dec 2021 20:28:01 +0800 Subject: [PATCH 068/337] tidy code --- internal/rpc/auth/auth.go | 3 +++ internal/rpc/user/user.go | 3 +++ pkg/common/db/mysql_model/im_mysql_model/user_model.go | 7 +------ 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/internal/rpc/auth/auth.go b/internal/rpc/auth/auth.go index 70ebfcbc0..d0137d012 100644 --- a/internal/rpc/auth/auth.go +++ b/internal/rpc/auth/auth.go @@ -22,6 +22,9 @@ func (rpc *rpcAuth) UserRegister(_ context.Context, req *pbAuth.UserRegisterReq) log.NewInfo(req.OperationID, "UserRegister args ", req.String()) var user imdb.User utils.CopyStructFields(&user, req.UserInfo) + if req.UserInfo.Birth != 0 { + user.Birth = utils.UnixSecondToTime(req.UserInfo.Birth) + } err := imdb.UserRegister(user) if err != nil { log.NewError(req.OperationID, "UserRegister failed ", err.Error(), user) diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index e0bb07d3c..ad480d6db 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -214,6 +214,9 @@ func (s *userServer) UpdateUserInfo(ctx context.Context, req *pbUser.UpdateUserI var user imdb.User utils.CopyStructFields(&user, req.UserInfo) + if req.UserInfo.Birth != 0 { + user.Birth = utils.UnixSecondToTime(req.UserInfo.Birth) + } err := imdb.UpdateUserInfo(user) if err != nil { log.NewError(req.OperationID, "UpdateUserInfo failed ", err.Error(), user) diff --git a/pkg/common/db/mysql_model/im_mysql_model/user_model.go b/pkg/common/db/mysql_model/im_mysql_model/user_model.go index 376a4b267..01ca6d593 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/user_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/user_model.go @@ -33,9 +33,6 @@ func UserRegister(user User) error { return err } user.CreateTime = time.Now() - if user.Birth != 0 { - user.Birth = utils.UnixSecondToTime(user.Birth) - } err = dbConn.Table("user").Create(&user).Error if err != nil { @@ -83,9 +80,7 @@ func UpdateUserInfo(user User) error { if err != nil { return err } - if user.Birth != 0 { - user.Birth = utils.UnixSecondToTime(user.Birth) - } + err = dbConn.Table("user").Where("user_id=?", user.UserID).Update(&user).Error return err } From 8cfc5925da6f884f56f3f7dfd6f782805eae610c Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Tue, 28 Dec 2021 20:44:19 +0800 Subject: [PATCH 069/337] management modify --- cmd/open_im_api/main.go | 7 +- internal/api/manage/management_user.go | 313 +++++++++++++----------- internal/api/user/user.go | 64 +---- internal/msg_gateway/gate/logic.go | 2 - internal/msg_gateway/gate/rpc_server.go | 8 +- internal/rpc/msg/send_msg.go | 10 +- pkg/base_info/manage_api_struct.go | 30 ++- pkg/base_info/user_api_struct.go | 14 -- pkg/proto/relay/relay.pb.go | 98 ++++---- pkg/proto/relay/relay.proto | 1 + 10 files changed, 263 insertions(+), 284 deletions(-) diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index 1730812bb..773b8be7d 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -26,7 +26,6 @@ func main() { { userRouterGroup.POST("/update_user_info", user.UpdateUserInfo) userRouterGroup.POST("/get_user_info", user.GetUserInfo) - //userRouterGroup.POST("/get_users_online_status", user.GetUsersOnlineStatus) } //friend routing group friendRouterGroup := r.Group("/friend") @@ -87,9 +86,9 @@ func main() { { managementGroup.POST("/delete_user", manage.DeleteUser) managementGroup.POST("/send_msg", manage.ManagementSendMsg) - // managementGroup.POST("/get_all_users_uid", manage.GetAllUsersUid) - // managementGroup.POST("/account_check", manage.AccountCheck) - // managementGroup.POST("/get_users_online_status", manage.GetUsersOnlineStatus) + managementGroup.POST("/get_all_users_uid", manage.GetAllUsersUid) + managementGroup.POST("/account_check", manage.AccountCheck) + managementGroup.POST("/get_users_online_status", manage.GetUsersOnlineStatus) } //Conversation conversationGroup := r.Group("/conversation") diff --git a/internal/api/manage/management_user.go b/internal/api/manage/management_user.go index 1cf8585a1..605bb5ddd 100644 --- a/internal/api/manage/management_user.go +++ b/internal/api/manage/management_user.go @@ -6,154 +6,175 @@ */ package manage -import "github.com/gin-gonic/gin" +import ( + api "Open_IM/pkg/base_info" + "Open_IM/pkg/common/config" + "Open_IM/pkg/common/constant" + "Open_IM/pkg/common/log" + "Open_IM/pkg/common/token_verify" + "Open_IM/pkg/grpc-etcdv3/getcdv3" + pbRelay "Open_IM/pkg/proto/relay" + rpc "Open_IM/pkg/proto/user" + "Open_IM/pkg/utils" + "context" + "github.com/gin-gonic/gin" + "net/http" + "strings" +) func DeleteUser(c *gin.Context) { + params := api.DeleteUsersReq{} + if err := c.BindJSON(¶ms); err != nil { + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) + return + } + req := &rpc.DeleteUsersReq{} + utils.CopyStructFields(req, ¶ms) + var ok bool + ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + if !ok { + log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) + return + } + log.NewInfo(params.OperationID, "DeleteUser args ", req.String()) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName) + client := rpc.NewUserClient(etcdConn) + + RpcResp, err := client.DeleteUsers(context.Background(), req) + if err != nil { + log.NewError(req.OperationID, "call delete users rpc server failed", err.Error()) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call delete users rpc server failed"}) + return + } + failedUserIDList := make([]string, 0) + for _, v := range RpcResp.FailedUserIDList { + failedUserIDList = append(failedUserIDList, v) + } + resp := api.DeleteUsersResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} + resp.FailedUserIDList = failedUserIDList + log.NewInfo(req.OperationID, "DeleteUser api return", resp) + c.JSON(http.StatusOK, resp) +} +func GetAllUsersUid(c *gin.Context) { + params := api.GetAllUsersUidReq{} + if err := c.BindJSON(¶ms); err != nil { + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) + return + } + req := &rpc.GetAllUserIDReq{} + utils.CopyStructFields(req, ¶ms) + var ok bool + ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + if !ok { + log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) + return + } + log.NewInfo(params.OperationID, "GetAllUsersUid args ", req.String()) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName) + client := rpc.NewUserClient(etcdConn) + RpcResp, err := client.GetAllUserID(context.Background(), req) + if err != nil { + log.NewError(req.OperationID, "call GetAllUsersUid users rpc server failed", err.Error()) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call GetAllUsersUid users rpc server failed"}) + return + } + userIDList := make([]string, 0) + for _, v := range RpcResp.UserIDList { + userIDList = append(userIDList, v) + } + resp := api.GetAllUsersUidResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} + resp.UserIDList = userIDList + log.NewInfo(req.OperationID, "GetAllUsersUid api return", resp) + c.JSON(http.StatusOK, resp) } +func AccountCheck(c *gin.Context) { + params := api.AccountCheckReq{} + if err := c.BindJSON(¶ms); err != nil { + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) + return + } + req := &rpc.AccountCheckReq{} + utils.CopyStructFields(req, ¶ms) + var ok bool + ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + if !ok { + log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) + return + } + log.NewInfo(params.OperationID, "AccountCheck args ", req.String()) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName) + client := rpc.NewUserClient(etcdConn) -// -//func DeleteUser(c *gin.Context) { -// params := paramsDeleteUsers{} -// if err := c.BindJSON(¶ms); err != nil { -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) -// return -// } -// log.InfoByKv("DeleteUser req come here", params.OperationID, "DeleteUidList", params.DeleteUidList) -// etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName) -// client := pbUser.NewUserClient(etcdConn) -// //defer etcdConn.Close() -// -// req := &pbUser.DeleteUsersReq{ -// OperationID: params.OperationID, -// DeleteUidList: params.DeleteUidList, -// Token: c.Request.Header.Get("token"), -// } -// RpcResp, err := client.DeleteUsers(context.Background(), req) -// if err != nil { -// log.NewError(req.OperationID, "call delete users rpc server failed", err.Error()) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call delete users rpc server failed"}) -// return -// } -// failedUidList := make([]string, 0) -// for _, v := range RpcResp.FailedUidList { -// failedUidList = append(failedUidList, v) -// } -// log.InfoByKv("call delete user rpc server is success", params.OperationID, "resp args", RpcResp.String()) -// resp := gin.H{"errCode": RpcResp.CommonResp.ErrorCode, "errMsg": RpcResp.CommonResp.ErrorMsg, "failedUidList": RpcResp.FailedUidList} -// c.JSON(http.StatusOK, resp) -//} -//func GetAllUsersUid(c *gin.Context) { -// params := paramsGetAllUsersUid{} -// if err := c.BindJSON(¶ms); err != nil { -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) -// return -// } -// log.InfoByKv("GetAllUsersUid req come here", params.OperationID) -// etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName) -// client := pbUser.NewUserClient(etcdConn) -// //defer etcdConn.Close() -// -// req := &pbUser.GetAllUsersUidReq{ -// OperationID: params.OperationID, -// Token: c.Request.Header.Get("token"), -// } -// RpcResp, err := client.GetAllUsersUid(context.Background(), req) -// if err != nil { -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error(), "uidList": []string{}}) -// return -// } -// log.InfoByKv("call GetAllUsersUid rpc server is success", params.OperationID, "resp args", RpcResp.String()) -// resp := gin.H{"errCode": RpcResp.CommonResp.ErrorCode, "errMsg": RpcResp.CommonResp.ErrorMsg, "uidList": RpcResp.UidList} -// c.JSON(http.StatusOK, resp) -// -//} -//func AccountCheck(c *gin.Context) { -// params := paramsAccountCheck{} -// if err := c.BindJSON(¶ms); err != nil { -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) -// return -// } -// log.InfoByKv("AccountCheck req come here", params.OperationID, params.UserIDList) -// etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName) -// client := pbUser.NewUserClient(etcdConn) -// //defer etcdConn.Close() -// -// req := &pbUser.AccountCheckReq{ -// OperationID: params.OperationID, -// Token: c.Request.Header.Get("token"), -// UidList: params.UserIDList, -// } -// RpcResp, err := client.AccountCheck(context.Background(), req) -// if err != nil { -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) -// return -// } -// log.InfoByKv("call AccountCheck rpc server is success", params.OperationID, "resp args", RpcResp.String()) -// resp := gin.H{"errCode": RpcResp.CommonResp.ErrorCode, "errMsg": RpcResp.CommonResp.ErrorMsg, "result": RpcResp.Result} -// c.JSON(http.StatusOK, resp) -// -//} -//func GetUsersOnlineStatus(c *gin.Context) { -// params := paramsGetUsersOnlineStatus{} -// if err := c.BindJSON(¶ms); err != nil { -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) -// return -// } -// claims, err := token_verify.ParseToken(c.Request.Header.Get("token")) -// if err != nil { -// log.ErrorByKv("parse token failed", params.OperationID, "err", err.Error()) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": err.Error()}) -// return -// } -// if !utils.IsContain(claims.UID, config.Config.Manager.AppManagerUid) { -// log.ErrorByKv(" Authentication failed", params.OperationID, "args", c) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 402, "errMsg": "not authorized"}) -// return -// } -// req := &pbRelay.GetUsersOnlineStatusReq{ -// OperationID: params.OperationID, -// UserIDList: params.UserIDList, -// } -// var wsResult []*pbRelay.GetUsersOnlineStatusResp_SuccessResult -// var respResult []*pbRelay.GetUsersOnlineStatusResp_SuccessResult -// flag := false -// log.NewDebug(params.OperationID, "GetUsersOnlineStatus req come here", params.UserIDList) -// grpcCons := getcdv3.GetConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOnlineMessageRelayName) -// for _, v := range grpcCons { -// client := pbRelay.NewOnlineMessageRelayServiceClient(v) -// reply, err := client.GetUsersOnlineStatus(context.Background(), req) -// if err != nil { -// log.NewError(params.OperationID, "GetUsersOnlineStatus rpc err", req.String(), err.Error()) -// continue -// } else { -// if reply.ErrCode == 0 { -// wsResult = append(wsResult, reply.SuccessResult...) -// } -// } -// } -// log.NewDebug(params.OperationID, "call GetUsersOnlineStatus rpc server is success", wsResult) -// //Online data merge of each node -// for _, v1 := range params.UserIDList { -// flag = false -// temp := new(pbRelay.GetUsersOnlineStatusResp_SuccessResult) -// for _, v2 := range wsResult { -// if v2.UserID == v1 { -// flag = true -// temp.UserID = v1 -// temp.Status = constant.OnlineStatus -// temp.DetailPlatformStatus = append(temp.DetailPlatformStatus, v2.DetailPlatformStatus...) -// } -// -// } -// if !flag { -// temp.UserID = v1 -// temp.Status = constant.OfflineStatus -// } -// respResult = append(respResult, temp) -// } -// log.NewDebug(params.OperationID, "Finished merged data", respResult) -// resp := gin.H{"errCode": 0, "errMsg": "", "successResult": respResult} -// c.JSON(http.StatusOK, resp) -// -//} + RpcResp, err := client.AccountCheck(context.Background(), req) + if err != nil { + log.NewError(req.OperationID, "call AccountCheck users rpc server failed", err.Error()) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call AccountCheck users rpc server failed"}) + return + } + resp := api.AccountCheckResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} + resp.ResultList = RpcResp.ResultList + log.NewInfo(req.OperationID, "AccountCheck api return", resp) + c.JSON(http.StatusOK, resp) +} +func GetUsersOnlineStatus(c *gin.Context) { + params := api.GetUsersOnlineStatusReq{} + if err := c.BindJSON(¶ms); err != nil { + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) + return + } + req := &pbRelay.GetUsersOnlineStatusReq{} + utils.CopyStructFields(req, ¶ms) + var ok bool + ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + if !ok { + log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) + return + } + log.NewInfo(params.OperationID, "GetUsersOnlineStatus args ", req.String()) + var wsResult []*pbRelay.GetUsersOnlineStatusResp_SuccessResult + var respResult []*pbRelay.GetUsersOnlineStatusResp_SuccessResult + flag := false + grpcCons := getcdv3.GetConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOnlineMessageRelayName) + for _, v := range grpcCons { + client := pbRelay.NewOnlineMessageRelayServiceClient(v) + reply, err := client.GetUsersOnlineStatus(context.Background(), req) + if err != nil { + log.NewError(params.OperationID, "GetUsersOnlineStatus rpc err", req.String(), err.Error()) + continue + } else { + if reply.ErrCode == 0 { + wsResult = append(wsResult, reply.SuccessResult...) + } + } + } + log.NewInfo(params.OperationID, "call GetUsersOnlineStatus rpc server is success", wsResult) + //Online data merge of each node + for _, v1 := range params.UserIDList { + flag = false + temp := new(pbRelay.GetUsersOnlineStatusResp_SuccessResult) + for _, v2 := range wsResult { + if v2.UserID == v1 { + flag = true + temp.UserID = v1 + temp.Status = constant.OnlineStatus + temp.DetailPlatformStatus = append(temp.DetailPlatformStatus, v2.DetailPlatformStatus...) + } + + } + if !flag { + temp.UserID = v1 + temp.Status = constant.OfflineStatus + } + respResult = append(respResult, temp) + } + resp := api.GetUsersOnlineStatusResp{CommResp: api.CommResp{ErrCode: 0, ErrMsg: ""}} + resp.SuccessResult = respResult + log.NewInfo(req.OperationID, "GetUsersOnlineStatus api return", resp) + c.JSON(http.StatusOK, resp) + +} diff --git a/internal/api/user/user.go b/internal/api/user/user.go index b6d550f1d..c312e462d 100644 --- a/internal/api/user/user.go +++ b/internal/api/user/user.go @@ -14,68 +14,6 @@ import ( "strings" ) -// -//func GetUsersOnlineStatus(c *gin.Context) { -// params := api.GetUsersOnlineStatusReq{} -// if err := c.BindJSON(¶ms); err != nil { -// log.NewError(params.OperationID, "bind json failed ", err.Error(), c) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) -// return -// } -// -// if params.Secret != config.Config.Secret { -// log.NewError(params.OperationID, "parse token failed ", params.Secret, config.Config.Secret) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "secret failed"}) -// return -// } -// -// req := &pbRelay.GetUsersOnlineStatusReq{ -// OperationID: params.OperationID, -// UserIDList: params.UserIDList, -// } -// var wsResult []*rpc.GetUsersOnlineStatusResp_SuccessResult -// var respResult []*rpc.GetUsersOnlineStatusResp_SuccessResult -// flag := false -// log.NewDebug(params.OperationID, "GetUsersOnlineStatus req come here", params.UserIDList) -// -// grpcCons := getcdv3.GetConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOnlineMessageRelayName) -// for _, v := range grpcCons { -// client := rpc.NewOnlineMessageRelayServiceClient(v) -// reply, err := client.GetUsersOnlineStatus(context.Background(), req) -// if err != nil { -// log.NewError(params.OperationID, "GetUsersOnlineStatus rpc err", req.String(), err.Error()) -// continue -// } else { -// if reply.ErrCode == 0 { -// wsResult = append(wsResult, reply.SuccessResult...) -// } -// } -// } -// log.NewDebug(params.OperationID, "call GetUsersOnlineStatus rpc server is success", wsResult) -// //Online data merge of each node -// for _, v1 := range params.UserIDList { -// flag = false -// temp := new(pbRelay.GetUsersOnlineStatusResp_SuccessResult) -// for _, v2 := range wsResult { -// if v2.UserID == v1 { -// flag = true -// temp.UserID = v1 -// temp.Status = constant.OnlineStatus -// temp.DetailPlatformStatus = append(temp.DetailPlatformStatus, v2.DetailPlatformStatus...) -// } -// } -// if !flag { -// temp.UserID = v1 -// temp.Status = constant.OfflineStatus -// } -// respResult = append(respResult, temp) -// } -// log.NewDebug(params.OperationID, "Finished merged data", respResult) -// resp := gin.H{"errCode": 0, "errMsg": "", "data": respResult} -// -// c.JSON(http.StatusOK, resp) -//} - func GetUserInfo(c *gin.Context) { params := api.GetUserInfoReq{} if err := c.BindJSON(¶ms); err != nil { @@ -83,7 +21,7 @@ func GetUserInfo(c *gin.Context) { return } req := &rpc.GetUserInfoReq{} - utils.CopyStructFields(&req, params) + utils.CopyStructFields(req, ¶ms) var ok bool ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { diff --git a/internal/msg_gateway/gate/logic.go b/internal/msg_gateway/gate/logic.go index fce7448bd..c7f0ff8a1 100644 --- a/internal/msg_gateway/gate/logic.go +++ b/internal/msg_gateway/gate/logic.go @@ -151,7 +151,6 @@ func (ws *WServer) pullMsgResp(conn *UserConn, m *Req, pb *sdk_ws.PullMessageRes } c, err := proto.Marshal(&mReplyData) log.NewInfo(m.OperationID, "test info is ", len(mReplyData.SingleUserMsg), mReplyData.SingleUserMsg) - mReply := Resp{ ReqIdentifier: m.ReqIdentifier, MsgIncr: m.MsgIncr, @@ -162,7 +161,6 @@ func (ws *WServer) pullMsgResp(conn *UserConn, m *Req, pb *sdk_ws.PullMessageRes } log.NewInfo(m.OperationID, "pullMsgResp all data is ", mReply.ReqIdentifier, mReply.MsgIncr, mReply.ErrCode, mReply.ErrMsg, len(mReply.Data)) - ws.sendMsg(conn, mReply) } diff --git a/internal/msg_gateway/gate/rpc_server.go b/internal/msg_gateway/gate/rpc_server.go index 4c9c03f34..450cb1c73 100644 --- a/internal/msg_gateway/gate/rpc_server.go +++ b/internal/msg_gateway/gate/rpc_server.go @@ -4,6 +4,7 @@ import ( "Open_IM/pkg/common/config" "Open_IM/pkg/common/constant" "Open_IM/pkg/common/log" + "Open_IM/pkg/common/token_verify" "Open_IM/pkg/grpc-etcdv3/getcdv3" pbRelay "Open_IM/pkg/proto/relay" "Open_IM/pkg/utils" @@ -105,7 +106,11 @@ func (r *RPCServer) OnlinePushMsg(_ context.Context, in *pbRelay.OnlinePushMsgRe }, nil } func (r *RPCServer) GetUsersOnlineStatus(_ context.Context, req *pbRelay.GetUsersOnlineStatusReq) (*pbRelay.GetUsersOnlineStatusResp, error) { - log.NewDebug(req.OperationID, "rpc GetUsersOnlineStatus arrived server", req.String()) + log.NewInfo(req.OperationID, "rpc GetUsersOnlineStatus arrived server", req.String()) + if !token_verify.IsMangerUserID(req.OpUserID) { + log.NewError(req.OperationID, "no permission GetUsersOnlineStatus ", req.OpUserID) + return &pbRelay.GetUsersOnlineStatusResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil + } var resp pbRelay.GetUsersOnlineStatusResp for _, userID := range req.UserIDList { platformList := genPlatformArray() @@ -125,6 +130,7 @@ func (r *RPCServer) GetUsersOnlineStatus(_ context.Context, req *pbRelay.GetUser resp.SuccessResult = append(resp.SuccessResult, temp) } } + log.NewInfo(req.OperationID, "GetUsersOnlineStatus rpc return ", resp.String()) return &resp, nil } func sendMsgToUser(conn *UserConn, bMsg []byte, in *pbRelay.OnlinePushMsgReq, RecvPlatForm, RecvID string) (ResultCode int64) { diff --git a/internal/rpc/msg/send_msg.go b/internal/rpc/msg/send_msg.go index 4c0c3ad2d..bf371f0a2 100644 --- a/internal/rpc/msg/send_msg.go +++ b/internal/rpc/msg/send_msg.go @@ -141,10 +141,12 @@ func (rpc *rpcChat) SendMsg(_ context.Context, pb *pbChat.SendMsgReq) (*pbChat.S return returnMsg(&replay, pb, 201, "kafka send msg err", "", 0) } } - err2 := rpc.sendMsgToKafka(&msgToMQ, msgToMQ.MsgData.SendID) - if err2 != nil { - log.NewError(msgToMQ.OperationID, "kafka send msg err:SendID", msgToMQ.MsgData.SendID, msgToMQ.String()) - return returnMsg(&replay, pb, 201, "kafka send msg err", "", 0) + if msgToMQ.MsgData.SendID != msgToMQ.MsgData.RecvID { //Filter messages sent to yourself + err2 := rpc.sendMsgToKafka(&msgToMQ, msgToMQ.MsgData.SendID) + if err2 != nil { + log.NewError(msgToMQ.OperationID, "kafka send msg err:SendID", msgToMQ.MsgData.SendID, msgToMQ.String()) + return returnMsg(&replay, pb, 201, "kafka send msg err", "", 0) + } } return returnMsg(&replay, pb, 0, "", msgToMQ.MsgData.ServerMsgID, msgToMQ.MsgData.SendTime) case constant.GroupChatType: diff --git a/pkg/base_info/manage_api_struct.go b/pkg/base_info/manage_api_struct.go index 3a00437a7..862706187 100644 --- a/pkg/base_info/manage_api_struct.go +++ b/pkg/base_info/manage_api_struct.go @@ -1,6 +1,10 @@ package base_info -import open_im_sdk "Open_IM/pkg/proto/sdk_ws" +import ( + pbRelay "Open_IM/pkg/proto/relay" + open_im_sdk "Open_IM/pkg/proto/sdk_ws" + pbUser "Open_IM/pkg/proto/user" +) type paramsManagementSendMsg struct { OperationID string `json:"operationID" binding:"required"` @@ -62,21 +66,37 @@ type FileElem struct { FileSize int64 `mapstructure:"fileSize"` } -type paramsDeleteUsers struct { +type DeleteUsersReq struct { OperationID string `json:"operationID" binding:"required"` DeleteUidList []string `json:"deleteUidList" binding:"required"` } -type paramsGetAllUsersUid struct { +type DeleteUsersResp struct { + CommResp + FailedUserIDList []string `json:"data"` +} +type GetAllUsersUidReq struct { OperationID string `json:"operationID" binding:"required"` } -type paramsGetUsersOnlineStatus struct { +type GetAllUsersUidResp struct { + CommResp + UserIDList []string `json:"data"` +} +type GetUsersOnlineStatusReq struct { OperationID string `json:"operationID" binding:"required"` UserIDList []string `json:"userIDList" binding:"required,lte=200"` } -type paramsAccountCheck struct { +type GetUsersOnlineStatusResp struct { + CommResp + SuccessResult []*pbRelay.GetUsersOnlineStatusResp_SuccessResult `json:"data"` +} +type AccountCheckReq struct { OperationID string `json:"operationID" binding:"required"` UserIDList []string `json:"userIDList" binding:"required,lte=100"` } +type AccountCheckResp struct { + CommResp + ResultList []*pbUser.AccountCheckResp_SingleUserStatus `json:"data"` +} type AtElem struct { Text string `mapstructure:"text"` diff --git a/pkg/base_info/user_api_struct.go b/pkg/base_info/user_api_struct.go index 2e736e97f..ff4695011 100644 --- a/pkg/base_info/user_api_struct.go +++ b/pkg/base_info/user_api_struct.go @@ -4,20 +4,6 @@ import ( open_im_sdk "Open_IM/pkg/proto/sdk_ws" ) -type GetUsersOnlineStatusReq struct { - OperationID string `json:"operationID" binding:"required"` - UserIDList []string `json:"userIDList" binding:"required,lte=200"` - Secret string `json:"secret" binding:"required,max=32"` -} -type OnlineStatus struct { - UserID string `json:"userID"` - Status string `json:"status"` -} -type GetUsersOnlineStatusResp struct { - CommResp - OnlineStatusList []*OnlineStatus `json:"data"` -} - type GetUserInfoReq struct { OperationID string `json:"operationID" binding:"required"` UserIDList []string `json:"userIDList" binding:"required"` diff --git a/pkg/proto/relay/relay.pb.go b/pkg/proto/relay/relay.pb.go index 02eb997e0..c2a3cda0c 100644 --- a/pkg/proto/relay/relay.pb.go +++ b/pkg/proto/relay/relay.pb.go @@ -36,7 +36,7 @@ func (m *OnlinePushMsgReq) Reset() { *m = OnlinePushMsgReq{} } func (m *OnlinePushMsgReq) String() string { return proto.CompactTextString(m) } func (*OnlinePushMsgReq) ProtoMessage() {} func (*OnlinePushMsgReq) Descriptor() ([]byte, []int) { - return fileDescriptor_relay_f80d9497f96c724f, []int{0} + return fileDescriptor_relay_de3bbbc2d62c0c49, []int{0} } func (m *OnlinePushMsgReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OnlinePushMsgReq.Unmarshal(m, b) @@ -81,7 +81,7 @@ func (m *OnlinePushMsgResp) Reset() { *m = OnlinePushMsgResp{} } func (m *OnlinePushMsgResp) String() string { return proto.CompactTextString(m) } func (*OnlinePushMsgResp) ProtoMessage() {} func (*OnlinePushMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_relay_f80d9497f96c724f, []int{1} + return fileDescriptor_relay_de3bbbc2d62c0c49, []int{1} } func (m *OnlinePushMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OnlinePushMsgResp.Unmarshal(m, b) @@ -121,7 +121,7 @@ func (m *SingleMsgToUser) Reset() { *m = SingleMsgToUser{} } func (m *SingleMsgToUser) String() string { return proto.CompactTextString(m) } func (*SingleMsgToUser) ProtoMessage() {} func (*SingleMsgToUser) Descriptor() ([]byte, []int) { - return fileDescriptor_relay_f80d9497f96c724f, []int{2} + return fileDescriptor_relay_de3bbbc2d62c0c49, []int{2} } func (m *SingleMsgToUser) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SingleMsgToUser.Unmarshal(m, b) @@ -165,6 +165,7 @@ func (m *SingleMsgToUser) GetRecvPlatFormID() int32 { type GetUsersOnlineStatusReq struct { UserIDList []string `protobuf:"bytes,1,rep,name=userIDList" json:"userIDList,omitempty"` OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` + OpUserID string `protobuf:"bytes,3,opt,name=opUserID" json:"opUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -174,7 +175,7 @@ func (m *GetUsersOnlineStatusReq) Reset() { *m = GetUsersOnlineStatusReq func (m *GetUsersOnlineStatusReq) String() string { return proto.CompactTextString(m) } func (*GetUsersOnlineStatusReq) ProtoMessage() {} func (*GetUsersOnlineStatusReq) Descriptor() ([]byte, []int) { - return fileDescriptor_relay_f80d9497f96c724f, []int{3} + return fileDescriptor_relay_de3bbbc2d62c0c49, []int{3} } func (m *GetUsersOnlineStatusReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUsersOnlineStatusReq.Unmarshal(m, b) @@ -208,6 +209,13 @@ func (m *GetUsersOnlineStatusReq) GetOperationID() string { return "" } +func (m *GetUsersOnlineStatusReq) GetOpUserID() string { + if m != nil { + return m.OpUserID + } + return "" +} + type GetUsersOnlineStatusResp struct { ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` @@ -222,7 +230,7 @@ func (m *GetUsersOnlineStatusResp) Reset() { *m = GetUsersOnlineStatusRe func (m *GetUsersOnlineStatusResp) String() string { return proto.CompactTextString(m) } func (*GetUsersOnlineStatusResp) ProtoMessage() {} func (*GetUsersOnlineStatusResp) Descriptor() ([]byte, []int) { - return fileDescriptor_relay_f80d9497f96c724f, []int{4} + return fileDescriptor_relay_de3bbbc2d62c0c49, []int{4} } func (m *GetUsersOnlineStatusResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUsersOnlineStatusResp.Unmarshal(m, b) @@ -284,7 +292,7 @@ func (m *GetUsersOnlineStatusResp_SuccessDetail) Reset() { func (m *GetUsersOnlineStatusResp_SuccessDetail) String() string { return proto.CompactTextString(m) } func (*GetUsersOnlineStatusResp_SuccessDetail) ProtoMessage() {} func (*GetUsersOnlineStatusResp_SuccessDetail) Descriptor() ([]byte, []int) { - return fileDescriptor_relay_f80d9497f96c724f, []int{4, 0} + return fileDescriptor_relay_de3bbbc2d62c0c49, []int{4, 0} } func (m *GetUsersOnlineStatusResp_SuccessDetail) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUsersOnlineStatusResp_SuccessDetail.Unmarshal(m, b) @@ -331,7 +339,7 @@ func (m *GetUsersOnlineStatusResp_FailedDetail) Reset() { *m = GetUsersO func (m *GetUsersOnlineStatusResp_FailedDetail) String() string { return proto.CompactTextString(m) } func (*GetUsersOnlineStatusResp_FailedDetail) ProtoMessage() {} func (*GetUsersOnlineStatusResp_FailedDetail) Descriptor() ([]byte, []int) { - return fileDescriptor_relay_f80d9497f96c724f, []int{4, 1} + return fileDescriptor_relay_de3bbbc2d62c0c49, []int{4, 1} } func (m *GetUsersOnlineStatusResp_FailedDetail) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUsersOnlineStatusResp_FailedDetail.Unmarshal(m, b) @@ -387,7 +395,7 @@ func (m *GetUsersOnlineStatusResp_SuccessResult) Reset() { func (m *GetUsersOnlineStatusResp_SuccessResult) String() string { return proto.CompactTextString(m) } func (*GetUsersOnlineStatusResp_SuccessResult) ProtoMessage() {} func (*GetUsersOnlineStatusResp_SuccessResult) Descriptor() ([]byte, []int) { - return fileDescriptor_relay_f80d9497f96c724f, []int{4, 2} + return fileDescriptor_relay_de3bbbc2d62c0c49, []int{4, 2} } func (m *GetUsersOnlineStatusResp_SuccessResult) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUsersOnlineStatusResp_SuccessResult.Unmarshal(m, b) @@ -544,42 +552,42 @@ var _OnlineMessageRelayService_serviceDesc = grpc.ServiceDesc{ Metadata: "relay/relay.proto", } -func init() { proto.RegisterFile("relay/relay.proto", fileDescriptor_relay_f80d9497f96c724f) } +func init() { proto.RegisterFile("relay/relay.proto", fileDescriptor_relay_de3bbbc2d62c0c49) } -var fileDescriptor_relay_f80d9497f96c724f = []byte{ - // 531 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x5f, 0x6f, 0xd2, 0x50, - 0x14, 0x4f, 0x65, 0x6c, 0x72, 0x18, 0x4e, 0x6e, 0xc8, 0x56, 0xfb, 0x80, 0xc8, 0x83, 0x21, 0x46, - 0x4b, 0x82, 0x8f, 0x3e, 0x98, 0x6c, 0xcd, 0x0c, 0x89, 0x0d, 0xe4, 0xa2, 0xd1, 0xe8, 0x03, 0xb9, - 0xa3, 0x67, 0xb5, 0xa1, 0xd0, 0x72, 0xcf, 0xed, 0x16, 0xbf, 0x8e, 0x5f, 0x42, 0x3f, 0x9e, 0xe9, - 0xbd, 0x05, 0x0b, 0x61, 0x2e, 0x7b, 0x21, 0x9c, 0x3f, 0xf7, 0xf7, 0xaf, 0xed, 0x85, 0xa6, 0xc4, - 0x58, 0xfc, 0xec, 0xeb, 0x5f, 0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0x35, 0xf8, 0x63, 0xc1, 0x33, 0x73, 0xd0, 0x47, 0x22, 0x11, 0x22, 0xcf, 0x31, 0x27, - 0x28, 0x6f, 0xa2, 0x19, 0xb2, 0x73, 0x68, 0x6c, 0x7d, 0x68, 0xec, 0xac, 0xe0, 0xdc, 0xfd, 0xc8, - 0x1d, 0x7b, 0xff, 0x80, 0x52, 0xf6, 0x05, 0x5a, 0xfb, 0x14, 0xb2, 0xf6, 0x7f, 0xe5, 0xaf, 0x9c, - 0xe7, 0xf7, 0xd8, 0x3b, 0x6f, 0x7e, 0x3b, 0x71, 0xcd, 0x35, 0xf5, 0x2e, 0xbd, 0xd2, 0xb2, 0xaf, - 0x0e, 0xf5, 0x2d, 0xf4, 0xf6, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x81, 0xe6, 0x3c, 0x27, 0xc4, - 0x04, 0x00, 0x00, +var fileDescriptor_relay_de3bbbc2d62c0c49 = []byte{ + // 539 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x5f, 0x8f, 0xd2, 0x40, + 0x10, 0x4f, 0xe5, 0xfe, 0xc8, 0x70, 0x78, 0xb2, 0x21, 0x77, 0xb5, 0x0f, 0x88, 0x3c, 0x18, 0x62, + 0xb4, 0x24, 0xf8, 0xe8, 0x83, 0xc9, 0x5d, 0x73, 0x86, 0xc4, 0x06, 0xb2, 0x78, 0xd1, 0xf8, 0x42, + 0x7a, 0x74, 0xae, 0x36, 0x14, 0xba, 0xec, 0x6c, 0x8f, 0xf8, 0x75, 0xfc, 0x12, 0xfa, 0xf1, 0x4c, + 0x77, 0x0b, 0x16, 0xc2, 0x79, 0xb9, 0x17, 0xc2, 0xcc, 0xec, 0xfc, 0xfe, 0xb5, 0x5d, 0x68, 0x48, + 0x4c, 0x82, 0x9f, 0x3d, 0xfd, 0xeb, 0x0a, 0x99, 0xaa, 0x94, 0x1d, 0xea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a, 0xec, 0xf6, 0x42, 0xf5, 0xff, 0x58, 0xf0, 0xc2, + 0x2c, 0xfa, 0x48, 0x14, 0x44, 0xc8, 0x73, 0xcc, 0x31, 0xca, 0xbb, 0x78, 0x8a, 0xec, 0x02, 0xea, + 0x5b, 0x1f, 0x21, 0x3b, 0x2f, 0x38, 0x77, 0x2f, 0x00, 0xc7, 0xde, 0x3f, 0x20, 0xc1, 0xbe, 0x42, + 0x73, 0x9f, 0x42, 0xd6, 0xfa, 0xaf, 0xfc, 0xa5, 0xf3, 0xf2, 0x01, 0x7b, 0x17, 0x8d, 0xef, 0xa7, + 0xae, 0xb9, 0xc2, 0x3e, 0x88, 0x1b, 0x2d, 0xfb, 0xe6, 0x48, 0xdf, 0x50, 0xef, 0xff, 0x06, 0x00, + 0x00, 0xff, 0xff, 0x6d, 0x5a, 0x23, 0x8f, 0xe0, 0x04, 0x00, 0x00, } diff --git a/pkg/proto/relay/relay.proto b/pkg/proto/relay/relay.proto index c3215db3f..fc95a4f7b 100644 --- a/pkg/proto/relay/relay.proto +++ b/pkg/proto/relay/relay.proto @@ -29,6 +29,7 @@ message SingleMsgToUser{ message GetUsersOnlineStatusReq{ repeated string userIDList = 1; string operationID = 2; + string opUserID = 3; } message GetUsersOnlineStatusResp{ int32 errCode = 1; From 39ceb203327c3a0ee93bf0227b6968d0cdb348fd Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 28 Dec 2021 21:03:03 +0800 Subject: [PATCH 070/337] tidy code --- pkg/common/db/mysql_model/im_mysql_model/user_model.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/common/db/mysql_model/im_mysql_model/user_model.go b/pkg/common/db/mysql_model/im_mysql_model/user_model.go index 01ca6d593..5dd6fb53f 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/user_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/user_model.go @@ -15,10 +15,13 @@ func init() { user, err := GetUserByUserID(v) if err != nil { fmt.Println("GetUserByUserID failed ", err.Error(), v, user) + }else{ continue } var appMgr User + appMgr.UserID = v appMgr.Nickname = "AppManager" + utils.IntToString(k+1) + appMgr.AppMangerLevel = 2 err = UserRegister(appMgr) if err != nil { fmt.Println("AppManager insert error", err.Error()) From 47a3c3c2535b456a8b44f9bdd3bbe77227460897 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 28 Dec 2021 21:17:41 +0800 Subject: [PATCH 071/337] tidy code --- internal/rpc/group/group.go | 8 +++---- pkg/common/constant/constant.go | 22 ++++++++++++++----- .../im_mysql_model/group_member_model.go | 6 ++++- .../im_mysql_model/group_request_model.go | 3 ++- .../mysql_model/im_mysql_model/user_model.go | 9 +++++--- 5 files changed, 34 insertions(+), 14 deletions(-) diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 1192155ea..ba5a348f9 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -94,7 +94,7 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR } //to group member - groupMember := imdb.GroupMember{GroupID: groupId, RoleLevel: 1} + groupMember := imdb.GroupMember{GroupID: groupId, RoleLevel: constant.GroupOwner} utils.CopyStructFields(&groupMember, us) err = im_mysql_model.InsertIntoGroupMember(groupMember) if err != nil { @@ -114,7 +114,7 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), user.UserID) continue } - if user.RoleLevel == 1 { + if user.RoleLevel == constant.GroupOwner { log.NewError(req.OperationID, "only one owner, failed ", user) continue } @@ -224,7 +224,7 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite var toInsertInfo imdb.GroupMember utils.CopyStructFields(&toInsertInfo, toUserInfo) toInsertInfo.GroupID = req.GroupID - toInsertInfo.RoleLevel = 0 + toInsertInfo.RoleLevel = constant.GroupOrdinaryUsers err = imdb.InsertIntoGroupMember(toInsertInfo) if err != nil { log.NewError(req.OperationID, "InsertIntoGroupMember failed ", req.GroupID, toUserInfo.UserID, toUserInfo.Nickname, toUserInfo.FaceUrl) @@ -331,7 +331,7 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou groupOwnerUserID := "" for _, v := range ownerList { - if v.RoleLevel == 1 { + if v.RoleLevel == constant.GroupOwner { groupOwnerUserID = v.UserID } } diff --git a/pkg/common/constant/constant.go b/pkg/common/constant/constant.go index d8aa4a965..aa2f12c45 100644 --- a/pkg/common/constant/constant.go +++ b/pkg/common/constant/constant.go @@ -3,12 +3,12 @@ package constant const ( //group admin - OrdinaryMember = 0 - GroupOwner = 1 - Administrator = 2 + // OrdinaryMember = 0 + // GroupOwner = 1 + // Administrator = 2 //group application - Application = 0 - AgreeApplication = 1 + // Application = 0 + // AgreeApplication = 1 //friend related BlackListFlag = 1 @@ -117,4 +117,16 @@ var ContentType2PushContent = map[int64]string{ Common: "你收到一条新消息", } +const ( + AppOrdinaryUsers = 1 + AppAdmin = 2 + + GroupOrdinaryUsers = 1 + GroupOwner = 2 + GroupAdmin = 3 + + Male = 1 + Female = 2 +) + const FriendAcceptTip = "You have successfully become friends, so start chatting" diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go index 84175c0a1..bcc087fb0 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go @@ -1,6 +1,7 @@ package im_mysql_model import ( + "Open_IM/pkg/common/constant" "Open_IM/pkg/common/db" "time" ) @@ -23,6 +24,9 @@ func InsertIntoGroupMember(toInsertInfo GroupMember) error { return err } toInsertInfo.JoinSource = time.Now() + if toInsertInfo.RoleLevel == 0 { + toInsertInfo.RoleLevel = constant.GroupOrdinaryUsers + } err = dbConn.Table("group_member").Create(toInsertInfo).Error if err != nil { return err @@ -138,7 +142,7 @@ func GetGroupOwnerInfoByGroupID(groupID string) (*GroupMember, error) { return nil, err } for _, v := range omList { - if v.RoleLevel == 1 { + if v.RoleLevel == constant.GroupOwner { return &v, nil } } diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go index e8f64208b..cd6cf641f 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go @@ -1,6 +1,7 @@ package im_mysql_model import ( + "Open_IM/pkg/common/constant" "Open_IM/pkg/common/db" "time" ) @@ -88,7 +89,7 @@ func GetGroupApplicationList(userID string) ([]GroupRequest, error) { return nil, err } for _, v := range memberList { - if v.RoleLevel > 0 { + if v.RoleLevel > constant.GroupOrdinaryUsers { list, err := GetGroupRequestByGroupID(v.GroupID) if err != nil { continue diff --git a/pkg/common/db/mysql_model/im_mysql_model/user_model.go b/pkg/common/db/mysql_model/im_mysql_model/user_model.go index 5dd6fb53f..613698429 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/user_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/user_model.go @@ -2,6 +2,7 @@ package im_mysql_model import ( "Open_IM/pkg/common/config" + "Open_IM/pkg/common/constant" "Open_IM/pkg/common/db" "Open_IM/pkg/utils" "fmt" @@ -15,13 +16,13 @@ func init() { user, err := GetUserByUserID(v) if err != nil { fmt.Println("GetUserByUserID failed ", err.Error(), v, user) - }else{ + } else { continue } var appMgr User appMgr.UserID = v appMgr.Nickname = "AppManager" + utils.IntToString(k+1) - appMgr.AppMangerLevel = 2 + appMgr.AppMangerLevel = constant.AppAdmin err = UserRegister(appMgr) if err != nil { fmt.Println("AppManager insert error", err.Error()) @@ -36,7 +37,9 @@ func UserRegister(user User) error { return err } user.CreateTime = time.Now() - + if user.AppMangerLevel == 0 { + user.AppMangerLevel = constant.AppOrdinaryUsers + } err = dbConn.Table("user").Create(&user).Error if err != nil { return err From ec144da8cedefb6ab297f754b88b7f384a48493c Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 09:32:35 +0800 Subject: [PATCH 072/337] Refactor code --- pkg/common/db/mysql_model/im_mysql_model/user_model.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/common/db/mysql_model/im_mysql_model/user_model.go b/pkg/common/db/mysql_model/im_mysql_model/user_model.go index 613698429..d23c6f228 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/user_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/user_model.go @@ -25,7 +25,7 @@ func init() { appMgr.AppMangerLevel = constant.AppAdmin err = UserRegister(appMgr) if err != nil { - fmt.Println("AppManager insert error", err.Error()) + fmt.Println("AppManager insert error", err.Error(), appMgr, "time: ", appMgr.Birth.Unix()) } } @@ -40,6 +40,7 @@ func UserRegister(user User) error { if user.AppMangerLevel == 0 { user.AppMangerLevel = constant.AppOrdinaryUsers } + utils.UnixSecondToTime(0) err = dbConn.Table("user").Create(&user).Error if err != nil { return err From 3737e889ea0bd9e812346603ba74b0c1b1033dcb Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 09:36:48 +0800 Subject: [PATCH 073/337] Refactor code --- pkg/common/db/mysql_model/im_mysql_model/user_model.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/common/db/mysql_model/im_mysql_model/user_model.go b/pkg/common/db/mysql_model/im_mysql_model/user_model.go index d23c6f228..298487c38 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/user_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/user_model.go @@ -40,7 +40,9 @@ func UserRegister(user User) error { if user.AppMangerLevel == 0 { user.AppMangerLevel = constant.AppOrdinaryUsers } - utils.UnixSecondToTime(0) + if user.Birth.Unix() < 0 { + user.Birth = utils.UnixSecondToTime(0) + } err = dbConn.Table("user").Create(&user).Error if err != nil { return err From b30cb5254ec06666215507c30f87aea5eb996eb7 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 10:18:10 +0800 Subject: [PATCH 074/337] Refactor code --- internal/api/friend/friend.go | 51 ++++++++++++++---------------- pkg/base_info/friend_api_struct.go | 4 +-- pkg/utils/utils.go | 39 ----------------------- 3 files changed, 26 insertions(+), 68 deletions(-) diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go index 85ec67e5e..7c2d2bde2 100644 --- a/internal/api/friend/friend.go +++ b/internal/api/friend/friend.go @@ -21,7 +21,7 @@ func AddBlacklist(c *gin.Context) { c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &rpc.AddBlacklistReq{} + req := &rpc.AddBlacklistReq{CommID: &rpc.CommID{}} utils.CopyStructFields(req.CommID, ¶ms) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) @@ -84,8 +84,8 @@ func AddFriend(c *gin.Context) { c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &rpc.AddFriendReq{} - utils.CopyStructFields(req.CommID, params) + req := &rpc.AddFriendReq{CommID: &rpc.CommID{}} + utils.CopyStructFields(req.CommID, ¶ms) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { @@ -116,7 +116,7 @@ func AddFriendResponse(c *gin.Context) { c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &rpc.AddFriendResponseReq{} + req := &rpc.AddFriendResponseReq{CommID: &rpc.CommID{}} utils.CopyStructFields(req.CommID, ¶ms) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) @@ -125,7 +125,7 @@ func AddFriendResponse(c *gin.Context) { c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) return } - utils.CopyStructFields(&req, ¶ms) + utils.CopyStructFields(req, ¶ms) log.NewInfo(req.CommID.OperationID, "AddFriendResponse args ", req.String()) etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) @@ -149,7 +149,7 @@ func DeleteFriend(c *gin.Context) { c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &rpc.DeleteFriendReq{} + req := &rpc.DeleteFriendReq{CommID: &rpc.CommID{}} utils.CopyStructFields(req.CommID, ¶ms) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) @@ -181,7 +181,7 @@ func GetBlacklist(c *gin.Context) { c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &rpc.GetBlacklistReq{} + req := &rpc.GetBlacklistReq{CommID: &rpc.CommID{}} utils.CopyStructFields(req.CommID, ¶ms) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) @@ -218,8 +218,8 @@ func SetFriendComment(c *gin.Context) { c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &rpc.SetFriendCommentReq{} - utils.CopyStructFields(req.CommID, params) + req := &rpc.SetFriendCommentReq{CommID: &rpc.CommID{}} + utils.CopyStructFields(req.CommID, ¶ms) req.Remark = params.Remark var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) @@ -251,8 +251,8 @@ func RemoveBlacklist(c *gin.Context) { c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &rpc.RemoveBlacklistReq{} - utils.CopyStructFields(req.CommID, params) + req := &rpc.RemoveBlacklistReq{CommID: &rpc.CommID{}} + utils.CopyStructFields(req.CommID, ¶ms) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { @@ -282,8 +282,8 @@ func IsFriend(c *gin.Context) { c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &rpc.IsFriendReq{} - utils.CopyStructFields(req.CommID, params) + req := &rpc.IsFriendReq{CommID: &rpc.CommID{}} + utils.CopyStructFields(req.CommID, ¶ms) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { @@ -347,8 +347,8 @@ func GetFriendList(c *gin.Context) { c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &rpc.GetFriendListReq{} - utils.CopyStructFields(req.CommID, params) + req := &rpc.GetFriendListReq{CommID: &rpc.CommID{}} + utils.CopyStructFields(req.CommID, ¶ms) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { @@ -367,9 +367,9 @@ func GetFriendList(c *gin.Context) { return } - resp := api.GetFriendListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}} - utils.CopyStructFields(&resp, RpcResp) + resp := api.GetFriendListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, FriendInfoList: RpcResp.FriendInfoList} log.NewInfo(req.CommID.OperationID, "GetFriendList api return ", resp) + c.JSON(http.StatusOK, resp) } func GetFriendApplyList(c *gin.Context) { @@ -379,8 +379,8 @@ func GetFriendApplyList(c *gin.Context) { c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &rpc.GetFriendApplyListReq{} - utils.CopyStructFields(req.CommID, params) + req := &rpc.GetFriendApplyListReq{CommID: &rpc.CommID{}} + utils.CopyStructFields(req.CommID, ¶ms) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { @@ -400,8 +400,7 @@ func GetFriendApplyList(c *gin.Context) { return } - resp := api.GetFriendApplyListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}} - utils.CopyStructFields(&resp, RpcResp) + resp := api.GetFriendApplyListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, FriendRequestList: RpcResp.FriendRequestList} log.NewInfo(req.CommID.OperationID, "GetFriendApplyList api return ", resp) } @@ -413,8 +412,8 @@ func GetSelfApplyList(c *gin.Context) { c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &rpc.GetSelfApplyListReq{} - utils.CopyStructFields(req.CommID, params) + req := &rpc.GetSelfApplyListReq{CommID: &rpc.CommID{}} + utils.CopyStructFields(req.CommID, ¶ms) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { @@ -433,9 +432,7 @@ func GetSelfApplyList(c *gin.Context) { return } - resp := api.GetSelfApplyListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}} - utils.CopyStructFields(resp, RpcResp) - c.JSON(http.StatusOK, resp) + resp := api.GetSelfApplyListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, FriendRequestList: RpcResp.FriendRequestList} log.NewInfo(req.CommID.OperationID, "GetSelfApplyList api return ", resp) - + c.JSON(http.StatusOK, resp) } diff --git a/pkg/base_info/friend_api_struct.go b/pkg/base_info/friend_api_struct.go index b5cee09e5..3924b571d 100644 --- a/pkg/base_info/friend_api_struct.go +++ b/pkg/base_info/friend_api_struct.go @@ -112,7 +112,7 @@ type GetFriendApplyListReq struct { } type GetFriendApplyListResp struct { CommResp - FriendRequestList open_im_sdk.FriendRequest `json:"data"` + FriendRequestList []*open_im_sdk.FriendRequest `json:"data"` } type GetSelfApplyListReq struct { @@ -120,5 +120,5 @@ type GetSelfApplyListReq struct { } type GetSelfApplyListResp struct { CommResp - FriendRequestList open_im_sdk.FriendRequest `json:"data"` + FriendRequestList []*open_im_sdk.FriendRequest `json:"data"` } diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index d5dc0254a..224e459e3 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -1,49 +1,10 @@ package utils import ( - "fmt" "github.com/jinzhu/copier" - "reflect" ) // copy a by b b->a func CopyStructFields(a interface{}, b interface{}, fields ...string) (err error) { return copier.Copy(a, b) - - at := reflect.TypeOf(a) - av := reflect.ValueOf(a) - bt := reflect.TypeOf(b) - bv := reflect.ValueOf(b) - - if at.Kind() != reflect.Ptr { - err = fmt.Errorf("a must be a struct pointer") - return err - } - av = reflect.ValueOf(av.Interface()) - - _fields := make([]string, 0) - if len(fields) > 0 { - _fields = fields - } else { - for i := 0; i < bv.NumField(); i++ { - _fields = append(_fields, bt.Field(i).Name) - } - } - - if len(_fields) == 0 { - err = fmt.Errorf("no fields to copy") - return err - } - - for i := 0; i < len(_fields); i++ { - name := _fields[i] - - f := av.Elem().FieldByName(name) - bValue := bv.FieldByName(name) - - if f.IsValid() && f.Kind() == bValue.Kind() { - f.Set(bValue) - } - } - return nil } From 376f61e2132d97aaf712c9c3c6868ee610ba63f6 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 10:32:26 +0800 Subject: [PATCH 075/337] Refactor code --- internal/api/friend/friend.go | 4 ++-- pkg/base_info/friend_api_struct.go | 26 +++++++++++++------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go index 7c2d2bde2..5ea9e1fb3 100644 --- a/internal/api/friend/friend.go +++ b/internal/api/friend/friend.go @@ -85,7 +85,7 @@ func AddFriend(c *gin.Context) { return } req := &rpc.AddFriendReq{CommID: &rpc.CommID{}} - utils.CopyStructFields(req.CommID, ¶ms) + utils.CopyStructFields(req.CommID, ¶ms.ParamsCommFriend) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { @@ -93,7 +93,7 @@ func AddFriend(c *gin.Context) { c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) return } - log.NewInfo("AddFriend args ", req.String()) + log.NewInfo(req.CommID.OperationID, "AddFriend args ", req.String()) etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) client := rpc.NewFriendClient(etcdConn) diff --git a/pkg/base_info/friend_api_struct.go b/pkg/base_info/friend_api_struct.go index 3924b571d..c0a5d3673 100644 --- a/pkg/base_info/friend_api_struct.go +++ b/pkg/base_info/friend_api_struct.go @@ -2,14 +2,14 @@ package base_info import open_im_sdk "Open_IM/pkg/proto/sdk_ws" -type paramsCommFriend struct { +type ParamsCommFriend struct { OperationID string `json:"operationID" binding:"required"` ToUserID string `json:"toUserID" binding:"required"` FromUserID string `json:"fromUserID" binding:"required"` } type AddBlacklistReq struct { - paramsCommFriend + ParamsCommFriend } type AddBlacklistResp struct { CommResp @@ -26,7 +26,7 @@ type ImportFriendResp struct { } type AddFriendReq struct { - paramsCommFriend + ParamsCommFriend ReqMsg string `json:"reqMsg"` } type AddFriendResp struct { @@ -34,7 +34,7 @@ type AddFriendResp struct { } type AddFriendResponseReq struct { - paramsCommFriend + ParamsCommFriend Flag int32 `json:"flag" binding:"required"` HandleMsg string `json:"handleMsg"` } @@ -43,14 +43,14 @@ type AddFriendResponseResp struct { } type DeleteFriendReq struct { - paramsCommFriend + ParamsCommFriend } type DeleteFriendResp struct { CommResp } type GetBlackListReq struct { - paramsCommFriend + ParamsCommFriend } type GetBlackListResp struct { CommResp @@ -69,7 +69,7 @@ type BlackUserInfo struct { } type SetFriendCommentReq struct { - paramsCommFriend + ParamsCommFriend Remark string `json:"remark" binding:"required"` } type SetFriendCommentResp struct { @@ -77,14 +77,14 @@ type SetFriendCommentResp struct { } type RemoveBlackListReq struct { - paramsCommFriend + ParamsCommFriend } type RemoveBlackListResp struct { CommResp } type IsFriendReq struct { - paramsCommFriend + ParamsCommFriend } type IsFriendResp struct { CommResp @@ -92,7 +92,7 @@ type IsFriendResp struct { } type GetFriendsInfoReq struct { - paramsCommFriend + ParamsCommFriend } type GetFriendsInfoResp struct { CommResp @@ -100,7 +100,7 @@ type GetFriendsInfoResp struct { } type GetFriendListReq struct { - paramsCommFriend + ParamsCommFriend } type GetFriendListResp struct { CommResp @@ -108,7 +108,7 @@ type GetFriendListResp struct { } type GetFriendApplyListReq struct { - paramsCommFriend + ParamsCommFriend } type GetFriendApplyListResp struct { CommResp @@ -116,7 +116,7 @@ type GetFriendApplyListResp struct { } type GetSelfApplyListReq struct { - paramsCommFriend + ParamsCommFriend } type GetSelfApplyListResp struct { CommResp From d8ab13e249ac4ea26a4c9948c76c18289708e6d3 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 10:39:47 +0800 Subject: [PATCH 076/337] Refactor code --- internal/rpc/friend/firend.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/rpc/friend/firend.go b/internal/rpc/friend/firend.go index b334cb1e3..685e786f3 100644 --- a/internal/rpc/friend/firend.go +++ b/internal/rpc/friend/firend.go @@ -144,6 +144,7 @@ func (s *friendServer) AddFriend(ctx context.Context, req *pbFriend.AddFriendReq //Establish a latest relationship in the friend request table friendRequest := imdb.FriendRequest{ReqMsg: req.ReqMsg} utils.CopyStructFields(&friendRequest, req.CommID) + log.NewDebug(req.CommID.OperationID, "UpdateFriendApplication args ", friendRequest) err := imdb.UpdateFriendApplication(&friendRequest) if err != nil { log.NewError(req.CommID.OperationID, "UpdateFriendApplication failed ", err.Error(), friendRequest) From 348ce56776416e6e1c1761297369c27c740759a2 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 10:41:05 +0800 Subject: [PATCH 077/337] Refactor code --- internal/api/friend/friend.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go index 5ea9e1fb3..94a899c8c 100644 --- a/internal/api/friend/friend.go +++ b/internal/api/friend/friend.go @@ -86,6 +86,7 @@ func AddFriend(c *gin.Context) { } req := &rpc.AddFriendReq{CommID: &rpc.CommID{}} utils.CopyStructFields(req.CommID, ¶ms.ParamsCommFriend) + req.ReqMsg = params.ReqMsg var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { From f0c5b1e54457a22e926e5da5e6496842fc2c3cff Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 10:52:52 +0800 Subject: [PATCH 078/337] Refactor code --- internal/rpc/friend/firend.go | 1 + .../db/mysql_model/im_mysql_model/friend_request_model.go | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/rpc/friend/firend.go b/internal/rpc/friend/firend.go index 685e786f3..e0ba79824 100644 --- a/internal/rpc/friend/firend.go +++ b/internal/rpc/friend/firend.go @@ -144,6 +144,7 @@ func (s *friendServer) AddFriend(ctx context.Context, req *pbFriend.AddFriendReq //Establish a latest relationship in the friend request table friendRequest := imdb.FriendRequest{ReqMsg: req.ReqMsg} utils.CopyStructFields(&friendRequest, req.CommID) + // {openIM001 openIM002 0 test add friend 0001-01-01 00:00:00 +0000 UTC 0001-01-01 00:00:00 +0000 UTC }] log.NewDebug(req.CommID.OperationID, "UpdateFriendApplication args ", friendRequest) err := imdb.UpdateFriendApplication(&friendRequest) if err != nil { diff --git a/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go b/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go index 891020ec0..e7e348bc0 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go @@ -65,11 +65,10 @@ func UpdateFriendApplication(friendRequest *FriendRequest) error { return err } friendRequest.CreateTime = time.Now() - err = dbConn.Table("friend_request").Where("from_user_id=? and to_user_id=?", friendRequest.FromUserID, friendRequest.ToUserID).Update(&friendRequest).Error - if err != nil { - return err + if dbConn.Table("friend_request").Where("from_user_id=? and to_user_id=?", + friendRequest.FromUserID, friendRequest.ToUserID).Update(&friendRequest).RowsAffected == 0 { + return InsertFriendApplication(friendRequest) } - return nil } func InsertFriendApplication(friendRequest *FriendRequest) error { From 51cb558317a4fb5a4f4a33f7d9b30e0b44edb822 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 10:55:28 +0800 Subject: [PATCH 079/337] Refactor code --- .../db/mysql_model/im_mysql_model/friend_request_model.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go b/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go index e7e348bc0..371f13761 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go @@ -68,6 +68,8 @@ func UpdateFriendApplication(friendRequest *FriendRequest) error { if dbConn.Table("friend_request").Where("from_user_id=? and to_user_id=?", friendRequest.FromUserID, friendRequest.ToUserID).Update(&friendRequest).RowsAffected == 0 { return InsertFriendApplication(friendRequest) + } else { + return nil } } From 453eddc0896d6efbfde722fbbd52f618c97aa9be Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 10:57:48 +0800 Subject: [PATCH 080/337] Refactor code --- internal/rpc/group/group.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index ba5a348f9..01192c049 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -513,7 +513,7 @@ func hasAccess(req *pbGroup.SetGroupInfoReq) bool { return false } - if groupUserInfo.RoleLevel == constant.OrdinaryMember { + if groupUserInfo.RoleLevel == constant.GroupAdmin { return true } return false From a480dfe59e6f323a3b6cc774f760ed74f6fd157d Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 11:01:14 +0800 Subject: [PATCH 081/337] Refactor code --- .../db/mysql_model/im_mysql_model/friend_request_model.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go b/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go index 371f13761..d09777a1d 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go @@ -2,6 +2,7 @@ package im_mysql_model import ( "Open_IM/pkg/common/db" + "Open_IM/pkg/utils" "time" ) @@ -78,6 +79,12 @@ func InsertFriendApplication(friendRequest *FriendRequest) error { if err != nil { return err } + if friendRequest.CreateTime.Unix() < 0 { + friendRequest.CreateTime = time.Now() + } + if friendRequest.HandleTime.Unix() < 0 { + friendRequest.HandleTime = time.Now() + } err = dbConn.Table("friend_request").Create(friendRequest).Error if err != nil { return err From c312f079fb4c0b045984f85dd30125ba5117a583 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 11:01:57 +0800 Subject: [PATCH 082/337] Refactor code --- pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go b/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go index d09777a1d..c058b8912 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go @@ -2,7 +2,6 @@ package im_mysql_model import ( "Open_IM/pkg/common/db" - "Open_IM/pkg/utils" "time" ) From 2fcd21ae944faf3a426bf6b461b2a77f2662e965 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 11:02:55 +0800 Subject: [PATCH 083/337] Refactor code --- .../db/mysql_model/im_mysql_model/friend_request_model.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go b/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go index c058b8912..a8973c2e2 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go @@ -2,6 +2,7 @@ package im_mysql_model import ( "Open_IM/pkg/common/db" + "Open_IM/pkg/utils" "time" ) @@ -82,7 +83,7 @@ func InsertFriendApplication(friendRequest *FriendRequest) error { friendRequest.CreateTime = time.Now() } if friendRequest.HandleTime.Unix() < 0 { - friendRequest.HandleTime = time.Now() + friendRequest.HandleTime = utils.UnixSecondToTime(0) } err = dbConn.Table("friend_request").Create(friendRequest).Error if err != nil { From 740dd0e0a65ebf3de57bfa2a1f609aaf3be8989b Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 11:15:20 +0800 Subject: [PATCH 084/337] Refactor code --- cmd/open_im_api/main.go | 4 ++-- internal/api/friend/friend.go | 16 ++++++++-------- pkg/base_info/friend_api_struct.go | 3 ++- .../mysql_model/im_mysql_model/model_struct.go | 2 +- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index 773b8be7d..528ddd876 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -31,9 +31,9 @@ func main() { friendRouterGroup := r.Group("/friend") { // friendRouterGroup.POST("/get_friends_info", friend.GetFriendsInfo) - friendRouterGroup.POST("/add_friend", friend.AddFriend) + friendRouterGroup.POST("/add_friend", friend.AddFriend) //1 friendRouterGroup.POST("/get_friend_apply_list", friend.GetFriendApplyList) - friendRouterGroup.POST("/get_self_apply_list", friend.GetSelfApplyList) + friendRouterGroup.POST("/get_self_apply_list", friend.GetSelfApplyList) //1 friendRouterGroup.POST("/get_friend_list", friend.GetFriendList) friendRouterGroup.POST("/add_blacklist", friend.AddBlacklist) friendRouterGroup.POST("/get_blacklist", friend.GetBlacklist) diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go index 94a899c8c..dc5115ed3 100644 --- a/internal/api/friend/friend.go +++ b/internal/api/friend/friend.go @@ -118,7 +118,7 @@ func AddFriendResponse(c *gin.Context) { return } req := &rpc.AddFriendResponseReq{CommID: &rpc.CommID{}} - utils.CopyStructFields(req.CommID, ¶ms) + utils.CopyStructFields(req.CommID, ¶ms.ParamsCommFriend) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { @@ -151,7 +151,7 @@ func DeleteFriend(c *gin.Context) { return } req := &rpc.DeleteFriendReq{CommID: &rpc.CommID{}} - utils.CopyStructFields(req.CommID, ¶ms) + utils.CopyStructFields(req.CommID, ¶ms.ParamsCommFriend) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { @@ -183,7 +183,7 @@ func GetBlacklist(c *gin.Context) { return } req := &rpc.GetBlacklistReq{CommID: &rpc.CommID{}} - utils.CopyStructFields(req.CommID, ¶ms) + utils.CopyStructFields(req.CommID, ¶ms.ParamsCommFriend) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { @@ -220,7 +220,7 @@ func SetFriendComment(c *gin.Context) { return } req := &rpc.SetFriendCommentReq{CommID: &rpc.CommID{}} - utils.CopyStructFields(req.CommID, ¶ms) + utils.CopyStructFields(req.CommID, ¶ms.ParamsCommFriend) req.Remark = params.Remark var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) @@ -253,7 +253,7 @@ func RemoveBlacklist(c *gin.Context) { return } req := &rpc.RemoveBlacklistReq{CommID: &rpc.CommID{}} - utils.CopyStructFields(req.CommID, ¶ms) + utils.CopyStructFields(req.CommID, ¶ms.ParamsCommFriend) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { @@ -284,7 +284,7 @@ func IsFriend(c *gin.Context) { return } req := &rpc.IsFriendReq{CommID: &rpc.CommID{}} - utils.CopyStructFields(req.CommID, ¶ms) + utils.CopyStructFields(req.CommID, ¶ms.ParamsCommFriend) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { @@ -349,7 +349,7 @@ func GetFriendList(c *gin.Context) { return } req := &rpc.GetFriendListReq{CommID: &rpc.CommID{}} - utils.CopyStructFields(req.CommID, ¶ms) + utils.CopyStructFields(req.CommID, ¶ms.ParamsCommFriend) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { @@ -381,7 +381,7 @@ func GetFriendApplyList(c *gin.Context) { return } req := &rpc.GetFriendApplyListReq{CommID: &rpc.CommID{}} - utils.CopyStructFields(req.CommID, ¶ms) + utils.CopyStructFields(req.CommID, ¶ms.ParamsCommFriend) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { diff --git a/pkg/base_info/friend_api_struct.go b/pkg/base_info/friend_api_struct.go index c0a5d3673..d9e5fbe59 100644 --- a/pkg/base_info/friend_api_struct.go +++ b/pkg/base_info/friend_api_struct.go @@ -116,7 +116,8 @@ type GetFriendApplyListResp struct { } type GetSelfApplyListReq struct { - ParamsCommFriend + OperationID string `json:"operationID" binding:"required"` + FromUserID string `json:"fromUserID" binding:"required"` } type GetSelfApplyListResp struct { CommResp diff --git a/pkg/common/db/mysql_model/im_mysql_model/model_struct.go b/pkg/common/db/mysql_model/im_mysql_model/model_struct.go index ae2d9dc43..29125d813 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/model_struct.go +++ b/pkg/common/db/mysql_model/im_mysql_model/model_struct.go @@ -95,7 +95,7 @@ type GroupMember struct { JoinTime time.Time `gorm:"column:join_time"` Nickname string `gorm:"column:nickname"` FaceUrl string `gorm:"user_group_face_url"` - JoinSource time.Time `gorm:"column:join_source"` + JoinSource int32 `gorm:"column:join_source"` OperatorUserID string `gorm:"column:operator_user_id"` Ex string `gorm:"column:ex"` } From 0891e2d4320bb2bbba79f43092e01f9bbb6eba66 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 11:16:23 +0800 Subject: [PATCH 085/337] Refactor code --- internal/api/friend/friend.go | 2 +- pkg/base_info/friend_api_struct.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go index dc5115ed3..a22f9b813 100644 --- a/internal/api/friend/friend.go +++ b/internal/api/friend/friend.go @@ -183,7 +183,7 @@ func GetBlacklist(c *gin.Context) { return } req := &rpc.GetBlacklistReq{CommID: &rpc.CommID{}} - utils.CopyStructFields(req.CommID, ¶ms.ParamsCommFriend) + utils.CopyStructFields(req.CommID, ¶ms) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { diff --git a/pkg/base_info/friend_api_struct.go b/pkg/base_info/friend_api_struct.go index d9e5fbe59..116c378a4 100644 --- a/pkg/base_info/friend_api_struct.go +++ b/pkg/base_info/friend_api_struct.go @@ -50,7 +50,8 @@ type DeleteFriendResp struct { } type GetBlackListReq struct { - ParamsCommFriend + OperationID string `json:"operationID" binding:"required"` + FromUserID string `json:"fromUserID" binding:"required"` } type GetBlackListResp struct { CommResp From 943f58f2c0c8f99c285f75aef48287aae05788ef Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 11:19:55 +0800 Subject: [PATCH 086/337] Refactor code --- pkg/common/db/mysql_model/im_mysql_model/group_member_model.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go index bcc087fb0..70be7a2bc 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go @@ -23,7 +23,7 @@ func InsertIntoGroupMember(toInsertInfo GroupMember) error { if err != nil { return err } - toInsertInfo.JoinSource = time.Now() + toInsertInfo.JoinTime = time.Now() if toInsertInfo.RoleLevel == 0 { toInsertInfo.RoleLevel = constant.GroupOrdinaryUsers } From d2ea06ef4a116a4b49b6e8720df768e2de8e87f3 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 11:29:51 +0800 Subject: [PATCH 087/337] Refactor code --- pkg/base_info/friend_api_struct.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/base_info/friend_api_struct.go b/pkg/base_info/friend_api_struct.go index 116c378a4..a45e7ccfa 100644 --- a/pkg/base_info/friend_api_struct.go +++ b/pkg/base_info/friend_api_struct.go @@ -109,7 +109,8 @@ type GetFriendListResp struct { } type GetFriendApplyListReq struct { - ParamsCommFriend + OperationID string `json:"operationID" binding:"required"` + FromUserID string `json:"fromUserID" binding:"required"` } type GetFriendApplyListResp struct { CommResp From 6a37072b9a4d5abc7e54e570a0e344f16562ff79 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 29 Dec 2021 11:31:51 +0800 Subject: [PATCH 088/337] conversation update --- cmd/open_im_api/main.go | 2 +- internal/api/conversation/conversation.go | 282 ++++++---------- internal/api/manage/management_chat.go | 384 +++++++++++++--------- internal/rpc/user/user.go | 4 +- internal/utils/jwt_token_test.go | 2 +- pkg/base_info/conversation_api_struct.go | 29 ++ pkg/base_info/manage_api_struct.go | 80 ----- pkg/common/token_verify/jwt_token.go | 3 +- pkg/proto/user/user.pb.go | 154 ++++----- pkg/proto/user/user.proto | 2 +- 10 files changed, 447 insertions(+), 495 deletions(-) diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index 773b8be7d..aa49378b1 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -94,7 +94,7 @@ func main() { conversationGroup := r.Group("/conversation") { conversationGroup.POST("/set_receive_message_opt", conversation.SetReceiveMessageOpt) - // conversationGroup.POST("/get_receive_message_opt", conversation.GetReceiveMessageOpt) + conversationGroup.POST("/get_receive_message_opt", conversation.GetReceiveMessageOpt) conversationGroup.POST("/get_all_conversation_message_opt", conversation.GetAllConversationMessageOpt) } diff --git a/internal/api/conversation/conversation.go b/internal/api/conversation/conversation.go index 1d47c2c70..38030279e 100644 --- a/internal/api/conversation/conversation.go +++ b/internal/api/conversation/conversation.go @@ -1,192 +1,106 @@ package conversation -import "github.com/gin-gonic/gin" - -// -//type paramsSetReceiveMessageOpt struct { -// OperationID string `json:"operationID" binding:"required"` -// Option *int32 `json:"option" binding:"required"` -// ConversationIdList []string `json:"conversationIdList" binding:"required"` -//} -// -//type OptResult struct { -// ConversationId string `json:"conversationId" binding:"required"` -// Result int32 `json:"result" binding:"required"` -//} -// -//type SetReceiveMessageOptResp struct { -// ErrCode int32 `json:"errCode"` -// ErrMsg string `json:"errMsg"` -// Data []OptResult `json:"data"` -//} -// -//type paramGetReceiveMessageOpt struct { -// ConversationIdList []string `json:"conversationIdList" binding:"required"` -// OperationID string `json:"operationID" binding:"required"` -//} -// -//type GetReceiveMessageOptResp struct { -// SetReceiveMessageOptResp -//} -// -//type paramGetAllConversationMessageOpt struct { -// OperationID string `json:"operationID" binding:"required"` -//} -// -//type GetAllConversationMessageOptResp struct { -// SetReceiveMessageOptResp -//} -// -////CopyStructFields +import ( + api "Open_IM/pkg/base_info" + "Open_IM/pkg/common/config" + "Open_IM/pkg/common/log" + "Open_IM/pkg/common/token_verify" + "Open_IM/pkg/grpc-etcdv3/getcdv3" + "Open_IM/pkg/proto/user" + rpc "Open_IM/pkg/proto/user" + "Open_IM/pkg/utils" + "context" + "github.com/gin-gonic/gin" + "net/http" + "strings" +) func GetAllConversationMessageOpt(c *gin.Context) { - + params := api.GetAllConversationMessageOptReq{} + if err := c.BindJSON(¶ms); err != nil { + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()}) + return + } + req := &rpc.GetAllConversationMsgOptReq{} + utils.CopyStructFields(req, ¶ms) + var ok bool + ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + if !ok { + log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) + return + } + log.NewInfo(params.OperationID, "GetAllConversationMessageOpt args ", req.String()) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName) + client := user.NewUserClient(etcdConn) + RpcResp, err := client.GetAllConversationMsgOpt(context.Background(), req) + if err != nil { + log.NewError(params.OperationID, "GetAllConversationMsgOpt rpc failed, ", req, err.Error()) + c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": "GetAllConversationMsgOpt rpc failed, " + err.Error()}) + return + } + resp := api.GetAllConversationMessageOptResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} + resp.ConversationOptResultList = RpcResp.ConversationOptResultList + log.NewInfo(req.OperationID, "GetAllConversationMsgOpt api return: ", resp) + c.JSON(http.StatusOK, resp) +} + +func GetReceiveMessageOpt(c *gin.Context) { + params := api.GetReceiveMessageOptReq{} + if err := c.BindJSON(¶ms); err != nil { + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()}) + return + } + req := &rpc.GetReceiveMessageOptReq{} + utils.CopyStructFields(req, ¶ms) + var ok bool + ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + if !ok { + log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) + return + } + log.NewInfo(params.OperationID, "GetReceiveMessageOpt args ", req.String()) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName) + client := user.NewUserClient(etcdConn) + RpcResp, err := client.GetReceiveMessageOpt(context.Background(), req) + if err != nil { + log.NewError(params.OperationID, "GetReceiveMessageOpt rpc failed, ", req, err.Error()) + c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": "GetReceiveMessageOpt rpc failed, " + err.Error()}) + return + } + resp := api.GetReceiveMessageOptResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} + resp.ConversationOptResultList = RpcResp.ConversationOptResultList + log.NewInfo(req.OperationID, "GetReceiveMessageOpt api return: ", resp) + c.JSON(http.StatusOK, resp) } -//func GetAllConversationMessageOpt(c *gin.Context) { -// params := paramGetAllConversationMessageOpt{} -// if err := c.BindJSON(¶ms); err != nil { -// log.NewError(params.OperationID, "bind json failed ", err.Error(), c) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()}) -// return -// } -// -// claims, err := token_verify.ParseToken(c.Request.Header.Get("token")) -// if err != nil { -// log.NewError(params.OperationID, "ParseToken failed, ", err.Error(), c.Request.Header.Get("token")) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "ParseToken failed, " + err.Error()}) -// return -// } -// -// req := &user.GetAllConversationMsgOptReq{ -// UId: claims.UID, -// OperationID: params.OperationID, -// } -// log.NewInfo(req.OperationID, "GetAllConversationMsgOpt req: ", req) -// etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName) -// client := user.NewUserClient(etcdConn) -// resp, err := client.GetAllConversationMsgOpt(context.Background(), req) -// if err != nil { -// log.NewError(params.OperationID, "GetAllConversationMsgOpt rpc failed, ", req, err.Error()) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "GetAllConversationMsgOpt rpc failed, " + err.Error()}) -// return -// } -// var ginResp GetAllConversationMessageOptResp -// ginResp.ErrCode = resp.ErrCode -// ginResp.ErrMsg = resp.ErrMsg -// for _, v := range resp.ConversationOptResult { -// var opt OptResult -// err := utils.CopyStructFields(&opt, *v, "ConversationId", "Result") -// if err != nil { -// log.NewError(req.OperationID, "CopyStructFields failed ", err.Error()) -// continue -// } -// ginResp.Data = append(ginResp.Data, opt) -// } -// log.NewInfo(req.OperationID, "GetAllConversationMsgOpt resp: ", ginResp, req) -// c.JSON(http.StatusOK, ginResp) -//} -// -//func GetReceiveMessageOpt(c *gin.Context) { -// params := paramGetReceiveMessageOpt{} -// if err := c.BindJSON(¶ms); err != nil { -// log.NewError(params.OperationID, "bind json failed ", err.Error(), c) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()}) -// return -// } -// -// claims, err := token_verify.ParseToken(c.Request.Header.Get("token")) -// if err != nil { -// log.NewError(params.OperationID, "ParseToken failed, ", err.Error(), c.Request.Header.Get("token")) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "ParseToken failed, " + err.Error()}) -// return -// } -// -// req := &user.GetReceiveMessageOptReq{ -// UId: claims.UID, -// ConversationId: params.ConversationIdList, -// OperationID: params.OperationID, -// } -// log.NewInfo(req.OperationID, "GetReceiveMessageOptReq req: ", req) -// etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName) -// client := user.NewUserClient(etcdConn) -// resp, err := client.GetReceiveMessageOpt(context.Background(), req) -// if err != nil { -// log.NewError(params.OperationID, "GetReceiveMessageOpt rpc failed, ", req, err.Error()) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "GetReceiveMessageOpt rpc failed, " + err.Error()}) -// return -// } -// log.NewInfo(req.OperationID, "GetReceiveMessageOptReq req: ", req, resp) -// var ginResp GetReceiveMessageOptResp -// ginResp.ErrCode = resp.ErrCode -// ginResp.ErrMsg = resp.ErrMsg -// -// for _, v := range resp.ConversationOptResult { -// var opt OptResult -// log.NewInfo("CopyStructFields begin ", v, req.OperationID) -// err := utils.CopyStructFields(&opt, *v, "ConversationId", "Result") -// log.NewInfo("CopyStructFields end ", v, req.OperationID) -// if err != nil { -// log.NewError(req.OperationID, "CopyStructFields failed ", err.Error()) -// continue -// } -// ginResp.Data = append(ginResp.Data, opt) -// } -// log.NewInfo(req.OperationID, "GetReceiveMessageOpt resp: ", ginResp) -// c.JSON(http.StatusOK, ginResp) -//} -// func SetReceiveMessageOpt(c *gin.Context) { - + params := api.SetReceiveMessageOptReq{} + if err := c.BindJSON(¶ms); err != nil { + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()}) + return + } + req := &rpc.SetReceiveMessageOptReq{} + utils.CopyStructFields(req, ¶ms) + var ok bool + ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + if !ok { + log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) + return + } + log.NewInfo(params.OperationID, "SetReceiveMessageOpt args ", req.String()) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName) + client := user.NewUserClient(etcdConn) + RpcResp, err := client.SetReceiveMessageOpt(context.Background(), req) + if err != nil { + log.NewError(params.OperationID, "SetReceiveMessageOpt rpc failed, ", req, err.Error()) + c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": "SetReceiveMessageOpt rpc failed, " + err.Error()}) + return + } + resp := api.SetReceiveMessageOptResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} + resp.OptResultList = RpcResp.OptResultList + log.NewInfo(req.OperationID, "SetReceiveMessageOpt api return: ", resp) + c.JSON(http.StatusOK, resp) } - -//func SetReceiveMessageOpt(c *gin.Context) { -// params := paramsSetReceiveMessageOpt{} -// if err := c.BindJSON(¶ms); err != nil { -// log.NewError(params.OperationID, "bind json failed ", err.Error(), c) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()}) -// return -// } -// -// claims, err := token_verify.ParseToken(c.Request.Header.Get("token")) -// if err != nil { -// log.NewError(params.OperationID, "ParseToken failed, ", err.Error(), c.Request.Header.Get("token")) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "ParseToken failed, " + err.Error()}) -// return -// } -// -// req := &user.SetReceiveMessageOptReq{ -// UId: claims.UID, -// Opt: *params.Option, -// ConversationId: params.ConversationIdList, -// OperationID: params.OperationID, -// } -// log.NewInfo(req.OperationID, "SetReceiveMessageOpt req: ", req) -// etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName) -// client := user.NewUserClient(etcdConn) -// resp, err := client.SetReceiveMessageOpt(context.Background(), req) -// if err != nil { -// log.NewError(params.OperationID, "SetReceiveMessageOpt rpc failed, ", req, err.Error()) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "SetReceiveMessageOpt rpc failed, " + err.Error()}) -// return -// } -// log.NewInfo(req.OperationID, "SetReceiveMessageOpt req: ", req, resp) -// ginResp := SetReceiveMessageOptResp{ -// ErrCode: resp.ErrCode, -// ErrMsg: resp.ErrMsg, -// } -// -// for _, v := range resp.OptResult { -// var opt OptResult -// log.NewDebug("CopyStructFields begin ", v, req.OperationID) -// err := utils.CopyStructFields(&opt, *v, "ConversationId", "Result") -// log.NewDebug("CopyStructFields end ", v, req.OperationID) -// if err != nil { -// log.NewError(req.OperationID, "CopyStructFields failed ", err.Error()) -// continue -// } -// ginResp.Data = append(ginResp.Data, opt) -// } -// log.NewInfo(req.OperationID, "SetReceiveMessageOpt resp: ", ginResp) -// c.JSON(http.StatusOK, ginResp) -//} diff --git a/internal/api/manage/management_chat.go b/internal/api/manage/management_chat.go index 1bb2a9961..f547b9b92 100644 --- a/internal/api/manage/management_chat.go +++ b/internal/api/manage/management_chat.go @@ -6,166 +6,254 @@ */ package manage -import "github.com/gin-gonic/gin" +import ( + "Open_IM/pkg/common/config" + "Open_IM/pkg/common/constant" + "Open_IM/pkg/common/log" + "Open_IM/pkg/common/token_verify" + "Open_IM/pkg/grpc-etcdv3/getcdv3" + pbChat "Open_IM/pkg/proto/chat" + open_im_sdk "Open_IM/pkg/proto/sdk_ws" + "Open_IM/pkg/utils" + "context" + "github.com/gin-gonic/gin" + "github.com/go-playground/validator/v10" + "github.com/mitchellh/mapstructure" + "net/http" + "strings" +) + +var validate *validator.Validate + +func newUserSendMsgReq(params *ManagementSendMsgReq) *pbChat.SendMsgReq { + var newContent string + switch params.ContentType { + case constant.Text: + newContent = params.Content["text"].(string) + case constant.Picture: + fallthrough + case constant.Custom: + fallthrough + case constant.Voice: + fallthrough + case constant.File: + newContent = utils.StructToJsonString(params.Content) + default: + } + options := make(map[string]bool, 2) + if params.IsOnlineOnly { + utils.SetSwitchFromOptions(options, constant.IsOfflinePush, false) + utils.SetSwitchFromOptions(options, constant.IsHistory, false) + utils.SetSwitchFromOptions(options, constant.IsPersistent, false) + } + pbData := pbChat.SendMsgReq{ + OperationID: params.OperationID, + MsgData: &open_im_sdk.MsgData{ + SendID: params.SendID, + RecvID: params.RecvID, + GroupID: params.GroupID, + ClientMsgID: utils.GetMsgID(params.SendID), + SenderPlatformID: params.SenderPlatformID, + SenderNickname: params.SenderNickname, + SenderFaceURL: params.SenderFaceURL, + SessionType: params.SessionType, + MsgFrom: constant.SysMsgType, + ContentType: params.ContentType, + Content: []byte(newContent), + ForceList: params.ForceList, + CreateTime: utils.GetCurrentTimestampByNano(), + Options: options, + OfflinePushInfo: params.OfflinePushInfo, + }, + } + return &pbData +} +func init() { + validate = validator.New() +} -// -//var validate *validator.Validate -// -// -//func newUserSendMsgReq(params *paramsManagementSendMsg) *pbChat.SendMsgReq { -// var newContent string -// switch params.ContentType { -// case constant.Text: -// newContent = params.Content["text"].(string) -// case constant.Picture: -// fallthrough -// case constant.Custom: -// fallthrough -// case constant.Voice: -// fallthrough -// case constant.File: -// newContent = utils.StructToJsonString(params.Content) -// default: -// } -// options := make(map[string]bool, 2) -// if params.IsOnlineOnly { -// utils.SetSwitchFromOptions(options, constant.IsOfflinePush, false) -// utils.SetSwitchFromOptions(options, constant.IsHistory, false) -// utils.SetSwitchFromOptions(options, constant.IsPersistent, false) -// } -// pbData := pbChat.SendMsgReq{ -// OperationID: params.OperationID, -// MsgData: &open_im_sdk.MsgData{ -// SendID: params.SendID, -// RecvID: params.RecvID, -// GroupID: params.GroupID, -// ClientMsgID: utils.GetMsgID(params.SendID), -// SenderPlatformID: params.SenderPlatformID, -// SenderNickName: params.SenderNickName, -// SenderFaceURL: params.SenderFaceURL, -// SessionType: params.SessionType, -// MsgFrom: constant.SysMsgType, -// ContentType: params.ContentType, -// Content: []byte(newContent), -// ForceList: params.ForceList, -// CreateTime: utils.GetCurrentTimestampByNano(), -// Options: options, -// OfflinePushInfo: params.OfflinePushInfo, -// }, -// } -// return &pbData -//} -//func init() { -// validate = validator.New() -//} func ManagementSendMsg(c *gin.Context) { + var data interface{} + params := ManagementSendMsgReq{} + if err := c.BindJSON(¶ms); err != nil { + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) + log.ErrorByKv("json unmarshal err", c.PostForm("operationID"), "err", err.Error(), "content", c.PostForm("content")) + return + } + switch params.ContentType { + case constant.Text: + data = TextElem{} + case constant.Picture: + data = PictureElem{} + case constant.Voice: + data = SoundElem{} + case constant.Video: + data = VideoElem{} + case constant.File: + data = FileElem{} + //case constant.AtText: + // data = AtElem{} + //case constant.Merger: + // data = + //case constant.Card: + //case constant.Location: + case constant.Custom: + data = CustomElem{} + //case constant.Revoke: + //case constant.HasReadReceipt: + //case constant.Typing: + //case constant.Quote: + default: + c.JSON(http.StatusBadRequest, gin.H{"errCode": 404, "errMsg": "contentType err"}) + log.ErrorByKv("contentType err", c.PostForm("operationID"), "content", c.PostForm("content")) + return + } + if err := mapstructure.WeakDecode(params.Content, &data); err != nil { + c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": err.Error()}) + log.ErrorByKv("content to Data struct err", "", "err", err.Error()) + return + } else if err := validate.Struct(data); err != nil { + c.JSON(http.StatusBadRequest, gin.H{"errCode": 403, "errMsg": err.Error()}) + log.ErrorByKv("data args validate err", "", "err", err.Error()) + return + } + + token := c.Request.Header.Get("token") + claims, err := token_verify.ParseToken(token) + if err != nil { + log.NewError(params.OperationID, "parse token failed", err.Error()) + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "parse token failed", "sendTime": 0, "MsgID": ""}) + } + if !utils.IsContain(claims.UID, config.Config.Manager.AppManagerUid) { + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "not authorized", "sendTime": 0, "MsgID": ""}) + return + + } + switch params.SessionType { + case constant.SingleChatType: + if len(params.RecvID) == 0 { + log.NewError(params.OperationID, "recvID is a null string") + c.JSON(http.StatusBadRequest, gin.H{"errCode": 405, "errMsg": "recvID is a null string", "sendTime": 0, "MsgID": ""}) + } + case constant.GroupChatType: + if len(params.GroupID) == 0 { + log.NewError(params.OperationID, "groupID is a null string") + c.JSON(http.StatusBadRequest, gin.H{"errCode": 405, "errMsg": "groupID is a null string", "sendTime": 0, "MsgID": ""}) + } + + } + log.InfoByKv("Ws call success to ManagementSendMsgReq", params.OperationID, "Parameters", params) + + pbData := newUserSendMsgReq(¶ms) + log.Info("", "", "api ManagementSendMsg call start..., [data: %s]", pbData.String()) + + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfflineMessageName) + client := pbChat.NewChatClient(etcdConn) + + log.Info("", "", "api ManagementSendMsg call, api call rpc...") + + reply, err := client.SendMsg(context.Background(), pbData) + if err != nil { + log.NewError(params.OperationID, "call delete UserSendMsg rpc server failed", err.Error()) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call UserSendMsg rpc server failed"}) + return + } + log.Info("", "", "api ManagementSendMsg call end..., [data: %s] [reply: %s]", pbData.String(), reply.String()) + + c.JSON(http.StatusOK, gin.H{ + "errCode": reply.ErrCode, + "errMsg": reply.ErrMsg, + "sendTime": reply.SendTime, + "msgID": reply.ClientMsgID, + }) } -//func ManagementSendMsg(c *gin.Context) { -// var data interface{} -// params := paramsManagementSendMsg{} -// if err := c.BindJSON(¶ms); err != nil { -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) -// log.ErrorByKv("json unmarshal err", c.PostForm("operationID"), "err", err.Error(), "content", c.PostForm("content")) -// return -// } -// switch params.ContentType { -// case constant.Text: -// data = TextElem{} -// case constant.Picture: -// data = PictureElem{} -// case constant.Voice: -// data = SoundElem{} -// case constant.Video: -// data = VideoElem{} -// case constant.File: -// data = FileElem{} -// //case constant.AtText: -// // data = AtElem{} -// //case constant.Merger: -// // data = -// //case constant.Card: -// //case constant.Location: -// case constant.Custom: -// data = CustomElem{} -// //case constant.Revoke: -// //case constant.HasReadReceipt: -// //case constant.Typing: -// //case constant.Quote: -// default: -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 404, "errMsg": "contentType err"}) -// log.ErrorByKv("contentType err", c.PostForm("operationID"), "content", c.PostForm("content")) -// return -// } -// if err := mapstructure.WeakDecode(params.Content, &data); err != nil { -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": err.Error()}) -// log.ErrorByKv("content to Data struct err", "", "err", err.Error()) -// return -// } else if err := validate.Struct(data); err != nil { -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 403, "errMsg": err.Error()}) -// log.ErrorByKv("data args validate err", "", "err", err.Error()) -// return -// } // -// token := c.Request.Header.Get("token") -// claims, err := token_verify.ParseToken(token) -// if err != nil { -// log.NewError(params.OperationID, "parse token failed", err.Error()) -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "parse token failed", "sendTime": 0, "MsgID": ""}) -// } -// if !utils.IsContain(claims.UID, config.Config.Manager.AppManagerUid) { -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "not authorized", "sendTime": 0, "MsgID": ""}) -// return -// -// } -// switch params.SessionType { -// case constant.SingleChatType: -// if len(params.RecvID) == 0 { -// log.NewError(params.OperationID, "recvID is a null string") -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 405, "errMsg": "recvID is a null string", "sendTime": 0, "MsgID": ""}) -// } -// case constant.GroupChatType: -// if len(params.GroupID) == 0 { -// log.NewError(params.OperationID, "groupID is a null string") -// c.JSON(http.StatusBadRequest, gin.H{"errCode": 405, "errMsg": "groupID is a null string", "sendTime": 0, "MsgID": ""}) -// } -// -// } -// log.InfoByKv("Ws call success to ManagementSendMsgReq", params.OperationID, "Parameters", params) -// -// pbData := newUserSendMsgReq(¶ms) -// log.Info("", "", "api ManagementSendMsg call start..., [data: %s]", pbData.String()) -// -// etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfflineMessageName) -// client := pbChat.NewChatClient(etcdConn) -// -// log.Info("", "", "api ManagementSendMsg call, api call rpc...") -// -// reply, err := client.SendMsg(context.Background(), pbData) -// if err != nil { -// log.NewError(params.OperationID, "call delete UserSendMsg rpc server failed", err.Error()) -// c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call UserSendMsg rpc server failed"}) -// return -// } -// log.Info("", "", "api ManagementSendMsg call end..., [data: %s] [reply: %s]", pbData.String(), reply.String()) -// -// c.JSON(http.StatusOK, gin.H{ -// "errCode": reply.ErrCode, -// "errMsg": reply.ErrMsg, -// "sendTime": reply.SendTime, -// "msgID": reply.ClientMsgID, -// }) -// -//} - //type MergeElem struct { // Title string `json:"title"` // AbstractList []string `json:"abstractList"` // MultiMessage []*MsgStruct `json:"multiMessage"` //} - +// //type QuoteElem struct { // Text string `json:"text"` // QuoteMessage *MsgStruct `json:"quoteMessage"` //} +type ManagementSendMsgReq struct { + OperationID string `json:"operationID" binding:"required"` + SendID string `json:"sendID" binding:"required"` + RecvID string `json:"recvID" ` + GroupID string `json:"groupID" ` + SenderNickname string `json:"senderNickname" ` + SenderFaceURL string `json:"senderFaceURL" ` + SenderPlatformID int32 `json:"senderPlatformID"` + ForceList []string `json:"forceList" ` + Content map[string]interface{} `json:"content" binding:"required"` + ContentType int32 `json:"contentType" binding:"required"` + SessionType int32 `json:"sessionType" binding:"required"` + IsOnlineOnly bool `json:"isOnlineOnly"` + OfflinePushInfo *open_im_sdk.OfflinePushInfo `json:"offlinePushInfo"` +} + +type PictureBaseInfo struct { + UUID string `mapstructure:"uuid"` + Type string `mapstructure:"type" validate:"required"` + Size int64 `mapstructure:"size" validate:"required"` + Width int32 `mapstructure:"width" validate:"required"` + Height int32 `mapstructure:"height" validate:"required"` + Url string `mapstructure:"url" validate:"required"` +} + +type PictureElem struct { + SourcePath string `mapstructure:"sourcePath"` + SourcePicture PictureBaseInfo `mapstructure:"sourcePicture" validate:"required"` + BigPicture PictureBaseInfo `mapstructure:"bigPicture" ` + SnapshotPicture PictureBaseInfo `mapstructure:"snapshotPicture"` +} +type SoundElem struct { + UUID string `mapstructure:"uuid"` + SoundPath string `mapstructure:"soundPath"` + SourceURL string `mapstructure:"sourceUrl"` + DataSize int64 `mapstructure:"dataSize"` + Duration int64 `mapstructure:"duration"` +} +type VideoElem struct { + VideoPath string `mapstructure:"videoPath"` + VideoUUID string `mapstructure:"videoUUID"` + VideoURL string `mapstructure:"videoUrl"` + VideoType string `mapstructure:"videoType"` + VideoSize int64 `mapstructure:"videoSize"` + Duration int64 `mapstructure:"duration"` + SnapshotPath string `mapstructure:"snapshotPath"` + SnapshotUUID string `mapstructure:"snapshotUUID"` + SnapshotSize int64 `mapstructure:"snapshotSize"` + SnapshotURL string `mapstructure:"snapshotUrl"` + SnapshotWidth int32 `mapstructure:"snapshotWidth"` + SnapshotHeight int32 `mapstructure:"snapshotHeight"` +} +type FileElem struct { + FilePath string `mapstructure:"filePath"` + UUID string `mapstructure:"uuid"` + SourceURL string `mapstructure:"sourceUrl"` + FileName string `mapstructure:"fileName"` + FileSize int64 `mapstructure:"fileSize"` +} +type AtElem struct { + Text string `mapstructure:"text"` + AtUserList []string `mapstructure:"atUserList"` + IsAtSelf bool `mapstructure:"isAtSelf"` +} +type LocationElem struct { + Description string `mapstructure:"description"` + Longitude float64 `mapstructure:"longitude"` + Latitude float64 `mapstructure:"latitude"` +} +type CustomElem struct { + Data string `mapstructure:"data" validate:"required"` + Description string `mapstructure:"description"` + Extension string `mapstructure:"extension"` +} +type TextElem struct { + Text string `mapstructure:"text" validate:"required"` +} diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index ad480d6db..783f6b1f3 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -112,9 +112,9 @@ func (s *userServer) SetReceiveMessageOpt(ctx context.Context, req *pbUser.SetRe func (s *userServer) GetReceiveMessageOpt(ctx context.Context, req *pbUser.GetReceiveMessageOptReq) (*pbUser.GetReceiveMessageOptResp, error) { log.NewInfo(req.OperationID, "GetReceiveMessageOpt args ", req.String()) - m, err := db.DB.GetMultiConversationMsgOpt(req.FromUserID, req.ConversationId) + m, err := db.DB.GetMultiConversationMsgOpt(req.FromUserID, req.ConversationIdList) if err != nil { - log.NewError(req.OperationID, "GetMultiConversationMsgOpt failed ", err.Error(), req.FromUserID, req.ConversationId) + log.NewError(req.OperationID, "GetMultiConversationMsgOpt failed ", err.Error(), req.FromUserID, req.ConversationIdList) return &pbUser.GetReceiveMessageOptResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } resp := pbUser.GetReceiveMessageOptResp{CommonResp: &pbUser.CommonResp{}} diff --git a/internal/utils/jwt_token_test.go b/internal/utils/jwt_token_test.go index 2c6550d87..571836d39 100644 --- a/internal/utils/jwt_token_test.go +++ b/internal/utils/jwt_token_test.go @@ -68,7 +68,7 @@ func Test_ParseRedisInterfaceToken(t *testing.T) { config.Config.TokenPolicy.AccessExpire = -80 tokenString, _, _ = token_verify.CreateToken(uid, platform) claims, err = token_verify.ParseRedisInterfaceToken([]uint8(tokenString)) - assert.Equal(t, err, constant.TokenExpired) + assert.Equal(t, err, constant.ExpiredToken) assert.Nil(t, claims) } diff --git a/pkg/base_info/conversation_api_struct.go b/pkg/base_info/conversation_api_struct.go index 7775a2f42..0bbb52a49 100644 --- a/pkg/base_info/conversation_api_struct.go +++ b/pkg/base_info/conversation_api_struct.go @@ -1 +1,30 @@ package base_info + +import "Open_IM/pkg/proto/user" + +type GetAllConversationMessageOptReq struct { + OperationID string `json:"operationID" binding:"required"` + FromUserID string `json:"fromUserID" binding:"required"` +} +type GetAllConversationMessageOptResp struct { + CommResp + ConversationOptResultList []*user.OptResult `json:"data"` +} +type GetReceiveMessageOptReq struct { + ConversationIdList []string `json:"conversationIdList" binding:"required"` + OperationID string `json:"operationID" binding:"required"` + FromUserID string `json:"fromUserID" binding:"required"` +} +type GetReceiveMessageOptResp struct { + CommResp + ConversationOptResultList []*user.OptResult `json:"data"` +} +type SetReceiveMessageOptReq struct { + OperationID string `json:"operationID" binding:"required"` + Opt *int32 `json:"opt" binding:"required"` + ConversationIdList []string `json:"conversationIdList" binding:"required"` +} +type SetReceiveMessageOptResp struct { + CommResp + OptResultList []*user.OptResult `json:"data"` +} diff --git a/pkg/base_info/manage_api_struct.go b/pkg/base_info/manage_api_struct.go index 862706187..070e2c72b 100644 --- a/pkg/base_info/manage_api_struct.go +++ b/pkg/base_info/manage_api_struct.go @@ -2,70 +2,9 @@ package base_info import ( pbRelay "Open_IM/pkg/proto/relay" - open_im_sdk "Open_IM/pkg/proto/sdk_ws" pbUser "Open_IM/pkg/proto/user" ) -type paramsManagementSendMsg struct { - OperationID string `json:"operationID" binding:"required"` - SendID string `json:"sendID" binding:"required"` - RecvID string `json:"recvID" ` - GroupID string `json:"groupID" ` - SenderNickName string `json:"senderNickName" ` - SenderFaceURL string `json:"senderFaceURL" ` - SenderPlatformID int32 `json:"senderPlatformID"` - ForceList []string `json:"forceList" ` - Content map[string]interface{} `json:"content" binding:"required"` - ContentType int32 `json:"contentType" binding:"required"` - SessionType int32 `json:"sessionType" binding:"required"` - IsOnlineOnly bool `json:"isOnlineOnly"` - OfflinePushInfo *open_im_sdk.OfflinePushInfo `json:"offlinePushInfo"` -} - -type PictureBaseInfo struct { - UUID string `mapstructure:"uuid"` - Type string `mapstructure:"type" validate:"required"` - Size int64 `mapstructure:"size" validate:"required"` - Width int32 `mapstructure:"width" validate:"required"` - Height int32 `mapstructure:"height" validate:"required"` - Url string `mapstructure:"url" validate:"required"` -} - -type PictureElem struct { - SourcePath string `mapstructure:"sourcePath"` - SourcePicture PictureBaseInfo `mapstructure:"sourcePicture" validate:"required"` - BigPicture PictureBaseInfo `mapstructure:"bigPicture" ` - SnapshotPicture PictureBaseInfo `mapstructure:"snapshotPicture"` -} -type SoundElem struct { - UUID string `mapstructure:"uuid"` - SoundPath string `mapstructure:"soundPath"` - SourceURL string `mapstructure:"sourceUrl"` - DataSize int64 `mapstructure:"dataSize"` - Duration int64 `mapstructure:"duration"` -} -type VideoElem struct { - VideoPath string `mapstructure:"videoPath"` - VideoUUID string `mapstructure:"videoUUID"` - VideoURL string `mapstructure:"videoUrl"` - VideoType string `mapstructure:"videoType"` - VideoSize int64 `mapstructure:"videoSize"` - Duration int64 `mapstructure:"duration"` - SnapshotPath string `mapstructure:"snapshotPath"` - SnapshotUUID string `mapstructure:"snapshotUUID"` - SnapshotSize int64 `mapstructure:"snapshotSize"` - SnapshotURL string `mapstructure:"snapshotUrl"` - SnapshotWidth int32 `mapstructure:"snapshotWidth"` - SnapshotHeight int32 `mapstructure:"snapshotHeight"` -} -type FileElem struct { - FilePath string `mapstructure:"filePath"` - UUID string `mapstructure:"uuid"` - SourceURL string `mapstructure:"sourceUrl"` - FileName string `mapstructure:"fileName"` - FileSize int64 `mapstructure:"fileSize"` -} - type DeleteUsersReq struct { OperationID string `json:"operationID" binding:"required"` DeleteUidList []string `json:"deleteUidList" binding:"required"` @@ -97,22 +36,3 @@ type AccountCheckResp struct { CommResp ResultList []*pbUser.AccountCheckResp_SingleUserStatus `json:"data"` } - -type AtElem struct { - Text string `mapstructure:"text"` - AtUserList []string `mapstructure:"atUserList"` - IsAtSelf bool `mapstructure:"isAtSelf"` -} -type LocationElem struct { - Description string `mapstructure:"description"` - Longitude float64 `mapstructure:"longitude"` - Latitude float64 `mapstructure:"latitude"` -} -type CustomElem struct { - Data string `mapstructure:"data" validate:"required"` - Description string `mapstructure:"description"` - Extension string `mapstructure:"extension"` -} -type TextElem struct { - Text string `mapstructure:"text" validate:"required"` -} diff --git a/pkg/common/token_verify/jwt_token.go b/pkg/common/token_verify/jwt_token.go index 519ecad63..50aecc8ae 100644 --- a/pkg/common/token_verify/jwt_token.go +++ b/pkg/common/token_verify/jwt_token.go @@ -51,7 +51,8 @@ func CreateToken(userID string, platformID int32) (string, int64, error) { } var deleteTokenKey []string for k, v := range m { - if v != constant.NormalToken { + _, err = GetClaimFromToken(k) + if err != nil || v != constant.NormalToken { deleteTokenKey = append(deleteTokenKey, k) } } diff --git a/pkg/proto/user/user.pb.go b/pkg/proto/user/user.pb.go index e81e474a9..892c0c982 100644 --- a/pkg/proto/user/user.pb.go +++ b/pkg/proto/user/user.pb.go @@ -36,7 +36,7 @@ func (m *CommonResp) Reset() { *m = CommonResp{} } func (m *CommonResp) String() string { return proto.CompactTextString(m) } func (*CommonResp) ProtoMessage() {} func (*CommonResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_119cb27841530cfa, []int{0} + return fileDescriptor_user_0a10ad809f213986, []int{0} } func (m *CommonResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CommonResp.Unmarshal(m, b) @@ -83,7 +83,7 @@ func (m *DeleteUsersReq) Reset() { *m = DeleteUsersReq{} } func (m *DeleteUsersReq) String() string { return proto.CompactTextString(m) } func (*DeleteUsersReq) ProtoMessage() {} func (*DeleteUsersReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_119cb27841530cfa, []int{1} + return fileDescriptor_user_0a10ad809f213986, []int{1} } func (m *DeleteUsersReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteUsersReq.Unmarshal(m, b) @@ -136,7 +136,7 @@ func (m *DeleteUsersResp) Reset() { *m = DeleteUsersResp{} } func (m *DeleteUsersResp) String() string { return proto.CompactTextString(m) } func (*DeleteUsersResp) ProtoMessage() {} func (*DeleteUsersResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_119cb27841530cfa, []int{2} + return fileDescriptor_user_0a10ad809f213986, []int{2} } func (m *DeleteUsersResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteUsersResp.Unmarshal(m, b) @@ -182,7 +182,7 @@ func (m *GetAllUserIDReq) Reset() { *m = GetAllUserIDReq{} } func (m *GetAllUserIDReq) String() string { return proto.CompactTextString(m) } func (*GetAllUserIDReq) ProtoMessage() {} func (*GetAllUserIDReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_119cb27841530cfa, []int{3} + return fileDescriptor_user_0a10ad809f213986, []int{3} } func (m *GetAllUserIDReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetAllUserIDReq.Unmarshal(m, b) @@ -228,7 +228,7 @@ func (m *GetAllUserIDResp) Reset() { *m = GetAllUserIDResp{} } func (m *GetAllUserIDResp) String() string { return proto.CompactTextString(m) } func (*GetAllUserIDResp) ProtoMessage() {} func (*GetAllUserIDResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_119cb27841530cfa, []int{4} + return fileDescriptor_user_0a10ad809f213986, []int{4} } func (m *GetAllUserIDResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetAllUserIDResp.Unmarshal(m, b) @@ -275,7 +275,7 @@ func (m *AccountCheckReq) Reset() { *m = AccountCheckReq{} } func (m *AccountCheckReq) String() string { return proto.CompactTextString(m) } func (*AccountCheckReq) ProtoMessage() {} func (*AccountCheckReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_119cb27841530cfa, []int{5} + return fileDescriptor_user_0a10ad809f213986, []int{5} } func (m *AccountCheckReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AccountCheckReq.Unmarshal(m, b) @@ -328,7 +328,7 @@ func (m *AccountCheckResp) Reset() { *m = AccountCheckResp{} } func (m *AccountCheckResp) String() string { return proto.CompactTextString(m) } func (*AccountCheckResp) ProtoMessage() {} func (*AccountCheckResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_119cb27841530cfa, []int{6} + return fileDescriptor_user_0a10ad809f213986, []int{6} } func (m *AccountCheckResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AccountCheckResp.Unmarshal(m, b) @@ -374,7 +374,7 @@ func (m *AccountCheckResp_SingleUserStatus) Reset() { *m = AccountCheckR func (m *AccountCheckResp_SingleUserStatus) String() string { return proto.CompactTextString(m) } func (*AccountCheckResp_SingleUserStatus) ProtoMessage() {} func (*AccountCheckResp_SingleUserStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_user_119cb27841530cfa, []int{6, 0} + return fileDescriptor_user_0a10ad809f213986, []int{6, 0} } func (m *AccountCheckResp_SingleUserStatus) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AccountCheckResp_SingleUserStatus.Unmarshal(m, b) @@ -421,7 +421,7 @@ func (m *GetUserInfoReq) Reset() { *m = GetUserInfoReq{} } func (m *GetUserInfoReq) String() string { return proto.CompactTextString(m) } func (*GetUserInfoReq) ProtoMessage() {} func (*GetUserInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_119cb27841530cfa, []int{7} + return fileDescriptor_user_0a10ad809f213986, []int{7} } func (m *GetUserInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUserInfoReq.Unmarshal(m, b) @@ -474,7 +474,7 @@ func (m *GetUserInfoResp) Reset() { *m = GetUserInfoResp{} } func (m *GetUserInfoResp) String() string { return proto.CompactTextString(m) } func (*GetUserInfoResp) ProtoMessage() {} func (*GetUserInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_119cb27841530cfa, []int{8} + return fileDescriptor_user_0a10ad809f213986, []int{8} } func (m *GetUserInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUserInfoResp.Unmarshal(m, b) @@ -521,7 +521,7 @@ func (m *UpdateUserInfoReq) Reset() { *m = UpdateUserInfoReq{} } func (m *UpdateUserInfoReq) String() string { return proto.CompactTextString(m) } func (*UpdateUserInfoReq) ProtoMessage() {} func (*UpdateUserInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_119cb27841530cfa, []int{9} + return fileDescriptor_user_0a10ad809f213986, []int{9} } func (m *UpdateUserInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UpdateUserInfoReq.Unmarshal(m, b) @@ -573,7 +573,7 @@ func (m *UpdateUserInfoResp) Reset() { *m = UpdateUserInfoResp{} } func (m *UpdateUserInfoResp) String() string { return proto.CompactTextString(m) } func (*UpdateUserInfoResp) ProtoMessage() {} func (*UpdateUserInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_119cb27841530cfa, []int{10} + return fileDescriptor_user_0a10ad809f213986, []int{10} } func (m *UpdateUserInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UpdateUserInfoResp.Unmarshal(m, b) @@ -615,7 +615,7 @@ func (m *SetReceiveMessageOptReq) Reset() { *m = SetReceiveMessageOptReq func (m *SetReceiveMessageOptReq) String() string { return proto.CompactTextString(m) } func (*SetReceiveMessageOptReq) ProtoMessage() {} func (*SetReceiveMessageOptReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_119cb27841530cfa, []int{11} + return fileDescriptor_user_0a10ad809f213986, []int{11} } func (m *SetReceiveMessageOptReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetReceiveMessageOptReq.Unmarshal(m, b) @@ -682,7 +682,7 @@ func (m *OptResult) Reset() { *m = OptResult{} } func (m *OptResult) String() string { return proto.CompactTextString(m) } func (*OptResult) ProtoMessage() {} func (*OptResult) Descriptor() ([]byte, []int) { - return fileDescriptor_user_119cb27841530cfa, []int{12} + return fileDescriptor_user_0a10ad809f213986, []int{12} } func (m *OptResult) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OptResult.Unmarshal(m, b) @@ -728,7 +728,7 @@ func (m *SetReceiveMessageOptResp) Reset() { *m = SetReceiveMessageOptRe func (m *SetReceiveMessageOptResp) String() string { return proto.CompactTextString(m) } func (*SetReceiveMessageOptResp) ProtoMessage() {} func (*SetReceiveMessageOptResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_119cb27841530cfa, []int{13} + return fileDescriptor_user_0a10ad809f213986, []int{13} } func (m *SetReceiveMessageOptResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetReceiveMessageOptResp.Unmarshal(m, b) @@ -764,7 +764,7 @@ func (m *SetReceiveMessageOptResp) GetOptResultList() []*OptResult { type GetReceiveMessageOptReq struct { FromUserID string `protobuf:"bytes,1,opt,name=FromUserID" json:"FromUserID,omitempty"` - ConversationId []string `protobuf:"bytes,2,rep,name=conversationId" json:"conversationId,omitempty"` + ConversationIdList []string `protobuf:"bytes,2,rep,name=conversationIdList" json:"conversationIdList,omitempty"` OperationID string `protobuf:"bytes,3,opt,name=operationID" json:"operationID,omitempty"` OpUserID string `protobuf:"bytes,4,opt,name=OpUserID" json:"OpUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -776,7 +776,7 @@ func (m *GetReceiveMessageOptReq) Reset() { *m = GetReceiveMessageOptReq func (m *GetReceiveMessageOptReq) String() string { return proto.CompactTextString(m) } func (*GetReceiveMessageOptReq) ProtoMessage() {} func (*GetReceiveMessageOptReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_119cb27841530cfa, []int{14} + return fileDescriptor_user_0a10ad809f213986, []int{14} } func (m *GetReceiveMessageOptReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetReceiveMessageOptReq.Unmarshal(m, b) @@ -803,9 +803,9 @@ func (m *GetReceiveMessageOptReq) GetFromUserID() string { return "" } -func (m *GetReceiveMessageOptReq) GetConversationId() []string { +func (m *GetReceiveMessageOptReq) GetConversationIdList() []string { if m != nil { - return m.ConversationId + return m.ConversationIdList } return nil } @@ -836,7 +836,7 @@ func (m *GetReceiveMessageOptResp) Reset() { *m = GetReceiveMessageOptRe func (m *GetReceiveMessageOptResp) String() string { return proto.CompactTextString(m) } func (*GetReceiveMessageOptResp) ProtoMessage() {} func (*GetReceiveMessageOptResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_119cb27841530cfa, []int{15} + return fileDescriptor_user_0a10ad809f213986, []int{15} } func (m *GetReceiveMessageOptResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetReceiveMessageOptResp.Unmarshal(m, b) @@ -883,7 +883,7 @@ func (m *GetAllConversationMsgOptReq) Reset() { *m = GetAllConversationM func (m *GetAllConversationMsgOptReq) String() string { return proto.CompactTextString(m) } func (*GetAllConversationMsgOptReq) ProtoMessage() {} func (*GetAllConversationMsgOptReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_119cb27841530cfa, []int{16} + return fileDescriptor_user_0a10ad809f213986, []int{16} } func (m *GetAllConversationMsgOptReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetAllConversationMsgOptReq.Unmarshal(m, b) @@ -936,7 +936,7 @@ func (m *GetAllConversationMsgOptResp) Reset() { *m = GetAllConversation func (m *GetAllConversationMsgOptResp) String() string { return proto.CompactTextString(m) } func (*GetAllConversationMsgOptResp) ProtoMessage() {} func (*GetAllConversationMsgOptResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_119cb27841530cfa, []int{17} + return fileDescriptor_user_0a10ad809f213986, []int{17} } func (m *GetAllConversationMsgOptResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetAllConversationMsgOptResp.Unmarshal(m, b) @@ -1295,60 +1295,60 @@ var _User_serviceDesc = grpc.ServiceDesc{ Metadata: "user/user.proto", } -func init() { proto.RegisterFile("user/user.proto", fileDescriptor_user_119cb27841530cfa) } +func init() { proto.RegisterFile("user/user.proto", fileDescriptor_user_0a10ad809f213986) } -var fileDescriptor_user_119cb27841530cfa = []byte{ - // 825 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xdf, 0x6e, 0xd3, 0x3e, - 0x14, 0x56, 0xd6, 0x6e, 0xbf, 0xf5, 0x74, 0x6b, 0xfb, 0xb3, 0xf6, 0x27, 0x04, 0x98, 0x3a, 0x0b, - 0x41, 0xb5, 0x8b, 0x14, 0x86, 0xb8, 0x00, 0x04, 0xd2, 0xe8, 0xb4, 0x68, 0x82, 0xaa, 0x28, 0xd3, - 0x6e, 0xb8, 0x99, 0x42, 0x63, 0x4a, 0xd5, 0x36, 0x0e, 0x71, 0xba, 0x09, 0x90, 0xb8, 0x81, 0xb7, - 0xe0, 0x82, 0xe7, 0xe0, 0x35, 0x78, 0x01, 0x5e, 0x05, 0xc5, 0x4e, 0x5a, 0x3b, 0x49, 0x5b, 0x54, - 0xb8, 0xe0, 0xa6, 0xaa, 0x3f, 0x1f,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, 0x14, 0x58, 0xa4, - 0xd6, 0x80, 0x75, 0x9a, 0x28, 0xd0, 0x84, 0x02, 0x2a, 0x29, 0xa0, 0x92, 0x02, 0x61, 0x9c, 0x0c, - 0x61, 0x17, 0x6a, 0x6a, 0xc2, 0xa5, 0x24, 0xec, 0x01, 0x64, 0xc8, 0x4b, 0x08, 0x7e, 0x0f, 0xd5, - 0xa3, 0x6e, 0x97, 0x8e, 0xbd, 0xb0, 0xf5, 0x96, 0x74, 0x07, 0x11, 0xed, 0x06, 0x54, 0xf9, 0x7f, - 0x69, 0x9d, 0xc6, 0xd7, 0xa5, 0x61, 0xe5, 0x88, 0x56, 0xe6, 0x1f, 0x51, 0x21, 0x7b, 0x44, 0x3f, - 0x35, 0xa8, 0xa9, 0x7b, 0x0b, 0x85, 0xdd, 0xdf, 0x50, 0x38, 0x8d, 0x41, 0x16, 0x80, 0x4d, 0xd8, - 0x78, 0x18, 0x4e, 0x14, 0x96, 0x0f, 0xef, 0x88, 0x15, 0xe9, 0xec, 0xe6, 0x59, 0xdf, 0xeb, 0x0d, - 0x79, 0x49, 0x9c, 0x85, 0x4e, 0x38, 0x66, 0xb6, 0xb4, 0xd4, 0x78, 0x09, 0xb5, 0xf4, 0x7c, 0x54, - 0xda, 0x63, 0xf9, 0x00, 0xe3, 0x11, 0xba, 0x05, 0x9b, 0x8e, 0x48, 0x2e, 0x02, 0x63, 0xf9, 0x2a, - 0x88, 0x3d, 0xa8, 0x58, 0x24, 0xe4, 0x86, 0x78, 0x6f, 0x68, 0xe4, 0xed, 0x1e, 0xc0, 0x38, 0x6d, - 0xab, 0x84, 0xfc, 0xa1, 0xa3, 0x9f, 0x78, 0x0d, 0x4e, 0xf7, 0x5b, 0xca, 0xcf, 0x87, 0xb0, 0x91, - 0x64, 0xe0, 0x24, 0x0b, 0xdc, 0xd1, 0x6d, 0x93, 0x46, 0xef, 0x45, 0x7f, 0x74, 0xc1, 0xdc, 0x81, - 0x39, 0xd9, 0x42, 0x09, 0xc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, 0xbf, 0xca, 0x94, 0x0b, 0x00, 0x00, +var fileDescriptor_user_0a10ad809f213986 = []byte{ + // 829 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xcd, 0x6e, 0xd3, 0x4a, + 0x14, 0x96, 0x9b, 0xb4, 0xb7, 0x39, 0x69, 0x93, 0xdc, 0x51, 0x7f, 0x7c, 0x7d, 0xa1, 0x4a, 0x47, + 0x08, 0xa2, 0x2e, 0x1c, 0x28, 0x62, 0x01, 0x08, 0xa4, 0x92, 0xaa, 0x56, 0x05, 0x51, 0x90, 0xab, + 0x6e, 0xd8, 0x54, 0x26, 0x1e, 0x42, 0x94, 0xc4, 0x63, 0x3c, 0x4e, 0x2b, 0x40, 0x62, 0x03, 0x6f, + 0xc1, 0x82, 0x25, 0xcf, 0xc0, 0x6b, 0xf0, 0x02, 0xbc, 0x0a, 0xf2, 0x8c, 0x9d, 0xcc, 0xd8, 0x4e, + 0x82, 0x02, 0x0b, 0x36, 0x51, 0xe6, 0x9b, 0x33, 0x67, 0xbe, 0xef, 0x9b, 0x33, 0xe3, 0x03, 0xd5, + 0x31, 0x23, 0x41, 0x33, 0xfa, 0x31, 0xfd, 0x80, 0x86, 0x14, 0x15, 0xa3, 0xff, 0xc6, 0x7e, 0xc7, + 0x27, 0xde, 0xc5, 0x69, 0xbb, 0xe9, 0x0f, 0x7a, 0x4d, 0x3e, 0xd1, 0x64, 0xee, 0xe0, 0xe2, 0x8a, + 0x35, 0xaf, 0x98, 0x08, 0xc4, 0x8f, 0x01, 0x5a, 0x74, 0x34, 0xa2, 0x9e, 0x4d, 0x98, 0x8f, 0x74, + 0xf8, 0x87, 0x04, 0x41, 0x8b, 0xba, 0x44, 0xd7, 0xea, 0x5a, 0x63, 0xd5, 0x4e, 0x86, 0x68, 0x07, + 0xd6, 0x48, 0x10, 0xb4, 0x59, 0x4f, 0x5f, 0xa9, 0x6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x40, 0xea, 0x61, + 0x12, 0x02, 0x6a, 0x4b, 0x95, 0x10, 0x48, 0x37, 0x3b, 0x8f, 0x60, 0x43, 0xee, 0x1e, 0xd0, 0x94, + 0xa7, 0xdc, 0xa2, 0x18, 0x3b, 0x79, 0x30, 0xf3, 0xd1, 0x39, 0x6c, 0xe5, 0x5d, 0x78, 0x74, 0x5d, + 0xc4, 0xcf, 0x78, 0x15, 0x8d, 0xbd, 0x79, 0xd3, 0x22, 0xad, 0x35, 0x27, 0xad, 0x35, 0x3f, 0xed, + 0xcc, 0x2b, 0xe5, 0xf0, 0xeb, 0x96, 0x5b, 0x53, 0x68, 0x5f, 0x56, 0x98, 0x5b, 0xf1, 0x06, 0x5e, + 0x14, 0x22, 0xfc, 0x94, 0xbb, 0x89, 0xc4, 0xcf, 0x54, 0xef, 0x94, 0xf8, 0x99, 0x6e, 0x3c, 0x9e, + 0x6c, 0xbe, 0x28, 0x9b, 0xbc, 0x07, 0x7f, 0x18, 0xfd, 0xbc, 0x5c, 0xe3, 0x0d, 0xf6, 0xdd, 0x9f, + 0x01, 0x00, 0x00, 0xff, 0xff, 0x88, 0x5d, 0x20, 0xc1, 0x9c, 0x0b, 0x00, 0x00, } diff --git a/pkg/proto/user/user.proto b/pkg/proto/user/user.proto index 2efd32ae4..7690167ed 100644 --- a/pkg/proto/user/user.proto +++ b/pkg/proto/user/user.proto @@ -86,7 +86,7 @@ message SetReceiveMessageOptResp{ message GetReceiveMessageOptReq{ string FromUserID = 1; - repeated string conversationId = 2; + repeated string conversationIdList = 2; string operationID = 3; string OpUserID = 4; } From ddf985b4456c1a09e4b89e65ae880405491552b1 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 11:31:53 +0800 Subject: [PATCH 089/337] Refactor code --- internal/api/friend/friend.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go index a22f9b813..8046ef219 100644 --- a/internal/api/friend/friend.go +++ b/internal/api/friend/friend.go @@ -381,7 +381,7 @@ func GetFriendApplyList(c *gin.Context) { return } req := &rpc.GetFriendApplyListReq{CommID: &rpc.CommID{}} - utils.CopyStructFields(req.CommID, ¶ms.ParamsCommFriend) + utils.CopyStructFields(req.CommID, ¶ms) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { From ce6cd8070fa7b06ac947a86c777bbdfe2204d9fb Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 29 Dec 2021 11:32:20 +0800 Subject: [PATCH 090/337] conversation update --- go.mod | 1 + 1 file changed, 1 insertion(+) diff --git a/go.mod b/go.mod index 911f68c00..a53930ed5 100644 --- a/go.mod +++ b/go.mod @@ -31,6 +31,7 @@ require ( github.com/lestrrat-go/strftime v1.0.4 // indirect github.com/lib/pq v1.2.0 // indirect github.com/mattn/go-sqlite3 v1.14.6 // indirect + github.com/mitchellh/mapstructure v1.4.2 github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 github.com/olivere/elastic/v7 v7.0.23 github.com/pierrec/lz4 v2.6.1+incompatible // indirect From 5ff69b86db5ae21d987f76ab39a1a2504dc20731 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 11:36:45 +0800 Subject: [PATCH 091/337] Refactor code --- internal/api/friend/friend.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go index 8046ef219..a28b4c6e0 100644 --- a/internal/api/friend/friend.go +++ b/internal/api/friend/friend.go @@ -403,7 +403,7 @@ func GetFriendApplyList(c *gin.Context) { resp := api.GetFriendApplyListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, FriendRequestList: RpcResp.FriendRequestList} log.NewInfo(req.CommID.OperationID, "GetFriendApplyList api return ", resp) - + c.JSON(http.StatusOK, resp) } func GetSelfApplyList(c *gin.Context) { From ec395acae067af21988c9818d765028c330fb70a Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 11:37:52 +0800 Subject: [PATCH 092/337] Refactor code --- internal/api/friend/friend.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go index a28b4c6e0..040402f28 100644 --- a/internal/api/friend/friend.go +++ b/internal/api/friend/friend.go @@ -272,8 +272,8 @@ func RemoveBlacklist(c *gin.Context) { return } resp := api.RemoveBlackListResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} - c.JSON(http.StatusOK, resp) log.NewInfo(req.CommID.OperationID, "RemoveBlacklist api return ", resp) + c.JSON(http.StatusOK, resp) } func IsFriend(c *gin.Context) { @@ -303,8 +303,8 @@ func IsFriend(c *gin.Context) { return } resp := api.IsFriendResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, Response: RpcResp.Response} - c.JSON(http.StatusOK, resp) log.NewInfo(req.CommID.OperationID, "IsFriend api return ", resp) + c.JSON(http.StatusOK, resp) } // From 2e0923a26a43d2503d96d6879d57ee2133dabb3a Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 11:52:51 +0800 Subject: [PATCH 093/337] Refactor code --- internal/api/friend/friend.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go index 040402f28..aabae58ce 100644 --- a/internal/api/friend/friend.go +++ b/internal/api/friend/friend.go @@ -7,6 +7,7 @@ import ( "Open_IM/pkg/common/token_verify" "Open_IM/pkg/grpc-etcdv3/getcdv3" rpc "Open_IM/pkg/proto/friend" + open_im_sdk "Open_IM/pkg/proto/sdk_ws" "Open_IM/pkg/utils" "context" "github.com/gin-gonic/gin" @@ -432,8 +433,10 @@ func GetSelfApplyList(c *gin.Context) { c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call get self apply list rpc server failed"}) return } - resp := api.GetSelfApplyListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, FriendRequestList: RpcResp.FriendRequestList} + if len(resp.FriendRequestList) == 0 { + resp.FriendRequestList = []*open_im_sdk.FriendRequest{} + } log.NewInfo(req.CommID.OperationID, "GetSelfApplyList api return ", resp) c.JSON(http.StatusOK, resp) } From db37d0197a01e58b572930669c8693a4fe619665 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 11:57:28 +0800 Subject: [PATCH 094/337] Refactor code --- internal/api/friend/friend.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go index aabae58ce..7cd45e1c0 100644 --- a/internal/api/friend/friend.go +++ b/internal/api/friend/friend.go @@ -403,6 +403,9 @@ func GetFriendApplyList(c *gin.Context) { } resp := api.GetFriendApplyListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, FriendRequestList: RpcResp.FriendRequestList} + if len(resp.FriendRequestList) == 0 { + resp.FriendRequestList = []*open_im_sdk.FriendRequest{} + } log.NewInfo(req.CommID.OperationID, "GetFriendApplyList api return ", resp) c.JSON(http.StatusOK, resp) } From 447ccdf04226d706af6d79b20fffa0915ba03f94 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 12:02:55 +0800 Subject: [PATCH 095/337] Refactor code --- cmd/open_im_api/main.go | 6 +++--- internal/api/friend/friend.go | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index 1f7f88c09..0a83053d1 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -31,9 +31,9 @@ func main() { friendRouterGroup := r.Group("/friend") { // friendRouterGroup.POST("/get_friends_info", friend.GetFriendsInfo) - friendRouterGroup.POST("/add_friend", friend.AddFriend) //1 - friendRouterGroup.POST("/get_friend_apply_list", friend.GetFriendApplyList) - friendRouterGroup.POST("/get_self_apply_list", friend.GetSelfApplyList) //1 + friendRouterGroup.POST("/add_friend", friend.AddFriend) //1 + friendRouterGroup.POST("/get_friend_apply_list", friend.GetFriendApplyList) //1 + friendRouterGroup.POST("/get_self_apply_list", friend.GetSelfApplyList) //1 friendRouterGroup.POST("/get_friend_list", friend.GetFriendList) friendRouterGroup.POST("/add_blacklist", friend.AddBlacklist) friendRouterGroup.POST("/get_blacklist", friend.GetBlacklist) diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go index 7cd45e1c0..0fa12600f 100644 --- a/internal/api/friend/friend.go +++ b/internal/api/friend/friend.go @@ -120,6 +120,8 @@ func AddFriendResponse(c *gin.Context) { } req := &rpc.AddFriendResponseReq{CommID: &rpc.CommID{}} utils.CopyStructFields(req.CommID, ¶ms.ParamsCommFriend) + req.HandleMsg = params.HandleMsg + req.Flag = params.Flag var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { From df861b59c11bd3922fdf452249aec9fa95ba5d84 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 12:06:26 +0800 Subject: [PATCH 096/337] Refactor code --- pkg/base_info/friend_api_struct.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/base_info/friend_api_struct.go b/pkg/base_info/friend_api_struct.go index a45e7ccfa..ba1290a44 100644 --- a/pkg/base_info/friend_api_struct.go +++ b/pkg/base_info/friend_api_struct.go @@ -35,7 +35,7 @@ type AddFriendResp struct { type AddFriendResponseReq struct { ParamsCommFriend - Flag int32 `json:"flag" binding:"required"` + Flag int32 `json:"flag" binding:"required, oneof=-1 1"` HandleMsg string `json:"handleMsg"` } type AddFriendResponseResp struct { From c42e70686dfa2f3e537d660d657544ff6c78a7ff Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 12:13:00 +0800 Subject: [PATCH 097/337] Refactor code --- internal/rpc/friend/firend.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/internal/rpc/friend/firend.go b/internal/rpc/friend/firend.go index e0ba79824..2fec04b68 100644 --- a/internal/rpc/friend/firend.go +++ b/internal/rpc/friend/firend.go @@ -258,14 +258,15 @@ 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 { + log.NewError(req.CommID.OperationID, "InsertToFriend failed ", err.Error(), toInsertFollow) + return &pbFriend.AddFriendResponseResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil + } + chat.FriendAddedNotification(req.CommID.OperationID, req.CommID.OpUserID, req.CommID.FromUserID, req.CommID.ToUserID) } - toInsertFollow := imdb.Friend{OwnerUserID: req.CommID.ToUserID, FriendUserID: req.CommID.FromUserID, OperatorUserID: req.CommID.OpUserID} - err = imdb.InsertToFriend(&toInsertFollow) - if err != nil { - log.NewError(req.CommID.OperationID, "InsertToFriend failed ", err.Error(), toInsertFollow) - return &pbFriend.AddFriendResponseResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil - } - chat.FriendAddedNotification(req.CommID.OperationID, req.CommID.OpUserID, req.CommID.FromUserID, req.CommID.ToUserID) } chat.FriendApplicationProcessedNotification(req) From c4fca3b23d48682da91c391a0425f159f02707bb Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 29 Dec 2021 12:22:10 +0800 Subject: [PATCH 098/337] nil return modify --- internal/api/conversation/conversation.go | 18 ++++++++++----- internal/api/manage/management_user.go | 28 +++++++++++------------ 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/internal/api/conversation/conversation.go b/internal/api/conversation/conversation.go index 38030279e..2a66be9dd 100644 --- a/internal/api/conversation/conversation.go +++ b/internal/api/conversation/conversation.go @@ -39,8 +39,10 @@ func GetAllConversationMessageOpt(c *gin.Context) { c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": "GetAllConversationMsgOpt rpc failed, " + err.Error()}) return } - resp := api.GetAllConversationMessageOptResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} - resp.ConversationOptResultList = RpcResp.ConversationOptResultList + resp := api.GetAllConversationMessageOptResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, ConversationOptResultList: RpcResp.ConversationOptResultList} + if len(RpcResp.ConversationOptResultList) == 0 { + resp.ConversationOptResultList = []*user.OptResult{} + } log.NewInfo(req.OperationID, "GetAllConversationMsgOpt api return: ", resp) c.JSON(http.StatusOK, resp) } @@ -69,8 +71,10 @@ func GetReceiveMessageOpt(c *gin.Context) { c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": "GetReceiveMessageOpt rpc failed, " + err.Error()}) return } - resp := api.GetReceiveMessageOptResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} - resp.ConversationOptResultList = RpcResp.ConversationOptResultList + resp := api.GetReceiveMessageOptResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, ConversationOptResultList: RpcResp.ConversationOptResultList} + if len(RpcResp.ConversationOptResultList) == 0 { + resp.ConversationOptResultList = []*user.OptResult{} + } log.NewInfo(req.OperationID, "GetReceiveMessageOpt api return: ", resp) c.JSON(http.StatusOK, resp) } @@ -99,8 +103,10 @@ func SetReceiveMessageOpt(c *gin.Context) { c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": "SetReceiveMessageOpt rpc failed, " + err.Error()}) return } - resp := api.SetReceiveMessageOptResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} - resp.OptResultList = RpcResp.OptResultList + resp := api.SetReceiveMessageOptResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, OptResultList: RpcResp.OptResultList} + if len(RpcResp.OptResultList) == 0 { + resp.OptResultList = []*user.OptResult{} + } log.NewInfo(req.OperationID, "SetReceiveMessageOpt api return: ", resp) c.JSON(http.StatusOK, resp) } diff --git a/internal/api/manage/management_user.go b/internal/api/manage/management_user.go index 605bb5ddd..6ef6f678f 100644 --- a/internal/api/manage/management_user.go +++ b/internal/api/manage/management_user.go @@ -47,12 +47,10 @@ func DeleteUser(c *gin.Context) { c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call delete users rpc server failed"}) return } - failedUserIDList := make([]string, 0) - for _, v := range RpcResp.FailedUserIDList { - failedUserIDList = append(failedUserIDList, v) + resp := api.DeleteUsersResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, FailedUserIDList: RpcResp.FailedUserIDList} + if len(RpcResp.FailedUserIDList) == 0 { + resp.FailedUserIDList = []string{} } - resp := api.DeleteUsersResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} - resp.FailedUserIDList = failedUserIDList log.NewInfo(req.OperationID, "DeleteUser api return", resp) c.JSON(http.StatusOK, resp) } @@ -80,12 +78,10 @@ func GetAllUsersUid(c *gin.Context) { c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call GetAllUsersUid users rpc server failed"}) return } - userIDList := make([]string, 0) - for _, v := range RpcResp.UserIDList { - userIDList = append(userIDList, v) + resp := api.GetAllUsersUidResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, UserIDList: RpcResp.UserIDList} + if len(RpcResp.UserIDList) == 0 { + resp.UserIDList = []string{} } - resp := api.GetAllUsersUidResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} - resp.UserIDList = userIDList log.NewInfo(req.OperationID, "GetAllUsersUid api return", resp) c.JSON(http.StatusOK, resp) @@ -115,8 +111,10 @@ func AccountCheck(c *gin.Context) { c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call AccountCheck users rpc server failed"}) return } - resp := api.AccountCheckResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} - resp.ResultList = RpcResp.ResultList + resp := api.AccountCheckResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, ResultList: RpcResp.ResultList} + if len(RpcResp.ResultList) == 0 { + resp.ResultList = []*rpc.AccountCheckResp_SingleUserStatus{} + } log.NewInfo(req.OperationID, "AccountCheck api return", resp) c.JSON(http.StatusOK, resp) } @@ -172,8 +170,10 @@ func GetUsersOnlineStatus(c *gin.Context) { } respResult = append(respResult, temp) } - resp := api.GetUsersOnlineStatusResp{CommResp: api.CommResp{ErrCode: 0, ErrMsg: ""}} - resp.SuccessResult = respResult + resp := api.GetUsersOnlineStatusResp{CommResp: api.CommResp{ErrCode: 0, ErrMsg: ""}, SuccessResult: respResult} + if len(respResult) == 0 { + resp.SuccessResult = []*pbRelay.GetUsersOnlineStatusResp_SuccessResult{} + } log.NewInfo(req.OperationID, "GetUsersOnlineStatus api return", resp) c.JSON(http.StatusOK, resp) From 7b67dc03f7965de31f33a9bb7ac92a19d4d6f833 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 12:29:39 +0800 Subject: [PATCH 099/337] Refactor code --- internal/rpc/friend/firend.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/rpc/friend/firend.go b/internal/rpc/friend/firend.go index 2fec04b68..0b189217c 100644 --- a/internal/rpc/friend/firend.go +++ b/internal/rpc/friend/firend.go @@ -257,7 +257,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) + log.NewWarn(req.CommID.OperationID, "GetFriendRelationshipFromFriend 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) From a8e13d86e2ac0be7f08bc771575c5313085c9245 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 13:30:50 +0800 Subject: [PATCH 100/337] Refactor code --- pkg/base_info/friend_api_struct.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/base_info/friend_api_struct.go b/pkg/base_info/friend_api_struct.go index ba1290a44..e587853f5 100644 --- a/pkg/base_info/friend_api_struct.go +++ b/pkg/base_info/friend_api_struct.go @@ -35,7 +35,9 @@ type AddFriendResp struct { type AddFriendResponseReq struct { ParamsCommFriend - Flag int32 `json:"flag" binding:"required, oneof=-1 1"` + //binding:"oneof=0 1 2"` + //} + Flag int32 `json:"flag" binding:"required,oneof=0 1"` HandleMsg string `json:"handleMsg"` } type AddFriendResponseResp struct { From 7903dc7c2ebba1c2fad20b5da43986a23d9aba39 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 13:34:13 +0800 Subject: [PATCH 101/337] Refactor code --- pkg/base_info/friend_api_struct.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/base_info/friend_api_struct.go b/pkg/base_info/friend_api_struct.go index e587853f5..2522288a8 100644 --- a/pkg/base_info/friend_api_struct.go +++ b/pkg/base_info/friend_api_struct.go @@ -37,7 +37,7 @@ type AddFriendResponseReq struct { ParamsCommFriend //binding:"oneof=0 1 2"` //} - Flag int32 `json:"flag" binding:"required,oneof=0 1"` + Flag int32 `json:"flag" binding:"required,oneof=-1 0 1"` HandleMsg string `json:"handleMsg"` } type AddFriendResponseResp struct { From e75e36e99919af57480a3e4441a146ef502f1660 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 13:40:26 +0800 Subject: [PATCH 102/337] Refactor code --- cmd/open_im_api/main.go | 2 +- internal/api/friend/friend.go | 2 +- pkg/base_info/friend_api_struct.go | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index 0a83053d1..5b138b7c3 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -39,7 +39,7 @@ func main() { friendRouterGroup.POST("/get_blacklist", friend.GetBlacklist) friendRouterGroup.POST("/remove_blacklist", friend.RemoveBlacklist) friendRouterGroup.POST("/delete_friend", friend.DeleteFriend) - friendRouterGroup.POST("/add_friend_response", friend.AddFriendResponse) + friendRouterGroup.POST("/add_friend_response", friend.AddFriendResponse) //1 friendRouterGroup.POST("/set_friend_comment", friend.SetFriendComment) friendRouterGroup.POST("/is_friend", friend.IsFriend) friendRouterGroup.POST("/import_friend", friend.ImportFriend) diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go index 0fa12600f..c31891c32 100644 --- a/internal/api/friend/friend.go +++ b/internal/api/friend/friend.go @@ -352,7 +352,7 @@ func GetFriendList(c *gin.Context) { return } req := &rpc.GetFriendListReq{CommID: &rpc.CommID{}} - utils.CopyStructFields(req.CommID, ¶ms.ParamsCommFriend) + utils.CopyStructFields(req.CommID, ¶ms) var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { diff --git a/pkg/base_info/friend_api_struct.go b/pkg/base_info/friend_api_struct.go index 2522288a8..e452eafda 100644 --- a/pkg/base_info/friend_api_struct.go +++ b/pkg/base_info/friend_api_struct.go @@ -103,7 +103,8 @@ type GetFriendsInfoResp struct { } type GetFriendListReq struct { - ParamsCommFriend + OperationID string `json:"operationID" binding:"required"` + FromUserID string `json:"fromUserID" binding:"required"` } type GetFriendListResp struct { CommResp From d58dc295504b3ae7489c3e9dba73f6ce5044934b Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 13:45:22 +0800 Subject: [PATCH 103/337] Refactor code --- internal/rpc/friend/firend.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/rpc/friend/firend.go b/internal/rpc/friend/firend.go index 0b189217c..33ffde291 100644 --- a/internal/rpc/friend/firend.go +++ b/internal/rpc/friend/firend.go @@ -410,7 +410,7 @@ func (s *friendServer) GetFriendList(ctx context.Context, req *pbFriend.GetFrien for _, friendUser := range friends { var friendUserInfo sdkws.FriendInfo - utils.CopyStructFields(&friendUserInfo, friendUser) + utils.CopyStructFields(&friendUserInfo, &friendUser) userInfoList = append(userInfoList, &friendUserInfo) } log.NewInfo(req.CommID.OperationID, "rpc GetFriendList ok", pbFriend.GetFriendListResp{FriendInfoList: userInfoList}) From c049cde8cf86e9912b2d25b6a183fe521a7b90e2 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 13:49:39 +0800 Subject: [PATCH 104/337] Refactor code --- internal/api/friend/friend.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go index c31891c32..b563ac165 100644 --- a/internal/api/friend/friend.go +++ b/internal/api/friend/friend.go @@ -372,6 +372,9 @@ func GetFriendList(c *gin.Context) { } resp := api.GetFriendListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, FriendInfoList: RpcResp.FriendInfoList} + if len(resp.FriendInfoList) == 0 { + resp.FriendInfoList = []*open_im_sdk.FriendInfo{} + } log.NewInfo(req.CommID.OperationID, "GetFriendList api return ", resp) c.JSON(http.StatusOK, resp) } From f2fa08ea82c951cae91dc413b392ff9a04157593 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 13:56:50 +0800 Subject: [PATCH 105/337] Refactor code --- internal/rpc/friend/firend.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/rpc/friend/firend.go b/internal/rpc/friend/firend.go index 33ffde291..37abff801 100644 --- a/internal/rpc/friend/firend.go +++ b/internal/rpc/friend/firend.go @@ -408,7 +408,7 @@ func (s *friendServer) GetFriendList(ctx context.Context, req *pbFriend.GetFrien } var userInfoList []*sdkws.FriendInfo for _, friendUser := range friends { - + log.NewDebug(req.CommID.OperationID, "friends : ", friendUser) var friendUserInfo sdkws.FriendInfo utils.CopyStructFields(&friendUserInfo, &friendUser) userInfoList = append(userInfoList, &friendUserInfo) From 903b53033d018f4583ec24f33192be490babb3a2 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 14:06:25 +0800 Subject: [PATCH 106/337] Refactor code --- internal/rpc/friend/firend.go | 4 ++-- pkg/common/utils/utils.go | 28 ++++++++++++++-------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/internal/rpc/friend/firend.go b/internal/rpc/friend/firend.go index 37abff801..b4660bd49 100644 --- a/internal/rpc/friend/firend.go +++ b/internal/rpc/friend/firend.go @@ -408,9 +408,9 @@ func (s *friendServer) GetFriendList(ctx context.Context, req *pbFriend.GetFrien } var userInfoList []*sdkws.FriendInfo for _, friendUser := range friends { - log.NewDebug(req.CommID.OperationID, "friends : ", friendUser) var friendUserInfo sdkws.FriendInfo - utils.CopyStructFields(&friendUserInfo, &friendUser) + cp.FriendDBCopyOpenIM(&friendUserInfo, &friendUser) + log.NewDebug(req.CommID.OperationID, "friends : ", friendUser, "openim friends: ", friendUserInfo) userInfoList = append(userInfoList, &friendUserInfo) } log.NewInfo(req.CommID.OperationID, "rpc GetFriendList ok", pbFriend.GetFriendListResp{FriendInfoList: userInfoList}) diff --git a/pkg/common/utils/utils.go b/pkg/common/utils/utils.go index ca67f33e2..61dc47be0 100644 --- a/pkg/common/utils/utils.go +++ b/pkg/common/utils/utils.go @@ -14,12 +14,12 @@ func OperationIDGenerator() string { return strconv.FormatInt(time.Now().UnixNano()+int64(rand.Uint32()), 10) } -func FriendOpenIMCopyDB(dst *imdb.Friend, src open_im_sdk.FriendInfo) { +func FriendOpenIMCopyDB(dst *imdb.Friend, src *open_im_sdk.FriendInfo) { utils.CopyStructFields(dst, src) dst.FriendUserID = src.FriendUser.UserID } -func FriendDBCopyOpenIM(dst *open_im_sdk.FriendInfo, src imdb.Friend) { +func FriendDBCopyOpenIM(dst *open_im_sdk.FriendInfo, src *imdb.Friend) { utils.CopyStructFields(dst, src) user, _ := imdb.GetUserByUserID(src.FriendUserID) if user != nil { @@ -30,21 +30,21 @@ func FriendDBCopyOpenIM(dst *open_im_sdk.FriendInfo, src imdb.Friend) { } // -func FriendRequestOpenIMCopyDB(dst *imdb.FriendRequest, src open_im_sdk.FriendRequest) { +func FriendRequestOpenIMCopyDB(dst *imdb.FriendRequest, src *open_im_sdk.FriendRequest) { utils.CopyStructFields(dst, src) } -func FriendRequestDBCopyOpenIM(dst *open_im_sdk.FriendRequest, src imdb.FriendRequest) { +func FriendRequestDBCopyOpenIM(dst *open_im_sdk.FriendRequest, src *imdb.FriendRequest) { utils.CopyStructFields(dst, src) dst.CreateTime = src.CreateTime.Unix() dst.HandleTime = src.HandleTime.Unix() } -func GroupOpenIMCopyDB(dst *imdb.Group, src open_im_sdk.GroupInfo) { +func GroupOpenIMCopyDB(dst *imdb.Group, src *open_im_sdk.GroupInfo) { utils.CopyStructFields(dst, src) } -func GroupDBCopyOpenIM(dst *open_im_sdk.GroupInfo, src imdb.Group) { +func GroupDBCopyOpenIM(dst *open_im_sdk.GroupInfo, src *imdb.Group) { utils.CopyStructFields(dst, src) user, _ := imdb.GetGroupOwnerInfoByGroupID(src.GroupID) if user != nil { @@ -54,11 +54,11 @@ func GroupDBCopyOpenIM(dst *open_im_sdk.GroupInfo, src imdb.Group) { dst.CreateTime = src.CreateTime.Unix() } -func GroupMemberOpenIMCopyDB(dst *imdb.GroupMember, src open_im_sdk.GroupMemberFullInfo) { +func GroupMemberOpenIMCopyDB(dst *imdb.GroupMember, src *open_im_sdk.GroupMemberFullInfo) { utils.CopyStructFields(dst, src) } -func GroupMemberDBCopyOpenIM(dst *open_im_sdk.GroupMemberFullInfo, src imdb.GroupMember) { +func GroupMemberDBCopyOpenIM(dst *open_im_sdk.GroupMemberFullInfo, src *imdb.GroupMember) { utils.CopyStructFields(dst, src) if token_verify.IsMangerUserID(src.UserID) { u, _ := imdb.GetUserByUserID(src.UserID) @@ -70,31 +70,31 @@ func GroupMemberDBCopyOpenIM(dst *open_im_sdk.GroupMemberFullInfo, src imdb.Grou dst.JoinTime = src.JoinTime.Unix() } -func GroupRequestOpenIMCopyDB(dst *imdb.GroupRequest, src open_im_sdk.GroupRequest) { +func GroupRequestOpenIMCopyDB(dst *imdb.GroupRequest, src *open_im_sdk.GroupRequest) { utils.CopyStructFields(dst, src) } -func GroupRequestDBCopyOpenIM(dst *open_im_sdk.GroupRequest, src imdb.GroupRequest) { +func GroupRequestDBCopyOpenIM(dst *open_im_sdk.GroupRequest, src *imdb.GroupRequest) { utils.CopyStructFields(dst, src) dst.ReqTime = src.ReqTime.Unix() dst.HandleTime = src.HandledTime.Unix() } -func UserOpenIMCopyDB(dst *imdb.User, src open_im_sdk.UserInfo) { +func UserOpenIMCopyDB(dst *imdb.User, src *open_im_sdk.UserInfo) { utils.CopyStructFields(dst, src) } -func UserDBCopyOpenIM(dst *open_im_sdk.UserInfo, src imdb.User) { +func UserDBCopyOpenIM(dst *open_im_sdk.UserInfo, src *imdb.User) { utils.CopyStructFields(dst, src) dst.CreateTime = src.CreateTime.Unix() } -func BlackOpenIMCopyDB(dst *imdb.Black, src open_im_sdk.BlackInfo) { +func BlackOpenIMCopyDB(dst *imdb.Black, src *open_im_sdk.BlackInfo) { utils.CopyStructFields(dst, src) dst.BlockUserID = src.BlackUserInfo.UserID } -func BlackDBCopyOpenIM(dst *open_im_sdk.BlackInfo, src imdb.Black) { +func BlackDBCopyOpenIM(dst *open_im_sdk.BlackInfo, src *imdb.Black) { utils.CopyStructFields(dst, src) dst.CreateTime = src.CreateTime.Unix() user, _ := imdb.GetUserByUserID(src.BlockUserID) From d99f3e1522e46699a19b3a4fbecc58f09017fbac Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 14:08:46 +0800 Subject: [PATCH 107/337] Refactor code --- internal/rpc/friend/firend.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/rpc/friend/firend.go b/internal/rpc/friend/firend.go index b4660bd49..cb2bae86a 100644 --- a/internal/rpc/friend/firend.go +++ b/internal/rpc/friend/firend.go @@ -459,7 +459,7 @@ func (s *friendServer) GetSelfApplyList(ctx context.Context, req *pbFriend.GetSe var selfApplyOtherUserList []*sdkws.FriendRequest for _, selfApplyOtherUserInfo := range usersInfo { var userInfo sdkws.FriendRequest // pbFriend.ApplyUserInfo - cp.FriendRequestDBCopyOpenIM(&userInfo, selfApplyOtherUserInfo) + cp.FriendRequestDBCopyOpenIM(&userInfo, &selfApplyOtherUserInfo) selfApplyOtherUserList = append(selfApplyOtherUserList, &userInfo) } log.NewInfo(req.CommID.OperationID, "rpc GetSelfApplyList ok", pbFriend.GetSelfApplyListResp{FriendRequestList: selfApplyOtherUserList}) From c7b7847a8299d7e557993d689d01639e110416f7 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 14:14:08 +0800 Subject: [PATCH 108/337] Refactor code --- internal/rpc/friend/firend.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/rpc/friend/firend.go b/internal/rpc/friend/firend.go index cb2bae86a..e86851275 100644 --- a/internal/rpc/friend/firend.go +++ b/internal/rpc/friend/firend.go @@ -408,7 +408,7 @@ func (s *friendServer) GetFriendList(ctx context.Context, req *pbFriend.GetFrien } var userInfoList []*sdkws.FriendInfo for _, friendUser := range friends { - var friendUserInfo sdkws.FriendInfo + friendUserInfo := sdkws.FriendInfo{FriendUser: &sdkws.UserInfo{}} cp.FriendDBCopyOpenIM(&friendUserInfo, &friendUser) log.NewDebug(req.CommID.OperationID, "friends : ", friendUser, "openim friends: ", friendUserInfo) userInfoList = append(userInfoList, &friendUserInfo) From 20aa2bdc6e083b983436025e1020e2c3b3a7bdf5 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 14:25:39 +0800 Subject: [PATCH 109/337] Refactor code --- cmd/open_im_api/main.go | 4 +- internal/api/friend/friend.go | 8 +- internal/rpc/friend/firend.go | 8 +- pkg/base_info/friend_api_struct.go | 4 +- pkg/proto/friend/friend.pb.go | 268 ++++++++++++++--------------- pkg/proto/friend/friend.proto | 6 +- 6 files changed, 149 insertions(+), 149 deletions(-) diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index 5b138b7c3..0d77d9106 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -34,13 +34,13 @@ func main() { friendRouterGroup.POST("/add_friend", friend.AddFriend) //1 friendRouterGroup.POST("/get_friend_apply_list", friend.GetFriendApplyList) //1 friendRouterGroup.POST("/get_self_apply_list", friend.GetSelfApplyList) //1 - friendRouterGroup.POST("/get_friend_list", friend.GetFriendList) + friendRouterGroup.POST("/get_friend_list", friend.GetFriendList) //1 friendRouterGroup.POST("/add_blacklist", friend.AddBlacklist) friendRouterGroup.POST("/get_blacklist", friend.GetBlacklist) friendRouterGroup.POST("/remove_blacklist", friend.RemoveBlacklist) friendRouterGroup.POST("/delete_friend", friend.DeleteFriend) friendRouterGroup.POST("/add_friend_response", friend.AddFriendResponse) //1 - friendRouterGroup.POST("/set_friend_comment", friend.SetFriendComment) + friendRouterGroup.POST("/set_friend_remark", friend.SetFriendComment) friendRouterGroup.POST("/is_friend", friend.IsFriend) friendRouterGroup.POST("/import_friend", friend.ImportFriend) } diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go index b563ac165..1ffa54413 100644 --- a/internal/api/friend/friend.go +++ b/internal/api/friend/friend.go @@ -215,14 +215,14 @@ func GetBlacklist(c *gin.Context) { c.JSON(http.StatusOK, resp) } -func SetFriendComment(c *gin.Context) { - params := api.SetFriendCommentReq{} +func SetFriendRemark(c *gin.Context) { + params := api.SetFriendRemarkReq{} if err := c.BindJSON(¶ms); err != nil { log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &rpc.SetFriendCommentReq{CommID: &rpc.CommID{}} + req := &rpc.SetFriendRemarkReq{CommID: &rpc.CommID{}} utils.CopyStructFields(req.CommID, ¶ms.ParamsCommFriend) req.Remark = params.Remark var ok bool @@ -242,7 +242,7 @@ func SetFriendComment(c *gin.Context) { c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call set friend comment rpc server failed"}) return } - resp := api.SetFriendCommentResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} + resp := api.SetFriendRemarkResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} log.NewInfo(req.CommID.OperationID, "SetFriendComment api return ", resp) c.JSON(http.StatusOK, resp) diff --git a/internal/rpc/friend/firend.go b/internal/rpc/friend/firend.go index e86851275..d5db10e1f 100644 --- a/internal/rpc/friend/firend.go +++ b/internal/rpc/friend/firend.go @@ -325,22 +325,22 @@ func (s *friendServer) GetBlacklist(ctx context.Context, req *pbFriend.GetBlackl return &pbFriend.GetBlacklistResp{BlackUserInfoList: userInfoList}, nil } -func (s *friendServer) SetFriendComment(ctx context.Context, req *pbFriend.SetFriendCommentReq) (*pbFriend.SetFriendCommentResp, error) { +func (s *friendServer) SetFriendRemark(ctx context.Context, req *pbFriend.SetFriendRemarkReq) (*pbFriend.SetFriendRemarkResp, error) { log.NewInfo(req.CommID.OperationID, "SetFriendComment args ", req.String()) //Parse token, to find current user information if !token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) { log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID) - return &pbFriend.SetFriendCommentResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil + return &pbFriend.SetFriendRemarkResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil } err := imdb.UpdateFriendComment(req.CommID.FromUserID, req.CommID.ToUserID, req.Remark) if err != nil { log.NewError(req.CommID.OperationID, "UpdateFriendComment failed ", req.CommID.FromUserID, req.CommID.ToUserID, req.Remark) - return &pbFriend.SetFriendCommentResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil + return &pbFriend.SetFriendRemarkResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } log.NewInfo(req.CommID.OperationID, "rpc SetFriendComment ok") chat.FriendInfoChangedNotification(req.CommID.OperationID, req.CommID.OpUserID, req.CommID.FromUserID, req.CommID.ToUserID) - return &pbFriend.SetFriendCommentResp{CommonResp: &pbFriend.CommonResp{}}, nil + return &pbFriend.SetFriendRemarkResp{CommonResp: &pbFriend.CommonResp{}}, nil } func (s *friendServer) RemoveBlacklist(ctx context.Context, req *pbFriend.RemoveBlacklistReq) (*pbFriend.RemoveBlacklistResp, error) { diff --git a/pkg/base_info/friend_api_struct.go b/pkg/base_info/friend_api_struct.go index e452eafda..361d54bd6 100644 --- a/pkg/base_info/friend_api_struct.go +++ b/pkg/base_info/friend_api_struct.go @@ -71,11 +71,11 @@ type BlackUserInfo struct { open_im_sdk.PublicUserInfo } -type SetFriendCommentReq struct { +type SetFriendRemarkReq struct { ParamsCommFriend Remark string `json:"remark" binding:"required"` } -type SetFriendCommentResp struct { +type SetFriendRemarkResp struct { CommResp } diff --git a/pkg/proto/friend/friend.pb.go b/pkg/proto/friend/friend.pb.go index 67efb3483..b903e4be4 100644 --- a/pkg/proto/friend/friend.pb.go +++ b/pkg/proto/friend/friend.pb.go @@ -36,7 +36,7 @@ func (m *CommonResp) Reset() { *m = CommonResp{} } func (m *CommonResp) String() string { return proto.CompactTextString(m) } func (*CommonResp) ProtoMessage() {} func (*CommonResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{0} + return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{0} } func (m *CommonResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CommonResp.Unmarshal(m, b) @@ -84,7 +84,7 @@ func (m *CommID) Reset() { *m = CommID{} } func (m *CommID) String() string { return proto.CompactTextString(m) } func (*CommID) ProtoMessage() {} func (*CommID) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{1} + return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{1} } func (m *CommID) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CommID.Unmarshal(m, b) @@ -143,7 +143,7 @@ func (m *GetFriendsInfoReq) Reset() { *m = GetFriendsInfoReq{} } func (m *GetFriendsInfoReq) String() string { return proto.CompactTextString(m) } func (*GetFriendsInfoReq) ProtoMessage() {} func (*GetFriendsInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{2} + return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{2} } func (m *GetFriendsInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendsInfoReq.Unmarshal(m, b) @@ -183,7 +183,7 @@ func (m *GetFriendInfoResp) Reset() { *m = GetFriendInfoResp{} } func (m *GetFriendInfoResp) String() string { return proto.CompactTextString(m) } func (*GetFriendInfoResp) ProtoMessage() {} func (*GetFriendInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{3} + return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{3} } func (m *GetFriendInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendInfoResp.Unmarshal(m, b) @@ -236,7 +236,7 @@ func (m *AddFriendReq) Reset() { *m = AddFriendReq{} } func (m *AddFriendReq) String() string { return proto.CompactTextString(m) } func (*AddFriendReq) ProtoMessage() {} func (*AddFriendReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{4} + return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{4} } func (m *AddFriendReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddFriendReq.Unmarshal(m, b) @@ -281,7 +281,7 @@ func (m *AddFriendResp) Reset() { *m = AddFriendResp{} } func (m *AddFriendResp) String() string { return proto.CompactTextString(m) } func (*AddFriendResp) ProtoMessage() {} func (*AddFriendResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{5} + return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{5} } func (m *AddFriendResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddFriendResp.Unmarshal(m, b) @@ -322,7 +322,7 @@ func (m *ImportFriendReq) Reset() { *m = ImportFriendReq{} } func (m *ImportFriendReq) String() string { return proto.CompactTextString(m) } func (*ImportFriendReq) ProtoMessage() {} func (*ImportFriendReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{6} + return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{6} } func (m *ImportFriendReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ImportFriendReq.Unmarshal(m, b) @@ -382,7 +382,7 @@ func (m *ImportFriendResp) Reset() { *m = ImportFriendResp{} } func (m *ImportFriendResp) String() string { return proto.CompactTextString(m) } func (*ImportFriendResp) ProtoMessage() {} func (*ImportFriendResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{7} + return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{7} } func (m *ImportFriendResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ImportFriendResp.Unmarshal(m, b) @@ -427,7 +427,7 @@ func (m *GetFriendApplyListReq) Reset() { *m = GetFriendApplyListReq{} } func (m *GetFriendApplyListReq) String() string { return proto.CompactTextString(m) } func (*GetFriendApplyListReq) ProtoMessage() {} func (*GetFriendApplyListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{8} + return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{8} } func (m *GetFriendApplyListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendApplyListReq.Unmarshal(m, b) @@ -467,7 +467,7 @@ func (m *GetFriendApplyListResp) Reset() { *m = GetFriendApplyListResp{} func (m *GetFriendApplyListResp) String() string { return proto.CompactTextString(m) } func (*GetFriendApplyListResp) ProtoMessage() {} func (*GetFriendApplyListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{9} + return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{9} } func (m *GetFriendApplyListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendApplyListResp.Unmarshal(m, b) @@ -519,7 +519,7 @@ func (m *GetFriendListReq) Reset() { *m = GetFriendListReq{} } func (m *GetFriendListReq) String() string { return proto.CompactTextString(m) } func (*GetFriendListReq) ProtoMessage() {} func (*GetFriendListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{10} + return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{10} } func (m *GetFriendListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendListReq.Unmarshal(m, b) @@ -559,7 +559,7 @@ func (m *GetFriendListResp) Reset() { *m = GetFriendListResp{} } func (m *GetFriendListResp) String() string { return proto.CompactTextString(m) } func (*GetFriendListResp) ProtoMessage() {} func (*GetFriendListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{11} + return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{11} } func (m *GetFriendListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendListResp.Unmarshal(m, b) @@ -611,7 +611,7 @@ func (m *AddBlacklistReq) Reset() { *m = AddBlacklistReq{} } func (m *AddBlacklistReq) String() string { return proto.CompactTextString(m) } func (*AddBlacklistReq) ProtoMessage() {} func (*AddBlacklistReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{12} + return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{12} } func (m *AddBlacklistReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddBlacklistReq.Unmarshal(m, b) @@ -649,7 +649,7 @@ func (m *AddBlacklistResp) Reset() { *m = AddBlacklistResp{} } func (m *AddBlacklistResp) String() string { return proto.CompactTextString(m) } func (*AddBlacklistResp) ProtoMessage() {} func (*AddBlacklistResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{13} + return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{13} } func (m *AddBlacklistResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddBlacklistResp.Unmarshal(m, b) @@ -687,7 +687,7 @@ func (m *RemoveBlacklistReq) Reset() { *m = RemoveBlacklistReq{} } func (m *RemoveBlacklistReq) String() string { return proto.CompactTextString(m) } func (*RemoveBlacklistReq) ProtoMessage() {} func (*RemoveBlacklistReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{14} + return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{14} } func (m *RemoveBlacklistReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RemoveBlacklistReq.Unmarshal(m, b) @@ -725,7 +725,7 @@ func (m *RemoveBlacklistResp) Reset() { *m = RemoveBlacklistResp{} } func (m *RemoveBlacklistResp) String() string { return proto.CompactTextString(m) } func (*RemoveBlacklistResp) ProtoMessage() {} func (*RemoveBlacklistResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{15} + return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{15} } func (m *RemoveBlacklistResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RemoveBlacklistResp.Unmarshal(m, b) @@ -763,7 +763,7 @@ func (m *GetBlacklistReq) Reset() { *m = GetBlacklistReq{} } func (m *GetBlacklistReq) String() string { return proto.CompactTextString(m) } func (*GetBlacklistReq) ProtoMessage() {} func (*GetBlacklistReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{16} + return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{16} } func (m *GetBlacklistReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetBlacklistReq.Unmarshal(m, b) @@ -803,7 +803,7 @@ func (m *GetBlacklistResp) Reset() { *m = GetBlacklistResp{} } func (m *GetBlacklistResp) String() string { return proto.CompactTextString(m) } func (*GetBlacklistResp) ProtoMessage() {} func (*GetBlacklistResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{17} + return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{17} } func (m *GetBlacklistResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetBlacklistResp.Unmarshal(m, b) @@ -855,7 +855,7 @@ func (m *IsFriendReq) Reset() { *m = IsFriendReq{} } func (m *IsFriendReq) String() string { return proto.CompactTextString(m) } func (*IsFriendReq) ProtoMessage() {} func (*IsFriendReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{18} + return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{18} } func (m *IsFriendReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IsFriendReq.Unmarshal(m, b) @@ -895,7 +895,7 @@ func (m *IsFriendResp) Reset() { *m = IsFriendResp{} } func (m *IsFriendResp) String() string { return proto.CompactTextString(m) } func (*IsFriendResp) ProtoMessage() {} func (*IsFriendResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{19} + return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{19} } func (m *IsFriendResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IsFriendResp.Unmarshal(m, b) @@ -947,7 +947,7 @@ func (m *IsInBlackListReq) Reset() { *m = IsInBlackListReq{} } func (m *IsInBlackListReq) String() string { return proto.CompactTextString(m) } func (*IsInBlackListReq) ProtoMessage() {} func (*IsInBlackListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{20} + return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{20} } func (m *IsInBlackListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IsInBlackListReq.Unmarshal(m, b) @@ -987,7 +987,7 @@ func (m *IsInBlackListResp) Reset() { *m = IsInBlackListResp{} } func (m *IsInBlackListResp) String() string { return proto.CompactTextString(m) } func (*IsInBlackListResp) ProtoMessage() {} func (*IsInBlackListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{21} + return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{21} } func (m *IsInBlackListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IsInBlackListResp.Unmarshal(m, b) @@ -1039,7 +1039,7 @@ func (m *DeleteFriendReq) Reset() { *m = DeleteFriendReq{} } func (m *DeleteFriendReq) String() string { return proto.CompactTextString(m) } func (*DeleteFriendReq) ProtoMessage() {} func (*DeleteFriendReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{22} + return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{22} } func (m *DeleteFriendReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteFriendReq.Unmarshal(m, b) @@ -1077,7 +1077,7 @@ func (m *DeleteFriendResp) Reset() { *m = DeleteFriendResp{} } func (m *DeleteFriendResp) String() string { return proto.CompactTextString(m) } func (*DeleteFriendResp) ProtoMessage() {} func (*DeleteFriendResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{23} + return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{23} } func (m *DeleteFriendResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteFriendResp.Unmarshal(m, b) @@ -1118,7 +1118,7 @@ func (m *AddFriendResponseReq) Reset() { *m = AddFriendResponseReq{} } func (m *AddFriendResponseReq) String() string { return proto.CompactTextString(m) } func (*AddFriendResponseReq) ProtoMessage() {} func (*AddFriendResponseReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{24} + return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{24} } func (m *AddFriendResponseReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddFriendResponseReq.Unmarshal(m, b) @@ -1170,7 +1170,7 @@ func (m *AddFriendResponseResp) Reset() { *m = AddFriendResponseResp{} } func (m *AddFriendResponseResp) String() string { return proto.CompactTextString(m) } func (*AddFriendResponseResp) ProtoMessage() {} func (*AddFriendResponseResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{25} + return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{25} } func (m *AddFriendResponseResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddFriendResponseResp.Unmarshal(m, b) @@ -1197,7 +1197,7 @@ func (m *AddFriendResponseResp) GetCommonResp() *CommonResp { return nil } -type SetFriendCommentReq struct { +type SetFriendRemarkReq struct { CommID *CommID `protobuf:"bytes,1,opt,name=CommID" json:"CommID,omitempty"` Remark string `protobuf:"bytes,2,opt,name=Remark" json:"Remark,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -1205,76 +1205,76 @@ type SetFriendCommentReq struct { XXX_sizecache int32 `json:"-"` } -func (m *SetFriendCommentReq) Reset() { *m = SetFriendCommentReq{} } -func (m *SetFriendCommentReq) String() string { return proto.CompactTextString(m) } -func (*SetFriendCommentReq) ProtoMessage() {} -func (*SetFriendCommentReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{26} +func (m *SetFriendRemarkReq) Reset() { *m = SetFriendRemarkReq{} } +func (m *SetFriendRemarkReq) String() string { return proto.CompactTextString(m) } +func (*SetFriendRemarkReq) ProtoMessage() {} +func (*SetFriendRemarkReq) Descriptor() ([]byte, []int) { + return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{26} } -func (m *SetFriendCommentReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SetFriendCommentReq.Unmarshal(m, b) +func (m *SetFriendRemarkReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SetFriendRemarkReq.Unmarshal(m, b) } -func (m *SetFriendCommentReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SetFriendCommentReq.Marshal(b, m, deterministic) +func (m *SetFriendRemarkReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SetFriendRemarkReq.Marshal(b, m, deterministic) } -func (dst *SetFriendCommentReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_SetFriendCommentReq.Merge(dst, src) +func (dst *SetFriendRemarkReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetFriendRemarkReq.Merge(dst, src) } -func (m *SetFriendCommentReq) XXX_Size() int { - return xxx_messageInfo_SetFriendCommentReq.Size(m) +func (m *SetFriendRemarkReq) XXX_Size() int { + return xxx_messageInfo_SetFriendRemarkReq.Size(m) } -func (m *SetFriendCommentReq) XXX_DiscardUnknown() { - xxx_messageInfo_SetFriendCommentReq.DiscardUnknown(m) +func (m *SetFriendRemarkReq) XXX_DiscardUnknown() { + xxx_messageInfo_SetFriendRemarkReq.DiscardUnknown(m) } -var xxx_messageInfo_SetFriendCommentReq proto.InternalMessageInfo +var xxx_messageInfo_SetFriendRemarkReq proto.InternalMessageInfo -func (m *SetFriendCommentReq) GetCommID() *CommID { +func (m *SetFriendRemarkReq) GetCommID() *CommID { if m != nil { return m.CommID } return nil } -func (m *SetFriendCommentReq) GetRemark() string { +func (m *SetFriendRemarkReq) GetRemark() string { if m != nil { return m.Remark } return "" } -type SetFriendCommentResp struct { +type SetFriendRemarkResp struct { CommonResp *CommonResp `protobuf:"bytes,1,opt,name=CommonResp" json:"CommonResp,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *SetFriendCommentResp) Reset() { *m = SetFriendCommentResp{} } -func (m *SetFriendCommentResp) String() string { return proto.CompactTextString(m) } -func (*SetFriendCommentResp) ProtoMessage() {} -func (*SetFriendCommentResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{27} +func (m *SetFriendRemarkResp) Reset() { *m = SetFriendRemarkResp{} } +func (m *SetFriendRemarkResp) String() string { return proto.CompactTextString(m) } +func (*SetFriendRemarkResp) ProtoMessage() {} +func (*SetFriendRemarkResp) Descriptor() ([]byte, []int) { + return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{27} } -func (m *SetFriendCommentResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SetFriendCommentResp.Unmarshal(m, b) +func (m *SetFriendRemarkResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SetFriendRemarkResp.Unmarshal(m, b) } -func (m *SetFriendCommentResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SetFriendCommentResp.Marshal(b, m, deterministic) +func (m *SetFriendRemarkResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SetFriendRemarkResp.Marshal(b, m, deterministic) } -func (dst *SetFriendCommentResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_SetFriendCommentResp.Merge(dst, src) +func (dst *SetFriendRemarkResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetFriendRemarkResp.Merge(dst, src) } -func (m *SetFriendCommentResp) XXX_Size() int { - return xxx_messageInfo_SetFriendCommentResp.Size(m) +func (m *SetFriendRemarkResp) XXX_Size() int { + return xxx_messageInfo_SetFriendRemarkResp.Size(m) } -func (m *SetFriendCommentResp) XXX_DiscardUnknown() { - xxx_messageInfo_SetFriendCommentResp.DiscardUnknown(m) +func (m *SetFriendRemarkResp) XXX_DiscardUnknown() { + xxx_messageInfo_SetFriendRemarkResp.DiscardUnknown(m) } -var xxx_messageInfo_SetFriendCommentResp proto.InternalMessageInfo +var xxx_messageInfo_SetFriendRemarkResp proto.InternalMessageInfo -func (m *SetFriendCommentResp) GetCommonResp() *CommonResp { +func (m *SetFriendRemarkResp) GetCommonResp() *CommonResp { if m != nil { return m.CommonResp } @@ -1292,7 +1292,7 @@ func (m *GetSelfApplyListReq) Reset() { *m = GetSelfApplyListReq{} } func (m *GetSelfApplyListReq) String() string { return proto.CompactTextString(m) } func (*GetSelfApplyListReq) ProtoMessage() {} func (*GetSelfApplyListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{28} + return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{28} } func (m *GetSelfApplyListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetSelfApplyListReq.Unmarshal(m, b) @@ -1332,7 +1332,7 @@ func (m *GetSelfApplyListResp) Reset() { *m = GetSelfApplyListResp{} } func (m *GetSelfApplyListResp) String() string { return proto.CompactTextString(m) } func (*GetSelfApplyListResp) ProtoMessage() {} func (*GetSelfApplyListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_a4d5a06cd0a3d99f, []int{29} + return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{29} } func (m *GetSelfApplyListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetSelfApplyListResp.Unmarshal(m, b) @@ -1400,8 +1400,8 @@ func init() { proto.RegisterType((*DeleteFriendResp)(nil), "friend.DeleteFriendResp") proto.RegisterType((*AddFriendResponseReq)(nil), "friend.AddFriendResponseReq") proto.RegisterType((*AddFriendResponseResp)(nil), "friend.AddFriendResponseResp") - proto.RegisterType((*SetFriendCommentReq)(nil), "friend.SetFriendCommentReq") - proto.RegisterType((*SetFriendCommentResp)(nil), "friend.SetFriendCommentResp") + proto.RegisterType((*SetFriendRemarkReq)(nil), "friend.SetFriendRemarkReq") + proto.RegisterType((*SetFriendRemarkResp)(nil), "friend.SetFriendRemarkResp") proto.RegisterType((*GetSelfApplyListReq)(nil), "friend.GetSelfApplyListReq") proto.RegisterType((*GetSelfApplyListResp)(nil), "friend.GetSelfApplyListResp") } @@ -1429,7 +1429,7 @@ type FriendClient interface { GetBlacklist(ctx context.Context, in *GetBlacklistReq, opts ...grpc.CallOption) (*GetBlacklistResp, error) DeleteFriend(ctx context.Context, in *DeleteFriendReq, opts ...grpc.CallOption) (*DeleteFriendResp, error) AddFriendResponse(ctx context.Context, in *AddFriendResponseReq, opts ...grpc.CallOption) (*AddFriendResponseResp, error) - SetFriendComment(ctx context.Context, in *SetFriendCommentReq, opts ...grpc.CallOption) (*SetFriendCommentResp, error) + SetFriendComment(ctx context.Context, in *SetFriendRemarkReq, opts ...grpc.CallOption) (*SetFriendRemarkResp, error) ImportFriend(ctx context.Context, in *ImportFriendReq, opts ...grpc.CallOption) (*ImportFriendResp, error) } @@ -1540,8 +1540,8 @@ func (c *friendClient) AddFriendResponse(ctx context.Context, in *AddFriendRespo return out, nil } -func (c *friendClient) SetFriendComment(ctx context.Context, in *SetFriendCommentReq, opts ...grpc.CallOption) (*SetFriendCommentResp, error) { - out := new(SetFriendCommentResp) +func (c *friendClient) SetFriendComment(ctx context.Context, in *SetFriendRemarkReq, opts ...grpc.CallOption) (*SetFriendRemarkResp, error) { + out := new(SetFriendRemarkResp) err := grpc.Invoke(ctx, "/friend.friend/setFriendComment", in, out, c.cc, opts...) if err != nil { return nil, err @@ -1573,7 +1573,7 @@ type FriendServer interface { GetBlacklist(context.Context, *GetBlacklistReq) (*GetBlacklistResp, error) DeleteFriend(context.Context, *DeleteFriendReq) (*DeleteFriendResp, error) AddFriendResponse(context.Context, *AddFriendResponseReq) (*AddFriendResponseResp, error) - SetFriendComment(context.Context, *SetFriendCommentReq) (*SetFriendCommentResp, error) + SetFriendComment(context.Context, *SetFriendRemarkReq) (*SetFriendRemarkResp, error) ImportFriend(context.Context, *ImportFriendReq) (*ImportFriendResp, error) } @@ -1780,7 +1780,7 @@ func _Friend_AddFriendResponse_Handler(srv interface{}, ctx context.Context, dec } func _Friend_SetFriendComment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetFriendCommentReq) + in := new(SetFriendRemarkReq) if err := dec(in); err != nil { return nil, err } @@ -1792,7 +1792,7 @@ func _Friend_SetFriendComment_Handler(srv interface{}, ctx context.Context, dec FullMethod: "/friend.friend/SetFriendComment", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FriendServer).SetFriendComment(ctx, req.(*SetFriendCommentReq)) + return srv.(FriendServer).SetFriendComment(ctx, req.(*SetFriendRemarkReq)) } return interceptor(ctx, in, info, handler) } @@ -1876,66 +1876,66 @@ var _Friend_serviceDesc = grpc.ServiceDesc{ Metadata: "friend/friend.proto", } -func init() { proto.RegisterFile("friend/friend.proto", fileDescriptor_friend_a4d5a06cd0a3d99f) } +func init() { proto.RegisterFile("friend/friend.proto", fileDescriptor_friend_ea5e0cd91ac7f1e7) } -var fileDescriptor_friend_a4d5a06cd0a3d99f = []byte{ - // 919 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x57, 0xcb, 0x4f, 0xf3, 0x46, - 0x10, 0x97, 0x09, 0x84, 0x64, 0x12, 0x48, 0xb2, 0x09, 0x90, 0x9a, 0x87, 0x52, 0x1f, 0xaa, 0xa8, - 0x87, 0x44, 0x4a, 0x45, 0x55, 0x4a, 0x5b, 0x14, 0x08, 0xa1, 0xa6, 0xa5, 0x20, 0x53, 0x2e, 0x55, - 0x25, 0x64, 0xf0, 0x26, 0xb5, 0xe2, 0xd8, 0x8b, 0xd7, 0x14, 0xf5, 0xd2, 0x43, 0x0f, 0xbd, 0x56, - 0xaa, 0x7a, 0xeb, 0xad, 0x7f, 0x69, 0x65, 0xaf, 0x1d, 0xaf, 0x1f, 0x41, 0x9f, 0xcd, 0x27, 0x7d, - 0x27, 0x98, 0x99, 0x9d, 0xf1, 0x6f, 0x1e, 0xf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, 0x27, 0xfc, 0x3b, 0x68, 0xde, 0x06, 0xb4, 0xe6, 0xaa, - 0xb1, 0xe9, 0x64, 0xde, 0xd2, 0x73, 0xd5, 0x9e, 0x85, 0x5b, 0xda, 0x95, 0xa4, 0x4b, 0x68, 0x25, - 0xc3, 0xe6, 0x84, 0xf8, 0x35, 0x34, 0x2f, 0xb0, 0x73, 0x8b, 0x8d, 0x49, 0xae, 0x65, 0xf4, 0xb7, - 0x00, 0xad, 0xa4, 0xff, 0x87, 0x5d, 0x45, 0x83, 0xff, 0xd6, 0xc1, 0x7f, 0xce, 0xa2, 0x2f, 0xa0, - 0xac, 0x06, 0xed, 0x44, 0xad, 0x20, 0x09, 0xfe, 0xcd, 0x24, 0x6e, 0xa5, 0x68, 0x29, 0x41, 0xb7, - 0x80, 0xa6, 0x89, 0x2d, 0x8b, 0xf6, 0x83, 0xc3, 0xa9, 0x3b, 0x5c, 0x3c, 0x78, 0xcd, 0x4c, 0x09, - 0xba, 0x82, 0xfa, 0x34, 0x56, 0x2d, 0xb4, 0xcb, 0xf9, 0xc4, 0xfb, 0x20, 0xee, 0x2d, 0x37, 0x52, - 0x82, 0x46, 0xb0, 0x31, 0xe5, 0xd7, 0x26, 0x6a, 0x27, 0xbe, 0x1f, 0x04, 0xfa, 0x68, 0x89, 0x85, - 0x12, 0x34, 0x84, 0xaa, 0xca, 0x6d, 0x2e, 0xb4, 0xc3, 0x15, 0x84, 0xa7, 0x7f, 0xb1, 0x9d, 0x6e, - 0xa0, 0x04, 0x5d, 0x42, 0xcd, 0x8e, 0xae, 0x1d, 0x24, 0x06, 0x87, 0x93, 0xdb, 0x4c, 0xdc, 0x5d, - 0x6a, 0xa3, 0x04, 0x1d, 0x42, 0x49, 0xf7, 0x39, 0x17, 0x35, 0x83, 0x83, 0x1c, 0x79, 0x8b, 0xad, - 0xa4, 0x92, 0xd5, 0x42, 0xe7, 0x09, 0x31, 0xac, 0x45, 0x9c, 0x63, 0xc3, 0x5a, 0x24, 0x19, 0x74, - 0x08, 0xd5, 0x29, 0xb7, 0xb8, 0xc2, 0x5a, 0xc4, 0x56, 0xa1, 0xd8, 0x4e, 0x37, 0xb0, 0x10, 0x1a, - 0xc7, 0x7d, 0x61, 0x88, 0x18, 0x99, 0x86, 0x21, 0x12, 0x54, 0x79, 0x03, 0x0d, 0x35, 0x4e, 0x42, - 0x68, 0x2f, 0x75, 0x4e, 0x7d, 0x46, 0x14, 0xf7, 0x5f, 0xb1, 0xb2, 0xc1, 0xa3, 0x31, 0xca, 0x08, - 0x07, 0x2f, 0x85, 0xa3, 0xc2, 0xc1, 0x4b, 0x65, 0x9a, 0x21, 0x54, 0x75, 0xee, 0x11, 0x1d, 0xe6, - 0x18, 0x7b, 0xf7, 0x87, 0x39, 0xc6, 0xdf, 0xdc, 0xa7, 0x8d, 0x9f, 0x6a, 0x3d, 0xff, 0x27, 0xe8, - 0x31, 0xfb, 0xf3, 0x50, 0xf4, 0x7e, 0x5f, 0x7e, 0xf6, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xcc, - 0xd1, 0x9d, 0x13, 0xa1, 0x0e, 0x00, 0x00, +var fileDescriptor_friend_ea5e0cd91ac7f1e7 = []byte{ + // 924 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x57, 0xcd, 0x6f, 0xe3, 0x44, + 0x14, 0x97, 0x37, 0x6d, 0x36, 0x79, 0xc9, 0x6e, 0x92, 0x97, 0xb4, 0x1b, 0xdc, 0xee, 0x2a, 0xf8, + 0x80, 0x22, 0x0e, 0x89, 0x14, 0xb4, 0x88, 0xb2, 0xc0, 0x2a, 0xdb, 0x34, 0xc5, 0x2c, 0xa5, 0x2b, + 0x77, 0xb9, 0x20, 0xa4, 0xca, 0x5b, 0x4f, 0x82, 0x15, 0xc7, 0x9e, 0x7a, 0x5c, 0x2a, 0x2e, 0x1c, + 0x38, 0x70, 0x45, 0x42, 0x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 0x5e, 0x0b, 0x53, 0x5c, 0x87, 0x71, 0x2d, 0xd2, 0x1b, 0x36, 0xae, 0x45, 0x76, 0x7f, 0x4e, 0xa1, + 0xb9, 0x14, 0x68, 0x2b, 0xae, 0x45, 0x8a, 0x08, 0xe5, 0x7e, 0xbe, 0x81, 0xbb, 0x30, 0x84, 0xcd, + 0x17, 0xbb, 0x48, 0xad, 0xd2, 0xd8, 0x45, 0x66, 0x51, 0xbe, 0x81, 0x8e, 0x9e, 0x5e, 0x41, 0x78, + 0x98, 0x3b, 0xa7, 0xe1, 0x3e, 0x94, 0x9f, 0xde, 0x61, 0x65, 0x14, 0x5f, 0x43, 0x9b, 0x45, 0x8d, + 0xf7, 0xaf, 0x2e, 0xb1, 0x85, 0x0e, 0x65, 0x37, 0x54, 0xdc, 0xa1, 0xbc, 0x3d, 0x33, 0x85, 0xa6, + 0x29, 0x3c, 0xa0, 0xe3, 0x0c, 0x53, 0x6f, 0xfe, 0x38, 0xc3, 0xf4, 0x7b, 0xfb, 0x55, 0xe7, 0x87, + 0xd6, 0x28, 0xfc, 0xf9, 0xf9, 0x82, 0xff, 0x79, 0x57, 0x0d, 0x7e, 0x5b, 0x7e, 0xf2, 0x6f, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x8d, 0xf7, 0x25, 0x0f, 0x9d, 0x0e, 0x00, 0x00, } diff --git a/pkg/proto/friend/friend.proto b/pkg/proto/friend/friend.proto index 052eb1d9d..df22713b8 100644 --- a/pkg/proto/friend/friend.proto +++ b/pkg/proto/friend/friend.proto @@ -130,11 +130,11 @@ message AddFriendResponseResp{ CommonResp CommonResp = 1; } -message SetFriendCommentReq{ +message SetFriendRemarkReq{ CommID CommID = 1; string Remark = 2; } -message SetFriendCommentResp{ +message SetFriendRemarkResp{ CommonResp CommonResp = 1; } @@ -160,6 +160,6 @@ service friend{ rpc getBlacklist(GetBlacklistReq) returns(GetBlacklistResp); rpc deleteFriend(DeleteFriendReq) returns(DeleteFriendResp); rpc addFriendResponse(AddFriendResponseReq) returns(AddFriendResponseResp); - rpc setFriendComment(SetFriendCommentReq) returns(SetFriendCommentResp); + rpc setFriendComment(SetFriendRemarkReq) returns(SetFriendRemarkResp); rpc importFriend(ImportFriendReq) returns(ImportFriendResp); } \ No newline at end of file From 5b32e0db6fca024086a95a884121f089ed0408ce Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 14:36:13 +0800 Subject: [PATCH 110/337] Refactor code --- cmd/open_im_api/main.go | 2 +- pkg/proto/friend/friend.pb.go | 202 +++++++++++++++++----------------- pkg/proto/friend/friend.proto | 2 +- 3 files changed, 103 insertions(+), 103 deletions(-) diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index 0d77d9106..edb44e5dd 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -40,7 +40,7 @@ func main() { friendRouterGroup.POST("/remove_blacklist", friend.RemoveBlacklist) friendRouterGroup.POST("/delete_friend", friend.DeleteFriend) friendRouterGroup.POST("/add_friend_response", friend.AddFriendResponse) //1 - friendRouterGroup.POST("/set_friend_remark", friend.SetFriendComment) + friendRouterGroup.POST("/set_friend_remark", friend.SetFriendRemark) friendRouterGroup.POST("/is_friend", friend.IsFriend) friendRouterGroup.POST("/import_friend", friend.ImportFriend) } diff --git a/pkg/proto/friend/friend.pb.go b/pkg/proto/friend/friend.pb.go index b903e4be4..941dd457b 100644 --- a/pkg/proto/friend/friend.pb.go +++ b/pkg/proto/friend/friend.pb.go @@ -36,7 +36,7 @@ func (m *CommonResp) Reset() { *m = CommonResp{} } func (m *CommonResp) String() string { return proto.CompactTextString(m) } func (*CommonResp) ProtoMessage() {} func (*CommonResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{0} + return fileDescriptor_friend_69e6f38cd215d5ef, []int{0} } func (m *CommonResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CommonResp.Unmarshal(m, b) @@ -84,7 +84,7 @@ func (m *CommID) Reset() { *m = CommID{} } func (m *CommID) String() string { return proto.CompactTextString(m) } func (*CommID) ProtoMessage() {} func (*CommID) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{1} + return fileDescriptor_friend_69e6f38cd215d5ef, []int{1} } func (m *CommID) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CommID.Unmarshal(m, b) @@ -143,7 +143,7 @@ func (m *GetFriendsInfoReq) Reset() { *m = GetFriendsInfoReq{} } func (m *GetFriendsInfoReq) String() string { return proto.CompactTextString(m) } func (*GetFriendsInfoReq) ProtoMessage() {} func (*GetFriendsInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{2} + return fileDescriptor_friend_69e6f38cd215d5ef, []int{2} } func (m *GetFriendsInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendsInfoReq.Unmarshal(m, b) @@ -183,7 +183,7 @@ func (m *GetFriendInfoResp) Reset() { *m = GetFriendInfoResp{} } func (m *GetFriendInfoResp) String() string { return proto.CompactTextString(m) } func (*GetFriendInfoResp) ProtoMessage() {} func (*GetFriendInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{3} + return fileDescriptor_friend_69e6f38cd215d5ef, []int{3} } func (m *GetFriendInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendInfoResp.Unmarshal(m, b) @@ -236,7 +236,7 @@ func (m *AddFriendReq) Reset() { *m = AddFriendReq{} } func (m *AddFriendReq) String() string { return proto.CompactTextString(m) } func (*AddFriendReq) ProtoMessage() {} func (*AddFriendReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{4} + return fileDescriptor_friend_69e6f38cd215d5ef, []int{4} } func (m *AddFriendReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddFriendReq.Unmarshal(m, b) @@ -281,7 +281,7 @@ func (m *AddFriendResp) Reset() { *m = AddFriendResp{} } func (m *AddFriendResp) String() string { return proto.CompactTextString(m) } func (*AddFriendResp) ProtoMessage() {} func (*AddFriendResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{5} + return fileDescriptor_friend_69e6f38cd215d5ef, []int{5} } func (m *AddFriendResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddFriendResp.Unmarshal(m, b) @@ -322,7 +322,7 @@ func (m *ImportFriendReq) Reset() { *m = ImportFriendReq{} } func (m *ImportFriendReq) String() string { return proto.CompactTextString(m) } func (*ImportFriendReq) ProtoMessage() {} func (*ImportFriendReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{6} + return fileDescriptor_friend_69e6f38cd215d5ef, []int{6} } func (m *ImportFriendReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ImportFriendReq.Unmarshal(m, b) @@ -382,7 +382,7 @@ func (m *ImportFriendResp) Reset() { *m = ImportFriendResp{} } func (m *ImportFriendResp) String() string { return proto.CompactTextString(m) } func (*ImportFriendResp) ProtoMessage() {} func (*ImportFriendResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{7} + return fileDescriptor_friend_69e6f38cd215d5ef, []int{7} } func (m *ImportFriendResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ImportFriendResp.Unmarshal(m, b) @@ -427,7 +427,7 @@ func (m *GetFriendApplyListReq) Reset() { *m = GetFriendApplyListReq{} } func (m *GetFriendApplyListReq) String() string { return proto.CompactTextString(m) } func (*GetFriendApplyListReq) ProtoMessage() {} func (*GetFriendApplyListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{8} + return fileDescriptor_friend_69e6f38cd215d5ef, []int{8} } func (m *GetFriendApplyListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendApplyListReq.Unmarshal(m, b) @@ -467,7 +467,7 @@ func (m *GetFriendApplyListResp) Reset() { *m = GetFriendApplyListResp{} func (m *GetFriendApplyListResp) String() string { return proto.CompactTextString(m) } func (*GetFriendApplyListResp) ProtoMessage() {} func (*GetFriendApplyListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{9} + return fileDescriptor_friend_69e6f38cd215d5ef, []int{9} } func (m *GetFriendApplyListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendApplyListResp.Unmarshal(m, b) @@ -519,7 +519,7 @@ func (m *GetFriendListReq) Reset() { *m = GetFriendListReq{} } func (m *GetFriendListReq) String() string { return proto.CompactTextString(m) } func (*GetFriendListReq) ProtoMessage() {} func (*GetFriendListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{10} + return fileDescriptor_friend_69e6f38cd215d5ef, []int{10} } func (m *GetFriendListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendListReq.Unmarshal(m, b) @@ -559,7 +559,7 @@ func (m *GetFriendListResp) Reset() { *m = GetFriendListResp{} } func (m *GetFriendListResp) String() string { return proto.CompactTextString(m) } func (*GetFriendListResp) ProtoMessage() {} func (*GetFriendListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{11} + return fileDescriptor_friend_69e6f38cd215d5ef, []int{11} } func (m *GetFriendListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendListResp.Unmarshal(m, b) @@ -611,7 +611,7 @@ func (m *AddBlacklistReq) Reset() { *m = AddBlacklistReq{} } func (m *AddBlacklistReq) String() string { return proto.CompactTextString(m) } func (*AddBlacklistReq) ProtoMessage() {} func (*AddBlacklistReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{12} + return fileDescriptor_friend_69e6f38cd215d5ef, []int{12} } func (m *AddBlacklistReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddBlacklistReq.Unmarshal(m, b) @@ -649,7 +649,7 @@ func (m *AddBlacklistResp) Reset() { *m = AddBlacklistResp{} } func (m *AddBlacklistResp) String() string { return proto.CompactTextString(m) } func (*AddBlacklistResp) ProtoMessage() {} func (*AddBlacklistResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{13} + return fileDescriptor_friend_69e6f38cd215d5ef, []int{13} } func (m *AddBlacklistResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddBlacklistResp.Unmarshal(m, b) @@ -687,7 +687,7 @@ func (m *RemoveBlacklistReq) Reset() { *m = RemoveBlacklistReq{} } func (m *RemoveBlacklistReq) String() string { return proto.CompactTextString(m) } func (*RemoveBlacklistReq) ProtoMessage() {} func (*RemoveBlacklistReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{14} + return fileDescriptor_friend_69e6f38cd215d5ef, []int{14} } func (m *RemoveBlacklistReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RemoveBlacklistReq.Unmarshal(m, b) @@ -725,7 +725,7 @@ func (m *RemoveBlacklistResp) Reset() { *m = RemoveBlacklistResp{} } func (m *RemoveBlacklistResp) String() string { return proto.CompactTextString(m) } func (*RemoveBlacklistResp) ProtoMessage() {} func (*RemoveBlacklistResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{15} + return fileDescriptor_friend_69e6f38cd215d5ef, []int{15} } func (m *RemoveBlacklistResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RemoveBlacklistResp.Unmarshal(m, b) @@ -763,7 +763,7 @@ func (m *GetBlacklistReq) Reset() { *m = GetBlacklistReq{} } func (m *GetBlacklistReq) String() string { return proto.CompactTextString(m) } func (*GetBlacklistReq) ProtoMessage() {} func (*GetBlacklistReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{16} + return fileDescriptor_friend_69e6f38cd215d5ef, []int{16} } func (m *GetBlacklistReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetBlacklistReq.Unmarshal(m, b) @@ -803,7 +803,7 @@ func (m *GetBlacklistResp) Reset() { *m = GetBlacklistResp{} } func (m *GetBlacklistResp) String() string { return proto.CompactTextString(m) } func (*GetBlacklistResp) ProtoMessage() {} func (*GetBlacklistResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{17} + return fileDescriptor_friend_69e6f38cd215d5ef, []int{17} } func (m *GetBlacklistResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetBlacklistResp.Unmarshal(m, b) @@ -855,7 +855,7 @@ func (m *IsFriendReq) Reset() { *m = IsFriendReq{} } func (m *IsFriendReq) String() string { return proto.CompactTextString(m) } func (*IsFriendReq) ProtoMessage() {} func (*IsFriendReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{18} + return fileDescriptor_friend_69e6f38cd215d5ef, []int{18} } func (m *IsFriendReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IsFriendReq.Unmarshal(m, b) @@ -895,7 +895,7 @@ func (m *IsFriendResp) Reset() { *m = IsFriendResp{} } func (m *IsFriendResp) String() string { return proto.CompactTextString(m) } func (*IsFriendResp) ProtoMessage() {} func (*IsFriendResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{19} + return fileDescriptor_friend_69e6f38cd215d5ef, []int{19} } func (m *IsFriendResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IsFriendResp.Unmarshal(m, b) @@ -947,7 +947,7 @@ func (m *IsInBlackListReq) Reset() { *m = IsInBlackListReq{} } func (m *IsInBlackListReq) String() string { return proto.CompactTextString(m) } func (*IsInBlackListReq) ProtoMessage() {} func (*IsInBlackListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{20} + return fileDescriptor_friend_69e6f38cd215d5ef, []int{20} } func (m *IsInBlackListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IsInBlackListReq.Unmarshal(m, b) @@ -987,7 +987,7 @@ func (m *IsInBlackListResp) Reset() { *m = IsInBlackListResp{} } func (m *IsInBlackListResp) String() string { return proto.CompactTextString(m) } func (*IsInBlackListResp) ProtoMessage() {} func (*IsInBlackListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{21} + return fileDescriptor_friend_69e6f38cd215d5ef, []int{21} } func (m *IsInBlackListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IsInBlackListResp.Unmarshal(m, b) @@ -1039,7 +1039,7 @@ func (m *DeleteFriendReq) Reset() { *m = DeleteFriendReq{} } func (m *DeleteFriendReq) String() string { return proto.CompactTextString(m) } func (*DeleteFriendReq) ProtoMessage() {} func (*DeleteFriendReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{22} + return fileDescriptor_friend_69e6f38cd215d5ef, []int{22} } func (m *DeleteFriendReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteFriendReq.Unmarshal(m, b) @@ -1077,7 +1077,7 @@ func (m *DeleteFriendResp) Reset() { *m = DeleteFriendResp{} } func (m *DeleteFriendResp) String() string { return proto.CompactTextString(m) } func (*DeleteFriendResp) ProtoMessage() {} func (*DeleteFriendResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{23} + return fileDescriptor_friend_69e6f38cd215d5ef, []int{23} } func (m *DeleteFriendResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteFriendResp.Unmarshal(m, b) @@ -1118,7 +1118,7 @@ func (m *AddFriendResponseReq) Reset() { *m = AddFriendResponseReq{} } func (m *AddFriendResponseReq) String() string { return proto.CompactTextString(m) } func (*AddFriendResponseReq) ProtoMessage() {} func (*AddFriendResponseReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{24} + return fileDescriptor_friend_69e6f38cd215d5ef, []int{24} } func (m *AddFriendResponseReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddFriendResponseReq.Unmarshal(m, b) @@ -1170,7 +1170,7 @@ func (m *AddFriendResponseResp) Reset() { *m = AddFriendResponseResp{} } func (m *AddFriendResponseResp) String() string { return proto.CompactTextString(m) } func (*AddFriendResponseResp) ProtoMessage() {} func (*AddFriendResponseResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{25} + return fileDescriptor_friend_69e6f38cd215d5ef, []int{25} } func (m *AddFriendResponseResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddFriendResponseResp.Unmarshal(m, b) @@ -1209,7 +1209,7 @@ func (m *SetFriendRemarkReq) Reset() { *m = SetFriendRemarkReq{} } func (m *SetFriendRemarkReq) String() string { return proto.CompactTextString(m) } func (*SetFriendRemarkReq) ProtoMessage() {} func (*SetFriendRemarkReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{26} + return fileDescriptor_friend_69e6f38cd215d5ef, []int{26} } func (m *SetFriendRemarkReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetFriendRemarkReq.Unmarshal(m, b) @@ -1254,7 +1254,7 @@ func (m *SetFriendRemarkResp) Reset() { *m = SetFriendRemarkResp{} } func (m *SetFriendRemarkResp) String() string { return proto.CompactTextString(m) } func (*SetFriendRemarkResp) ProtoMessage() {} func (*SetFriendRemarkResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{27} + return fileDescriptor_friend_69e6f38cd215d5ef, []int{27} } func (m *SetFriendRemarkResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetFriendRemarkResp.Unmarshal(m, b) @@ -1292,7 +1292,7 @@ func (m *GetSelfApplyListReq) Reset() { *m = GetSelfApplyListReq{} } func (m *GetSelfApplyListReq) String() string { return proto.CompactTextString(m) } func (*GetSelfApplyListReq) ProtoMessage() {} func (*GetSelfApplyListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{28} + return fileDescriptor_friend_69e6f38cd215d5ef, []int{28} } func (m *GetSelfApplyListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetSelfApplyListReq.Unmarshal(m, b) @@ -1332,7 +1332,7 @@ func (m *GetSelfApplyListResp) Reset() { *m = GetSelfApplyListResp{} } func (m *GetSelfApplyListResp) String() string { return proto.CompactTextString(m) } func (*GetSelfApplyListResp) ProtoMessage() {} func (*GetSelfApplyListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_ea5e0cd91ac7f1e7, []int{29} + return fileDescriptor_friend_69e6f38cd215d5ef, []int{29} } func (m *GetSelfApplyListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetSelfApplyListResp.Unmarshal(m, b) @@ -1429,7 +1429,7 @@ type FriendClient interface { GetBlacklist(ctx context.Context, in *GetBlacklistReq, opts ...grpc.CallOption) (*GetBlacklistResp, error) DeleteFriend(ctx context.Context, in *DeleteFriendReq, opts ...grpc.CallOption) (*DeleteFriendResp, error) AddFriendResponse(ctx context.Context, in *AddFriendResponseReq, opts ...grpc.CallOption) (*AddFriendResponseResp, error) - SetFriendComment(ctx context.Context, in *SetFriendRemarkReq, opts ...grpc.CallOption) (*SetFriendRemarkResp, error) + SetFriendRemark(ctx context.Context, in *SetFriendRemarkReq, opts ...grpc.CallOption) (*SetFriendRemarkResp, error) ImportFriend(ctx context.Context, in *ImportFriendReq, opts ...grpc.CallOption) (*ImportFriendResp, error) } @@ -1540,9 +1540,9 @@ func (c *friendClient) AddFriendResponse(ctx context.Context, in *AddFriendRespo return out, nil } -func (c *friendClient) SetFriendComment(ctx context.Context, in *SetFriendRemarkReq, opts ...grpc.CallOption) (*SetFriendRemarkResp, error) { +func (c *friendClient) SetFriendRemark(ctx context.Context, in *SetFriendRemarkReq, opts ...grpc.CallOption) (*SetFriendRemarkResp, error) { out := new(SetFriendRemarkResp) - err := grpc.Invoke(ctx, "/friend.friend/setFriendComment", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/friend.friend/setFriendRemark", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -1573,7 +1573,7 @@ type FriendServer interface { GetBlacklist(context.Context, *GetBlacklistReq) (*GetBlacklistResp, error) DeleteFriend(context.Context, *DeleteFriendReq) (*DeleteFriendResp, error) AddFriendResponse(context.Context, *AddFriendResponseReq) (*AddFriendResponseResp, error) - SetFriendComment(context.Context, *SetFriendRemarkReq) (*SetFriendRemarkResp, error) + SetFriendRemark(context.Context, *SetFriendRemarkReq) (*SetFriendRemarkResp, error) ImportFriend(context.Context, *ImportFriendReq) (*ImportFriendResp, error) } @@ -1779,20 +1779,20 @@ func _Friend_AddFriendResponse_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } -func _Friend_SetFriendComment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Friend_SetFriendRemark_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(SetFriendRemarkReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(FriendServer).SetFriendComment(ctx, in) + return srv.(FriendServer).SetFriendRemark(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/friend.friend/SetFriendComment", + FullMethod: "/friend.friend/SetFriendRemark", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FriendServer).SetFriendComment(ctx, req.(*SetFriendRemarkReq)) + return srv.(FriendServer).SetFriendRemark(ctx, req.(*SetFriendRemarkReq)) } return interceptor(ctx, in, info, handler) } @@ -1864,8 +1864,8 @@ var _Friend_serviceDesc = grpc.ServiceDesc{ Handler: _Friend_AddFriendResponse_Handler, }, { - MethodName: "setFriendComment", - Handler: _Friend_SetFriendComment_Handler, + MethodName: "setFriendRemark", + Handler: _Friend_SetFriendRemark_Handler, }, { MethodName: "importFriend", @@ -1876,66 +1876,66 @@ var _Friend_serviceDesc = grpc.ServiceDesc{ Metadata: "friend/friend.proto", } -func init() { proto.RegisterFile("friend/friend.proto", fileDescriptor_friend_ea5e0cd91ac7f1e7) } +func init() { proto.RegisterFile("friend/friend.proto", fileDescriptor_friend_69e6f38cd215d5ef) } -var fileDescriptor_friend_ea5e0cd91ac7f1e7 = []byte{ - // 924 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x57, 0xcd, 0x6f, 0xe3, 0x44, - 0x14, 0x97, 0x37, 0x6d, 0x36, 0x79, 0xc9, 0x6e, 0x92, 0x97, 0xb4, 0x1b, 0xdc, 0xee, 0x2a, 0xf8, - 0x80, 0x22, 0x0e, 0x89, 0x14, 0xb4, 0x88, 0xb2, 0xc0, 0x2a, 0xdb, 0x34, 0xc5, 0x2c, 0xa5, 0x2b, - 0x77, 0xb9, 0x20, 0xa4, 0xca, 0x5b, 0x4f, 0x82, 0x15, 0xc7, 0x9e, 0x7a, 0x5c, 0x2a, 0x2e, 0x1c, - 0x38, 0x70, 0x45, 0x42, 0xdc, 0xb8, 0xf0, 0xa7, 0x22, 0x7b, 0xec, 0x78, 0xfc, 0x91, 0x0a, 0xbb, - 0x48, 0x7b, 0x6a, 0xdf, 0x7b, 0xf3, 0x7b, 0x7e, 0x5f, 0xf3, 0x7e, 0x13, 0xe8, 0x2e, 0x5c, 0x93, - 0xd8, 0xc6, 0x98, 0xff, 0x19, 0x51, 0xd7, 0xf1, 0x1c, 0xac, 0x72, 0x49, 0xfe, 0xf0, 0x9c, 0x12, - 0xfb, 0x52, 0x3d, 0x1b, 0xd3, 0xd5, 0x72, 0x1c, 0x98, 0xc6, 0xcc, 0x58, 0x5d, 0xde, 0xb2, 0xf1, - 0x2d, 0xe3, 0x47, 0x95, 0xaf, 0x00, 0x8e, 0x9d, 0xf5, 0xda, 0xb1, 0x35, 0xc2, 0x28, 0xf6, 0xe1, - 0x21, 0x71, 0xdd, 0x63, 0xc7, 0x20, 0x7d, 0x69, 0x20, 0x0d, 0x77, 0xb5, 0x48, 0xc4, 0x7d, 0xa8, - 0x12, 0xd7, 0x3d, 0x63, 0xcb, 0xfe, 0x83, 0x81, 0x34, 0xac, 0x6b, 0xa1, 0xa4, 0xfc, 0x26, 0x41, - 0xd5, 0x77, 0xa0, 0xce, 0x50, 0x86, 0xda, 0x39, 0xfd, 0x9e, 0x11, 0x57, 0x9d, 0x05, 0xe8, 0xba, - 0xb6, 0x91, 0x71, 0x00, 0x8d, 0x73, 0x4a, 0x5c, 0xdd, 0x33, 0x1d, 0x5b, 0x9d, 0x85, 0x3e, 0x44, - 0x95, 0x8f, 0x7e, 0xeb, 0x84, 0xe8, 0x1d, 0x8e, 0x8e, 0x64, 0x7c, 0x06, 0x30, 0x77, 0x9d, 0x75, - 0x68, 0xdd, 0x0d, 0xac, 0x82, 0x46, 0x79, 0x01, 0x9d, 0x53, 0xe2, 0xcd, 0x83, 0xa4, 0x99, 0x6a, - 0x2f, 0x1c, 0x8d, 0x5c, 0xe3, 0x47, 0x51, 0x60, 0x41, 0x30, 0x8d, 0xc9, 0xe3, 0x51, 0x58, 0x23, - 0xae, 0xd5, 0x42, 0xab, 0xf2, 0xbb, 0x24, 0xa0, 0x39, 0x98, 0x57, 0xe2, 0x24, 0x59, 0x89, 0x93, - 0xb8, 0x12, 0x27, 0x89, 0x4a, 0x70, 0x09, 0x5f, 0xc2, 0xe3, 0xd8, 0xc7, 0xb7, 0x26, 0xf3, 0xfa, - 0x95, 0x41, 0x65, 0xd8, 0x98, 0x3c, 0x19, 0x39, 0x7e, 0x17, 0xcc, 0xf5, 0x25, 0x33, 0x56, 0x23, - 0xe1, 0x33, 0xa9, 0xe3, 0x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, 0x15, 0xba, 0x19, 0x74, 0xc9, - 0x40, 0x8e, 0xa0, 0x75, 0x4a, 0xbc, 0x52, 0x51, 0xfc, 0x21, 0x05, 0xc3, 0x90, 0x8c, 0xa1, 0x78, - 0x3b, 0x55, 0xe8, 0x04, 0x2e, 0x82, 0xdb, 0x93, 0xec, 0xe8, 0x41, 0xa2, 0xa3, 0x6f, 0x6e, 0xde, - 0x59, 0xe6, 0x55, 0x74, 0x4c, 0xcb, 0xa2, 0x94, 0xe7, 0xd0, 0x50, 0x59, 0xe1, 0x3d, 0xa9, 0xfc, - 0x08, 0xcd, 0x18, 0x56, 0x2a, 0x07, 0x19, 0x6a, 0x3e, 0xd2, 0xb1, 0x19, 0x09, 0x16, 0x55, 0x4d, - 0xdb, 0xc8, 0xfe, 0x95, 0x51, 0x99, 0x6a, 0x07, 0xd1, 0x16, 0xbd, 0x32, 0x3a, 0x74, 0x52, 0xd8, - 0xff, 0x3d, 0xbc, 0x23, 0x68, 0xcd, 0x88, 0x45, 0x3c, 0x52, 0xbc, 0x6e, 0x73, 0x68, 0x27, 0xa1, - 0x25, 0x67, 0x90, 0x42, 0x2f, 0xc1, 0x47, 0x7e, 0x5c, 0x45, 0x78, 0x0e, 0x61, 0x67, 0x61, 0xe9, - 0x3c, 0xe9, 0x5d, 0x2d, 0xf8, 0x1f, 0x0f, 0xa1, 0xfe, 0x93, 0x6e, 0x1b, 0x16, 0xf1, 0xab, 0xc1, - 0xb9, 0x23, 0x56, 0x28, 0xaf, 0x61, 0x2f, 0xe7, 0x8b, 0x25, 0xc3, 0x7f, 0x0b, 0x78, 0x41, 0x36, - 0x44, 0xb3, 0xd6, 0xdd, 0x55, 0x61, 0x92, 0xf6, 0x41, 0x31, 0x49, 0xfb, 0x92, 0x7f, 0xc7, 0x33, - 0x5e, 0x4b, 0x06, 0xf8, 0x25, 0x74, 0x4f, 0x89, 0x77, 0x41, 0xac, 0x45, 0x29, 0x2a, 0xfa, 0x53, - 0x82, 0x5e, 0x16,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x65, 0x14, 0x5f, 0x43, 0x9b, 0x45, 0x8d, - 0xf7, 0xaf, 0x2e, 0xb1, 0x85, 0x0e, 0x65, 0x37, 0x54, 0xdc, 0xa1, 0xbc, 0x3d, 0x33, 0x85, 0xa6, - 0x29, 0x3c, 0xa0, 0xe3, 0x0c, 0x53, 0x6f, 0xfe, 0x38, 0xc3, 0xf4, 0x7b, 0xfb, 0x55, 0xe7, 0x87, - 0xd6, 0x28, 0xfc, 0xf9, 0xf9, 0x82, 0xff, 0x79, 0x57, 0x0d, 0x7e, 0x5b, 0x7e, 0xf2, 0x6f, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x8d, 0xf7, 0x25, 0x0f, 0x9d, 0x0e, 0x00, 0x00, +var fileDescriptor_friend_69e6f38cd215d5ef = []byte{ + // 916 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x57, 0xcd, 0x4f, 0xeb, 0x46, + 0x10, 0x97, 0x09, 0x84, 0x64, 0x12, 0x48, 0xb2, 0x09, 0x90, 0x9a, 0x0f, 0xa5, 0x3e, 0x54, 0x51, + 0x0f, 0x89, 0x94, 0x8a, 0xaa, 0x94, 0xb6, 0x28, 0x10, 0x42, 0xdd, 0x96, 0x82, 0x0c, 0xbd, 0x54, + 0x95, 0x90, 0xc1, 0x9b, 0xd4, 0x8a, 0x63, 0x2f, 0x5e, 0x53, 0xd4, 0x4b, 0x0f, 0x3d, 0xf4, 0x5a, + 0xa9, 0xea, 0xed, 0x1d, 0xde, 0xbf, 0xfa, 0x64, 0xaf, 0x1d, 0xaf, 0x3f, 0x82, 0x9e, 0xcd, 0x93, + 0xde, 0x09, 0x66, 0x66, 0x7f, 0xe3, 0xf9, 0xda, 0xf9, 0x6d, 0xa0, 0x39, 0xb1, 0x75, 0x6c, 0x6a, + 0x7d, 0xf6, 0xa7, 0x47, 0x6c, 0xcb, 0xb1, 0x50, 0x91, 0x49, 0xe2, 0xa7, 0x57, 0x04, 0x9b, 0x77, + 0xf2, 0x65, 0x9f, 0xcc, 0xa6, 0x7d, 0xcf, 0xd4, 0xa7, 0xda, 0xec, 0xee, 0x99, 0xf6, 0x9f, 0x29, + 0x3b, 0x2a, 0x7d, 0x07, 0x70, 0x66, 0xcd, 0xe7, 0x96, 0xa9, 0x60, 0x4a, 0x50, 0x1b, 0xd6, 0xb1, + 0x6d, 0x9f, 0x59, 0x1a, 0x6e, 0x0b, 0x1d, 0xa1, 0xbb, 0xa6, 0x04, 0x22, 0xda, 0x86, 0x22, 0xb6, + 0xed, 0x4b, 0x3a, 0x6d, 0xaf, 0x74, 0x84, 0x6e, 0x59, 0xf1, 0x25, 0xe9, 0x6f, 0x01, 0x8a, 0xae, + 0x03, 0x79, 0x84, 0x44, 0x28, 0x5d, 0x91, 0x5f, 0x28, 0xb6, 0xe5, 0x91, 0x87, 0x2e, 0x2b, 0x0b, + 0x19, 0x75, 0xa0, 0x72, 0x45, 0xb0, 0xad, 0x3a, 0xba, 0x65, 0xca, 0x23, 0xdf, 0x07, 0xaf, 0x72, + 0xd1, 0xb7, 0x96, 0x8f, 0x5e, 0x65, 0xe8, 0x40, 0x46, 0x07, 0x00, 0x63, 0xdb, 0x9a, 0xfb, 0xd6, + 0x35, 0xcf, 0xca, 0x69, 0xa4, 0x63, 0x68, 0x5c, 0x60, 0x67, 0xec, 0x25, 0x4d, 0x65, 0x73, 0x62, + 0x29, 0xf8, 0x11, 0x7d, 0x16, 0x04, 0xe6, 0x05, 0x53, 0x19, 0x6c, 0xf6, 0xfc, 0x1a, 0x31, 0xad, + 0xe2, 0x5b, 0xa5, 0x7f, 0x04, 0x0e, 0xcd, 0xc0, 0xac, 0x12, 0xe7, 0xd1, 0x4a, 0x9c, 0x87, 0x95, + 0x38, 0x8f, 0x54, 0x82, 0x49, 0xe8, 0x04, 0x36, 0x43, 0x1f, 0x3f, 0xe9, 0xd4, 0x69, 0x17, 0x3a, + 0x85, 0x6e, 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, 0x73, 0x18, 0x43, 0x3d, 0x0a, 0xcd, 0x79, 0x7b, 0xbe, + 0x01, 0xa4, 0xe0, 0xb9, 0xf5, 0x07, 0xce, 0x15, 0x85, 0x0c, 0xcd, 0x04, 0x3a, 0x67, 0x20, 0x47, + 0x50, 0xbb, 0xc0, 0x4e, 0xae, 0x28, 0xfe, 0x15, 0xbc, 0x61, 0x88, 0xc6, 0x90, 0xbd, 0x9d, 0x32, + 0x34, 0x3c, 0x17, 0xde, 0xed, 0x89, 0x76, 0x74, 0x37, 0xd2, 0xd1, 0xeb, 0xa7, 0x7b, 0x43, 0x7f, + 0x08, 0x8e, 0x29, 0x49, 0x94, 0x74, 0x08, 0x15, 0x99, 0x66, 0xde, 0x93, 0xd2, 0x6f, 0x50, 0x0d, + 0x61, 0xb9, 0x72, 0x10, 0xa1, 0xe4, 0x22, 0x2d, 0x93, 0x62, 0x6f, 0x51, 0x95, 0x94, 0x85, 0xec, + 0x5e, 0x19, 0x99, 0xca, 0xa6, 0x17, 0x6d, 0xd6, 0x2b, 0xa3, 0x42, 0x23, 0x86, 0xfd, 0xe0, 0xe1, + 0x1d, 0x41, 0x6d, 0x84, 0x0d, 0xec, 0xe0, 0xec, 0x75, 0x1b, 0x43, 0x3d, 0x0a, 0xcd, 0x39, 0x83, + 0x04, 0x5a, 0x11, 0x3e, 0x72, 0xe3, 0xca, 0xc2, 0x73, 0x08, 0x56, 0x27, 0x86, 0xca, 0x92, 0x5e, + 0x53, 0xbc, 0xff, 0xd1, 0x1e, 0x94, 0x7f, 0x57, 0x4d, 0xcd, 0xc0, 0x6e, 0x35, 0x18, 0x77, 0x84, + 0x0a, 0xe9, 0x47, 0xd8, 0x4a, 0xf9, 0x62, 0xce, 0xf0, 0x6f, 0x01, 0xdd, 0xe0, 0x05, 0xd1, 0xcc, + 0x55, 0x7b, 0x96, 0x99, 0xa4, 0x5d, 0x50, 0x48, 0xd2, 0xae, 0xe4, 0xde, 0xf1, 0x84, 0xd7, 0x9c, + 0x01, 0x7e, 0x0b, 0xcd, 0x0b, 0xec, 0xdc, 0x60, 0x63, 0x92, 0x8b, 0x8a, 0xfe, 0x13, 0xa0, 0x95, + 0xc4, 0x7f, 0x5c, 0x22, 0x1a, 0xbc, 0x5d, 0x07, 0xff, 0x31, 0x8b, 0xbe, 0x82, 0xb2, 0x1a, 0x34, + 0x13, 0xb5, 0x82, 0x24, 0xf8, 0x17, 0x93, 0xb8, 0x95, 0xa2, 0xa5, 0x04, 0xdd, 0x00, 0x9a, 0x26, + 0x38, 0x16, 0xed, 0x07, 0x87, 0x53, 0x19, 0x5c, 0x3c, 0x78, 0xc9, 0x4c, 0x09, 0xba, 0x84, 0xfa, + 0x34, 0x56, 0x2d, 0xb4, 0xcb, 0x61, 0xe2, 0x7d, 0x10, 0xf7, 0x96, 0x1b, 0x29, 0x41, 0x23, 0xd8, + 0x98, 0xf2, 0xa4, 0x89, 0xda, 0x89, 0xef, 0x07, 0x8e, 0x3e, 0x59, 0x62, 0xa1, 0x04, 0x0d, 0xa1, + 0xaa, 0x72, 0xbc, 0x85, 0x76, 0xb8, 0x82, 0xf0, 0xcb, 0x5f, 0x6c, 0xa7, 0x1b, 0x28, 0x41, 0x3f, + 0x40, 0xcd, 0x8e, 0x92, 0x0e, 0x12, 0x83, 0xc3, 0x49, 0x2e, 0x13, 0x77, 0x97, 0xda, 0x28, 0x41, + 0x87, 0x50, 0xd2, 0xfd, 0x8d, 0x8b, 0x9a, 0xc1, 0x41, 0x6e, 0x75, 0x8b, 0xad, 0xa4, 0x92, 0xd5, + 0x42, 0xe7, 0xd7, 0x61, 0x58, 0x8b, 0xf8, 0x86, 0x0d, 0x6b, 0x91, 0xdc, 0x9f, 0x43, 0xa8, 0x4e, + 0x39, 0xda, 0x0a, 0x6b, 0x11, 0x23, 0x42, 0xb1, 0x9d, 0x6e, 0x60, 0x2e, 0x34, 0x6e, 0xf3, 0x85, + 0x2e, 0x62, 0xab, 0x34, 0x74, 0x91, 0x58, 0x94, 0xd7, 0xd0, 0x50, 0xe3, 0x2b, 0x08, 0xed, 0xa5, + 0xce, 0xa9, 0xbf, 0x0f, 0xc5, 0xfd, 0x17, 0xac, 0xac, 0x41, 0x34, 0xba, 0x31, 0xc2, 0x06, 0x25, + 0x17, 0x54, 0xd8, 0xa0, 0xb4, 0x35, 0x33, 0x84, 0xaa, 0xce, 0xbd, 0x9f, 0xc3, 0x04, 0x63, 0x4f, + 0xfe, 0x30, 0xc1, 0xf8, 0x73, 0xfb, 0xb4, 0xf1, 0x6b, 0xad, 0xe7, 0xff, 0xfa, 0x3c, 0x66, 0x7f, + 0xee, 0x8b, 0xde, 0x4f, 0xcb, 0x2f, 0xde, 0x05, 0x00, 0x00, 0xff, 0xff, 0x85, 0x71, 0x6d, 0x1b, + 0x9c, 0x0e, 0x00, 0x00, } diff --git a/pkg/proto/friend/friend.proto b/pkg/proto/friend/friend.proto index df22713b8..780ebbb62 100644 --- a/pkg/proto/friend/friend.proto +++ b/pkg/proto/friend/friend.proto @@ -160,6 +160,6 @@ service friend{ rpc getBlacklist(GetBlacklistReq) returns(GetBlacklistResp); rpc deleteFriend(DeleteFriendReq) returns(DeleteFriendResp); rpc addFriendResponse(AddFriendResponseReq) returns(AddFriendResponseResp); - rpc setFriendComment(SetFriendRemarkReq) returns(SetFriendRemarkResp); + rpc setFriendRemark(SetFriendRemarkReq) returns(SetFriendRemarkResp); rpc importFriend(ImportFriendReq) returns(ImportFriendResp); } \ No newline at end of file From 669ea693570dc6ab054afa6911b22c234025fdea Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 14:39:54 +0800 Subject: [PATCH 111/337] Refactor code --- internal/api/friend/friend.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go index 1ffa54413..9728eeb2b 100644 --- a/internal/api/friend/friend.go +++ b/internal/api/friend/friend.go @@ -236,7 +236,7 @@ func SetFriendRemark(c *gin.Context) { etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImFriendName) client := rpc.NewFriendClient(etcdConn) - RpcResp, err := client.SetFriendComment(context.Background(), req) + RpcResp, err := client.SetFriendRemark(context.Background(), req) if err != nil { log.NewError(req.CommID.OperationID, "SetFriendComment failed ", err.Error(), req.String()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call set friend comment rpc server failed"}) From fb7c4114c14e7500afc193f23964adce3b6b0257 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 14:57:36 +0800 Subject: [PATCH 112/337] Refactor code --- cmd/open_im_api/main.go | 2 +- internal/api/friend/friend.go | 4 +++- pkg/base_info/friend_api_struct.go | 5 ++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index edb44e5dd..6135ee3f0 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -40,7 +40,7 @@ func main() { friendRouterGroup.POST("/remove_blacklist", friend.RemoveBlacklist) friendRouterGroup.POST("/delete_friend", friend.DeleteFriend) friendRouterGroup.POST("/add_friend_response", friend.AddFriendResponse) //1 - friendRouterGroup.POST("/set_friend_remark", friend.SetFriendRemark) + friendRouterGroup.POST("/set_friend_remark", friend.SetFriendRemark) //1 friendRouterGroup.POST("/is_friend", friend.IsFriend) friendRouterGroup.POST("/import_friend", friend.ImportFriend) } diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go index 9728eeb2b..1a27effb9 100644 --- a/internal/api/friend/friend.go +++ b/internal/api/friend/friend.go @@ -305,7 +305,9 @@ func IsFriend(c *gin.Context) { c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call add friend rpc server failed"}) return } - resp := api.IsFriendResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, Response: RpcResp.Response} + resp := api.IsFriendResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}} + resp.Response.Friend = RpcResp.Response + log.NewInfo(req.CommID.OperationID, "IsFriend api return ", resp) c.JSON(http.StatusOK, resp) } diff --git a/pkg/base_info/friend_api_struct.go b/pkg/base_info/friend_api_struct.go index 361d54bd6..5d7f33d27 100644 --- a/pkg/base_info/friend_api_struct.go +++ b/pkg/base_info/friend_api_struct.go @@ -89,9 +89,12 @@ type RemoveBlackListResp struct { type IsFriendReq struct { ParamsCommFriend } +type Response struct { + Friend bool `json:"isFriend"` +} type IsFriendResp struct { CommResp - Response bool `json:"response"` + Response Response `json:"data"` } type GetFriendsInfoReq struct { From 03f491ab5a3a3750614af3ae3d6844df46f1a613 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 29 Dec 2021 15:07:36 +0800 Subject: [PATCH 113/337] nil return modify --- internal/api/conversation/conversation.go | 2 +- internal/rpc/user/user.go | 1 - pkg/proto/user/user.pb.go | 152 +++++++++++----------- pkg/proto/user/user.proto | 2 +- 4 files changed, 78 insertions(+), 79 deletions(-) diff --git a/internal/api/conversation/conversation.go b/internal/api/conversation/conversation.go index 2a66be9dd..4eaf1f0a9 100644 --- a/internal/api/conversation/conversation.go +++ b/internal/api/conversation/conversation.go @@ -27,7 +27,7 @@ func GetAllConversationMessageOpt(c *gin.Context) { ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed or not set token in header"}) return } log.NewInfo(params.OperationID, "GetAllConversationMessageOpt args ", req.String()) diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index 783f6b1f3..2ad30123d 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -139,7 +139,6 @@ func (s *userServer) GetAllConversationMsgOpt(ctx context.Context, req *pbUser.G log.NewInfo(req.OperationID, "GetAllConversationMsgOpt rpc return ", resp.String()) return &resp, nil } - func (s *userServer) DeleteUsers(_ context.Context, req *pbUser.DeleteUsersReq) (*pbUser.DeleteUsersResp, error) { log.NewInfo(req.OperationID, "DeleteUsers args ", req.String()) if token_verify.IsMangerUserID(req.OpUserID) { diff --git a/pkg/proto/user/user.pb.go b/pkg/proto/user/user.pb.go index 892c0c982..79a53f7d7 100644 --- a/pkg/proto/user/user.pb.go +++ b/pkg/proto/user/user.pb.go @@ -36,7 +36,7 @@ func (m *CommonResp) Reset() { *m = CommonResp{} } func (m *CommonResp) String() string { return proto.CompactTextString(m) } func (*CommonResp) ProtoMessage() {} func (*CommonResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_0a10ad809f213986, []int{0} + return fileDescriptor_user_9c8678d55a710022, []int{0} } func (m *CommonResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CommonResp.Unmarshal(m, b) @@ -83,7 +83,7 @@ func (m *DeleteUsersReq) Reset() { *m = DeleteUsersReq{} } func (m *DeleteUsersReq) String() string { return proto.CompactTextString(m) } func (*DeleteUsersReq) ProtoMessage() {} func (*DeleteUsersReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_0a10ad809f213986, []int{1} + return fileDescriptor_user_9c8678d55a710022, []int{1} } func (m *DeleteUsersReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteUsersReq.Unmarshal(m, b) @@ -136,7 +136,7 @@ func (m *DeleteUsersResp) Reset() { *m = DeleteUsersResp{} } func (m *DeleteUsersResp) String() string { return proto.CompactTextString(m) } func (*DeleteUsersResp) ProtoMessage() {} func (*DeleteUsersResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_0a10ad809f213986, []int{2} + return fileDescriptor_user_9c8678d55a710022, []int{2} } func (m *DeleteUsersResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteUsersResp.Unmarshal(m, b) @@ -182,7 +182,7 @@ func (m *GetAllUserIDReq) Reset() { *m = GetAllUserIDReq{} } func (m *GetAllUserIDReq) String() string { return proto.CompactTextString(m) } func (*GetAllUserIDReq) ProtoMessage() {} func (*GetAllUserIDReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_0a10ad809f213986, []int{3} + return fileDescriptor_user_9c8678d55a710022, []int{3} } func (m *GetAllUserIDReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetAllUserIDReq.Unmarshal(m, b) @@ -228,7 +228,7 @@ func (m *GetAllUserIDResp) Reset() { *m = GetAllUserIDResp{} } func (m *GetAllUserIDResp) String() string { return proto.CompactTextString(m) } func (*GetAllUserIDResp) ProtoMessage() {} func (*GetAllUserIDResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_0a10ad809f213986, []int{4} + return fileDescriptor_user_9c8678d55a710022, []int{4} } func (m *GetAllUserIDResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetAllUserIDResp.Unmarshal(m, b) @@ -275,7 +275,7 @@ func (m *AccountCheckReq) Reset() { *m = AccountCheckReq{} } func (m *AccountCheckReq) String() string { return proto.CompactTextString(m) } func (*AccountCheckReq) ProtoMessage() {} func (*AccountCheckReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_0a10ad809f213986, []int{5} + return fileDescriptor_user_9c8678d55a710022, []int{5} } func (m *AccountCheckReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AccountCheckReq.Unmarshal(m, b) @@ -328,7 +328,7 @@ func (m *AccountCheckResp) Reset() { *m = AccountCheckResp{} } func (m *AccountCheckResp) String() string { return proto.CompactTextString(m) } func (*AccountCheckResp) ProtoMessage() {} func (*AccountCheckResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_0a10ad809f213986, []int{6} + return fileDescriptor_user_9c8678d55a710022, []int{6} } func (m *AccountCheckResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AccountCheckResp.Unmarshal(m, b) @@ -374,7 +374,7 @@ func (m *AccountCheckResp_SingleUserStatus) Reset() { *m = AccountCheckR func (m *AccountCheckResp_SingleUserStatus) String() string { return proto.CompactTextString(m) } func (*AccountCheckResp_SingleUserStatus) ProtoMessage() {} func (*AccountCheckResp_SingleUserStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_user_0a10ad809f213986, []int{6, 0} + return fileDescriptor_user_9c8678d55a710022, []int{6, 0} } func (m *AccountCheckResp_SingleUserStatus) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AccountCheckResp_SingleUserStatus.Unmarshal(m, b) @@ -421,7 +421,7 @@ func (m *GetUserInfoReq) Reset() { *m = GetUserInfoReq{} } func (m *GetUserInfoReq) String() string { return proto.CompactTextString(m) } func (*GetUserInfoReq) ProtoMessage() {} func (*GetUserInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_0a10ad809f213986, []int{7} + return fileDescriptor_user_9c8678d55a710022, []int{7} } func (m *GetUserInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUserInfoReq.Unmarshal(m, b) @@ -474,7 +474,7 @@ func (m *GetUserInfoResp) Reset() { *m = GetUserInfoResp{} } func (m *GetUserInfoResp) String() string { return proto.CompactTextString(m) } func (*GetUserInfoResp) ProtoMessage() {} func (*GetUserInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_0a10ad809f213986, []int{8} + return fileDescriptor_user_9c8678d55a710022, []int{8} } func (m *GetUserInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUserInfoResp.Unmarshal(m, b) @@ -521,7 +521,7 @@ func (m *UpdateUserInfoReq) Reset() { *m = UpdateUserInfoReq{} } func (m *UpdateUserInfoReq) String() string { return proto.CompactTextString(m) } func (*UpdateUserInfoReq) ProtoMessage() {} func (*UpdateUserInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_0a10ad809f213986, []int{9} + return fileDescriptor_user_9c8678d55a710022, []int{9} } func (m *UpdateUserInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UpdateUserInfoReq.Unmarshal(m, b) @@ -573,7 +573,7 @@ func (m *UpdateUserInfoResp) Reset() { *m = UpdateUserInfoResp{} } func (m *UpdateUserInfoResp) String() string { return proto.CompactTextString(m) } func (*UpdateUserInfoResp) ProtoMessage() {} func (*UpdateUserInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_0a10ad809f213986, []int{10} + return fileDescriptor_user_9c8678d55a710022, []int{10} } func (m *UpdateUserInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UpdateUserInfoResp.Unmarshal(m, b) @@ -615,7 +615,7 @@ func (m *SetReceiveMessageOptReq) Reset() { *m = SetReceiveMessageOptReq func (m *SetReceiveMessageOptReq) String() string { return proto.CompactTextString(m) } func (*SetReceiveMessageOptReq) ProtoMessage() {} func (*SetReceiveMessageOptReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_0a10ad809f213986, []int{11} + return fileDescriptor_user_9c8678d55a710022, []int{11} } func (m *SetReceiveMessageOptReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetReceiveMessageOptReq.Unmarshal(m, b) @@ -682,7 +682,7 @@ func (m *OptResult) Reset() { *m = OptResult{} } func (m *OptResult) String() string { return proto.CompactTextString(m) } func (*OptResult) ProtoMessage() {} func (*OptResult) Descriptor() ([]byte, []int) { - return fileDescriptor_user_0a10ad809f213986, []int{12} + return fileDescriptor_user_9c8678d55a710022, []int{12} } func (m *OptResult) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OptResult.Unmarshal(m, b) @@ -728,7 +728,7 @@ func (m *SetReceiveMessageOptResp) Reset() { *m = SetReceiveMessageOptRe func (m *SetReceiveMessageOptResp) String() string { return proto.CompactTextString(m) } func (*SetReceiveMessageOptResp) ProtoMessage() {} func (*SetReceiveMessageOptResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_0a10ad809f213986, []int{13} + return fileDescriptor_user_9c8678d55a710022, []int{13} } func (m *SetReceiveMessageOptResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetReceiveMessageOptResp.Unmarshal(m, b) @@ -776,7 +776,7 @@ func (m *GetReceiveMessageOptReq) Reset() { *m = GetReceiveMessageOptReq func (m *GetReceiveMessageOptReq) String() string { return proto.CompactTextString(m) } func (*GetReceiveMessageOptReq) ProtoMessage() {} func (*GetReceiveMessageOptReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_0a10ad809f213986, []int{14} + return fileDescriptor_user_9c8678d55a710022, []int{14} } func (m *GetReceiveMessageOptReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetReceiveMessageOptReq.Unmarshal(m, b) @@ -836,7 +836,7 @@ func (m *GetReceiveMessageOptResp) Reset() { *m = GetReceiveMessageOptRe func (m *GetReceiveMessageOptResp) String() string { return proto.CompactTextString(m) } func (*GetReceiveMessageOptResp) ProtoMessage() {} func (*GetReceiveMessageOptResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_0a10ad809f213986, []int{15} + return fileDescriptor_user_9c8678d55a710022, []int{15} } func (m *GetReceiveMessageOptResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetReceiveMessageOptResp.Unmarshal(m, b) @@ -871,7 +871,7 @@ func (m *GetReceiveMessageOptResp) GetConversationOptResultList() []*OptResult { } type GetAllConversationMsgOptReq struct { - FromUserId string `protobuf:"bytes,1,opt,name=FromUserId" json:"FromUserId,omitempty"` + FromUserID string `protobuf:"bytes,1,opt,name=FromUserID" json:"FromUserID,omitempty"` OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` OpUserID string `protobuf:"bytes,3,opt,name=OpUserID" json:"OpUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -883,7 +883,7 @@ func (m *GetAllConversationMsgOptReq) Reset() { *m = GetAllConversationM func (m *GetAllConversationMsgOptReq) String() string { return proto.CompactTextString(m) } func (*GetAllConversationMsgOptReq) ProtoMessage() {} func (*GetAllConversationMsgOptReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_0a10ad809f213986, []int{16} + return fileDescriptor_user_9c8678d55a710022, []int{16} } func (m *GetAllConversationMsgOptReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetAllConversationMsgOptReq.Unmarshal(m, b) @@ -903,9 +903,9 @@ func (m *GetAllConversationMsgOptReq) XXX_DiscardUnknown() { var xxx_messageInfo_GetAllConversationMsgOptReq proto.InternalMessageInfo -func (m *GetAllConversationMsgOptReq) GetFromUserId() string { +func (m *GetAllConversationMsgOptReq) GetFromUserID() string { if m != nil { - return m.FromUserId + return m.FromUserID } return "" } @@ -936,7 +936,7 @@ func (m *GetAllConversationMsgOptResp) Reset() { *m = GetAllConversation func (m *GetAllConversationMsgOptResp) String() string { return proto.CompactTextString(m) } func (*GetAllConversationMsgOptResp) ProtoMessage() {} func (*GetAllConversationMsgOptResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_0a10ad809f213986, []int{17} + return fileDescriptor_user_9c8678d55a710022, []int{17} } func (m *GetAllConversationMsgOptResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetAllConversationMsgOptResp.Unmarshal(m, b) @@ -1295,60 +1295,60 @@ var _User_serviceDesc = grpc.ServiceDesc{ Metadata: "user/user.proto", } -func init() { proto.RegisterFile("user/user.proto", fileDescriptor_user_0a10ad809f213986) } +func init() { proto.RegisterFile("user/user.proto", fileDescriptor_user_9c8678d55a710022) } -var fileDescriptor_user_0a10ad809f213986 = []byte{ - // 829 bytes of a gzipped FileDescriptorProto +var fileDescriptor_user_9c8678d55a710022 = []byte{ + // 827 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xcd, 0x6e, 0xd3, 0x4a, - 0x14, 0x96, 0x9b, 0xb4, 0xb7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0x32, 0x77, 0x70, 0x71, + 0xc5, 0x9a, 0x57, 0x4c, 0x04, 0xe2, 0xc7, 0x00, 0x2d, 0x3a, 0x1a, 0x51, 0xcf, 0x26, 0xcc, 0x47, + 0x3a, 0xfc, 0x45, 0x82, 0xa0, 0x45, 0x5d, 0xa2, 0x6b, 0x75, 0xad, 0xb1, 0x6a, 0x27, 0x43, 0xb4, + 0x03, 0x6b, 0x24, 0x08, 0xda, 0xac, 0xa7, 0xaf, 0xd4, 0xb5, 0x46, 0xc9, 0x8e, 0x47, 0xf8, 0x1d, + 0x54, 0x8e, 0xc9, 0x90, 0x84, 0xe4, 0x9c, 0x91, 0x80, 0xd9, 0xe4, 0x0d, 0x3a, 0x80, 0xda, 0x14, + 0x39, 0x3d, 0x7e, 0xd6, 0x67, 0xa1, 0xbe, 0x52, 0x2f, 0x34, 0x4a, 0x76, 0x06, 0x47, 0x06, 0xac, + 0x77, 0x7c, 0x31, 0xd6, 0x0b, 0x3c, 0xef, 0x64, 0x8c, 0xea, 0x50, 0xee, 0xf8, 0x24, 0x70, 0xc2, + 0x3e, 0xf5, 0x4e, 0x8f, 0xf5, 0x22, 0x9f, 0x96, 0x21, 0x4c, 0xa1, 0xaa, 0xec, 0xcd, 0x7c, 0x74, + 0x5b, 0x96, 0xc3, 0x35, 0x94, 0x0f, 0x6b, 0x26, 0x37, 0x66, 0x8a, 0xdb, 0xb2, 0xe4, 0x03, 0xa8, + 0x9d, 0x38, 0xfd, 0x21, 0x71, 0xb3, 0x74, 0xd3, 0x38, 0xee, 0x40, 0xd5, 0x22, 0xe1, 0xd1, 0x70, + 0x28, 0xb0, 0x48, 0xad, 0x01, 0xeb, 0x34, 0x51, 0xa0, 0x09, 0x05, 0x54, 0x52, 0x40, 0x25, 0x05, + 0xc2, 0x38, 0x19, 0xc2, 0x2e, 0xd4, 0xd4, 0x84, 0x4b, 0x49, 0xd8, 0x03, 0xc8, 0x90, 0x97, 0x10, + 0xfc, 0x16, 0xaa, 0x47, 0x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 0x3d, 0x87, 0xdf, 0x8b, 0xc0, 0x3b, 0x24, 0xf4, 0x00, 0xca, 0xd2, 0x6b, 0x8a, 0xb6, + 0x44, 0x0e, 0xf5, 0x41, 0x37, 0xb6, 0x73, 0x50, 0xe6, 0xa3, 0x16, 0x54, 0xd4, 0x27, 0x08, 0xed, + 0x8a, 0xc0, 0xcc, 0xf3, 0x68, 0xe8, 0xf9, 0x13, 0xcc, 0x8f, 0x08, 0x48, 0x3d, 0x4c, 0x42, 0x40, + 0x6d, 0xa9, 0x12, 0x02, 0xe9, 0x66, 0xe7, 0x11, 0x6c, 0xc8, 0xdd, 0x03, 0x9a, 0xf2, 0x94, 0x5b, + 0x14, 0x63, 0x27, 0x0f, 0x66, 0x3e, 0x3a, 0x87, 0xad, 0xbc, 0x0b, 0x8f, 0xfe, 0x17, 0xf1, 0x33, + 0x5e, 0x45, 0x63, 0x6f, 0xde, 0xb4, 0x48, 0x6b, 0xcd, 0x49, 0x6b, 0xcd, 0x4f, 0x3b, 0xf3, 0x4a, + 0x39, 0xfc, 0xba, 0xe5, 0xd6, 0x14, 0xda, 0x97, 0x15, 0xe6, 0x56, 0xbc, 0x81, 0x17, 0x85, 0x08, + 0x3f, 0xe5, 0x6e, 0x22, 0xf1, 0x33, 0xd5, 0x3b, 0x25, 0x7e, 0xa6, 0x1b, 0x8f, 0x27, 0x9b, 0x2f, + 0xca, 0x26, 0xef, 0xc1, 0x1f, 0x46, 0x3f, 0x2f, 0xd7, 0x78, 0x83, 0x7d, 0xf7, 0x67, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xda, 0x48, 0xf9, 0xbd, 0x9c, 0x0b, 0x00, 0x00, } diff --git a/pkg/proto/user/user.proto b/pkg/proto/user/user.proto index 7690167ed..bf4738d21 100644 --- a/pkg/proto/user/user.proto +++ b/pkg/proto/user/user.proto @@ -97,7 +97,7 @@ message GetReceiveMessageOptResp{ message GetAllConversationMsgOptReq{ - string FromUserId = 1; + string FromUserID = 1; string operationID = 2; string OpUserID = 3; } From 667ceb211504accaadc950dba60c8d3a33d63a97 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 15:08:27 +0800 Subject: [PATCH 114/337] Refactor code --- cmd/open_im_api/main.go | 2 +- internal/rpc/friend/firend.go | 2 +- pkg/common/db/mysql_model/im_mysql_model/model_struct.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index 6135ee3f0..ea126b1c8 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -41,7 +41,7 @@ func main() { friendRouterGroup.POST("/delete_friend", friend.DeleteFriend) friendRouterGroup.POST("/add_friend_response", friend.AddFriendResponse) //1 friendRouterGroup.POST("/set_friend_remark", friend.SetFriendRemark) //1 - friendRouterGroup.POST("/is_friend", friend.IsFriend) + friendRouterGroup.POST("/is_friend", friend.IsFriend) //1 friendRouterGroup.POST("/import_friend", friend.ImportFriend) } //group related routing group diff --git a/internal/rpc/friend/firend.go b/internal/rpc/friend/firend.go index d5db10e1f..4fe757f11 100644 --- a/internal/rpc/friend/firend.go +++ b/internal/rpc/friend/firend.go @@ -116,7 +116,7 @@ func (s *friendServer) AddBlacklist(ctx context.Context, req *pbFriend.AddBlackl log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID) return &pbFriend.AddBlacklistResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil } - black := imdb.Black{OwnerUserID: req.CommID.FromUserID, BlockUserID: req.CommID.ToUserID} + black := imdb.Black{OwnerUserID: req.CommID.FromUserID, BlockUserID: req.CommID.ToUserID, OperatorUserID: req.CommID.OpUserID} err := imdb.InsertInToUserBlackList(black) if err != nil { diff --git a/pkg/common/db/mysql_model/im_mysql_model/model_struct.go b/pkg/common/db/mysql_model/im_mysql_model/model_struct.go index 29125d813..bd35c6314 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/model_struct.go +++ b/pkg/common/db/mysql_model/im_mysql_model/model_struct.go @@ -161,6 +161,6 @@ type Black struct { CreateTime time.Time `gorm:"column:create_time"` BlockUserID string `gorm:"column:block_user_id;primaryKey;"` AddSource int32 `gorm:"column:add_source"` - OperatorUserID int32 `gorm:"column:operator_user_id"` + OperatorUserID string `gorm:"column:operator_user_id"` Ex string `gorm:"column:ex"` } From 679c907b789aef3ead408d3807dd3fc190fe3973 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 29 Dec 2021 15:19:49 +0800 Subject: [PATCH 115/337] nil return modify --- internal/rpc/user/user.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index 2ad30123d..fbe14cb92 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -127,9 +127,9 @@ func (s *userServer) GetReceiveMessageOpt(ctx context.Context, req *pbUser.GetRe func (s *userServer) GetAllConversationMsgOpt(ctx context.Context, req *pbUser.GetAllConversationMsgOptReq) (*pbUser.GetAllConversationMsgOptResp, error) { log.NewInfo(req.OperationID, "GetAllConversationMsgOpt args ", req.String()) - m, err := db.DB.GetAllConversationMsgOpt(req.FromUserId) + m, err := db.DB.GetAllConversationMsgOpt(req.FromUserID) if err != nil { - log.NewError(req.OperationID, "GetAllConversationMsgOpt failed ", err.Error(), req.FromUserId) + log.NewError(req.OperationID, "GetAllConversationMsgOpt failed ", err.Error(), req.FromUserID) return &pbUser.GetAllConversationMsgOptResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } resp := pbUser.GetAllConversationMsgOptResp{CommonResp: &pbUser.CommonResp{}} From 4e4bab2bf04c18af1624792d4de4bccfce608156 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 15:50:50 +0800 Subject: [PATCH 116/337] Refactor code --- cmd/open_im_api/main.go | 14 +++++++------- pkg/proto/friend/friend.proto | 6 +++++- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index ea126b1c8..d6abb67e4 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -24,8 +24,8 @@ func main() { // user routing group, which handles user registration and login services userRouterGroup := r.Group("/user") { - userRouterGroup.POST("/update_user_info", user.UpdateUserInfo) - userRouterGroup.POST("/get_user_info", user.GetUserInfo) + userRouterGroup.POST("/update_user_info", user.UpdateUserInfo) //1 + userRouterGroup.POST("/get_user_info", user.GetUserInfo) //1 } //friend routing group friendRouterGroup := r.Group("/friend") @@ -35,9 +35,9 @@ func main() { friendRouterGroup.POST("/get_friend_apply_list", friend.GetFriendApplyList) //1 friendRouterGroup.POST("/get_self_apply_list", friend.GetSelfApplyList) //1 friendRouterGroup.POST("/get_friend_list", friend.GetFriendList) //1 - friendRouterGroup.POST("/add_blacklist", friend.AddBlacklist) - friendRouterGroup.POST("/get_blacklist", friend.GetBlacklist) - friendRouterGroup.POST("/remove_blacklist", friend.RemoveBlacklist) + friendRouterGroup.POST("/add_blacklist", friend.AddBlacklist) //1 + friendRouterGroup.POST("/get_blacklist", friend.GetBlacklist) //1 + friendRouterGroup.POST("/remove_blacklist", friend.RemoveBlacklist) //1 friendRouterGroup.POST("/delete_friend", friend.DeleteFriend) friendRouterGroup.POST("/add_friend_response", friend.AddFriendResponse) //1 friendRouterGroup.POST("/set_friend_remark", friend.SetFriendRemark) //1 @@ -65,8 +65,8 @@ func main() { //certificate authRouterGroup := r.Group("/auth") { - authRouterGroup.POST("/user_register", apiAuth.UserRegister) - authRouterGroup.POST("/user_token", apiAuth.UserToken) + authRouterGroup.POST("/user_register", apiAuth.UserRegister) //1 + authRouterGroup.POST("/user_token", apiAuth.UserToken) //1 } //Third service thirdGroup := r.Group("/third") diff --git a/pkg/proto/friend/friend.proto b/pkg/proto/friend/friend.proto index 780ebbb62..9bb348178 100644 --- a/pkg/proto/friend/friend.proto +++ b/pkg/proto/friend/friend.proto @@ -42,9 +42,13 @@ message ImportFriendReq{ string FromUserID = 3; string OpUserID = 4; } +message UserIDResult{ + string UserID = 1; + int32 Result = 2; +} message ImportFriendResp{ CommonResp CommonResp = 1; - repeated string FailedFriendUserIDList = 2; + repeated UserIDResult UserIDResultList = 2; } From 0b0173f155a4c1b1664a5002e9ffc7a2994b0e03 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 29 Dec 2021 15:52:19 +0800 Subject: [PATCH 117/337] nil return modify --- internal/api/conversation/conversation.go | 30 ++-- pkg/base_info/conversation_api_struct.go | 12 +- pkg/proto/user/user.pb.go | 171 +++++++++++----------- pkg/proto/user/user.proto | 6 +- 4 files changed, 116 insertions(+), 103 deletions(-) diff --git a/internal/api/conversation/conversation.go b/internal/api/conversation/conversation.go index 4eaf1f0a9..d29e47c09 100644 --- a/internal/api/conversation/conversation.go +++ b/internal/api/conversation/conversation.go @@ -39,10 +39,14 @@ func GetAllConversationMessageOpt(c *gin.Context) { c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": "GetAllConversationMsgOpt rpc failed, " + err.Error()}) return } - resp := api.GetAllConversationMessageOptResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, ConversationOptResultList: RpcResp.ConversationOptResultList} - if len(RpcResp.ConversationOptResultList) == 0 { - resp.ConversationOptResultList = []*user.OptResult{} + optResult := make([]*api.OptResult, 0) + for _, v := range RpcResp.ConversationOptResultList { + temp := new(api.OptResult) + temp.ConversationID = v.ConversationID + temp.Result = &v.Result + optResult = append(optResult, temp) } + resp := api.GetAllConversationMessageOptResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, ConversationOptResultList: optResult} log.NewInfo(req.OperationID, "GetAllConversationMsgOpt api return: ", resp) c.JSON(http.StatusOK, resp) } @@ -71,10 +75,14 @@ func GetReceiveMessageOpt(c *gin.Context) { c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": "GetReceiveMessageOpt rpc failed, " + err.Error()}) return } - resp := api.GetReceiveMessageOptResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, ConversationOptResultList: RpcResp.ConversationOptResultList} - if len(RpcResp.ConversationOptResultList) == 0 { - resp.ConversationOptResultList = []*user.OptResult{} + optResult := make([]*api.OptResult, 0) + for _, v := range RpcResp.ConversationOptResultList { + temp := new(api.OptResult) + temp.ConversationID = v.ConversationID + temp.Result = &v.Result + optResult = append(optResult, temp) } + resp := api.GetReceiveMessageOptResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, ConversationOptResultList: optResult} log.NewInfo(req.OperationID, "GetReceiveMessageOpt api return: ", resp) c.JSON(http.StatusOK, resp) } @@ -103,10 +111,14 @@ func SetReceiveMessageOpt(c *gin.Context) { c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": "SetReceiveMessageOpt rpc failed, " + err.Error()}) return } - resp := api.SetReceiveMessageOptResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, OptResultList: RpcResp.OptResultList} - if len(RpcResp.OptResultList) == 0 { - resp.OptResultList = []*user.OptResult{} + optResult := make([]*api.OptResult, 0) + for _, v := range RpcResp.ConversationOptResultList { + temp := new(api.OptResult) + temp.ConversationID = v.ConversationID + temp.Result = &v.Result + optResult = append(optResult, temp) } + resp := api.SetReceiveMessageOptResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, ConversationOptResultList: optResult} log.NewInfo(req.OperationID, "SetReceiveMessageOpt api return: ", resp) c.JSON(http.StatusOK, resp) } diff --git a/pkg/base_info/conversation_api_struct.go b/pkg/base_info/conversation_api_struct.go index 0bbb52a49..06133e4bd 100644 --- a/pkg/base_info/conversation_api_struct.go +++ b/pkg/base_info/conversation_api_struct.go @@ -1,14 +1,16 @@ package base_info -import "Open_IM/pkg/proto/user" - +type OptResult struct { + ConversationID string `json:"conversationID"` + Result *int32 `json:"result"` +} type GetAllConversationMessageOptReq struct { OperationID string `json:"operationID" binding:"required"` FromUserID string `json:"fromUserID" binding:"required"` } type GetAllConversationMessageOptResp struct { CommResp - ConversationOptResultList []*user.OptResult `json:"data"` + ConversationOptResultList []*OptResult `json:"data"` } type GetReceiveMessageOptReq struct { ConversationIdList []string `json:"conversationIdList" binding:"required"` @@ -17,7 +19,7 @@ type GetReceiveMessageOptReq struct { } type GetReceiveMessageOptResp struct { CommResp - ConversationOptResultList []*user.OptResult `json:"data"` + ConversationOptResultList []*OptResult `json:"data"` } type SetReceiveMessageOptReq struct { OperationID string `json:"operationID" binding:"required"` @@ -26,5 +28,5 @@ type SetReceiveMessageOptReq struct { } type SetReceiveMessageOptResp struct { CommResp - OptResultList []*user.OptResult `json:"data"` + ConversationOptResultList []*OptResult `json:"data"` } diff --git a/pkg/proto/user/user.pb.go b/pkg/proto/user/user.pb.go index 79a53f7d7..22a698a44 100644 --- a/pkg/proto/user/user.pb.go +++ b/pkg/proto/user/user.pb.go @@ -36,7 +36,7 @@ func (m *CommonResp) Reset() { *m = CommonResp{} } func (m *CommonResp) String() string { return proto.CompactTextString(m) } func (*CommonResp) ProtoMessage() {} func (*CommonResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9c8678d55a710022, []int{0} + return fileDescriptor_user_9cc4371b0c883611, []int{0} } func (m *CommonResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CommonResp.Unmarshal(m, b) @@ -83,7 +83,7 @@ func (m *DeleteUsersReq) Reset() { *m = DeleteUsersReq{} } func (m *DeleteUsersReq) String() string { return proto.CompactTextString(m) } func (*DeleteUsersReq) ProtoMessage() {} func (*DeleteUsersReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9c8678d55a710022, []int{1} + return fileDescriptor_user_9cc4371b0c883611, []int{1} } func (m *DeleteUsersReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteUsersReq.Unmarshal(m, b) @@ -136,7 +136,7 @@ func (m *DeleteUsersResp) Reset() { *m = DeleteUsersResp{} } func (m *DeleteUsersResp) String() string { return proto.CompactTextString(m) } func (*DeleteUsersResp) ProtoMessage() {} func (*DeleteUsersResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9c8678d55a710022, []int{2} + return fileDescriptor_user_9cc4371b0c883611, []int{2} } func (m *DeleteUsersResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteUsersResp.Unmarshal(m, b) @@ -182,7 +182,7 @@ func (m *GetAllUserIDReq) Reset() { *m = GetAllUserIDReq{} } func (m *GetAllUserIDReq) String() string { return proto.CompactTextString(m) } func (*GetAllUserIDReq) ProtoMessage() {} func (*GetAllUserIDReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9c8678d55a710022, []int{3} + return fileDescriptor_user_9cc4371b0c883611, []int{3} } func (m *GetAllUserIDReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetAllUserIDReq.Unmarshal(m, b) @@ -228,7 +228,7 @@ func (m *GetAllUserIDResp) Reset() { *m = GetAllUserIDResp{} } func (m *GetAllUserIDResp) String() string { return proto.CompactTextString(m) } func (*GetAllUserIDResp) ProtoMessage() {} func (*GetAllUserIDResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9c8678d55a710022, []int{4} + return fileDescriptor_user_9cc4371b0c883611, []int{4} } func (m *GetAllUserIDResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetAllUserIDResp.Unmarshal(m, b) @@ -275,7 +275,7 @@ func (m *AccountCheckReq) Reset() { *m = AccountCheckReq{} } func (m *AccountCheckReq) String() string { return proto.CompactTextString(m) } func (*AccountCheckReq) ProtoMessage() {} func (*AccountCheckReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9c8678d55a710022, []int{5} + return fileDescriptor_user_9cc4371b0c883611, []int{5} } func (m *AccountCheckReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AccountCheckReq.Unmarshal(m, b) @@ -328,7 +328,7 @@ func (m *AccountCheckResp) Reset() { *m = AccountCheckResp{} } func (m *AccountCheckResp) String() string { return proto.CompactTextString(m) } func (*AccountCheckResp) ProtoMessage() {} func (*AccountCheckResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9c8678d55a710022, []int{6} + return fileDescriptor_user_9cc4371b0c883611, []int{6} } func (m *AccountCheckResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AccountCheckResp.Unmarshal(m, b) @@ -374,7 +374,7 @@ func (m *AccountCheckResp_SingleUserStatus) Reset() { *m = AccountCheckR func (m *AccountCheckResp_SingleUserStatus) String() string { return proto.CompactTextString(m) } func (*AccountCheckResp_SingleUserStatus) ProtoMessage() {} func (*AccountCheckResp_SingleUserStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9c8678d55a710022, []int{6, 0} + return fileDescriptor_user_9cc4371b0c883611, []int{6, 0} } func (m *AccountCheckResp_SingleUserStatus) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AccountCheckResp_SingleUserStatus.Unmarshal(m, b) @@ -421,7 +421,7 @@ func (m *GetUserInfoReq) Reset() { *m = GetUserInfoReq{} } func (m *GetUserInfoReq) String() string { return proto.CompactTextString(m) } func (*GetUserInfoReq) ProtoMessage() {} func (*GetUserInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9c8678d55a710022, []int{7} + return fileDescriptor_user_9cc4371b0c883611, []int{7} } func (m *GetUserInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUserInfoReq.Unmarshal(m, b) @@ -474,7 +474,7 @@ func (m *GetUserInfoResp) Reset() { *m = GetUserInfoResp{} } func (m *GetUserInfoResp) String() string { return proto.CompactTextString(m) } func (*GetUserInfoResp) ProtoMessage() {} func (*GetUserInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9c8678d55a710022, []int{8} + return fileDescriptor_user_9cc4371b0c883611, []int{8} } func (m *GetUserInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUserInfoResp.Unmarshal(m, b) @@ -521,7 +521,7 @@ func (m *UpdateUserInfoReq) Reset() { *m = UpdateUserInfoReq{} } func (m *UpdateUserInfoReq) String() string { return proto.CompactTextString(m) } func (*UpdateUserInfoReq) ProtoMessage() {} func (*UpdateUserInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9c8678d55a710022, []int{9} + return fileDescriptor_user_9cc4371b0c883611, []int{9} } func (m *UpdateUserInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UpdateUserInfoReq.Unmarshal(m, b) @@ -573,7 +573,7 @@ func (m *UpdateUserInfoResp) Reset() { *m = UpdateUserInfoResp{} } func (m *UpdateUserInfoResp) String() string { return proto.CompactTextString(m) } func (*UpdateUserInfoResp) ProtoMessage() {} func (*UpdateUserInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9c8678d55a710022, []int{10} + return fileDescriptor_user_9cc4371b0c883611, []int{10} } func (m *UpdateUserInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UpdateUserInfoResp.Unmarshal(m, b) @@ -615,7 +615,7 @@ func (m *SetReceiveMessageOptReq) Reset() { *m = SetReceiveMessageOptReq func (m *SetReceiveMessageOptReq) String() string { return proto.CompactTextString(m) } func (*SetReceiveMessageOptReq) ProtoMessage() {} func (*SetReceiveMessageOptReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9c8678d55a710022, []int{11} + return fileDescriptor_user_9cc4371b0c883611, []int{11} } func (m *SetReceiveMessageOptReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetReceiveMessageOptReq.Unmarshal(m, b) @@ -671,7 +671,7 @@ func (m *SetReceiveMessageOptReq) GetOpUserID() string { } type OptResult struct { - ConversationId string `protobuf:"bytes,1,opt,name=conversationId" json:"conversationId,omitempty"` + ConversationID string `protobuf:"bytes,1,opt,name=conversationID" json:"conversationID,omitempty"` Result int32 `protobuf:"varint,2,opt,name=result" json:"result,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -682,7 +682,7 @@ func (m *OptResult) Reset() { *m = OptResult{} } func (m *OptResult) String() string { return proto.CompactTextString(m) } func (*OptResult) ProtoMessage() {} func (*OptResult) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9c8678d55a710022, []int{12} + return fileDescriptor_user_9cc4371b0c883611, []int{12} } func (m *OptResult) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OptResult.Unmarshal(m, b) @@ -702,9 +702,9 @@ func (m *OptResult) XXX_DiscardUnknown() { var xxx_messageInfo_OptResult proto.InternalMessageInfo -func (m *OptResult) GetConversationId() string { +func (m *OptResult) GetConversationID() string { if m != nil { - return m.ConversationId + return m.ConversationID } return "" } @@ -717,18 +717,18 @@ func (m *OptResult) GetResult() int32 { } type SetReceiveMessageOptResp struct { - CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` - OptResultList []*OptResult `protobuf:"bytes,2,rep,name=optResultList" json:"optResultList,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` + ConversationOptResultList []*OptResult `protobuf:"bytes,2,rep,name=conversationOptResultList" json:"conversationOptResultList,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *SetReceiveMessageOptResp) Reset() { *m = SetReceiveMessageOptResp{} } func (m *SetReceiveMessageOptResp) String() string { return proto.CompactTextString(m) } func (*SetReceiveMessageOptResp) ProtoMessage() {} func (*SetReceiveMessageOptResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9c8678d55a710022, []int{13} + return fileDescriptor_user_9cc4371b0c883611, []int{13} } func (m *SetReceiveMessageOptResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetReceiveMessageOptResp.Unmarshal(m, b) @@ -755,16 +755,16 @@ func (m *SetReceiveMessageOptResp) GetCommonResp() *CommonResp { return nil } -func (m *SetReceiveMessageOptResp) GetOptResultList() []*OptResult { +func (m *SetReceiveMessageOptResp) GetConversationOptResultList() []*OptResult { if m != nil { - return m.OptResultList + return m.ConversationOptResultList } return nil } type GetReceiveMessageOptReq struct { FromUserID string `protobuf:"bytes,1,opt,name=FromUserID" json:"FromUserID,omitempty"` - ConversationIdList []string `protobuf:"bytes,2,rep,name=conversationIdList" json:"conversationIdList,omitempty"` + ConversationIDList []string `protobuf:"bytes,2,rep,name=conversationIDList" json:"conversationIDList,omitempty"` OperationID string `protobuf:"bytes,3,opt,name=operationID" json:"operationID,omitempty"` OpUserID string `protobuf:"bytes,4,opt,name=OpUserID" json:"OpUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -776,7 +776,7 @@ func (m *GetReceiveMessageOptReq) Reset() { *m = GetReceiveMessageOptReq func (m *GetReceiveMessageOptReq) String() string { return proto.CompactTextString(m) } func (*GetReceiveMessageOptReq) ProtoMessage() {} func (*GetReceiveMessageOptReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9c8678d55a710022, []int{14} + return fileDescriptor_user_9cc4371b0c883611, []int{14} } func (m *GetReceiveMessageOptReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetReceiveMessageOptReq.Unmarshal(m, b) @@ -803,9 +803,9 @@ func (m *GetReceiveMessageOptReq) GetFromUserID() string { return "" } -func (m *GetReceiveMessageOptReq) GetConversationIdList() []string { +func (m *GetReceiveMessageOptReq) GetConversationIDList() []string { if m != nil { - return m.ConversationIdList + return m.ConversationIDList } return nil } @@ -836,7 +836,7 @@ func (m *GetReceiveMessageOptResp) Reset() { *m = GetReceiveMessageOptRe func (m *GetReceiveMessageOptResp) String() string { return proto.CompactTextString(m) } func (*GetReceiveMessageOptResp) ProtoMessage() {} func (*GetReceiveMessageOptResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9c8678d55a710022, []int{15} + return fileDescriptor_user_9cc4371b0c883611, []int{15} } func (m *GetReceiveMessageOptResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetReceiveMessageOptResp.Unmarshal(m, b) @@ -883,7 +883,7 @@ func (m *GetAllConversationMsgOptReq) Reset() { *m = GetAllConversationM func (m *GetAllConversationMsgOptReq) String() string { return proto.CompactTextString(m) } func (*GetAllConversationMsgOptReq) ProtoMessage() {} func (*GetAllConversationMsgOptReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9c8678d55a710022, []int{16} + return fileDescriptor_user_9cc4371b0c883611, []int{16} } func (m *GetAllConversationMsgOptReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetAllConversationMsgOptReq.Unmarshal(m, b) @@ -936,7 +936,7 @@ func (m *GetAllConversationMsgOptResp) Reset() { *m = GetAllConversation func (m *GetAllConversationMsgOptResp) String() string { return proto.CompactTextString(m) } func (*GetAllConversationMsgOptResp) ProtoMessage() {} func (*GetAllConversationMsgOptResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9c8678d55a710022, []int{17} + return fileDescriptor_user_9cc4371b0c883611, []int{17} } func (m *GetAllConversationMsgOptResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetAllConversationMsgOptResp.Unmarshal(m, b) @@ -1295,60 +1295,59 @@ var _User_serviceDesc = grpc.ServiceDesc{ Metadata: "user/user.proto", } -func init() { proto.RegisterFile("user/user.proto", fileDescriptor_user_9c8678d55a710022) } +func init() { proto.RegisterFile("user/user.proto", fileDescriptor_user_9cc4371b0c883611) } -var fileDescriptor_user_9c8678d55a710022 = []byte{ - // 827 bytes of a gzipped FileDescriptorProto +var fileDescriptor_user_9cc4371b0c883611 = []byte{ + // 812 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xcd, 0x6e, 0xd3, 0x4a, - 0x14, 0x96, 0x9b, 0xb4, 0xb7, 0x39, 0x69, 0x93, 0xdc, 0x51, 0x7f, 0x7c, 0x7d, 0xef, 0xad, 0xd2, - 0x11, 0x82, 0xa8, 0x0b, 0x07, 0x8a, 0x58, 0x00, 0x02, 0xa9, 0xa4, 0xaa, 0x55, 0x41, 0x14, 0xe4, - 0xaa, 0x1b, 0x36, 0x95, 0x89, 0x87, 0x10, 0x25, 0xf1, 0x18, 0x8f, 0xd3, 0x0a, 0x90, 0xd8, 0xc0, - 0x5b, 0xb0, 0x60, 0xc9, 0x33, 0xf0, 0x1a, 0xbc, 0x00, 0xaf, 0x82, 0x3c, 0x63, 0x27, 0x33, 0xb6, - 0x93, 0x54, 0x81, 0x05, 0x9b, 0x28, 0xf3, 0xcd, 0x99, 0x33, 0xdf, 0xf7, 0xcd, 0x99, 0xf1, 0x81, - 0xea, 0x98, 0x91, 0xa0, 0x19, 0xfd, 0x98, 0x7e, 0x40, 0x43, 0x8a, 0x8a, 0xd1, 0x7f, 0x63, 0xbf, - 0xe3, 0x13, 0xef, 0xe2, 0xb4, 0xdd, 0xf4, 0x07, 0xbd, 0x26, 0x9f, 0x68, 0x32, 0x77, 0x70, 0x71, - 0xc5, 0x9a, 0x57, 0x4c, 0x04, 0xe2, 0xc7, 0x00, 0x2d, 0x3a, 0x1a, 0x51, 0xcf, 0x26, 0xcc, 0x47, - 0x3a, 0xfc, 0x45, 0x82, 0xa0, 0x45, 0x5d, 0xa2, 0x6b, 0x75, 0xad, 0xb1, 0x6a, 0x27, 0x43, 0xb4, - 0x03, 0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proto/user/user.proto b/pkg/proto/user/user.proto index bf4738d21..3b66f1f41 100644 --- a/pkg/proto/user/user.proto +++ b/pkg/proto/user/user.proto @@ -75,18 +75,18 @@ message SetReceiveMessageOptReq{ string OpUserID = 5; } message OptResult{ - string conversationId = 1; + string conversationID = 1; int32 result = 2; //-1: failed; 0:default; 1: not receive ; 2: not jpush } message SetReceiveMessageOptResp{ CommonResp commonResp = 1; - repeated OptResult optResultList = 2; + repeated OptResult conversationOptResultList = 2; } message GetReceiveMessageOptReq{ string FromUserID = 1; - repeated string conversationIdList = 2; + repeated string conversationIDList = 2; string operationID = 3; string OpUserID = 4; } From 20f51092adc61af9b1bf90234963b11e1920e309 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 29 Dec 2021 15:53:56 +0800 Subject: [PATCH 118/337] nil return modify --- pkg/base_info/conversation_api_struct.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/base_info/conversation_api_struct.go b/pkg/base_info/conversation_api_struct.go index 06133e4bd..5642e8061 100644 --- a/pkg/base_info/conversation_api_struct.go +++ b/pkg/base_info/conversation_api_struct.go @@ -13,7 +13,7 @@ type GetAllConversationMessageOptResp struct { ConversationOptResultList []*OptResult `json:"data"` } type GetReceiveMessageOptReq struct { - ConversationIdList []string `json:"conversationIdList" binding:"required"` + ConversationIDList []string `json:"conversationIDList" binding:"required"` OperationID string `json:"operationID" binding:"required"` FromUserID string `json:"fromUserID" binding:"required"` } @@ -24,7 +24,7 @@ type GetReceiveMessageOptResp struct { type SetReceiveMessageOptReq struct { OperationID string `json:"operationID" binding:"required"` Opt *int32 `json:"opt" binding:"required"` - ConversationIdList []string `json:"conversationIdList" binding:"required"` + ConversationIDList []string `json:"conversationIDList" binding:"required"` } type SetReceiveMessageOptResp struct { CommResp From 65456d331bfaadce7ef88fc3b7a288a1fc8ec183 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 29 Dec 2021 16:04:08 +0800 Subject: [PATCH 119/337] nil return modify --- internal/rpc/user/user.go | 10 +++++----- pkg/base_info/conversation_api_struct.go | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index fbe14cb92..69d3c2bc3 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -104,7 +104,7 @@ func (s *userServer) SetReceiveMessageOpt(ctx context.Context, req *pbUser.SetRe resp := pbUser.SetReceiveMessageOptResp{CommonResp: &pbUser.CommonResp{}} for _, v := range req.ConversationIDList { - resp.OptResultList = append(resp.OptResultList, &pbUser.OptResult{ConversationId: v, Result: 0}) + resp.ConversationOptResultList = append(resp.ConversationOptResultList, &pbUser.OptResult{ConversationID: v, Result: 0}) } log.NewInfo(req.OperationID, "SetReceiveMessageOpt rpc return ", resp.String()) return &resp, nil @@ -112,14 +112,14 @@ func (s *userServer) SetReceiveMessageOpt(ctx context.Context, req *pbUser.SetRe func (s *userServer) GetReceiveMessageOpt(ctx context.Context, req *pbUser.GetReceiveMessageOptReq) (*pbUser.GetReceiveMessageOptResp, error) { log.NewInfo(req.OperationID, "GetReceiveMessageOpt args ", req.String()) - m, err := db.DB.GetMultiConversationMsgOpt(req.FromUserID, req.ConversationIdList) + m, err := db.DB.GetMultiConversationMsgOpt(req.FromUserID, req.ConversationIDList) if err != nil { - log.NewError(req.OperationID, "GetMultiConversationMsgOpt failed ", err.Error(), req.FromUserID, req.ConversationIdList) + log.NewError(req.OperationID, "GetMultiConversationMsgOpt failed ", err.Error(), req.FromUserID, req.ConversationIDList) return &pbUser.GetReceiveMessageOptResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } resp := pbUser.GetReceiveMessageOptResp{CommonResp: &pbUser.CommonResp{}} for k, v := range m { - resp.ConversationOptResultList = append(resp.ConversationOptResultList, &pbUser.OptResult{ConversationId: k, Result: int32(v)}) + resp.ConversationOptResultList = append(resp.ConversationOptResultList, &pbUser.OptResult{ConversationID: k, Result: int32(v)}) } log.NewInfo(req.OperationID, "GetReceiveMessageOpt rpc return ", resp.String()) return &resp, nil @@ -134,7 +134,7 @@ func (s *userServer) GetAllConversationMsgOpt(ctx context.Context, req *pbUser.G } resp := pbUser.GetAllConversationMsgOptResp{CommonResp: &pbUser.CommonResp{}} for k, v := range m { - resp.ConversationOptResultList = append(resp.ConversationOptResultList, &pbUser.OptResult{ConversationId: k, Result: int32(v)}) + resp.ConversationOptResultList = append(resp.ConversationOptResultList, &pbUser.OptResult{ConversationID: k, Result: int32(v)}) } log.NewInfo(req.OperationID, "GetAllConversationMsgOpt rpc return ", resp.String()) return &resp, nil diff --git a/pkg/base_info/conversation_api_struct.go b/pkg/base_info/conversation_api_struct.go index 5642e8061..bd54bafbf 100644 --- a/pkg/base_info/conversation_api_struct.go +++ b/pkg/base_info/conversation_api_struct.go @@ -22,6 +22,7 @@ type GetReceiveMessageOptResp struct { ConversationOptResultList []*OptResult `json:"data"` } type SetReceiveMessageOptReq struct { + FromUserID string `json:"fromUserID" binding:"required"` OperationID string `json:"operationID" binding:"required"` Opt *int32 `json:"opt" binding:"required"` ConversationIDList []string `json:"conversationIDList" binding:"required"` From 4623b5d5db0c98179a88f3ae58462a3c6d6fd838 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 16:17:55 +0800 Subject: [PATCH 120/337] Refactor code --- internal/api/friend/friend.go | 7 +- internal/rpc/friend/firend.go | 29 ++-- pkg/base_info/friend_api_struct.go | 6 +- pkg/proto/friend/friend.pb.go | 245 +++++++++++++++++------------ 4 files changed, 174 insertions(+), 113 deletions(-) diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go index 1a27effb9..973317838 100644 --- a/internal/api/friend/friend.go +++ b/internal/api/friend/friend.go @@ -72,8 +72,13 @@ func ImportFriend(c *gin.Context) { c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "cImportFriend failed " + err.Error()}) return } + resp := api.ImportFriendResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} + if resp.ErrCode == 0 { + for _, v := range RpcResp.UserIDResultList { + resp.UserIDResultList = append(resp.UserIDResultList, api.UserIDResult{v.UserID, v.Result}) + } + } - resp := api.ImportFriendResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, Data: RpcResp.FailedFriendUserIDList} log.NewInfo(req.OperationID, "ImportFriend api return ", resp) c.JSON(http.StatusOK, resp) } diff --git a/internal/rpc/friend/firend.go b/internal/rpc/friend/firend.go index 4fe757f11..b4f2a06f7 100644 --- a/internal/rpc/friend/firend.go +++ b/internal/rpc/friend/firend.go @@ -166,49 +166,52 @@ func (s *friendServer) ImportFriend(ctx context.Context, req *pbFriend.ImportFri log.NewError(req.OperationID, "not authorized", req.OpUserID, config.Config.Manager.AppManagerUid) c.ErrCode = constant.ErrAccess.ErrCode c.ErrMsg = constant.ErrAccess.ErrMsg - return &pbFriend.ImportFriendResp{CommonResp: &c, FailedFriendUserIDList: req.FriendUserIDList}, nil + for _, v := range req.FriendUserIDList { + resp.UserIDResultList = append(resp.UserIDResultList, &pbFriend.UserIDResult{UserID: v, Result: -1}) + } + resp.CommonResp = &c + return &resp, nil } if _, err := imdb.GetUserByUserID(req.FromUserID); err != nil { log.NewError(req.OperationID, "GetUserByUserID failed ", err.Error(), req.FromUserID) c.ErrCode = constant.ErrDB.ErrCode c.ErrMsg = "this user not exists,cant not add friend" - return &pbFriend.ImportFriendResp{CommonResp: &c, FailedFriendUserIDList: req.FriendUserIDList}, nil + for _, v := range req.FriendUserIDList { + resp.UserIDResultList = append(resp.UserIDResultList, &pbFriend.UserIDResult{UserID: v, Result: -1}) + } + resp.CommonResp = &c + return &resp, nil } for _, v := range req.FriendUserIDList { if _, fErr := imdb.GetUserByUserID(v); fErr != nil { - c.ErrMsg = "some uid establish failed" - c.ErrCode = 408 - resp.FailedFriendUserIDList = append(resp.FailedFriendUserIDList, v) + resp.UserIDResultList = append(resp.UserIDResultList, &pbFriend.UserIDResult{UserID: v, Result: -1}) } else { if _, err := imdb.GetFriendRelationshipFromFriend(req.FromUserID, v); err != nil { //Establish two single friendship toInsertFollow := imdb.Friend{OwnerUserID: req.FromUserID, FriendUserID: v} err1 := imdb.InsertToFriend(&toInsertFollow) if err1 != nil { - resp.FailedFriendUserIDList = append(resp.FailedFriendUserIDList, v) log.NewError(req.OperationID, "InsertToFriend failed", req.FromUserID, v, err1.Error()) - c.ErrMsg = "some uid establish failed" - c.ErrCode = 408 + resp.UserIDResultList = append(resp.UserIDResultList, &pbFriend.UserIDResult{UserID: v, Result: -1}) continue } toInsertFollow = imdb.Friend{OwnerUserID: v, FriendUserID: req.FromUserID} err2 := imdb.InsertToFriend(&toInsertFollow) if err2 != nil { - resp.FailedFriendUserIDList = append(resp.FailedFriendUserIDList, v) log.NewError(req.OperationID, "InsertToFriend failed", v, req.FromUserID, err2.Error()) - c.ErrMsg = "some uid establish failed" - c.ErrCode = 408 + resp.UserIDResultList = append(resp.UserIDResultList, &pbFriend.UserIDResult{UserID: v, Result: -1}) continue } for _, v := range req.FriendUserIDList { chat.FriendAddedNotification(req.OperationID, req.OpUserID, req.FromUserID, v) + resp.UserIDResultList = append(resp.UserIDResultList, &pbFriend.UserIDResult{UserID: v, Result: 0}) } } } } - resp.CommonResp = &c - log.NewInfo(req.OperationID, "ImportFriend rpc ok ", resp) + resp.CommonResp.ErrCode = 0 + log.NewInfo(req.OperationID, "ImportFriend rpc ok ", resp.String()) return &resp, nil } diff --git a/pkg/base_info/friend_api_struct.go b/pkg/base_info/friend_api_struct.go index 5d7f33d27..18c429471 100644 --- a/pkg/base_info/friend_api_struct.go +++ b/pkg/base_info/friend_api_struct.go @@ -20,9 +20,13 @@ type ImportFriendReq struct { OperationID string `json:"operationID" binding:"required"` FromUserID string `json:"fromUserID" binding:"required"` } +type UserIDResult struct { + UserID string `json:"userID" binding:"required"` + Result int32 `json:"result" binding:"required"` +} type ImportFriendResp struct { CommResp - Data []string `json:"data"` + UserIDResultList []UserIDResult `json:"data"` } type AddFriendReq struct { diff --git a/pkg/proto/friend/friend.pb.go b/pkg/proto/friend/friend.pb.go index 941dd457b..1c46e62ec 100644 --- a/pkg/proto/friend/friend.pb.go +++ b/pkg/proto/friend/friend.pb.go @@ -36,7 +36,7 @@ func (m *CommonResp) Reset() { *m = CommonResp{} } func (m *CommonResp) String() string { return proto.CompactTextString(m) } func (*CommonResp) ProtoMessage() {} func (*CommonResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_69e6f38cd215d5ef, []int{0} + return fileDescriptor_friend_74665a4d507faa8c, []int{0} } func (m *CommonResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CommonResp.Unmarshal(m, b) @@ -84,7 +84,7 @@ func (m *CommID) Reset() { *m = CommID{} } func (m *CommID) String() string { return proto.CompactTextString(m) } func (*CommID) ProtoMessage() {} func (*CommID) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_69e6f38cd215d5ef, []int{1} + return fileDescriptor_friend_74665a4d507faa8c, []int{1} } func (m *CommID) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CommID.Unmarshal(m, b) @@ -143,7 +143,7 @@ func (m *GetFriendsInfoReq) Reset() { *m = GetFriendsInfoReq{} } func (m *GetFriendsInfoReq) String() string { return proto.CompactTextString(m) } func (*GetFriendsInfoReq) ProtoMessage() {} func (*GetFriendsInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_69e6f38cd215d5ef, []int{2} + return fileDescriptor_friend_74665a4d507faa8c, []int{2} } func (m *GetFriendsInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendsInfoReq.Unmarshal(m, b) @@ -183,7 +183,7 @@ func (m *GetFriendInfoResp) Reset() { *m = GetFriendInfoResp{} } func (m *GetFriendInfoResp) String() string { return proto.CompactTextString(m) } func (*GetFriendInfoResp) ProtoMessage() {} func (*GetFriendInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_69e6f38cd215d5ef, []int{3} + return fileDescriptor_friend_74665a4d507faa8c, []int{3} } func (m *GetFriendInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendInfoResp.Unmarshal(m, b) @@ -236,7 +236,7 @@ func (m *AddFriendReq) Reset() { *m = AddFriendReq{} } func (m *AddFriendReq) String() string { return proto.CompactTextString(m) } func (*AddFriendReq) ProtoMessage() {} func (*AddFriendReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_69e6f38cd215d5ef, []int{4} + return fileDescriptor_friend_74665a4d507faa8c, []int{4} } func (m *AddFriendReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddFriendReq.Unmarshal(m, b) @@ -281,7 +281,7 @@ func (m *AddFriendResp) Reset() { *m = AddFriendResp{} } func (m *AddFriendResp) String() string { return proto.CompactTextString(m) } func (*AddFriendResp) ProtoMessage() {} func (*AddFriendResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_69e6f38cd215d5ef, []int{5} + return fileDescriptor_friend_74665a4d507faa8c, []int{5} } func (m *AddFriendResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddFriendResp.Unmarshal(m, b) @@ -322,7 +322,7 @@ func (m *ImportFriendReq) Reset() { *m = ImportFriendReq{} } func (m *ImportFriendReq) String() string { return proto.CompactTextString(m) } func (*ImportFriendReq) ProtoMessage() {} func (*ImportFriendReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_69e6f38cd215d5ef, []int{6} + return fileDescriptor_friend_74665a4d507faa8c, []int{6} } func (m *ImportFriendReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ImportFriendReq.Unmarshal(m, b) @@ -370,19 +370,65 @@ func (m *ImportFriendReq) GetOpUserID() string { return "" } +type UserIDResult struct { + UserID string `protobuf:"bytes,1,opt,name=UserID" json:"UserID,omitempty"` + Result int32 `protobuf:"varint,2,opt,name=Result" json:"Result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UserIDResult) Reset() { *m = UserIDResult{} } +func (m *UserIDResult) String() string { return proto.CompactTextString(m) } +func (*UserIDResult) ProtoMessage() {} +func (*UserIDResult) Descriptor() ([]byte, []int) { + return fileDescriptor_friend_74665a4d507faa8c, []int{7} +} +func (m *UserIDResult) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UserIDResult.Unmarshal(m, b) +} +func (m *UserIDResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UserIDResult.Marshal(b, m, deterministic) +} +func (dst *UserIDResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_UserIDResult.Merge(dst, src) +} +func (m *UserIDResult) XXX_Size() int { + return xxx_messageInfo_UserIDResult.Size(m) +} +func (m *UserIDResult) XXX_DiscardUnknown() { + xxx_messageInfo_UserIDResult.DiscardUnknown(m) +} + +var xxx_messageInfo_UserIDResult proto.InternalMessageInfo + +func (m *UserIDResult) GetUserID() string { + if m != nil { + return m.UserID + } + return "" +} + +func (m *UserIDResult) GetResult() int32 { + if m != nil { + return m.Result + } + return 0 +} + type ImportFriendResp struct { - CommonResp *CommonResp `protobuf:"bytes,1,opt,name=CommonResp" json:"CommonResp,omitempty"` - FailedFriendUserIDList []string `protobuf:"bytes,2,rep,name=FailedFriendUserIDList" json:"FailedFriendUserIDList,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + CommonResp *CommonResp `protobuf:"bytes,1,opt,name=CommonResp" json:"CommonResp,omitempty"` + UserIDResultList []*UserIDResult `protobuf:"bytes,2,rep,name=UserIDResultList" json:"UserIDResultList,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *ImportFriendResp) Reset() { *m = ImportFriendResp{} } func (m *ImportFriendResp) String() string { return proto.CompactTextString(m) } func (*ImportFriendResp) ProtoMessage() {} func (*ImportFriendResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_69e6f38cd215d5ef, []int{7} + return fileDescriptor_friend_74665a4d507faa8c, []int{8} } func (m *ImportFriendResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ImportFriendResp.Unmarshal(m, b) @@ -409,9 +455,9 @@ func (m *ImportFriendResp) GetCommonResp() *CommonResp { return nil } -func (m *ImportFriendResp) GetFailedFriendUserIDList() []string { +func (m *ImportFriendResp) GetUserIDResultList() []*UserIDResult { if m != nil { - return m.FailedFriendUserIDList + return m.UserIDResultList } return nil } @@ -427,7 +473,7 @@ func (m *GetFriendApplyListReq) Reset() { *m = GetFriendApplyListReq{} } func (m *GetFriendApplyListReq) String() string { return proto.CompactTextString(m) } func (*GetFriendApplyListReq) ProtoMessage() {} func (*GetFriendApplyListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_69e6f38cd215d5ef, []int{8} + return fileDescriptor_friend_74665a4d507faa8c, []int{9} } func (m *GetFriendApplyListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendApplyListReq.Unmarshal(m, b) @@ -467,7 +513,7 @@ func (m *GetFriendApplyListResp) Reset() { *m = GetFriendApplyListResp{} func (m *GetFriendApplyListResp) String() string { return proto.CompactTextString(m) } func (*GetFriendApplyListResp) ProtoMessage() {} func (*GetFriendApplyListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_69e6f38cd215d5ef, []int{9} + return fileDescriptor_friend_74665a4d507faa8c, []int{10} } func (m *GetFriendApplyListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendApplyListResp.Unmarshal(m, b) @@ -519,7 +565,7 @@ func (m *GetFriendListReq) Reset() { *m = GetFriendListReq{} } func (m *GetFriendListReq) String() string { return proto.CompactTextString(m) } func (*GetFriendListReq) ProtoMessage() {} func (*GetFriendListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_69e6f38cd215d5ef, []int{10} + return fileDescriptor_friend_74665a4d507faa8c, []int{11} } func (m *GetFriendListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendListReq.Unmarshal(m, b) @@ -559,7 +605,7 @@ func (m *GetFriendListResp) Reset() { *m = GetFriendListResp{} } func (m *GetFriendListResp) String() string { return proto.CompactTextString(m) } func (*GetFriendListResp) ProtoMessage() {} func (*GetFriendListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_69e6f38cd215d5ef, []int{11} + return fileDescriptor_friend_74665a4d507faa8c, []int{12} } func (m *GetFriendListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendListResp.Unmarshal(m, b) @@ -611,7 +657,7 @@ func (m *AddBlacklistReq) Reset() { *m = AddBlacklistReq{} } func (m *AddBlacklistReq) String() string { return proto.CompactTextString(m) } func (*AddBlacklistReq) ProtoMessage() {} func (*AddBlacklistReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_69e6f38cd215d5ef, []int{12} + return fileDescriptor_friend_74665a4d507faa8c, []int{13} } func (m *AddBlacklistReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddBlacklistReq.Unmarshal(m, b) @@ -649,7 +695,7 @@ func (m *AddBlacklistResp) Reset() { *m = AddBlacklistResp{} } func (m *AddBlacklistResp) String() string { return proto.CompactTextString(m) } func (*AddBlacklistResp) ProtoMessage() {} func (*AddBlacklistResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_69e6f38cd215d5ef, []int{13} + return fileDescriptor_friend_74665a4d507faa8c, []int{14} } func (m *AddBlacklistResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddBlacklistResp.Unmarshal(m, b) @@ -687,7 +733,7 @@ func (m *RemoveBlacklistReq) Reset() { *m = RemoveBlacklistReq{} } func (m *RemoveBlacklistReq) String() string { return proto.CompactTextString(m) } func (*RemoveBlacklistReq) ProtoMessage() {} func (*RemoveBlacklistReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_69e6f38cd215d5ef, []int{14} + return fileDescriptor_friend_74665a4d507faa8c, []int{15} } func (m *RemoveBlacklistReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RemoveBlacklistReq.Unmarshal(m, b) @@ -725,7 +771,7 @@ func (m *RemoveBlacklistResp) Reset() { *m = RemoveBlacklistResp{} } func (m *RemoveBlacklistResp) String() string { return proto.CompactTextString(m) } func (*RemoveBlacklistResp) ProtoMessage() {} func (*RemoveBlacklistResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_69e6f38cd215d5ef, []int{15} + return fileDescriptor_friend_74665a4d507faa8c, []int{16} } func (m *RemoveBlacklistResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RemoveBlacklistResp.Unmarshal(m, b) @@ -763,7 +809,7 @@ func (m *GetBlacklistReq) Reset() { *m = GetBlacklistReq{} } func (m *GetBlacklistReq) String() string { return proto.CompactTextString(m) } func (*GetBlacklistReq) ProtoMessage() {} func (*GetBlacklistReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_69e6f38cd215d5ef, []int{16} + return fileDescriptor_friend_74665a4d507faa8c, []int{17} } func (m *GetBlacklistReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetBlacklistReq.Unmarshal(m, b) @@ -803,7 +849,7 @@ func (m *GetBlacklistResp) Reset() { *m = GetBlacklistResp{} } func (m *GetBlacklistResp) String() string { return proto.CompactTextString(m) } func (*GetBlacklistResp) ProtoMessage() {} func (*GetBlacklistResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_69e6f38cd215d5ef, []int{17} + return fileDescriptor_friend_74665a4d507faa8c, []int{18} } func (m *GetBlacklistResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetBlacklistResp.Unmarshal(m, b) @@ -855,7 +901,7 @@ func (m *IsFriendReq) Reset() { *m = IsFriendReq{} } func (m *IsFriendReq) String() string { return proto.CompactTextString(m) } func (*IsFriendReq) ProtoMessage() {} func (*IsFriendReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_69e6f38cd215d5ef, []int{18} + return fileDescriptor_friend_74665a4d507faa8c, []int{19} } func (m *IsFriendReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IsFriendReq.Unmarshal(m, b) @@ -895,7 +941,7 @@ func (m *IsFriendResp) Reset() { *m = IsFriendResp{} } func (m *IsFriendResp) String() string { return proto.CompactTextString(m) } func (*IsFriendResp) ProtoMessage() {} func (*IsFriendResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_69e6f38cd215d5ef, []int{19} + return fileDescriptor_friend_74665a4d507faa8c, []int{20} } func (m *IsFriendResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IsFriendResp.Unmarshal(m, b) @@ -947,7 +993,7 @@ func (m *IsInBlackListReq) Reset() { *m = IsInBlackListReq{} } func (m *IsInBlackListReq) String() string { return proto.CompactTextString(m) } func (*IsInBlackListReq) ProtoMessage() {} func (*IsInBlackListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_69e6f38cd215d5ef, []int{20} + return fileDescriptor_friend_74665a4d507faa8c, []int{21} } func (m *IsInBlackListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IsInBlackListReq.Unmarshal(m, b) @@ -987,7 +1033,7 @@ func (m *IsInBlackListResp) Reset() { *m = IsInBlackListResp{} } func (m *IsInBlackListResp) String() string { return proto.CompactTextString(m) } func (*IsInBlackListResp) ProtoMessage() {} func (*IsInBlackListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_69e6f38cd215d5ef, []int{21} + return fileDescriptor_friend_74665a4d507faa8c, []int{22} } func (m *IsInBlackListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IsInBlackListResp.Unmarshal(m, b) @@ -1039,7 +1085,7 @@ func (m *DeleteFriendReq) Reset() { *m = DeleteFriendReq{} } func (m *DeleteFriendReq) String() string { return proto.CompactTextString(m) } func (*DeleteFriendReq) ProtoMessage() {} func (*DeleteFriendReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_69e6f38cd215d5ef, []int{22} + return fileDescriptor_friend_74665a4d507faa8c, []int{23} } func (m *DeleteFriendReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteFriendReq.Unmarshal(m, b) @@ -1077,7 +1123,7 @@ func (m *DeleteFriendResp) Reset() { *m = DeleteFriendResp{} } func (m *DeleteFriendResp) String() string { return proto.CompactTextString(m) } func (*DeleteFriendResp) ProtoMessage() {} func (*DeleteFriendResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_69e6f38cd215d5ef, []int{23} + return fileDescriptor_friend_74665a4d507faa8c, []int{24} } func (m *DeleteFriendResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteFriendResp.Unmarshal(m, b) @@ -1118,7 +1164,7 @@ func (m *AddFriendResponseReq) Reset() { *m = AddFriendResponseReq{} } func (m *AddFriendResponseReq) String() string { return proto.CompactTextString(m) } func (*AddFriendResponseReq) ProtoMessage() {} func (*AddFriendResponseReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_69e6f38cd215d5ef, []int{24} + return fileDescriptor_friend_74665a4d507faa8c, []int{25} } func (m *AddFriendResponseReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddFriendResponseReq.Unmarshal(m, b) @@ -1170,7 +1216,7 @@ func (m *AddFriendResponseResp) Reset() { *m = AddFriendResponseResp{} } func (m *AddFriendResponseResp) String() string { return proto.CompactTextString(m) } func (*AddFriendResponseResp) ProtoMessage() {} func (*AddFriendResponseResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_69e6f38cd215d5ef, []int{25} + return fileDescriptor_friend_74665a4d507faa8c, []int{26} } func (m *AddFriendResponseResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddFriendResponseResp.Unmarshal(m, b) @@ -1209,7 +1255,7 @@ func (m *SetFriendRemarkReq) Reset() { *m = SetFriendRemarkReq{} } func (m *SetFriendRemarkReq) String() string { return proto.CompactTextString(m) } func (*SetFriendRemarkReq) ProtoMessage() {} func (*SetFriendRemarkReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_69e6f38cd215d5ef, []int{26} + return fileDescriptor_friend_74665a4d507faa8c, []int{27} } func (m *SetFriendRemarkReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetFriendRemarkReq.Unmarshal(m, b) @@ -1254,7 +1300,7 @@ func (m *SetFriendRemarkResp) Reset() { *m = SetFriendRemarkResp{} } func (m *SetFriendRemarkResp) String() string { return proto.CompactTextString(m) } func (*SetFriendRemarkResp) ProtoMessage() {} func (*SetFriendRemarkResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_69e6f38cd215d5ef, []int{27} + return fileDescriptor_friend_74665a4d507faa8c, []int{28} } func (m *SetFriendRemarkResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetFriendRemarkResp.Unmarshal(m, b) @@ -1292,7 +1338,7 @@ func (m *GetSelfApplyListReq) Reset() { *m = GetSelfApplyListReq{} } func (m *GetSelfApplyListReq) String() string { return proto.CompactTextString(m) } func (*GetSelfApplyListReq) ProtoMessage() {} func (*GetSelfApplyListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_69e6f38cd215d5ef, []int{28} + return fileDescriptor_friend_74665a4d507faa8c, []int{29} } func (m *GetSelfApplyListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetSelfApplyListReq.Unmarshal(m, b) @@ -1332,7 +1378,7 @@ func (m *GetSelfApplyListResp) Reset() { *m = GetSelfApplyListResp{} } func (m *GetSelfApplyListResp) String() string { return proto.CompactTextString(m) } func (*GetSelfApplyListResp) ProtoMessage() {} func (*GetSelfApplyListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_69e6f38cd215d5ef, []int{29} + return fileDescriptor_friend_74665a4d507faa8c, []int{30} } func (m *GetSelfApplyListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetSelfApplyListResp.Unmarshal(m, b) @@ -1381,6 +1427,7 @@ func init() { proto.RegisterType((*AddFriendReq)(nil), "friend.AddFriendReq") proto.RegisterType((*AddFriendResp)(nil), "friend.AddFriendResp") proto.RegisterType((*ImportFriendReq)(nil), "friend.ImportFriendReq") + proto.RegisterType((*UserIDResult)(nil), "friend.UserIDResult") proto.RegisterType((*ImportFriendResp)(nil), "friend.ImportFriendResp") proto.RegisterType((*GetFriendApplyListReq)(nil), "friend.GetFriendApplyListReq") proto.RegisterType((*GetFriendApplyListResp)(nil), "friend.GetFriendApplyListResp") @@ -1876,66 +1923,68 @@ var _Friend_serviceDesc = grpc.ServiceDesc{ Metadata: "friend/friend.proto", } -func init() { proto.RegisterFile("friend/friend.proto", fileDescriptor_friend_69e6f38cd215d5ef) } +func init() { proto.RegisterFile("friend/friend.proto", fileDescriptor_friend_74665a4d507faa8c) } -var fileDescriptor_friend_69e6f38cd215d5ef = []byte{ - // 916 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x57, 0xcd, 0x4f, 0xeb, 0x46, - 0x10, 0x97, 0x09, 0x84, 0x64, 0x12, 0x48, 0xb2, 0x09, 0x90, 0x9a, 0x0f, 0xa5, 0x3e, 0x54, 0x51, - 0x0f, 0x89, 0x94, 0x8a, 0xaa, 0x94, 0xb6, 0x28, 0x10, 0x42, 0xdd, 0x96, 0x82, 0x0c, 0xbd, 0x54, - 0x95, 0x90, 0xc1, 0x9b, 0xd4, 0x8a, 0x63, 0x2f, 0x5e, 0x53, 0xd4, 0x4b, 0x0f, 0x3d, 0xf4, 0x5a, - 0xa9, 0xea, 0xed, 0x1d, 0xde, 0xbf, 0xfa, 0x64, 0xaf, 0x1d, 0xaf, 0x3f, 0x82, 0x9e, 0xcd, 0x93, - 0xde, 0x09, 0x66, 0x66, 0x7f, 0xe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0x6b, 0x4a, 0x91, 0xfb, 0xf4, 0x8a, 0x6c, 0x5e, 0x7d, 0x9f, 0x8e, 0xa0, 0x36, 0xd4, - 0xb4, 0x53, 0x43, 0x7d, 0x98, 0x19, 0x19, 0x73, 0x18, 0x43, 0x3d, 0x0a, 0xcd, 0x79, 0x7b, 0xbe, - 0x01, 0xa4, 0xe0, 0xb9, 0xf5, 0x07, 0xce, 0x15, 0x85, 0x0c, 0xcd, 0x04, 0x3a, 0x67, 0x20, 0x47, - 0x50, 0xbb, 0xc0, 0x4e, 0xae, 0x28, 0xfe, 0x15, 0xbc, 0x61, 0x88, 0xc6, 0x90, 0xbd, 0x9d, 0x32, - 0x34, 0x3c, 0x17, 0xde, 0xed, 0x89, 0x76, 0x74, 0x37, 0xd2, 0xd1, 0xeb, 0xa7, 0x7b, 0x43, 0x7f, - 0x08, 0x8e, 0x29, 0x49, 0x94, 0x74, 0x08, 0x15, 0x99, 0x66, 0xde, 0x93, 0xd2, 0x6f, 0x50, 0x0d, - 0x61, 0xb9, 0x72, 0x10, 0xa1, 0xe4, 0x22, 0x2d, 0x93, 0x62, 0x6f, 0x51, 0x95, 0x94, 0x85, 0xec, - 0x5e, 0x19, 0x99, 0xca, 0xa6, 0x17, 0x6d, 0xd6, 0x2b, 0xa3, 0x42, 0x23, 0x86, 0xfd, 0xe0, 0xe1, - 0x1d, 0x41, 0x6d, 0x84, 0x0d, 0xec, 0xe0, 0xec, 0x75, 0x1b, 0x43, 0x3d, 0x0a, 0xcd, 0x39, 0x83, - 0x04, 0x5a, 0x11, 0x3e, 0x72, 0xe3, 0xca, 0xc2, 0x73, 0x08, 0x56, 0x27, 0x86, 0xca, 0x92, 0x5e, - 0x53, 0xbc, 0xff, 0xd1, 0x1e, 0x94, 0x7f, 0x57, 0x4d, 0xcd, 0xc0, 0x6e, 0x35, 0x18, 0x77, 0x84, - 0x0a, 0xe9, 0x47, 0xd8, 0x4a, 0xf9, 0x62, 0xce, 0xf0, 0x6f, 0x01, 0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 0x6b, 0x11, 0x23, 0x42, 0xb1, 0x9d, 0x6e, 0x60, 0x2e, 0x34, 0x6e, 0xf3, 0x85, - 0x2e, 0x62, 0xab, 0x34, 0x74, 0x91, 0x58, 0x94, 0xd7, 0xd0, 0x50, 0xe3, 0x2b, 0x08, 0xed, 0xa5, - 0xce, 0xa9, 0xbf, 0x0f, 0xc5, 0xfd, 0x17, 0xac, 0xac, 0x41, 0x34, 0xba, 0x31, 0xc2, 0x06, 0x25, - 0x17, 0x54, 0xd8, 0xa0, 0xb4, 0x35, 0x33, 0x84, 0xaa, 0xce, 0xbd, 0x9f, 0xc3, 0x04, 0x63, 0x4f, - 0xfe, 0x30, 0xc1, 0xf8, 0x73, 0xfb, 0xb4, 0xf1, 0x6b, 0xad, 0xe7, 0xff, 0xfa, 0x3c, 0x66, 0x7f, - 0xee, 0x8b, 0xde, 0x4f, 0xcb, 0x2f, 0xde, 0x05, 0x00, 0x00, 0xff, 0xff, 0x85, 0x71, 0x6d, 0x1b, - 0x9c, 0x0e, 0x00, 0x00, +var fileDescriptor_friend_74665a4d507faa8c = []byte{ + // 945 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x57, 0xcf, 0x8f, 0xdb, 0x44, + 0x14, 0x96, 0x9b, 0xdd, 0x34, 0x79, 0x49, 0x9b, 0x64, 0x92, 0x6d, 0x83, 0x77, 0x5b, 0x05, 0x1f, + 0x50, 0xc4, 0x21, 0x91, 0x82, 0x2a, 0xb1, 0x14, 0x5a, 0xd2, 0xcd, 0x66, 0x31, 0xb0, 0x6c, 0x35, + 0x5b, 0x2e, 0x08, 0x69, 0xe5, 0xd6, 0x93, 0x60, 0xc5, 0xb1, 0xa7, 0x1e, 0x2f, 0x15, 0x57, 0x0e, + 0x88, 0x1b, 0x12, 0xe2, 0xc6, 0x81, 0x7f, 0x15, 0x79, 0xc6, 0x8e, 0x67, 0x6c, 0x6f, 0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x5c, 0xa6, 0x1f, 0xde, 0xa8, 0x63, 0x14, 0x3d, 0x82, 0x86, 0x13, + 0x6f, 0x5c, 0xd4, 0x4f, 0x0c, 0xa5, 0xd5, 0xad, 0x0f, 0xf2, 0x87, 0x02, 0x0b, 0x47, 0x5e, 0x87, + 0x29, 0x16, 0xd9, 0x0d, 0x9b, 0x62, 0x91, 0xdf, 0x9f, 0x73, 0x68, 0xaf, 0x25, 0xda, 0x4a, 0xb1, + 0xc8, 0x10, 0xa1, 0x3e, 0x2c, 0x56, 0x88, 0x10, 0xb6, 0xb4, 0xf9, 0xd2, 0x10, 0x99, 0x55, 0x9a, + 0x86, 0xc8, 0x2d, 0xca, 0xe7, 0xd0, 0xb3, 0xb2, 0x2b, 0x08, 0x1d, 0x15, 0xce, 0x69, 0xbc, 0x0f, + 0xf5, 0x07, 0x6f, 0xd1, 0x8a, 0x06, 0x31, 0x75, 0x63, 0xa4, 0x0d, 0xca, 0x2f, 0xa8, 0xb4, 0x41, + 0x45, 0x6b, 0x66, 0x0e, 0x6d, 0x47, 0x7a, 0x93, 0x4e, 0x0b, 0xcc, 0x7c, 0x3d, 0xa4, 0x05, 0x66, + 0x5f, 0xbc, 0x9f, 0xf5, 0x7e, 0xe8, 0x4c, 0xe2, 0x0f, 0xd9, 0xc7, 0xe2, 0xe7, 0x65, 0x9d, 0x7f, + 0xa5, 0x7e, 0xf2, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xdf, 0x16, 0xf8, 0xb5, 0xe7, 0x0e, 0x00, + 0x00, } From 8cd38693ddee572395f84b7d25da77fef7451c42 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 16:31:33 +0800 Subject: [PATCH 121/337] Refactor code --- internal/api/friend/friend.go | 10 ++++++---- pkg/base_info/friend_api_struct.go | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go index 973317838..ac3e49c12 100644 --- a/internal/api/friend/friend.go +++ b/internal/api/friend/friend.go @@ -68,17 +68,19 @@ func ImportFriend(c *gin.Context) { client := rpc.NewFriendClient(etcdConn) RpcResp, err := client.ImportFriend(context.Background(), req) if err != nil { - log.NewError(req.OperationID, "ImportFriend failed", err.Error(), req.String()) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "cImportFriend failed " + err.Error()}) + log.NewError(req.OperationID, "ImportFriend failed ", err.Error(), req.String()) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "cImportFriend failed "}) return } resp := api.ImportFriendResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} if resp.ErrCode == 0 { for _, v := range RpcResp.UserIDResultList { - resp.UserIDResultList = append(resp.UserIDResultList, api.UserIDResult{v.UserID, v.Result}) + resp.UserIDResultList = append(resp.UserIDResultList, api.UserIDResult{UserID: v.UserID, Result: v.Result}) } } - + if len(resp.UserIDResultList) == 0 { + resp.UserIDResultList = []api.UserIDResult{} + } log.NewInfo(req.OperationID, "ImportFriend api return ", resp) c.JSON(http.StatusOK, resp) } diff --git a/pkg/base_info/friend_api_struct.go b/pkg/base_info/friend_api_struct.go index 18c429471..653730fc0 100644 --- a/pkg/base_info/friend_api_struct.go +++ b/pkg/base_info/friend_api_struct.go @@ -21,8 +21,8 @@ type ImportFriendReq struct { FromUserID string `json:"fromUserID" binding:"required"` } type UserIDResult struct { - UserID string `json:"userID" binding:"required"` - Result int32 `json:"result" binding:"required"` + UserID string `json:"userID""` + Result int32 `json:"result"` } type ImportFriendResp struct { CommResp From cf59f57ab8b15fd4d10b77c8e1b33970fea4b937 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 16:39:52 +0800 Subject: [PATCH 122/337] Refactor code --- internal/api/friend/friend.go | 2 +- internal/rpc/friend/firend.go | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go index ac3e49c12..bbb31236c 100644 --- a/internal/api/friend/friend.go +++ b/internal/api/friend/friend.go @@ -69,7 +69,7 @@ func ImportFriend(c *gin.Context) { RpcResp, err := client.ImportFriend(context.Background(), req) if err != nil { log.NewError(req.OperationID, "ImportFriend failed ", err.Error(), req.String()) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "cImportFriend failed "}) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "ImportFriend failed "}) return } resp := api.ImportFriendResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} diff --git a/internal/rpc/friend/firend.go b/internal/rpc/friend/firend.go index b4f2a06f7..018e88b9b 100644 --- a/internal/rpc/friend/firend.go +++ b/internal/rpc/friend/firend.go @@ -156,10 +156,9 @@ func (s *friendServer) AddFriend(ctx context.Context, req *pbFriend.AddFriendReq return &pbFriend.AddFriendResp{CommonResp: &pbFriend.CommonResp{}}, nil } -//todo func (s *friendServer) ImportFriend(ctx context.Context, req *pbFriend.ImportFriendReq) (*pbFriend.ImportFriendResp, error) { log.NewInfo(req.OperationID, "ImportFriend failed ", req.String()) - var resp pbFriend.ImportFriendResp + resp := pbFriend.ImportFriendResp{CommonResp: &pbFriend.CommonResp{}} var c pbFriend.CommonResp if !utils.IsContain(req.OpUserID, config.Config.Manager.AppManagerUid) { From 95a771c2fb6f48081b594f09db27f4812853a827 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 16:44:24 +0800 Subject: [PATCH 123/337] Refactor code --- internal/api/friend/friend.go | 2 +- internal/rpc/friend/firend.go | 2 +- pkg/base_info/friend_api_struct.go | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go index bbb31236c..abc7ecff2 100644 --- a/internal/api/friend/friend.go +++ b/internal/api/friend/friend.go @@ -54,7 +54,7 @@ func ImportFriend(c *gin.Context) { return } req := &rpc.ImportFriendReq{} - utils.CopyStructFields(req, ¶ms) + utils.CopyStructFields(req, ¶ms.ParamsCommFriend) var ok bool ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { diff --git a/internal/rpc/friend/firend.go b/internal/rpc/friend/firend.go index 018e88b9b..bfcb46467 100644 --- a/internal/rpc/friend/firend.go +++ b/internal/rpc/friend/firend.go @@ -157,7 +157,7 @@ func (s *friendServer) AddFriend(ctx context.Context, req *pbFriend.AddFriendReq } func (s *friendServer) ImportFriend(ctx context.Context, req *pbFriend.ImportFriendReq) (*pbFriend.ImportFriendResp, error) { - log.NewInfo(req.OperationID, "ImportFriend failed ", req.String()) + log.NewInfo(req.OperationID, "ImportFriend args ", req.String()) resp := pbFriend.ImportFriendResp{CommonResp: &pbFriend.CommonResp{}} var c pbFriend.CommonResp diff --git a/pkg/base_info/friend_api_struct.go b/pkg/base_info/friend_api_struct.go index 653730fc0..79d37e94e 100644 --- a/pkg/base_info/friend_api_struct.go +++ b/pkg/base_info/friend_api_struct.go @@ -17,8 +17,7 @@ type AddBlacklistResp struct { type ImportFriendReq struct { FriendUserIDList []string `json:"friendUserIDList" binding:"required"` - OperationID string `json:"operationID" binding:"required"` - FromUserID string `json:"fromUserID" binding:"required"` + ParamsCommFriend } type UserIDResult struct { UserID string `json:"userID""` From 69b1ee2ec72169e59a7fa8427cd89e3dc66833e7 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 16:46:33 +0800 Subject: [PATCH 124/337] Refactor code --- internal/api/friend/friend.go | 2 +- pkg/base_info/friend_api_struct.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go index abc7ecff2..bbb31236c 100644 --- a/internal/api/friend/friend.go +++ b/internal/api/friend/friend.go @@ -54,7 +54,7 @@ func ImportFriend(c *gin.Context) { return } req := &rpc.ImportFriendReq{} - utils.CopyStructFields(req, ¶ms.ParamsCommFriend) + utils.CopyStructFields(req, ¶ms) var ok bool ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { diff --git a/pkg/base_info/friend_api_struct.go b/pkg/base_info/friend_api_struct.go index 79d37e94e..653730fc0 100644 --- a/pkg/base_info/friend_api_struct.go +++ b/pkg/base_info/friend_api_struct.go @@ -17,7 +17,8 @@ type AddBlacklistResp struct { type ImportFriendReq struct { FriendUserIDList []string `json:"friendUserIDList" binding:"required"` - ParamsCommFriend + OperationID string `json:"operationID" binding:"required"` + FromUserID string `json:"fromUserID" binding:"required"` } type UserIDResult struct { UserID string `json:"userID""` From a52d674a14cdd305418d2a20e35de4dcb391dfd8 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 16:52:12 +0800 Subject: [PATCH 125/337] Refactor code --- internal/rpc/friend/firend.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/internal/rpc/friend/firend.go b/internal/rpc/friend/firend.go index bfcb46467..7acb2e7dd 100644 --- a/internal/rpc/friend/firend.go +++ b/internal/rpc/friend/firend.go @@ -184,6 +184,7 @@ func (s *friendServer) ImportFriend(ctx context.Context, req *pbFriend.ImportFri for _, v := range req.FriendUserIDList { if _, fErr := imdb.GetUserByUserID(v); fErr != nil { + log.NewError(req.OperationID, "GetUserByUserID failed", req.FromUserID, fErr.Error(), v) resp.UserIDResultList = append(resp.UserIDResultList, &pbFriend.UserIDResult{UserID: v, Result: -1}) } else { if _, err := imdb.GetFriendRelationshipFromFriend(req.FromUserID, v); err != nil { @@ -202,10 +203,8 @@ func (s *friendServer) ImportFriend(ctx context.Context, req *pbFriend.ImportFri resp.UserIDResultList = append(resp.UserIDResultList, &pbFriend.UserIDResult{UserID: v, Result: -1}) continue } - for _, v := range req.FriendUserIDList { - chat.FriendAddedNotification(req.OperationID, req.OpUserID, req.FromUserID, v) - resp.UserIDResultList = append(resp.UserIDResultList, &pbFriend.UserIDResult{UserID: v, Result: 0}) - } + resp.UserIDResultList = append(resp.UserIDResultList, &pbFriend.UserIDResult{UserID: v, Result: 0}) + chat.FriendAddedNotification(req.OperationID, req.OpUserID, req.FromUserID, v) } } } From c6ee7c50820043d59ce37f7c2f6a1b2acbb827b9 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 16:55:45 +0800 Subject: [PATCH 126/337] Refactor code --- internal/rpc/friend/firend.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/rpc/friend/firend.go b/internal/rpc/friend/firend.go index 7acb2e7dd..54cfd3bb0 100644 --- a/internal/rpc/friend/firend.go +++ b/internal/rpc/friend/firend.go @@ -204,6 +204,7 @@ func (s *friendServer) ImportFriend(ctx context.Context, req *pbFriend.ImportFri continue } resp.UserIDResultList = append(resp.UserIDResultList, &pbFriend.UserIDResult{UserID: v, Result: 0}) + log.NewDebug(req.OperationID, "UserIDResultList ", resp.UserIDResultList) chat.FriendAddedNotification(req.OperationID, req.OpUserID, req.FromUserID, v) } } From 1ce2a86f37f23f18c66af2517d396a7ecdec0ccc Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 29 Dec 2021 17:05:52 +0800 Subject: [PATCH 127/337] nil return modify --- internal/msg_gateway/gate/validate.go | 2 +- internal/rpc/user/user.go | 2 +- pkg/common/db/mysql_model/im_mysql_model/user_model.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/msg_gateway/gate/validate.go b/internal/msg_gateway/gate/validate.go index 269229e9c..fe1411a62 100644 --- a/internal/msg_gateway/gate/validate.go +++ b/internal/msg_gateway/gate/validate.go @@ -59,7 +59,7 @@ type SeqListData struct { func (ws *WServer) argsValidate(m *Req, r int32) (isPass bool, errCode int32, errMsg string, returnData interface{}) { switch r { case constant.WSSendMsg: - data := open_im_sdk.UserSendMsgReq{} + data := open_im_sdk.MsgData{} if err := proto.Unmarshal(m.Data, &data); err != nil { log.ErrorByKv("Decode Data struct err", "", "err", err.Error(), "reqIdentifier", r) return false, 203, err.Error(), nil diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index 69d3c2bc3..c6391bcb3 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -104,7 +104,7 @@ func (s *userServer) SetReceiveMessageOpt(ctx context.Context, req *pbUser.SetRe resp := pbUser.SetReceiveMessageOptResp{CommonResp: &pbUser.CommonResp{}} for _, v := range req.ConversationIDList { - resp.ConversationOptResultList = append(resp.ConversationOptResultList, &pbUser.OptResult{ConversationID: v, Result: 0}) + resp.ConversationOptResultList = append(resp.ConversationOptResultList, &pbUser.OptResult{ConversationID: v, Result: req.Opt}) } log.NewInfo(req.OperationID, "SetReceiveMessageOpt rpc return ", resp.String()) return &resp, nil diff --git a/pkg/common/db/mysql_model/im_mysql_model/user_model.go b/pkg/common/db/mysql_model/im_mysql_model/user_model.go index 298487c38..fb7001b41 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/user_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/user_model.go @@ -100,7 +100,7 @@ func SelectAllUserID() ([]string, error) { return nil, err } var resultArr []string - err = dbConn.Table("user").Select([]string{"user_id"}).Scan(&resultArr).Error + err = dbConn.Table("user").Select("user_id").Scan(&resultArr).Error if err != nil { return nil, err } From bb2d5e570a786b3ebcaab700d1fbd3bdab4bf071 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 17:06:40 +0800 Subject: [PATCH 128/337] Refactor code --- internal/rpc/friend/firend.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/rpc/friend/firend.go b/internal/rpc/friend/firend.go index 54cfd3bb0..653f3a37e 100644 --- a/internal/rpc/friend/firend.go +++ b/internal/rpc/friend/firend.go @@ -183,6 +183,7 @@ func (s *friendServer) ImportFriend(ctx context.Context, req *pbFriend.ImportFri } for _, v := range req.FriendUserIDList { + log.NewDebug(req.OperationID, "FriendUserIDList ", v) if _, fErr := imdb.GetUserByUserID(v); fErr != nil { log.NewError(req.OperationID, "GetUserByUserID failed", req.FromUserID, fErr.Error(), v) resp.UserIDResultList = append(resp.UserIDResultList, &pbFriend.UserIDResult{UserID: v, Result: -1}) From 3ca92c7a034ab88a4652721ec9d33d7a838bdbd9 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 17:13:45 +0800 Subject: [PATCH 129/337] Refactor code --- internal/rpc/friend/firend.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/internal/rpc/friend/firend.go b/internal/rpc/friend/firend.go index 653f3a37e..378f3a911 100644 --- a/internal/rpc/friend/firend.go +++ b/internal/rpc/friend/firend.go @@ -185,7 +185,7 @@ func (s *friendServer) ImportFriend(ctx context.Context, req *pbFriend.ImportFri for _, v := range req.FriendUserIDList { log.NewDebug(req.OperationID, "FriendUserIDList ", v) if _, fErr := imdb.GetUserByUserID(v); fErr != nil { - log.NewError(req.OperationID, "GetUserByUserID failed", req.FromUserID, fErr.Error(), v) + log.NewError(req.OperationID, "GetUserByUserID failed ", fErr.Error(), v) resp.UserIDResultList = append(resp.UserIDResultList, &pbFriend.UserIDResult{UserID: v, Result: -1}) } else { if _, err := imdb.GetFriendRelationshipFromFriend(req.FromUserID, v); err != nil { @@ -193,20 +193,23 @@ func (s *friendServer) ImportFriend(ctx context.Context, req *pbFriend.ImportFri toInsertFollow := imdb.Friend{OwnerUserID: req.FromUserID, FriendUserID: v} err1 := imdb.InsertToFriend(&toInsertFollow) if err1 != nil { - log.NewError(req.OperationID, "InsertToFriend failed", req.FromUserID, v, err1.Error()) + log.NewError(req.OperationID, "InsertToFriend failed ", err1.Error(), toInsertFollow) resp.UserIDResultList = append(resp.UserIDResultList, &pbFriend.UserIDResult{UserID: v, Result: -1}) continue } toInsertFollow = imdb.Friend{OwnerUserID: v, FriendUserID: req.FromUserID} err2 := imdb.InsertToFriend(&toInsertFollow) if err2 != nil { - log.NewError(req.OperationID, "InsertToFriend failed", v, req.FromUserID, err2.Error()) + log.NewError(req.OperationID, "InsertToFriend failed ", err2.Error(), toInsertFollow) resp.UserIDResultList = append(resp.UserIDResultList, &pbFriend.UserIDResult{UserID: v, Result: -1}) continue } resp.UserIDResultList = append(resp.UserIDResultList, &pbFriend.UserIDResult{UserID: v, Result: 0}) log.NewDebug(req.OperationID, "UserIDResultList ", resp.UserIDResultList) chat.FriendAddedNotification(req.OperationID, req.OpUserID, req.FromUserID, v) + } else { + log.NewWarn(req.OperationID, "GetFriendRelationshipFromFriend ok", req.FromUserID, v) + resp.UserIDResultList = append(resp.UserIDResultList, &pbFriend.UserIDResult{UserID: v, Result: 0}) } } } From 6c137d90982010a4aa363ddb287e6f26e69531cc Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 17:26:06 +0800 Subject: [PATCH 130/337] Refactor code --- cmd/open_im_api/main.go | 12 ++++++------ internal/api/group/group.go | 12 +++++++----- pkg/base_info/group_api_struct.go | 19 +++++++++---------- pkg/base_info/public_struct.go | 5 +++++ 4 files changed, 27 insertions(+), 21 deletions(-) diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index d6abb67e4..7134127a1 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -25,7 +25,7 @@ func main() { userRouterGroup := r.Group("/user") { userRouterGroup.POST("/update_user_info", user.UpdateUserInfo) //1 - userRouterGroup.POST("/get_user_info", user.GetUserInfo) //1 + userRouterGroup.POST("/get_user_info", user.GetUserInfo) //1 } //friend routing group friendRouterGroup := r.Group("/friend") @@ -35,14 +35,14 @@ func main() { friendRouterGroup.POST("/get_friend_apply_list", friend.GetFriendApplyList) //1 friendRouterGroup.POST("/get_self_apply_list", friend.GetSelfApplyList) //1 friendRouterGroup.POST("/get_friend_list", friend.GetFriendList) //1 - friendRouterGroup.POST("/add_blacklist", friend.AddBlacklist) //1 - friendRouterGroup.POST("/get_blacklist", friend.GetBlacklist) //1 - friendRouterGroup.POST("/remove_blacklist", friend.RemoveBlacklist) //1 + friendRouterGroup.POST("/add_blacklist", friend.AddBlacklist) //1 + friendRouterGroup.POST("/get_blacklist", friend.GetBlacklist) //1 + friendRouterGroup.POST("/remove_blacklist", friend.RemoveBlacklist) //1 friendRouterGroup.POST("/delete_friend", friend.DeleteFriend) friendRouterGroup.POST("/add_friend_response", friend.AddFriendResponse) //1 friendRouterGroup.POST("/set_friend_remark", friend.SetFriendRemark) //1 friendRouterGroup.POST("/is_friend", friend.IsFriend) //1 - friendRouterGroup.POST("/import_friend", friend.ImportFriend) + friendRouterGroup.POST("/import_friend", friend.ImportFriend) //1 } //group related routing group groupRouterGroup := r.Group("/group") @@ -66,7 +66,7 @@ func main() { authRouterGroup := r.Group("/auth") { authRouterGroup.POST("/user_register", apiAuth.UserRegister) //1 - authRouterGroup.POST("/user_token", apiAuth.UserToken) //1 + authRouterGroup.POST("/user_token", apiAuth.UserToken) //1 } //Third service thirdGroup := r.Group("/third") diff --git a/internal/api/group/group.go b/internal/api/group/group.go index 62c3ab8df..76e0b9928 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -227,7 +227,10 @@ func CreateGroup(c *gin.Context) { return } req := &rpc.CreateGroupReq{} - utils.CopyStructFields(req, params) + utils.CopyStructFields(req, ¶ms) + for _, v := range params.MemberList { + req.InitMemberList = append(req.InitMemberList, &rpc.GroupAddMemberInfo{UserID: v.UserID, RoleLevel: v.RoleLevel}) + } var ok bool ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { @@ -246,13 +249,12 @@ func CreateGroup(c *gin.Context) { return } + resp := api.CreateGroupResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}} if RpcResp.ErrCode == 0 { - resp := gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg, "data": gin.H{"groupInfo": RpcResp.GroupInfo}} - c.JSON(http.StatusOK, resp) - } else { - c.JSON(http.StatusOK, gin.H{"errCode": RpcResp.ErrCode, "errMsg": RpcResp.ErrMsg}) + utils.CopyStructFields(&resp.GroupInfo, &RpcResp.GroupInfo) } log.NewInfo(req.OperationID, "InviteUserToGroup api return ", RpcResp) + c.JSON(http.StatusOK, resp) } //my application 我发出去的 diff --git a/pkg/base_info/group_api_struct.go b/pkg/base_info/group_api_struct.go index 726a9c24a..3c0256857 100644 --- a/pkg/base_info/group_api_struct.go +++ b/pkg/base_info/group_api_struct.go @@ -1,7 +1,6 @@ package base_info import ( - pb "Open_IM/pkg/proto/group" open_im_sdk "Open_IM/pkg/proto/sdk_ws" ) @@ -77,18 +76,18 @@ type GetGroupAllMemberResp struct { } type CreateGroupReq struct { - MemberList []*pb.GroupAddMemberInfo `json:"memberList"` - GroupName string `json:"groupName"` - Introduction string `json:"introduction"` - Notification string `json:"notification"` - FaceUrl string `json:"faceUrl"` - OperationID string `json:"operationID" binding:"required"` - GroupType int32 `json:"groupType"` - Ex string `json:"ex"` + MemberList []*GroupAddMemberInfo `json:"memberList" binding:"required"` + GroupName string `json:"groupName"` + Introduction string `json:"introduction"` + Notification string `json:"notification"` + FaceUrl string `json:"faceUrl"` + OperationID string `json:"operationID" binding:"required"` + GroupType int32 `json:"groupType"` + Ex string `json:"ex"` } type CreateGroupResp struct { CommResp - Data open_im_sdk.GroupInfo `json:"data"` + GroupInfo open_im_sdk.GroupInfo `json:"data"` } type GetGroupApplicationListReq struct { diff --git a/pkg/base_info/public_struct.go b/pkg/base_info/public_struct.go index 8993cb0a9..80c5e944c 100644 --- a/pkg/base_info/public_struct.go +++ b/pkg/base_info/public_struct.go @@ -16,6 +16,11 @@ type UserInfo struct { Ex string `json:"ex" binding:"omitempty,max=1024"` } +type GroupAddMemberInfo struct { + UserID string `json:"userID" binding:"required"` + RoleLevel int32 `json:"roleLevel" binding:"required"` +} + func SetErrCodeMsg(c *gin.Context, status int) *CommResp { resp := CommResp{ErrCode: int32(status), ErrMsg: http.StatusText(status)} c.JSON(status, resp) From 7c04bcae26c093d7fcee099a78840f3e1b85e3d5 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 29 Dec 2021 17:34:44 +0800 Subject: [PATCH 131/337] nil return modify --- internal/msg_transfer/logic/db.go | 5 ----- pkg/common/db/mysql_model/im_mysql_model/user_model.go | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/internal/msg_transfer/logic/db.go b/internal/msg_transfer/logic/db.go index bd1972386..0c09e0c8e 100644 --- a/internal/msg_transfer/logic/db.go +++ b/internal/msg_transfer/logic/db.go @@ -2,7 +2,6 @@ package logic import ( "Open_IM/pkg/common/db" - "Open_IM/pkg/common/db/mysql_model/im_mysql_model" "Open_IM/pkg/common/log" pbMsg "Open_IM/pkg/proto/chat" "Open_IM/pkg/utils" @@ -21,7 +20,3 @@ func saveUserChat(uid string, msg *pbMsg.MsgDataToMQ) error { log.NewInfo(msg.OperationID, "IncrUserSeq cost time", utils.GetCurrentTimestampByMill()-time) return db.DB.SaveUserChat(uid, pbSaveData.MsgData.SendTime, &pbSaveData) } - -func getGroupList(groupID string) ([]string, error) { - return im_mysql_model.SelectGroupList(groupID) -} diff --git a/pkg/common/db/mysql_model/im_mysql_model/user_model.go b/pkg/common/db/mysql_model/im_mysql_model/user_model.go index fb7001b41..cd9267642 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/user_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/user_model.go @@ -100,7 +100,7 @@ func SelectAllUserID() ([]string, error) { return nil, err } var resultArr []string - err = dbConn.Table("user").Select("user_id").Scan(&resultArr).Error + err = dbConn.Table("user").Select("user_id").Scan(resultArr).Error if err != nil { return nil, err } From bd5480b264e68de0f146e068178cd73497ac80b3 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 29 Dec 2021 17:39:04 +0800 Subject: [PATCH 132/337] nil return modify --- pkg/common/db/mysql_model/im_mysql_model/user_model.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/db/mysql_model/im_mysql_model/user_model.go b/pkg/common/db/mysql_model/im_mysql_model/user_model.go index cd9267642..fb7001b41 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/user_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/user_model.go @@ -100,7 +100,7 @@ func SelectAllUserID() ([]string, error) { return nil, err } var resultArr []string - err = dbConn.Table("user").Select("user_id").Scan(resultArr).Error + err = dbConn.Table("user").Select("user_id").Scan(&resultArr).Error if err != nil { return nil, err } From a02b8104120f709e66c741f7a5adcfe4501567c5 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 17:42:22 +0800 Subject: [PATCH 133/337] Refactor code --- pkg/base_info/group_api_struct.go | 13 +++++-------- pkg/base_info/public_struct.go | 16 +++++++++------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/pkg/base_info/group_api_struct.go b/pkg/base_info/group_api_struct.go index 3c0256857..6c675145c 100644 --- a/pkg/base_info/group_api_struct.go +++ b/pkg/base_info/group_api_struct.go @@ -76,15 +76,12 @@ type GetGroupAllMemberResp struct { } type CreateGroupReq struct { - MemberList []*GroupAddMemberInfo `json:"memberList" binding:"required"` - GroupName string `json:"groupName"` - Introduction string `json:"introduction"` - Notification string `json:"notification"` - FaceUrl string `json:"faceUrl"` - OperationID string `json:"operationID" binding:"required"` - GroupType int32 `json:"groupType"` - Ex string `json:"ex"` + MemberList []*GroupAddMemberInfo `json:"memberList" binding:"required"` + OwnerUserID string `json:"ownerUserID"` + GroupName string `json:"groupName"` + GroupType int32 `json:"groupType"` } + type CreateGroupResp struct { CommResp GroupInfo open_im_sdk.GroupInfo `json:"data"` diff --git a/pkg/base_info/public_struct.go b/pkg/base_info/public_struct.go index 80c5e944c..dbb729e71 100644 --- a/pkg/base_info/public_struct.go +++ b/pkg/base_info/public_struct.go @@ -27,23 +27,25 @@ func SetErrCodeMsg(c *gin.Context, status int) *CommResp { return &resp } -// +//GroupName string `json:"groupName"` +// Introduction string `json:"introduction"` +// Notification string `json:"notification"` +// FaceUrl string `json:"faceUrl"` +// OperationID string `json:"operationID" binding:"required"` +// GroupType int32 `json:"groupType"` +// Ex string `json:"ex"` + //type GroupInfo struct { // GroupID string `json:"groupID"` // GroupName string `json:"groupName"` // Notification string `json:"notification"` // Introduction string `json:"introduction"` // FaceUrl string `json:"faceUrl"` -// OperationID string `json:"operationID"` // OwnerUserID string `json:"ownerUserID"` -// CreateTime int64 `json:"createTime"` -// MemberCount uint32 `json:"memberCount"` // Ex string `json:"ex"` -// Status int32 `json:"status"` -// CreatorUserID string `json:"creatorUserID"` // GroupType int32 `json:"groupType"` //} -// + //type GroupMemberFullInfo struct { // GroupID string `json:"groupID"` // UserID string `json:"userID"` From 7138d7ac592a5a06d40a9f1396dba6b179263cf4 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 17:43:49 +0800 Subject: [PATCH 134/337] Refactor code --- internal/api/group/group.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/api/group/group.go b/internal/api/group/group.go index 76e0b9928..edd42a2c3 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -251,9 +251,9 @@ func CreateGroup(c *gin.Context) { resp := api.CreateGroupResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}} if RpcResp.ErrCode == 0 { - utils.CopyStructFields(&resp.GroupInfo, &RpcResp.GroupInfo) + utils.CopyStructFields(&resp.GroupInfo, RpcResp.GroupInfo) } - log.NewInfo(req.OperationID, "InviteUserToGroup api return ", RpcResp) + log.NewInfo(req.OperationID, "InviteUserToGroup api return ", resp) c.JSON(http.StatusOK, resp) } From 6e14375b86866bfda0bf6bec111df74372b51d52 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 17:46:27 +0800 Subject: [PATCH 135/337] Refactor code --- internal/api/group/group.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/api/group/group.go b/internal/api/group/group.go index edd42a2c3..952962f59 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -244,7 +244,7 @@ func CreateGroup(c *gin.Context) { client := rpc.NewGroupClient(etcdConn) RpcResp, err := client.CreateGroup(context.Background(), req) if err != nil { - log.NewError(req.OperationID, "CreateGroup failed", err.Error(), req.String()) + log.NewError(req.OperationID, "CreateGroup failed ", err.Error(), req.String()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) return } From 8faf1140fb3c84cdddeb29fe6e815de13d609456 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 29 Dec 2021 17:51:06 +0800 Subject: [PATCH 136/337] nil return modify --- pkg/common/db/mysql_model/im_mysql_model/user_model.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/db/mysql_model/im_mysql_model/user_model.go b/pkg/common/db/mysql_model/im_mysql_model/user_model.go index fb7001b41..46909e95c 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/user_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/user_model.go @@ -100,7 +100,7 @@ func SelectAllUserID() ([]string, error) { return nil, err } var resultArr []string - err = dbConn.Table("user").Select("user_id").Scan(&resultArr).Error + err = dbConn.Table("user").Select("user_id").Pluck("user_id", &resultArr).Error if err != nil { return nil, err } From 9f55418bfb5bb53ac4a7da17d11ddf60ab80fa9b Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 17:52:01 +0800 Subject: [PATCH 137/337] Refactor code --- internal/api/group/group.go | 2 +- internal/rpc/group/group.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/api/group/group.go b/internal/api/group/group.go index 952962f59..688686112 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -253,7 +253,7 @@ func CreateGroup(c *gin.Context) { if RpcResp.ErrCode == 0 { utils.CopyStructFields(&resp.GroupInfo, RpcResp.GroupInfo) } - log.NewInfo(req.OperationID, "InviteUserToGroup api return ", resp) + log.NewInfo(req.OperationID, "CreateGroup api return ", resp) c.JSON(http.StatusOK, resp) } diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 01192c049..287d172aa 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -111,7 +111,7 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR for _, user := range req.InitMemberList { us, err := im_mysql_model.GetUserByUserID(user.UserID) if err != nil { - log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), user.UserID) + log.NewError(req.OperationID, "GetUserByUserID failed ", err.Error(), user.UserID) continue } if user.RoleLevel == constant.GroupOwner { @@ -133,7 +133,7 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR } } - resp := &pbGroup.CreateGroupResp{} + resp := &pbGroup.CreateGroupResp{GroupInfo: &open_im_sdk.GroupInfo{}} group, err := im_mysql_model.GetGroupInfoByGroupID(groupId) if err != nil { log.NewError(req.OperationID, "GetGroupInfoByGroupID failed ", err.Error(), groupId) @@ -143,7 +143,7 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR } chat.GroupCreatedNotification(req.OperationID, req.OpUserID, req.OwnerUserID, groupId, okUserIDList) utils.CopyStructFields(resp.GroupInfo, group) - resp.GroupInfo.MemberCount = uint32(imdb.GetGroupMemberNumByGroupID(groupId)) + resp.GroupInfo.MemberCount = imdb.GetGroupMemberNumByGroupID(groupId) resp.GroupInfo.OwnerUserID = req.OwnerUserID log.NewInfo(req.OperationID, "rpc CreateGroup return ", resp.String()) From 6f03c470ae7c684ded7fcee6a2a4f934effa7bd6 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 29 Dec 2021 17:53:08 +0800 Subject: [PATCH 138/337] nil return modify --- pkg/common/db/mysql_model/im_mysql_model/user_model.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/db/mysql_model/im_mysql_model/user_model.go b/pkg/common/db/mysql_model/im_mysql_model/user_model.go index 46909e95c..8a4900ee1 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/user_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/user_model.go @@ -100,7 +100,7 @@ func SelectAllUserID() ([]string, error) { return nil, err } var resultArr []string - err = dbConn.Table("user").Select("user_id").Pluck("user_id", &resultArr).Error + err = dbConn.Table("user").Pluck("user_id", &resultArr).Error if err != nil { return nil, err } From 5dcb321a6f67c56611050bffe973b3a252ace889 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 18:04:24 +0800 Subject: [PATCH 139/337] Refactor code --- internal/rpc/group/group.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 287d172aa..f759bc903 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -195,7 +195,7 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite _, err := imdb.GetGroupInfoByGroupID(req.GroupID) if err != nil { - log.NewError(req.OperationID, "FindGroupInfoByGroupId failed ", req.GroupID, err) + log.NewError(req.OperationID, "GetGroupInfoByGroupID failed ", req.GroupID, err) return &pbGroup.InviteUserToGroupResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil } // @@ -209,7 +209,7 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite resultNode.Result = 0 toUserInfo, err := imdb.GetUserByUserID(v) if err != nil { - log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), v) + log.NewError(req.OperationID, "GetUserByUserID failed ", err.Error(), v) resultNode.Result = -1 resp.Id2ResultList = append(resp.Id2ResultList, &resultNode) continue @@ -253,7 +253,7 @@ func (s *groupServer) GetGroupAllMember(ctx context.Context, req *pbGroup.GetGro if err != nil { resp.ErrCode = constant.ErrDB.ErrCode resp.ErrMsg = constant.ErrDB.ErrMsg - log.NewError(req.OperationID, "FindGroupMemberListByGroupId failed,", err.Error(), req.GroupID) + log.NewError(req.OperationID, "GetGroupMemberListByGroupID failed,", err.Error(), req.GroupID) return &resp, nil } @@ -411,7 +411,7 @@ func (s *groupServer) GetGroupsInfo(ctx context.Context, req *pbGroup.GetGroupsI for _, groupID := range req.GroupIDList { groupInfoFromMysql, err := im_mysql_model.GetGroupInfoByGroupID(groupID) if err != nil { - log.NewError(req.OperationID, "FindGroupInfoByGroupId failed ", err.Error(), groupID) + log.NewError(req.OperationID, "GetGroupInfoByGroupID failed ", err.Error(), groupID) continue } var groupInfo open_im_sdk.GroupInfo @@ -482,7 +482,7 @@ func (s *groupServer) QuitGroup(ctx context.Context, req *pbGroup.QuitGroupReq) _, err := imdb.GetGroupMemberInfoByGroupIDAndUserID(req.GroupID, req.OpUserID) if err != nil { - log.NewError(req.OperationID, "FindGroupMemberInfoByGroupIdAndUserId failed", err.Error(), req.GroupID, req.OpUserID) + log.NewError(req.OperationID, "GetGroupMemberInfoByGroupIDAndUserID failed", err.Error(), req.GroupID, req.OpUserID) return &pbGroup.QuitGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } @@ -509,7 +509,7 @@ func hasAccess(req *pbGroup.SetGroupInfoReq) bool { } groupUserInfo, err := im_mysql_model.GetGroupMemberInfoByGroupIDAndUserID(req.GroupInfo.GroupID, req.OpUserID) if err != nil { - log.NewError(req.OperationID, "FindGroupMemberInfoByGroupIdAndUserId failed, ", err.Error(), req.GroupInfo.GroupID, req.OpUserID) + log.NewError(req.OperationID, "GetGroupMemberInfoByGroupIDAndUserID failed, ", err.Error(), req.GroupInfo.GroupID, req.OpUserID) return false } @@ -528,7 +528,7 @@ func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInf group, err := im_mysql_model.GetGroupInfoByGroupID(req.GroupInfo.GroupID) if err != nil { - log.NewError(req.OperationID, "FindGroupInfoByGroupId failed ", err.Error(), req.GroupInfo.GroupID) + log.NewError(req.OperationID, "GetGroupInfoByGroupID failed ", err.Error(), req.GroupInfo.GroupID) return &pbGroup.SetGroupInfoResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil } From abd91260ab02ecceb97b08f9de30c130a98b0077 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 29 Dec 2021 18:09:55 +0800 Subject: [PATCH 140/337] nil return modify --- internal/rpc/user/user.go | 7 ++++--- pkg/common/db/mysql_model/im_mysql_model/user_model.go | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index c6391bcb3..49f800242 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -141,7 +141,7 @@ func (s *userServer) GetAllConversationMsgOpt(ctx context.Context, req *pbUser.G } func (s *userServer) DeleteUsers(_ context.Context, req *pbUser.DeleteUsersReq) (*pbUser.DeleteUsersResp, error) { log.NewInfo(req.OperationID, "DeleteUsers args ", req.String()) - if token_verify.IsMangerUserID(req.OpUserID) { + if !token_verify.IsMangerUserID(req.OpUserID) { log.NewError(req.OperationID, "IsMangerUserID false ", req.OpUserID) return &pbUser.DeleteUsersResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, FailedUserIDList: req.DeleteUserIDList}, nil } @@ -161,7 +161,7 @@ func (s *userServer) DeleteUsers(_ context.Context, req *pbUser.DeleteUsersReq) func (s *userServer) GetAllUserID(_ context.Context, req *pbUser.GetAllUserIDReq) (*pbUser.GetAllUserIDResp, error) { log.NewInfo(req.OperationID, "GetAllUserID args ", req.String()) - if token_verify.IsMangerUserID(req.OpUserID) { + if !token_verify.IsMangerUserID(req.OpUserID) { log.NewError(req.OperationID, "IsMangerUserID false ", req.OpUserID) return &pbUser.GetAllUserIDResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil } @@ -177,11 +177,12 @@ func (s *userServer) GetAllUserID(_ context.Context, req *pbUser.GetAllUserIDReq func (s *userServer) AccountCheck(_ context.Context, req *pbUser.AccountCheckReq) (*pbUser.AccountCheckResp, error) { log.NewInfo(req.OperationID, "AccountCheck args ", req.String()) - if token_verify.IsMangerUserID(req.OpUserID) { + if !token_verify.IsMangerUserID(req.OpUserID) { log.NewError(req.OperationID, "IsMangerUserID false ", req.OpUserID) return &pbUser.AccountCheckResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil } uidList, err := imdb.SelectSomeUserID(req.CheckUserIDList) + log.NewDebug(req.OperationID, "from db uid list is:", uidList) if err != nil { log.NewError(req.OperationID, "SelectSomeUserID failed ", err.Error(), req.CheckUserIDList) return &pbUser.AccountCheckResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil diff --git a/pkg/common/db/mysql_model/im_mysql_model/user_model.go b/pkg/common/db/mysql_model/im_mysql_model/user_model.go index 8a4900ee1..fbc382718 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/user_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/user_model.go @@ -112,10 +112,10 @@ func SelectSomeUserID(userIDList []string) ([]string, error) { if err != nil { return nil, err } - var userList []User - err = dbConn.Table("user").Where("(user_id) IN ? ", userIDList).Find(&userList).Error + var resultArr []string + err = dbConn.Table("user").Where("(user_id) IN ? ", userIDList).Pluck("user_id", &resultArr).Error if err != nil { return nil, err } - return userIDList, nil + return resultArr, nil } From 1537330b6173e05674d7fbe4c07e9fc86f753303 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 18:10:19 +0800 Subject: [PATCH 141/337] Refactor code --- pkg/base_info/group_api_struct.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/base_info/group_api_struct.go b/pkg/base_info/group_api_struct.go index 6c675145c..01250bddf 100644 --- a/pkg/base_info/group_api_struct.go +++ b/pkg/base_info/group_api_struct.go @@ -80,6 +80,7 @@ type CreateGroupReq struct { OwnerUserID string `json:"ownerUserID"` GroupName string `json:"groupName"` GroupType int32 `json:"groupType"` + OperationID string `json:"operationID"` } type CreateGroupResp struct { From b0c05fd80d44e307b6724354ccdc93fa35870bbf Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 18:12:23 +0800 Subject: [PATCH 142/337] Refactor code --- pkg/base_info/group_api_struct.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/base_info/group_api_struct.go b/pkg/base_info/group_api_struct.go index 01250bddf..bcc657e43 100644 --- a/pkg/base_info/group_api_struct.go +++ b/pkg/base_info/group_api_struct.go @@ -77,10 +77,10 @@ type GetGroupAllMemberResp struct { type CreateGroupReq struct { MemberList []*GroupAddMemberInfo `json:"memberList" binding:"required"` - OwnerUserID string `json:"ownerUserID"` + OwnerUserID string `json:"ownerUserID" binding:"required"` GroupName string `json:"groupName"` GroupType int32 `json:"groupType"` - OperationID string `json:"operationID"` + OperationID string `json:"operationID" binding:"required"` } type CreateGroupResp struct { From 4b38f0bc6b5adb62ac8f2dd3b95087386a666c20 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 18:26:49 +0800 Subject: [PATCH 143/337] Refactor code --- internal/rpc/group/group.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index f759bc903..e9d937863 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -94,8 +94,10 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR } //to group member + groupMemberTmp := imdb.GroupMember{GroupID: groupId, RoleLevel: constant.GroupOwner} + utils.CopyStructFields(&groupMemberTmp, us) groupMember := imdb.GroupMember{GroupID: groupId, RoleLevel: constant.GroupOwner} - utils.CopyStructFields(&groupMember, us) + groupMember = groupMemberTmp err = im_mysql_model.InsertIntoGroupMember(groupMember) if err != nil { log.NewError(req.OperationID, "InsertIntoGroupMember failed ", err.Error(), groupMember) From 479ce592fae3a50363c115b9e65bb570811dc29e Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 18:36:56 +0800 Subject: [PATCH 144/337] Refactor code --- internal/rpc/group/group.go | 4 +--- pkg/common/db/mysql_model/im_mysql_model/model_struct.go | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index e9d937863..f759bc903 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -94,10 +94,8 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR } //to group member - groupMemberTmp := imdb.GroupMember{GroupID: groupId, RoleLevel: constant.GroupOwner} - utils.CopyStructFields(&groupMemberTmp, us) groupMember := imdb.GroupMember{GroupID: groupId, RoleLevel: constant.GroupOwner} - groupMember = groupMemberTmp + utils.CopyStructFields(&groupMember, us) err = im_mysql_model.InsertIntoGroupMember(groupMember) if err != nil { log.NewError(req.OperationID, "InsertIntoGroupMember failed ", err.Error(), groupMember) diff --git a/pkg/common/db/mysql_model/im_mysql_model/model_struct.go b/pkg/common/db/mysql_model/im_mysql_model/model_struct.go index bd35c6314..e53b02222 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/model_struct.go +++ b/pkg/common/db/mysql_model/im_mysql_model/model_struct.go @@ -94,7 +94,7 @@ type GroupMember struct { RoleLevel int32 `gorm:"column:role_level"` JoinTime time.Time `gorm:"column:join_time"` Nickname string `gorm:"column:nickname"` - FaceUrl string `gorm:"user_group_face_url"` + FaceUrl string `gorm:"column:user_group_face_url"` JoinSource int32 `gorm:"column:join_source"` OperatorUserID string `gorm:"column:operator_user_id"` Ex string `gorm:"column:ex"` From 0392eab12923c3b1bd940ecf6be340b08ed8f123 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 29 Dec 2021 19:12:33 +0800 Subject: [PATCH 145/337] nil return modify --- pkg/common/db/mysql_model/im_mysql_model/user_model.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/common/db/mysql_model/im_mysql_model/user_model.go b/pkg/common/db/mysql_model/im_mysql_model/user_model.go index fbc382718..c4ed8686a 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/user_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/user_model.go @@ -109,11 +109,13 @@ func SelectAllUserID() ([]string, error) { func SelectSomeUserID(userIDList []string) ([]string, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() + dbConn.LogMode(true) if err != nil { return nil, err } var resultArr []string err = dbConn.Table("user").Where("(user_id) IN ? ", userIDList).Pluck("user_id", &resultArr).Error + if err != nil { return nil, err } From de8ac684668f69efb51bef4b1427a55dc705e80f Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 29 Dec 2021 19:17:43 +0800 Subject: [PATCH 146/337] nil return modify --- pkg/common/db/mysql_model/im_mysql_model/user_model.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/db/mysql_model/im_mysql_model/user_model.go b/pkg/common/db/mysql_model/im_mysql_model/user_model.go index c4ed8686a..42d573b5e 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/user_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/user_model.go @@ -114,7 +114,7 @@ func SelectSomeUserID(userIDList []string) ([]string, error) { return nil, err } var resultArr []string - err = dbConn.Table("user").Where("(user_id) IN ? ", userIDList).Pluck("user_id", &resultArr).Error + err = dbConn.Table("user").Where("user_id IN (?) ", userIDList).Pluck("user_id", &resultArr).Error if err != nil { return nil, err From b4935fef767eaaa3c6a905006ca23ee213a60d62 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 29 Dec 2021 19:33:54 +0800 Subject: [PATCH 147/337] nil return modify --- pkg/common/db/mysql_model/im_mysql_model/user_model.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/db/mysql_model/im_mysql_model/user_model.go b/pkg/common/db/mysql_model/im_mysql_model/user_model.go index 42d573b5e..0f0396be8 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/user_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/user_model.go @@ -114,7 +114,7 @@ func SelectSomeUserID(userIDList []string) ([]string, error) { return nil, err } var resultArr []string - err = dbConn.Table("user").Where("user_id IN (?) ", userIDList).Pluck("user_id", &resultArr).Error + err = dbConn.Table("user").Where("user_id IN (?) ", userIDList).Find(&resultArr).Error if err != nil { return nil, err From 31fabb462474e4aef5531bb1ecf1ceb548d4d714 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 29 Dec 2021 19:35:04 +0800 Subject: [PATCH 148/337] nil return modify --- pkg/base_info/manage_api_struct.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/base_info/manage_api_struct.go b/pkg/base_info/manage_api_struct.go index 070e2c72b..ff1fea906 100644 --- a/pkg/base_info/manage_api_struct.go +++ b/pkg/base_info/manage_api_struct.go @@ -29,8 +29,8 @@ type GetUsersOnlineStatusResp struct { SuccessResult []*pbRelay.GetUsersOnlineStatusResp_SuccessResult `json:"data"` } type AccountCheckReq struct { - OperationID string `json:"operationID" binding:"required"` - UserIDList []string `json:"userIDList" binding:"required,lte=100"` + OperationID string `json:"operationID" binding:"required"` + CheckUserIDList []string `json:"checkUserIDList" binding:"required,lte=100"` } type AccountCheckResp struct { CommResp From ace5fd61bd2cc9d6fad3c26dff9aef26db77b36d Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 29 Dec 2021 19:37:52 +0800 Subject: [PATCH 149/337] nil return modify --- pkg/common/db/mysql_model/im_mysql_model/user_model.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/db/mysql_model/im_mysql_model/user_model.go b/pkg/common/db/mysql_model/im_mysql_model/user_model.go index 0f0396be8..42d573b5e 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/user_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/user_model.go @@ -114,7 +114,7 @@ func SelectSomeUserID(userIDList []string) ([]string, error) { return nil, err } var resultArr []string - err = dbConn.Table("user").Where("user_id IN (?) ", userIDList).Find(&resultArr).Error + err = dbConn.Table("user").Where("user_id IN (?) ", userIDList).Pluck("user_id", &resultArr).Error if err != nil { return nil, err From ca92bc899bba63844c1c0ff1470e55e39aabcd14 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 21:26:56 +0800 Subject: [PATCH 150/337] Refactor code --- cmd/open_im_api/main.go | 2 +- internal/api/group/group.go | 2 +- pkg/base_info/group_api_struct.go | 3 ++- .../db/mysql_model/im_mysql_model/model_struct.go | 14 ++++++++------ 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index 7134127a1..259978c56 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -47,7 +47,7 @@ func main() { //group related routing group groupRouterGroup := r.Group("/group") { - groupRouterGroup.POST("/create_group", group.CreateGroup) + groupRouterGroup.POST("/create_group", group.CreateGroup) //1 groupRouterGroup.POST("/set_group_info", group.SetGroupInfo) groupRouterGroup.POST("join_group", group.JoinGroup) groupRouterGroup.POST("/quit_group", group.QuitGroup) diff --git a/internal/api/group/group.go b/internal/api/group/group.go index 688686112..0c90d00c5 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -443,7 +443,7 @@ func SetGroupInfo(c *gin.Context) { c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) return } - resp := api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg} + resp := api.SetGroupInfoResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} c.JSON(http.StatusOK, resp) log.NewInfo(req.OperationID, "SetGroupInfo api return ", resp) } diff --git a/pkg/base_info/group_api_struct.go b/pkg/base_info/group_api_struct.go index bcc657e43..b232f389c 100644 --- a/pkg/base_info/group_api_struct.go +++ b/pkg/base_info/group_api_struct.go @@ -1,6 +1,7 @@ package base_info import ( + imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" open_im_sdk "Open_IM/pkg/proto/sdk_ws" ) @@ -135,7 +136,7 @@ type QuitGroupResp struct { } type SetGroupInfoReq struct { - open_im_sdk.GroupInfo + imdb.Group OperationID string `json:"operationID" binding:"required"` } type SetGroupInfoResp struct { diff --git a/pkg/common/db/mysql_model/im_mysql_model/model_struct.go b/pkg/common/db/mysql_model/im_mysql_model/model_struct.go index e53b02222..8c228cae0 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/model_struct.go +++ b/pkg/common/db/mysql_model/im_mysql_model/model_struct.go @@ -63,17 +63,19 @@ type FriendRequest struct { //} // open_im_sdk.GroupInfo (OwnerUserID , MemberCount )> imdb.Group type Group struct { - GroupID string `gorm:"column:group_id;primaryKey;"` - GroupName string `gorm:"column:name"` - Notification string `gorm:"column:notification"` - Introduction string `gorm:"column:introduction"` - FaceUrl string `gorm:"column:face_url"` + //`json:"operationID" binding:"required"` + //`protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` `json:"operationID" binding:"required"` + GroupID string `gorm:"column:group_id;primaryKey;" json:"groupID" binding:"required"` + GroupName string `gorm:"column:name" json:"groupName"` + Notification string `gorm:"column:notification" json:"notification"` + Introduction string `gorm:"column:introduction" json:"introduction"` + FaceUrl string `gorm:"column:face_url" json:"faceUrl"` CreateTime time.Time `gorm:"column:create_time"` Status int32 `gorm:"column:status"` CreatorUserID string `gorm:"column:creator_user_id"` GroupType int32 `gorm:"column:group_type"` - Ex string `gorm:"column:ex"` + Ex string `gorm:"column:ex" json:"ex"` } //message GroupMemberFullInfo { From 51126ca941e5c0305c66aef3da59ee4489c0c173 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 21:47:56 +0800 Subject: [PATCH 151/337] Refactor code --- internal/api/group/group.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/api/group/group.go b/internal/api/group/group.go index 0c90d00c5..c13662651 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -394,7 +394,7 @@ func QuitGroup(c *gin.Context) { return } req := &rpc.QuitGroupReq{} - utils.CopyStructFields(req, params) + utils.CopyStructFields(req, ¶ms) var ok bool ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { @@ -425,7 +425,7 @@ func SetGroupInfo(c *gin.Context) { return } req := &rpc.SetGroupInfoReq{} - utils.CopyStructFields(req, params) + utils.CopyStructFields(req, ¶ms.Group) var ok bool ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { From be4ba6cc69c2952efa8dafd4afb308246934df79 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 21:50:11 +0800 Subject: [PATCH 152/337] Refactor code --- internal/api/group/group.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/api/group/group.go b/internal/api/group/group.go index c13662651..acdd83e9c 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -7,6 +7,7 @@ import ( "Open_IM/pkg/common/token_verify" "Open_IM/pkg/grpc-etcdv3/getcdv3" rpc "Open_IM/pkg/proto/group" + open_im_sdk "Open_IM/pkg/proto/sdk_ws" "Open_IM/pkg/utils" "context" "github.com/gin-gonic/gin" @@ -424,8 +425,9 @@ func SetGroupInfo(c *gin.Context) { c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &rpc.SetGroupInfoReq{} - utils.CopyStructFields(req, ¶ms.Group) + req := &rpc.SetGroupInfoReq{GroupInfo: &open_im_sdk.GroupInfo{}} + utils.CopyStructFields(req.GroupInfo, ¶ms.Group) + req.OperationID = params.OperationID var ok bool ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { From 3bbf9d2e0f06d4f1362f8272cce97849e5849796 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 29 Dec 2021 21:55:07 +0800 Subject: [PATCH 153/337] nil return modify --- pkg/base_info/manage_api_struct.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/base_info/manage_api_struct.go b/pkg/base_info/manage_api_struct.go index ff1fea906..61e2bbba4 100644 --- a/pkg/base_info/manage_api_struct.go +++ b/pkg/base_info/manage_api_struct.go @@ -6,8 +6,8 @@ import ( ) type DeleteUsersReq struct { - OperationID string `json:"operationID" binding:"required"` - DeleteUidList []string `json:"deleteUidList" binding:"required"` + OperationID string `json:"operationID" binding:"required"` + DeleteUserIDList []string `json:"deleteUserIDList" binding:"required"` } type DeleteUsersResp struct { CommResp From e39312828cd7802df326f8b23f8ce45278a32d08 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 22:00:18 +0800 Subject: [PATCH 154/337] Refactor code --- pkg/common/db/mysql_model/im_mysql_model/group_member_model.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go index 70be7a2bc..94581eb0f 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go @@ -79,7 +79,7 @@ func GetGroupMemberInfoByGroupIDAndUserID(groupID, userID string) (*GroupMember, return nil, err } var groupMember GroupMember - err = dbConn.Table("group_member").Where("group_id=? and user_id=? limit 1", groupID, userID).Find(&groupMember).Error + err = dbConn.Table("group_member").Where("group_id=? and user_id=? ", groupID, userID).Limit(1).Find(&groupMember).Error if err != nil { return nil, err } From 28ef79f37110b42b17d9f9ba21c3da337bf36885 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 29 Dec 2021 22:06:27 +0800 Subject: [PATCH 155/337] Refactor code --- internal/rpc/group/group.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index f759bc903..6ece62592 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -513,7 +513,7 @@ func hasAccess(req *pbGroup.SetGroupInfoReq) bool { return false } - if groupUserInfo.RoleLevel == constant.GroupAdmin { + if groupUserInfo.RoleLevel == constant.GroupOwner || groupUserInfo.RoleLevel == constant.GroupAdmin { return true } return false @@ -522,7 +522,7 @@ func hasAccess(req *pbGroup.SetGroupInfoReq) bool { func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInfoReq) (*pbGroup.SetGroupInfoResp, error) { log.NewInfo(req.OperationID, "SetGroupInfo args ", req.String()) if !hasAccess(req) { - log.NewError(req.OperationID, "no access ") + log.NewError(req.OperationID, "no access ", req) return &pbGroup.SetGroupInfoResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil } From 8b7e62e81933fb4cce336bca7d3b55271aee43b9 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 09:10:31 +0800 Subject: [PATCH 156/337] Refactor code --- internal/rpc/group/group.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 6ece62592..32b7f83d8 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -551,13 +551,14 @@ func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInf utils.CopyStructFields(&groupInfo, req.GroupInfo) err = imdb.SetGroupInfo(groupInfo) if err != nil { + log.NewError(req.OperationID, "SetGroupInfo failed ", err.Error(), groupInfo) return &pbGroup.SetGroupInfoResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil } if changedType != 0 { chat.GroupInfoChangedNotification(req.OperationID, req.OpUserID, req.GroupInfo.GroupID, changedType) } - log.NewInfo("SetGroupInfo rpc return ", pbGroup.SetGroupInfoResp{CommonResp: &pbGroup.CommonResp{}}) + log.NewInfo(req.OperationID, "SetGroupInfo rpc return ", pbGroup.SetGroupInfoResp{CommonResp: &pbGroup.CommonResp{}}) return &pbGroup.SetGroupInfoResp{CommonResp: &pbGroup.CommonResp{}}, nil } From f93090596a32275829fe05abcd07aa6e3259fdc0 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 09:11:38 +0800 Subject: [PATCH 157/337] Refactor code --- internal/rpc/group/group.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 32b7f83d8..4bb29db9c 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -552,7 +552,7 @@ func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInf err = imdb.SetGroupInfo(groupInfo) if err != nil { log.NewError(req.OperationID, "SetGroupInfo failed ", err.Error(), groupInfo) - return &pbGroup.SetGroupInfoResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil + return &pbGroup.SetGroupInfoResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } if changedType != 0 { From d7dbe986f1f40c472b5827ebe57421dc9a504ec7 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 09:17:49 +0800 Subject: [PATCH 158/337] Refactor code --- pkg/common/db/mysql_model/im_mysql_model/group_model.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_model.go index cc53a8036..12c809c28 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_model.go @@ -52,6 +52,6 @@ func SetGroupInfo(groupInfo Group) error { if err != nil { return err } - err = dbConn.Table("friend_request").Where("group_id=?", groupInfo.GroupID).Update(&groupInfo).Error + err = dbConn.Table("group").Where("group_id=?", groupInfo.GroupID).Update(&groupInfo).Error return err } From f2c0a3994aab88757f8009189ebbb7699ec30b3f Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 09:23:18 +0800 Subject: [PATCH 159/337] Refactor code --- cmd/open_im_api/main.go | 4 ++-- internal/api/group/group.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index 259978c56..6768191a8 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -47,8 +47,8 @@ func main() { //group related routing group groupRouterGroup := r.Group("/group") { - groupRouterGroup.POST("/create_group", group.CreateGroup) //1 - groupRouterGroup.POST("/set_group_info", group.SetGroupInfo) + groupRouterGroup.POST("/create_group", group.CreateGroup) //1 + groupRouterGroup.POST("/set_group_info", group.SetGroupInfo) //1 groupRouterGroup.POST("join_group", group.JoinGroup) groupRouterGroup.POST("/quit_group", group.QuitGroup) groupRouterGroup.POST("/group_application_response", group.ApplicationGroupResponse) diff --git a/internal/api/group/group.go b/internal/api/group/group.go index acdd83e9c..93e20839b 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -383,8 +383,8 @@ func JoinGroup(c *gin.Context) { return } resp := api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg} + log.NewInfo(req.OperationID, "JoinGroup api return", RpcResp.String()) c.JSON(http.StatusOK, resp) - log.NewInfo("JoinGroup api return", RpcResp.String()) } func QuitGroup(c *gin.Context) { From ac3159193fe9ea230d300abee8de9e9e3dfc63ac Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 09:26:40 +0800 Subject: [PATCH 160/337] Refactor code --- internal/api/group/group.go | 2 +- internal/rpc/group/group.go | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/internal/api/group/group.go b/internal/api/group/group.go index 93e20839b..8905b641d 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -414,8 +414,8 @@ func QuitGroup(c *gin.Context) { return } resp := api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg} + log.NewInfo(req.OperationID, "QuitGroup api return", RpcResp.String()) c.JSON(http.StatusOK, resp) - log.NewInfo("QuitGroup api return", RpcResp.String()) } func SetGroupInfo(c *gin.Context) { diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 4bb29db9c..615e69efa 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -478,11 +478,10 @@ func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq) } func (s *groupServer) QuitGroup(ctx context.Context, req *pbGroup.QuitGroupReq) (*pbGroup.QuitGroupResp, error) { - log.NewError("QuitGroup args ", req.String()) - + log.NewError(req.OperationID, "QuitGroup args ", req.String()) _, err := imdb.GetGroupMemberInfoByGroupIDAndUserID(req.GroupID, req.OpUserID) if err != nil { - log.NewError(req.OperationID, "GetGroupMemberInfoByGroupIDAndUserID failed", err.Error(), req.GroupID, req.OpUserID) + log.NewError(req.OperationID, "GetGroupMemberInfoByGroupIDAndUserID failed ", err.Error(), req.GroupID, req.OpUserID) return &pbGroup.QuitGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } @@ -499,7 +498,7 @@ func (s *groupServer) QuitGroup(ctx context.Context, req *pbGroup.QuitGroupReq) } chat.MemberLeaveNotification(req) - log.NewInfo(req.OperationID, "rpc QuitGroup return ") + log.NewInfo(req.OperationID, "rpc QuitGroup return ", pbGroup.QuitGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""}}) return &pbGroup.QuitGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""}}, nil } From 2725a1cd8d367a07b5cf48b4a28caca8a551c912 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 09:30:46 +0800 Subject: [PATCH 161/337] Refactor code --- pkg/common/db/mysql_model/im_mysql_model/group_member_model.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go index 94581eb0f..0c25a7003 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go @@ -91,7 +91,7 @@ func DeleteGroupMemberByGroupIDAndUserID(groupID, userID string) error { if err != nil { return err } - err = dbConn.Table("group_member").Where("group_id=? and user_id=? limit 1", groupID, userID).Delete(&GroupMember{}).Error + err = dbConn.Table("group_member").Where("group_id=? and user_id=? ", groupID, userID).Delete(&GroupMember{}).Error if err != nil { return err } From 3f639e2ffe0254fccfdf0ddba44d631a97920833 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 09:33:51 +0800 Subject: [PATCH 162/337] Refactor code --- pkg/common/db/mysql_model/im_mysql_model/group_member_model.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go index 0c25a7003..7e4afb402 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go @@ -116,7 +116,7 @@ func GetOwnerManagerByGroupID(groupID string) ([]GroupMember, error) { return nil, err } var groupMemberList []GroupMember - err = dbConn.Table("group_member").Where("group_id=? and role_level>0", groupID).Find(&groupMemberList).Error + err = dbConn.Table("group_member").Where("group_id=? and role_level>?", groupID, constant.GroupOrdinaryUsers).Find(&groupMemberList).Error if err != nil { return nil, err } From 5ae6e985728eedb36acdb97f6f4eaa12f12356d2 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 09:34:19 +0800 Subject: [PATCH 163/337] Refactor code --- cmd/open_im_api/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index 6768191a8..fd703657f 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -50,7 +50,7 @@ func main() { groupRouterGroup.POST("/create_group", group.CreateGroup) //1 groupRouterGroup.POST("/set_group_info", group.SetGroupInfo) //1 groupRouterGroup.POST("join_group", group.JoinGroup) - groupRouterGroup.POST("/quit_group", group.QuitGroup) + groupRouterGroup.POST("/quit_group", group.QuitGroup) //1 groupRouterGroup.POST("/group_application_response", group.ApplicationGroupResponse) groupRouterGroup.POST("/transfer_group", group.TransferGroupOwner) groupRouterGroup.POST("/get_group_applicationList", group.GetGroupApplicationList) From 6d9ee74360eecd2352c4a1d98737700d3a23e0d0 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 09:38:07 +0800 Subject: [PATCH 164/337] Refactor code --- internal/rpc/group/group.go | 2 +- .../db/mysql_model/im_mysql_model/group_request_model.go | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 615e69efa..a959778af 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -453,7 +453,7 @@ func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq) log.NewInfo(req.OperationID, "JoinGroup args ", req.String()) _, err := imdb.GetUserByUserID(req.OpUserID) if err != nil { - log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), req.OpUserID) + log.NewError(req.OperationID, "GetUserByUserID failed ", err.Error(), req.OpUserID) return &pbGroup.JoinGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go index cd6cf641f..9e7266b02 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go @@ -23,11 +23,10 @@ func UpdateGroupRequest(groupRequest GroupRequest) error { if err != nil { return err } - err = dbConn.Table("group_request").Where("group_id=? and user_id=?", groupRequest.GroupID, groupRequest.UserID).Update(&groupRequest).Error - if err != nil { - return err + //RowsAffected + if dbConn.Table("group_request").Where("group_id=? and user_id=?", groupRequest.GroupID, groupRequest.UserID).Update(&groupRequest).RowsAffected == 0 { + return InsertIntoGroupRequest(groupRequest) } - return nil } func InsertIntoGroupRequest(toInsertInfo GroupRequest) error { From c0172b0a49a3c2371067de18a3f85f1f9b48db9a Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 09:39:37 +0800 Subject: [PATCH 165/337] Refactor code --- pkg/common/db/mysql_model/im_mysql_model/group_request_model.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go index 9e7266b02..c96d1bf63 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go @@ -26,6 +26,8 @@ func UpdateGroupRequest(groupRequest GroupRequest) error { //RowsAffected if dbConn.Table("group_request").Where("group_id=? and user_id=?", groupRequest.GroupID, groupRequest.UserID).Update(&groupRequest).RowsAffected == 0 { return InsertIntoGroupRequest(groupRequest) + } else { + return nil } } From 83874ad4666415309c700e05aa56d0803bd183ab Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 09:46:53 +0800 Subject: [PATCH 166/337] Refactor code --- pkg/common/db/mysql_model/im_mysql_model/model_struct.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/db/mysql_model/im_mysql_model/model_struct.go b/pkg/common/db/mysql_model/im_mysql_model/model_struct.go index 8c228cae0..d47ca5334 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/model_struct.go +++ b/pkg/common/db/mysql_model/im_mysql_model/model_struct.go @@ -118,7 +118,7 @@ type GroupRequest struct { GroupID string `gorm:"column:group_id;primaryKey;"` HandleResult int32 `gorm:"column:handle_result"` ReqMsg string `gorm:"column:req_msg"` - HandledMsg string `gorm:"column:handled_msg"` + HandledMsg string `gorm:"column:handle_msg"` ReqTime time.Time `gorm:"column:req_time"` HandleUserID string `gorm:"column:handle_user_id"` HandledTime time.Time `gorm:"column:handle_time"` From b687eb09b4fa573bceefeee1f78814f473c0750b Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 10:14:30 +0800 Subject: [PATCH 167/337] Refactor code --- internal/rpc/group/group.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index a959778af..a58e6728a 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -458,7 +458,10 @@ func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq) } var groupRequest imdb.GroupRequest - utils.CopyStructFields(&groupRequest, req) + groupRequest.UserID = req.OpUserID + groupRequest.ReqMsg = req.ReqMessage + groupRequest.GroupID = req.GroupID + err = imdb.UpdateGroupRequest(groupRequest) if err != nil { log.NewError(req.OperationID, "UpdateGroupRequest ", err.Error(), groupRequest) From cb79b1aea5abfb1ee0a35a2ff55fe5e2cc0481f0 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 10:18:49 +0800 Subject: [PATCH 168/337] Refactor code --- .../db/mysql_model/im_mysql_model/group_request_model.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go index c96d1bf63..76545c35d 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go @@ -3,6 +3,7 @@ package im_mysql_model import ( "Open_IM/pkg/common/constant" "Open_IM/pkg/common/db" + "Open_IM/pkg/utils" "time" ) @@ -23,6 +24,12 @@ func UpdateGroupRequest(groupRequest GroupRequest) error { if err != nil { return err } + groupRequest.ReqTime = time.Now() + + if groupRequest.HandledTime.Unix() < 0 { + groupRequest.HandledTime = utils.UnixSecondToTime(0) + } + //RowsAffected if dbConn.Table("group_request").Where("group_id=? and user_id=?", groupRequest.GroupID, groupRequest.UserID).Update(&groupRequest).RowsAffected == 0 { return InsertIntoGroupRequest(groupRequest) From 7c3e429f22aa4ea42c471a226bd737f52df639ce Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 10:20:16 +0800 Subject: [PATCH 169/337] Refactor code --- .../db/mysql_model/im_mysql_model/group_request_model.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go index 76545c35d..e90c2cdd5 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go @@ -24,7 +24,6 @@ func UpdateGroupRequest(groupRequest GroupRequest) error { if err != nil { return err } - groupRequest.ReqTime = time.Now() if groupRequest.HandledTime.Unix() < 0 { groupRequest.HandledTime = utils.UnixSecondToTime(0) @@ -43,7 +42,12 @@ func InsertIntoGroupRequest(toInsertInfo GroupRequest) error { if err != nil { return err } - toInsertInfo.HandledTime = time.Now() + + toInsertInfo.ReqTime = time.Now() + if toInsertInfo.HandledTime.Unix() < 0 { + toInsertInfo.HandledTime = utils.UnixSecondToTime(0) + } + err = dbConn.Table("group_request").Create(&toInsertInfo).Error if err != nil { return err From 68985e9edae1d19672c26b5db1299856e6fa7a04 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 30 Dec 2021 10:30:47 +0800 Subject: [PATCH 170/337] log add --- internal/msg_gateway/gate/ws_server.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/internal/msg_gateway/gate/ws_server.go b/internal/msg_gateway/gate/ws_server.go index 150a11b64..88fad8c0c 100644 --- a/internal/msg_gateway/gate/ws_server.go +++ b/internal/msg_gateway/gate/ws_server.go @@ -183,7 +183,7 @@ func (ws *WServer) addUserConn(uid string, platformID int32, conn *UserConn, tok for _, v := range ws.wsUserToConn { count = count + len(v) } - log.WarnByKv("WS Add operation", "", "wsUser added", ws.wsUserToConn, "uid", uid, "online_user_num", len(ws.wsUserToConn), "online_conn_num", count) + log.WarnByKv("WS Add operation", "", "wsUser added", ws.wsUserToConn, "connection_uid", uid, "connection_platform", constant.PlatformIDToName(platformID), "online_user_num", len(ws.wsUserToConn), "online_conn_num", count) } @@ -206,9 +206,9 @@ func (ws *WServer) delUserConn(conn *UserConn) { for _, v := range ws.wsUserToConn { count = count + len(v) } - log.WarnByKv("WS delete operation", "", "wsUser deleted", ws.wsUserToConn, "uid", uid, "online_user_num", len(ws.wsUserToConn), "online_conn_num", count) + log.WarnByKv("WS delete operation", "", "wsUser deleted", ws.wsUserToConn, "disconnection_uid", uid, "disconnection_platform", platform, "online_user_num", len(ws.wsUserToConn), "online_conn_num", count) } else { - log.WarnByKv("WS delete operation", "", "wsUser deleted", ws.wsUserToConn, "uid", uid, "online_user_num", len(ws.wsUserToConn)) + log.WarnByKv("WS delete operation", "", "wsUser deleted", ws.wsUserToConn, "disconnection_uid", uid, "disconnection_platform", platform, "online_user_num", len(ws.wsUserToConn)) } delete(ws.wsConnToUser, conn) @@ -272,7 +272,6 @@ func (ws *WServer) headerCheck(w http.ResponseWriter, r *http.Request) bool { http.Error(w, http.StatusText(status), status) return false } - } func genMapKey(uid string, platformID int32) string { return uid + " " + constant.PlatformIDToName(platformID) From 2936f886a974538b4ba57f438b2dc64e61287855 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 10:35:09 +0800 Subject: [PATCH 171/337] Refactor code --- cmd/open_im_api/main.go | 4 ++-- internal/api/group/group.go | 11 +++++++---- pkg/base_info/group_api_struct.go | 4 ++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index fd703657f..ea550d174 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -49,8 +49,8 @@ func main() { { groupRouterGroup.POST("/create_group", group.CreateGroup) //1 groupRouterGroup.POST("/set_group_info", group.SetGroupInfo) //1 - groupRouterGroup.POST("join_group", group.JoinGroup) - groupRouterGroup.POST("/quit_group", group.QuitGroup) //1 + groupRouterGroup.POST("join_group", group.JoinGroup) //1 + groupRouterGroup.POST("/quit_group", group.QuitGroup) //1 groupRouterGroup.POST("/group_application_response", group.ApplicationGroupResponse) groupRouterGroup.POST("/transfer_group", group.TransferGroupOwner) groupRouterGroup.POST("/get_group_applicationList", group.GetGroupApplicationList) diff --git a/internal/api/group/group.go b/internal/api/group/group.go index 8905b641d..87378cde6 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -258,7 +258,7 @@ func CreateGroup(c *gin.Context) { c.JSON(http.StatusOK, resp) } -//my application 我发出去的 +// 群主或管理员收到的 func GetGroupApplicationList(c *gin.Context) { params := api.GetGroupApplicationListReq{} if err := c.BindJSON(¶ms); err != nil { @@ -279,16 +279,19 @@ func GetGroupApplicationList(c *gin.Context) { etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) client := rpc.NewGroupClient(etcdConn) - reply, err := client.GetGroupApplicationList(context.Background(), req) if err != nil { + log.NewError(req.OperationID, "GetGroupApplicationList failed ", err.Error(), req.String()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) return } - resp := api.GetGroupApplicationListResp{CommResp: api.CommResp{ErrCode: reply.ErrCode, ErrMsg: reply.ErrMsg}, Data: reply.GroupRequestList} - c.JSON(http.StatusOK, resp) + resp := api.GetGroupApplicationListResp{CommResp: api.CommResp{ErrCode: reply.ErrCode, ErrMsg: reply.ErrMsg}, GroupRequestList: reply.GroupRequestList} + if len(resp.GroupRequestList) == 0 { + resp.GroupRequestList = []*open_im_sdk.GroupRequest{} + } log.NewInfo(req.OperationID, "GetGroupApplicationList api return ", resp) + c.JSON(http.StatusOK, resp) } func GetGroupsInfo(c *gin.Context) { diff --git a/pkg/base_info/group_api_struct.go b/pkg/base_info/group_api_struct.go index b232f389c..243dc4e2b 100644 --- a/pkg/base_info/group_api_struct.go +++ b/pkg/base_info/group_api_struct.go @@ -91,11 +91,11 @@ type CreateGroupResp struct { type GetGroupApplicationListReq struct { OperationID string `json:"operationID" binding:"required"` - FromUserID string `json:"fromUserID" binding:"required"` //my application + FromUserID string `json:"fromUserID" binding:"required"` //作为管理员或群主收到的 进群申请 } type GetGroupApplicationListResp struct { CommResp - Data []*open_im_sdk.GroupRequest `json:"data"` + GroupRequestList []*open_im_sdk.GroupRequest `json:"data"` } type GetGroupInfoReq struct { From 42c898d5aaa613fcccd07451744fd1c09dd4d281 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 10:36:37 +0800 Subject: [PATCH 172/337] Refactor code --- internal/rpc/group/group.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index a58e6728a..891b9efe0 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -400,6 +400,7 @@ func (s *groupServer) GetGroupApplicationList(_ context.Context, req *pbGroup.Ge for _, v := range reply { var node open_im_sdk.GroupRequest utils.CopyStructFields(&node, v) + log.NewDebug(req.OperationID, "node ", node, "v ", v) } log.NewInfo(req.OperationID, "GetGroupMembersInfo rpc return ", resp) return &resp, nil From 6692867db5053fff59e5b7e23adec1095ee8cc7a Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 10:49:09 +0800 Subject: [PATCH 173/337] Refactor code --- internal/rpc/group/group.go | 4 ++-- .../db/mysql_model/im_mysql_model/group_request_model.go | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 891b9efe0..7522b4f41 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -390,9 +390,9 @@ func (s *groupServer) GetGroupMembersInfo(ctx context.Context, req *pbGroup.GetG func (s *groupServer) GetGroupApplicationList(_ context.Context, req *pbGroup.GetGroupApplicationListReq) (*pbGroup.GetGroupApplicationListResp, error) { log.NewInfo(req.OperationID, "GetGroupMembersInfo args ", req.String()) - reply, err := im_mysql_model.GetGroupApplicationList(req.OpUserID) + reply, err := im_mysql_model.GetGroupApplicationList(req.FromUserID) if err != nil { - log.NewError(req.OperationID, "GetGroupApplicationList failed ", err.Error(), req.OpUserID) + log.NewError(req.OperationID, "GetGroupApplicationList failed ", err.Error(), req.FromUserID) return &pbGroup.GetGroupApplicationListResp{ErrCode: 701, ErrMsg: "GetGroupApplicationList failed"}, nil } diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go index e90c2cdd5..8073c1cff 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go @@ -4,6 +4,7 @@ import ( "Open_IM/pkg/common/constant" "Open_IM/pkg/common/db" "Open_IM/pkg/utils" + "fmt" "time" ) @@ -104,9 +105,12 @@ func GetGroupApplicationList(userID string) ([]GroupRequest, error) { if v.RoleLevel > constant.GroupOrdinaryUsers { list, err := GetGroupRequestByGroupID(v.GroupID) if err != nil { + fmt.Println("111 GetGroupRequestByGroupID failed ", err.Error()) continue } + fmt.Println("222 GetGroupRequestByGroupID ok ", list) groupRequestList = append(groupRequestList, list...) + fmt.Println("333 GetGroupRequestByGroupID ok ", groupRequestList) } } return groupRequestList, nil From 88aaa38676a8fa04a2020311a04d5e64dc2e6db1 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 10:56:17 +0800 Subject: [PATCH 174/337] Refactor code --- internal/rpc/group/group.go | 4 +++- .../db/mysql_model/im_mysql_model/group_request_model.go | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 7522b4f41..fa2972286 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -9,6 +9,7 @@ import ( imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" "Open_IM/pkg/common/log" "Open_IM/pkg/common/token_verify" + cp "Open_IM/pkg/common/utils" "Open_IM/pkg/grpc-etcdv3/getcdv3" pbGroup "Open_IM/pkg/proto/group" open_im_sdk "Open_IM/pkg/proto/sdk_ws" @@ -396,10 +397,11 @@ func (s *groupServer) GetGroupApplicationList(_ context.Context, req *pbGroup.Ge return &pbGroup.GetGroupApplicationListResp{ErrCode: 701, ErrMsg: "GetGroupApplicationList failed"}, nil } + log.NewDebug(req.OperationID, "GetGroupApplicationList reply ", reply) resp := pbGroup.GetGroupApplicationListResp{} for _, v := range reply { var node open_im_sdk.GroupRequest - utils.CopyStructFields(&node, v) + cp.GroupRequestDBCopyOpenIM(&node, &v) log.NewDebug(req.OperationID, "node ", node, "v ", v) } log.NewInfo(req.OperationID, "GetGroupMembersInfo rpc return ", resp) diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go index 8073c1cff..65268ae6a 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go @@ -105,12 +105,12 @@ func GetGroupApplicationList(userID string) ([]GroupRequest, error) { if v.RoleLevel > constant.GroupOrdinaryUsers { list, err := GetGroupRequestByGroupID(v.GroupID) if err != nil { - fmt.Println("111 GetGroupRequestByGroupID failed ", err.Error()) + // fmt.Println("111 GetGroupRequestByGroupID failed ", err.Error()) continue } - fmt.Println("222 GetGroupRequestByGroupID ok ", list) + // fmt.Println("222 GetGroupRequestByGroupID ok ", list) groupRequestList = append(groupRequestList, list...) - fmt.Println("333 GetGroupRequestByGroupID ok ", groupRequestList) + // fmt.Println("333 GetGroupRequestByGroupID ok ", groupRequestList) } } return groupRequestList, nil From e8ffcb0630823afb0558aa35ea093c63bad43ca7 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 10:59:25 +0800 Subject: [PATCH 175/337] Refactor code --- pkg/common/db/mysql_model/im_mysql_model/group_request_model.go | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go index 65268ae6a..5c7d3000b 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go @@ -4,7 +4,6 @@ import ( "Open_IM/pkg/common/constant" "Open_IM/pkg/common/db" "Open_IM/pkg/utils" - "fmt" "time" ) From 9f5897e06c9308a92bd5939a55acdac483eaa623 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 11:04:53 +0800 Subject: [PATCH 176/337] Refactor code --- internal/api/group/group.go | 9 ++++++--- pkg/base_info/group_api_struct.go | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/internal/api/group/group.go b/internal/api/group/group.go index 87378cde6..9401304cb 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -302,7 +302,7 @@ func GetGroupsInfo(c *gin.Context) { return } req := &rpc.GetGroupsInfoReq{} - utils.CopyStructFields(req, params) + utils.CopyStructFields(req, ¶ms) var ok bool ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { @@ -321,9 +321,12 @@ func GetGroupsInfo(c *gin.Context) { return } - resp := api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg} - c.JSON(http.StatusOK, resp) + resp := api.GetGroupInfoResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, GroupInfoList: RpcResp.GroupInfoList} + if len(resp.GroupInfoList) == 0 { + resp.GroupInfoList = []*open_im_sdk.GroupInfo{} + } log.NewInfo(req.OperationID, "GetGroupsInfo api return ", resp) + c.JSON(http.StatusOK, resp) } //process application diff --git a/pkg/base_info/group_api_struct.go b/pkg/base_info/group_api_struct.go index 243dc4e2b..e502ee10d 100644 --- a/pkg/base_info/group_api_struct.go +++ b/pkg/base_info/group_api_struct.go @@ -104,7 +104,7 @@ type GetGroupInfoReq struct { } type GetGroupInfoResp struct { CommResp - Data []open_im_sdk.GroupInfo `json:"data"` + GroupInfoList []*open_im_sdk.GroupInfo `json:"data"` } type ApplicationGroupResponseReq struct { From b32567681ff53c2245839b74b347354691d80715 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 11:07:12 +0800 Subject: [PATCH 177/337] Refactor code --- internal/rpc/group/group.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index fa2972286..e281a8541 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -418,8 +418,7 @@ func (s *groupServer) GetGroupsInfo(ctx context.Context, req *pbGroup.GetGroupsI continue } var groupInfo open_im_sdk.GroupInfo - utils.CopyStructFields(&groupInfo, groupInfoFromMysql) - groupInfo.CreateTime = groupInfoFromMysql.CreateTime.Unix() + cp.GroupDBCopyOpenIM(&groupInfo, groupInfoFromMysql) groupsInfoList = append(groupsInfoList, &groupInfo) } From e90be1bb88886c0bcf74e1a7d68569a158718d19 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 11:13:19 +0800 Subject: [PATCH 178/337] Refactor code --- internal/rpc/group/group.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index e281a8541..7a7dd5cf1 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -403,6 +403,7 @@ func (s *groupServer) GetGroupApplicationList(_ context.Context, req *pbGroup.Ge var node open_im_sdk.GroupRequest cp.GroupRequestDBCopyOpenIM(&node, &v) log.NewDebug(req.OperationID, "node ", node, "v ", v) + resp.GroupRequestList = append(resp.GroupRequestList, &node) } log.NewInfo(req.OperationID, "GetGroupMembersInfo rpc return ", resp) return &resp, nil From cc5125d51dbb0ed7e9bf19234d8947d8537c2140 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 11:28:24 +0800 Subject: [PATCH 179/337] Refactor code --- cmd/open_im_api/main.go | 4 ++-- pkg/base_info/group_api_struct.go | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index ea550d174..510d8cf55 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -53,8 +53,8 @@ func main() { groupRouterGroup.POST("/quit_group", group.QuitGroup) //1 groupRouterGroup.POST("/group_application_response", group.ApplicationGroupResponse) groupRouterGroup.POST("/transfer_group", group.TransferGroupOwner) - groupRouterGroup.POST("/get_group_applicationList", group.GetGroupApplicationList) - groupRouterGroup.POST("/get_groups_info", group.GetGroupsInfo) + groupRouterGroup.POST("/get_group_applicationList", group.GetGroupApplicationList) //1 + groupRouterGroup.POST("/get_groups_info", group.GetGroupsInfo) //1 groupRouterGroup.POST("/kick_group", group.KickGroupMember) groupRouterGroup.POST("/get_group_member_list", group.GetGroupMemberList) groupRouterGroup.POST("/get_group_all_member_list", group.GetGroupAllMember) diff --git a/pkg/base_info/group_api_struct.go b/pkg/base_info/group_api_struct.go index e502ee10d..af109afdb 100644 --- a/pkg/base_info/group_api_struct.go +++ b/pkg/base_info/group_api_struct.go @@ -108,20 +108,20 @@ type GetGroupInfoResp struct { } type ApplicationGroupResponseReq struct { - OperationID string `json:"groupIDList" binding:"required"` - GroupID string `json:"groupIDList" binding:"required"` - FromUserID string `json:"groupIDList" binding:"required"` - HandledMsg string `json:"groupIDList" binding:"required"` - HandleResult int32 `json:"groupIDList" binding:"required"` + OperationID string `json:"operationID" binding:"required"` + GroupID string `json:"groupID" binding:"required"` + FromUserID string `json:"fromUserID" binding:"required"` + HandledMsg string `json:"handledMsg"` + HandleResult int32 `json:"handleResult" binding:"required"` } type ApplicationGroupResponseResp struct { CommResp } type JoinGroupReq struct { - GroupID string `json:"groupID"` + GroupID string `json:"groupID" binding:"required"` ReqMessage string `json:"reqMessage"` - OperationID string `json:"operationID"` + OperationID string `json:"operationID" binding:"required"` } type JoinGroupResp struct { CommResp From bd0596dd86dabdb8f2162fd34c17f1eeed73fbc5 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 30 Dec 2021 11:35:48 +0800 Subject: [PATCH 180/337] err log --- internal/rpc/user/user.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index 49f800242..910c9b5ab 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -150,6 +150,7 @@ func (s *userServer) DeleteUsers(_ context.Context, req *pbUser.DeleteUsersReq) for _, userID := range req.DeleteUserIDList { err := imdb.DeleteUser(userID) if err != nil { + log.NewError(req.OperationID, "delete user error", userID) common.ErrCode = 201 common.ErrMsg = "some uid deleted failed" resp.FailedUserIDList = append(resp.FailedUserIDList, userID) From 81aaa951705f5ef6866576d82f3a2617a4528bf3 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 11:42:10 +0800 Subject: [PATCH 181/337] Refactor code --- internal/api/group/group.go | 6 +++--- internal/rpc/group/group.go | 9 +++------ pkg/base_info/group_api_struct.go | 4 ++-- pkg/common/constant/constant.go | 3 +++ 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/internal/api/group/group.go b/internal/api/group/group.go index 9401304cb..c7297e083 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -338,7 +338,7 @@ func ApplicationGroupResponse(c *gin.Context) { return } req := &rpc.GroupApplicationResponseReq{} - utils.CopyStructFields(req, params) + utils.CopyStructFields(req, ¶ms) var ok bool ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { @@ -357,9 +357,9 @@ func ApplicationGroupResponse(c *gin.Context) { return } - resp := api.CommResp{ErrCode: reply.CommonResp.ErrCode, ErrMsg: reply.CommonResp.ErrMsg} - c.JSON(http.StatusOK, resp) + resp := api.ApplicationGroupResponseResp{CommResp: api.CommResp{ErrCode: reply.CommonResp.ErrCode, ErrMsg: reply.CommonResp.ErrMsg}} log.NewInfo(req.OperationID, "ApplicationGroupResponse api return ", resp) + c.JSON(http.StatusOK, resp) } func JoinGroup(c *gin.Context) { diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 7a7dd5cf1..e737fb163 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -432,23 +432,20 @@ func (s *groupServer) GroupApplicationResponse(_ context.Context, req *pbGroup.G log.NewInfo(req.OperationID, "GroupApplicationResponse args ", req.String()) groupRequest := imdb.GroupRequest{} + utils.CopyStructFields(&groupRequest, req) groupRequest.UserID = req.FromUserID - groupRequest.GroupID = req.GroupID - groupRequest.HandledTime = time.Now() - groupRequest.HandleResult = req.HandleResult groupRequest.HandleUserID = req.OpUserID - groupRequest.HandledMsg = req.HandledMsg err := imdb.UpdateGroupRequest(groupRequest) if err != nil { log.NewError(req.OperationID, "GroupApplicationResponse failed ", err.Error(), req.String()) return &pbGroup.GroupApplicationResponseResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } chat.ApplicationProcessedNotification(req) - if req.HandleResult == 1 { + if req.HandleResult == constant.GroupResponseAgree { chat.MemberEnterNotification(req) } - log.NewInfo(req.OperationID, "rpc GroupApplicationResponse return ") + log.NewInfo(req.OperationID, "rpc GroupApplicationResponse return ", pbGroup.GroupApplicationResponseResp{CommonResp: &pbGroup.CommonResp{}}) return &pbGroup.GroupApplicationResponseResp{CommonResp: &pbGroup.CommonResp{}}, nil } diff --git a/pkg/base_info/group_api_struct.go b/pkg/base_info/group_api_struct.go index af109afdb..f6a5ef86f 100644 --- a/pkg/base_info/group_api_struct.go +++ b/pkg/base_info/group_api_struct.go @@ -110,9 +110,9 @@ type GetGroupInfoResp struct { type ApplicationGroupResponseReq struct { OperationID string `json:"operationID" binding:"required"` GroupID string `json:"groupID" binding:"required"` - FromUserID string `json:"fromUserID" binding:"required"` + FromUserID string `json:"fromUserID" binding:"required"` //application from FromUserID HandledMsg string `json:"handledMsg"` - HandleResult int32 `json:"handleResult" binding:"required"` + HandleResult int32 `json:"handleResult" binding:"required, oneof=-1 1"` } type ApplicationGroupResponseResp struct { CommResp diff --git a/pkg/common/constant/constant.go b/pkg/common/constant/constant.go index aa2f12c45..636096176 100644 --- a/pkg/common/constant/constant.go +++ b/pkg/common/constant/constant.go @@ -125,6 +125,9 @@ const ( GroupOwner = 2 GroupAdmin = 3 + GroupResponseAgree = 1 + GroupResponseRefuse = -1 + Male = 1 Female = 2 ) From 6790d2be44aa9776fc9b12bb2a158009a799288e Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 30 Dec 2021 11:50:20 +0800 Subject: [PATCH 182/337] err log --- internal/rpc/user/user.go | 4 ++-- pkg/common/db/mysql_model/im_mysql_model/user_model.go | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index 910c9b5ab..bcdea833f 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -148,8 +148,8 @@ func (s *userServer) DeleteUsers(_ context.Context, req *pbUser.DeleteUsersReq) var common pbUser.CommonResp resp := pbUser.DeleteUsersResp{CommonResp: &common} for _, userID := range req.DeleteUserIDList { - err := imdb.DeleteUser(userID) - if err != nil { + i := imdb.DeleteUser(userID) + if i == 0 { log.NewError(req.OperationID, "delete user error", userID) common.ErrCode = 201 common.ErrMsg = "some uid deleted failed" diff --git a/pkg/common/db/mysql_model/im_mysql_model/user_model.go b/pkg/common/db/mysql_model/im_mysql_model/user_model.go index 42d573b5e..6c9069558 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/user_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/user_model.go @@ -62,13 +62,13 @@ func UserRegister(user User) error { // CreateTime time.Time `gorm:"column:create_time"` //} -func DeleteUser(userID string) error { +func DeleteUser(userID string) (i int64) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { - return err + return 0 } - err = dbConn.Table("user").Where("user_id=?", userID).Delete(User{}).Error - return err + i = dbConn.Table("user").Where("user_id=?", userID).Delete(User{}).RowsAffected + return i } func GetUserByUserID(userID string) (*User, error) { From 097144528968c36687a59c67661a8f19209ca453 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 11:53:50 +0800 Subject: [PATCH 183/337] Refactor code --- pkg/base_info/group_api_struct.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkg/base_info/group_api_struct.go b/pkg/base_info/group_api_struct.go index f6a5ef86f..9611dfac0 100644 --- a/pkg/base_info/group_api_struct.go +++ b/pkg/base_info/group_api_struct.go @@ -108,11 +108,12 @@ type GetGroupInfoResp struct { } type ApplicationGroupResponseReq struct { - OperationID string `json:"operationID" binding:"required"` - GroupID string `json:"groupID" binding:"required"` - FromUserID string `json:"fromUserID" binding:"required"` //application from FromUserID - HandledMsg string `json:"handledMsg"` - HandleResult int32 `json:"handleResult" binding:"required, oneof=-1 1"` + OperationID string `json:"operationID" binding:"required"` + GroupID string `json:"groupID" binding:"required"` + FromUserID string `json:"fromUserID" binding:"required"` //application from FromUserID + HandledMsg string `json:"handledMsg"` + //`json:"flag" binding:"required,oneof=-1 0 1"` + HandleResult int32 `json:"handleResult" binding:"required,oneof=-1 1"` } type ApplicationGroupResponseResp struct { CommResp From 4336a1a13e4950ab16c13c62f4d76fc7cf60cced Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 12:05:10 +0800 Subject: [PATCH 184/337] Refactor code --- internal/rpc/group/group.go | 5 +++++ pkg/base_info/group_api_struct.go | 11 +++++------ .../im_mysql_model/group_member_model.go | 13 +++++++++++++ 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index e737fb163..306c409d1 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -435,6 +435,11 @@ func (s *groupServer) GroupApplicationResponse(_ context.Context, req *pbGroup.G utils.CopyStructFields(&groupRequest, req) groupRequest.UserID = req.FromUserID groupRequest.HandleUserID = req.OpUserID + + if !token_verify.IsMangerUserID(req.OpUserID) && !imdb.IsGroupOwnerAdmin(req.GroupID, req.OpUserID) { + log.NewError(req.OperationID, "IsMangerUserID IsGroupOwnerAdmin false ", req.GroupID, req.OpUserID) + return &pbGroup.GroupApplicationResponseResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil + } err := imdb.UpdateGroupRequest(groupRequest) if err != nil { log.NewError(req.OperationID, "GroupApplicationResponse failed ", err.Error(), req.String()) diff --git a/pkg/base_info/group_api_struct.go b/pkg/base_info/group_api_struct.go index 9611dfac0..fd4c8206b 100644 --- a/pkg/base_info/group_api_struct.go +++ b/pkg/base_info/group_api_struct.go @@ -108,12 +108,11 @@ type GetGroupInfoResp struct { } type ApplicationGroupResponseReq struct { - OperationID string `json:"operationID" binding:"required"` - GroupID string `json:"groupID" binding:"required"` - FromUserID string `json:"fromUserID" binding:"required"` //application from FromUserID - HandledMsg string `json:"handledMsg"` - //`json:"flag" binding:"required,oneof=-1 0 1"` - HandleResult int32 `json:"handleResult" binding:"required,oneof=-1 1"` + OperationID string `json:"operationID" binding:"required"` + GroupID string `json:"groupID" binding:"required"` + FromUserID string `json:"fromUserID" binding:"required"` //application from FromUserID + HandledMsg string `json:"handledMsg"` + HandleResult int32 `json:"handleResult" binding:"required,oneof=-1 1"` } type ApplicationGroupResponseResp struct { CommResp diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go index 7e4afb402..95f4c5723 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go @@ -210,6 +210,19 @@ func GetJoinedGroupIDListByUserID(userID string) ([]string, error) { return groupIDList, nil } +func IsGroupOwnerAdmin(groupID, UserID string) bool { + groupMemberList, err := GetOwnerManagerByGroupID(groupID) + if err != nil { + return false + } + for _, v := range groupMemberList { + if v.UserID == UserID && v.RoleLevel > constant.GroupOrdinaryUsers { + return true + } + } + return false +} + // //func SelectGroupList(groupID string) ([]string, error) { // var groupUserID string From 7574d06718cf256f622b1187c9777950d9ccd06e Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 12:07:13 +0800 Subject: [PATCH 185/337] Refactor code --- .../db/mysql_model/im_mysql_model/group_request_model.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go index 5c7d3000b..307dac166 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go @@ -24,16 +24,15 @@ func UpdateGroupRequest(groupRequest GroupRequest) error { if err != nil { return err } - if groupRequest.HandledTime.Unix() < 0 { groupRequest.HandledTime = utils.UnixSecondToTime(0) } - + t := dbConn.Table("group_request").Where("group_id=? and user_id=?", groupRequest.GroupID, groupRequest.UserID).Update(&groupRequest) //RowsAffected - if dbConn.Table("group_request").Where("group_id=? and user_id=?", groupRequest.GroupID, groupRequest.UserID).Update(&groupRequest).RowsAffected == 0 { + if t.RowsAffected == 0 { return InsertIntoGroupRequest(groupRequest) } else { - return nil + return t.Error } } From 89d69a8fb60a95030edae1900633c95932246165 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 12:27:26 +0800 Subject: [PATCH 186/337] Refactor code --- internal/api/group/group.go | 2 ++ internal/rpc/group/group.go | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/internal/api/group/group.go b/internal/api/group/group.go index c7297e083..a7a7b86a3 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -3,6 +3,8 @@ package group import ( api "Open_IM/pkg/base_info" "Open_IM/pkg/common/config" + "Open_IM/pkg/common/constant" + imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" "Open_IM/pkg/common/log" "Open_IM/pkg/common/token_verify" "Open_IM/pkg/grpc-etcdv3/getcdv3" diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 306c409d1..8599ee6c2 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -447,6 +447,28 @@ func (s *groupServer) GroupApplicationResponse(_ context.Context, req *pbGroup.G } chat.ApplicationProcessedNotification(req) if req.HandleResult == constant.GroupResponseAgree { + + if req.HandleResult == constant.GroupResponseAgree { + user, err := imdb.GetUserByUserID(req.FromUserID) + if err != nil { + log.NewError(req.OperationID, "GroupApplicationResponse failed ", err.Error(), req.FromUserID) + return &pbGroup.GroupApplicationResponseResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil + } + member := imdb.GroupMember{} + member.GroupID = req.GroupID + member.UserID = req.FromUserID + member.RoleLevel = constant.GroupOrdinaryUsers + member.OperatorUserID = req.OpUserID + member.FaceUrl = user.FaceUrl + member.Nickname = user.Nickname + + err = imdb.InsertIntoGroupMember(member) + if err != nil { + log.NewError(req.OperationID, "GroupApplicationResponse failed ", err.Error(), req.FromUserID) + return &pbGroup.GroupApplicationResponseResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil + } + } + chat.MemberEnterNotification(req) } From 0db7aca1cd1f7560d02968a5c8136036571f411a Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 12:29:27 +0800 Subject: [PATCH 187/337] Refactor code --- internal/rpc/group/group.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 8599ee6c2..de1708140 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -464,11 +464,10 @@ func (s *groupServer) GroupApplicationResponse(_ context.Context, req *pbGroup.G err = imdb.InsertIntoGroupMember(member) if err != nil { - log.NewError(req.OperationID, "GroupApplicationResponse failed ", err.Error(), req.FromUserID) + log.NewError(req.OperationID, "GroupApplicationResponse failed ", err.Error(), member) return &pbGroup.GroupApplicationResponseResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } } - chat.MemberEnterNotification(req) } From 1eee8f439bd80111ce9868f90b81b72be2f7ca5d Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 12:30:30 +0800 Subject: [PATCH 188/337] Refactor code --- internal/api/group/group.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/internal/api/group/group.go b/internal/api/group/group.go index a7a7b86a3..c7297e083 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -3,8 +3,6 @@ package group import ( api "Open_IM/pkg/base_info" "Open_IM/pkg/common/config" - "Open_IM/pkg/common/constant" - imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" "Open_IM/pkg/common/log" "Open_IM/pkg/common/token_verify" "Open_IM/pkg/grpc-etcdv3/getcdv3" From 1392a8ecf137924f070b618af137dbaeac76c5a4 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 13:26:07 +0800 Subject: [PATCH 189/337] Refactor code --- internal/rpc/group/group.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index de1708140..48db23fc7 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -442,7 +442,7 @@ func (s *groupServer) GroupApplicationResponse(_ context.Context, req *pbGroup.G } err := imdb.UpdateGroupRequest(groupRequest) if err != nil { - log.NewError(req.OperationID, "GroupApplicationResponse failed ", err.Error(), req.String()) + log.NewError(req.OperationID, "GroupApplicationResponse failed ", err.Error(), groupRequest) return &pbGroup.GroupApplicationResponseResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } chat.ApplicationProcessedNotification(req) From 288f25c82703b7756c976aa2cf5c992ba15fd570 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 13:29:32 +0800 Subject: [PATCH 190/337] Refactor code --- internal/rpc/group/group.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 48db23fc7..b42badca2 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -435,13 +435,14 @@ func (s *groupServer) GroupApplicationResponse(_ context.Context, req *pbGroup.G utils.CopyStructFields(&groupRequest, req) groupRequest.UserID = req.FromUserID groupRequest.HandleUserID = req.OpUserID - + groupRequest.HandledTime = time.Now() if !token_verify.IsMangerUserID(req.OpUserID) && !imdb.IsGroupOwnerAdmin(req.GroupID, req.OpUserID) { log.NewError(req.OperationID, "IsMangerUserID IsGroupOwnerAdmin false ", req.GroupID, req.OpUserID) return &pbGroup.GroupApplicationResponseResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil } err := imdb.UpdateGroupRequest(groupRequest) if err != nil { + //{openIM002 7836e478bc43ce1d3b8889cac983f59b 1 ok 0001-01-01 00:00:00 +0000 UTC openIM001 0001-01-01 00:00:00 +0000 UTC } log.NewError(req.OperationID, "GroupApplicationResponse failed ", err.Error(), groupRequest) return &pbGroup.GroupApplicationResponseResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } From 2f62339f0c5163c08dd87da04ae14256426c4a88 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 13:39:36 +0800 Subject: [PATCH 191/337] Refactor code --- cmd/open_im_api/main.go | 10 +++++----- internal/api/group/group.go | 7 ++++--- internal/rpc/group/group.go | 8 +++++--- pkg/base_info/group_api_struct.go | 3 +++ 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index 510d8cf55..a3a2c2c40 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -47,11 +47,11 @@ func main() { //group related routing group groupRouterGroup := r.Group("/group") { - groupRouterGroup.POST("/create_group", group.CreateGroup) //1 - groupRouterGroup.POST("/set_group_info", group.SetGroupInfo) //1 - groupRouterGroup.POST("join_group", group.JoinGroup) //1 - groupRouterGroup.POST("/quit_group", group.QuitGroup) //1 - groupRouterGroup.POST("/group_application_response", group.ApplicationGroupResponse) + groupRouterGroup.POST("/create_group", group.CreateGroup) //1 + groupRouterGroup.POST("/set_group_info", group.SetGroupInfo) //1 + groupRouterGroup.POST("join_group", group.JoinGroup) //1 + groupRouterGroup.POST("/quit_group", group.QuitGroup) //1 + groupRouterGroup.POST("/group_application_response", group.ApplicationGroupResponse) //1 groupRouterGroup.POST("/transfer_group", group.TransferGroupOwner) groupRouterGroup.POST("/get_group_applicationList", group.GetGroupApplicationList) //1 groupRouterGroup.POST("/get_groups_info", group.GetGroupsInfo) //1 diff --git a/internal/api/group/group.go b/internal/api/group/group.go index c7297e083..7fe82b1fe 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -464,7 +464,7 @@ func TransferGroupOwner(c *gin.Context) { return } req := &rpc.TransferGroupOwnerReq{} - utils.CopyStructFields(req, params) + utils.CopyStructFields(req, ¶ms) var ok bool ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { @@ -483,7 +483,8 @@ func TransferGroupOwner(c *gin.Context) { return } - resp := api.CommResp{ErrCode: reply.CommonResp.ErrCode, ErrMsg: reply.CommonResp.ErrMsg} - c.JSON(http.StatusOK, resp) + resp := api.TransferGroupOwnerResp{CommResp: api.CommResp{ErrCode: reply.CommonResp.ErrCode, ErrMsg: reply.CommonResp.ErrMsg}} log.NewInfo(req.OperationID, "TransferGroupOwner api return ", resp) + c.JSON(http.StatusOK, resp) + } diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index b42badca2..fe34a7735 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -595,17 +595,19 @@ func (s *groupServer) TransferGroupOwner(_ context.Context, req *pbGroup.Transfe log.NewInfo(req.OperationID, "TransferGroupOwner ", req.String()) if req.OldOwnerUserID == req.NewOwnerUserID { - log.NewError(req.OperationID, "same owner ", req.String()) + log.NewError(req.OperationID, "same owner ", req.OldOwnerUserID, req.NewOwnerUserID) return &pbGroup.TransferGroupOwnerResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrArgs.ErrCode, ErrMsg: constant.ErrArgs.ErrMsg}}, nil } - groupMemberInfo := imdb.GroupMember{GroupID: req.GroupID, UserID: req.OldOwnerUserID, RoleLevel: 0} + groupMemberInfo := imdb.GroupMember{GroupID: req.GroupID, UserID: req.OldOwnerUserID, RoleLevel: constant.GroupOrdinaryUsers} err := imdb.UpdateGroupMemberInfo(groupMemberInfo) if err != nil { + log.NewError(req.OperationID, "UpdateGroupMemberInfo failed ", groupMemberInfo) return &pbGroup.TransferGroupOwnerResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } - groupMemberInfo = imdb.GroupMember{GroupID: req.GroupID, UserID: req.NewOwnerUserID, RoleLevel: 1} + groupMemberInfo = imdb.GroupMember{GroupID: req.GroupID, UserID: req.NewOwnerUserID, RoleLevel: constant.GroupOwner} err = imdb.UpdateGroupMemberInfo(groupMemberInfo) if err != nil { + log.NewError(req.OperationID, "UpdateGroupMemberInfo failed ", groupMemberInfo) return &pbGroup.TransferGroupOwnerResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } changedType := int32(1) << 4 diff --git a/pkg/base_info/group_api_struct.go b/pkg/base_info/group_api_struct.go index fd4c8206b..f4c8fa666 100644 --- a/pkg/base_info/group_api_struct.go +++ b/pkg/base_info/group_api_struct.go @@ -149,3 +149,6 @@ type TransferGroupOwnerReq struct { NewOwnerUserID string `json:"newOwnerUserID" binding:"required"` OperationID string `json:"operationID" binding:"required"` } +type TransferGroupOwnerResp struct { + CommResp +} From 8b1a7def38f481eaf5b02e549353f0d15a7185cc Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 13:49:39 +0800 Subject: [PATCH 192/337] Refactor code --- internal/rpc/friend/firend.go | 2 +- internal/rpc/group/group.go | 2 +- .../mysql_model/im_mysql_model/friend_request_model.go | 9 +++------ 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/internal/rpc/friend/firend.go b/internal/rpc/friend/firend.go index 378f3a911..f548a21b6 100644 --- a/internal/rpc/friend/firend.go +++ b/internal/rpc/friend/firend.go @@ -146,7 +146,7 @@ func (s *friendServer) AddFriend(ctx context.Context, req *pbFriend.AddFriendReq utils.CopyStructFields(&friendRequest, req.CommID) // {openIM001 openIM002 0 test add friend 0001-01-01 00:00:00 +0000 UTC 0001-01-01 00:00:00 +0000 UTC }] log.NewDebug(req.CommID.OperationID, "UpdateFriendApplication args ", friendRequest) - err := imdb.UpdateFriendApplication(&friendRequest) + err := imdb.InsertFriendApplication(&friendRequest) if err != nil { log.NewError(req.CommID.OperationID, "UpdateFriendApplication failed ", err.Error(), friendRequest) return &pbFriend.AddFriendResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index fe34a7735..2c747466d 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -95,7 +95,7 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR } //to group member - groupMember := imdb.GroupMember{GroupID: groupId, RoleLevel: constant.GroupOwner} + groupMember := imdb.GroupMember{GroupID: groupId, RoleLevel: constant.GroupOwner, OperatorUserID: req.OpUserID} utils.CopyStructFields(&groupMember, us) err = im_mysql_model.InsertIntoGroupMember(groupMember) if err != nil { diff --git a/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go b/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go index a8973c2e2..5e99dcf5d 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go @@ -66,12 +66,9 @@ func UpdateFriendApplication(friendRequest *FriendRequest) error { return err } friendRequest.CreateTime = time.Now() - if dbConn.Table("friend_request").Where("from_user_id=? and to_user_id=?", - friendRequest.FromUserID, friendRequest.ToUserID).Update(&friendRequest).RowsAffected == 0 { - return InsertFriendApplication(friendRequest) - } else { - return nil - } + + return dbConn.Table("friend_request").Where("from_user_id=? and to_user_id=?", + friendRequest.FromUserID, friendRequest.ToUserID).Update(&friendRequest).Error } func InsertFriendApplication(friendRequest *FriendRequest) error { From 492915567b007426a8523d2620286a3ef32f3a92 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 13:53:05 +0800 Subject: [PATCH 193/337] Refactor code --- internal/rpc/group/group.go | 2 +- .../db/mysql_model/im_mysql_model/group_request_model.go | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 2c747466d..17228a4aa 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -489,7 +489,7 @@ func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq) groupRequest.ReqMsg = req.ReqMessage groupRequest.GroupID = req.GroupID - err = imdb.UpdateGroupRequest(groupRequest) + err = imdb.InsertIntoGroupRequest(groupRequest) if err != nil { log.NewError(req.OperationID, "UpdateGroupRequest ", err.Error(), groupRequest) return &pbGroup.JoinGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go index 307dac166..9ccffeaba 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go @@ -27,13 +27,7 @@ func UpdateGroupRequest(groupRequest GroupRequest) error { if groupRequest.HandledTime.Unix() < 0 { groupRequest.HandledTime = utils.UnixSecondToTime(0) } - t := dbConn.Table("group_request").Where("group_id=? and user_id=?", groupRequest.GroupID, groupRequest.UserID).Update(&groupRequest) - //RowsAffected - if t.RowsAffected == 0 { - return InsertIntoGroupRequest(groupRequest) - } else { - return t.Error - } + return dbConn.Table("group_request").Where("group_id=? and user_id=?", groupRequest.GroupID, groupRequest.UserID).Update(&groupRequest).Error } func InsertIntoGroupRequest(toInsertInfo GroupRequest) error { From a031311ab523058190c5507a534b54a4eba4a708 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 14:03:55 +0800 Subject: [PATCH 194/337] Refactor code --- cmd/open_im_api/main.go | 6 +++--- internal/api/group/group.go | 14 +++++++++----- internal/rpc/group/group.go | 3 ++- pkg/base_info/group_api_struct.go | 10 +++------- 4 files changed, 17 insertions(+), 16 deletions(-) diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index a3a2c2c40..a737d4162 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -52,9 +52,9 @@ func main() { groupRouterGroup.POST("join_group", group.JoinGroup) //1 groupRouterGroup.POST("/quit_group", group.QuitGroup) //1 groupRouterGroup.POST("/group_application_response", group.ApplicationGroupResponse) //1 - groupRouterGroup.POST("/transfer_group", group.TransferGroupOwner) - groupRouterGroup.POST("/get_group_applicationList", group.GetGroupApplicationList) //1 - groupRouterGroup.POST("/get_groups_info", group.GetGroupsInfo) //1 + groupRouterGroup.POST("/transfer_group", group.TransferGroupOwner) //1 + groupRouterGroup.POST("/get_group_applicationList", group.GetGroupApplicationList) //1 + groupRouterGroup.POST("/get_groups_info", group.GetGroupsInfo) //1 groupRouterGroup.POST("/kick_group", group.KickGroupMember) groupRouterGroup.POST("/get_group_member_list", group.GetGroupMemberList) groupRouterGroup.POST("/get_group_all_member_list", group.GetGroupAllMember) diff --git a/internal/api/group/group.go b/internal/api/group/group.go index 7fe82b1fe..790836089 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -24,7 +24,7 @@ func KickGroupMember(c *gin.Context) { } req := &rpc.KickGroupMemberReq{} - utils.CopyStructFields(req, params) + utils.CopyStructFields(req, ¶ms) var ok bool ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { @@ -39,7 +39,7 @@ func KickGroupMember(c *gin.Context) { client := rpc.NewGroupClient(etcdConn) RpcResp, err := client.KickGroupMember(context.Background(), req) if err != nil { - log.NewError(req.OperationID, "GetGroupMemberList failed ", err.Error()) + log.NewError(req.OperationID, "GetGroupMemberList failed ", err.Error(), req.String()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) return } @@ -48,8 +48,12 @@ func KickGroupMember(c *gin.Context) { memberListResp.ErrMsg = RpcResp.ErrMsg memberListResp.ErrCode = RpcResp.ErrCode for _, v := range RpcResp.Id2ResultList { - memberListResp.Data = append(memberListResp.Data, &api.Id2Result{UserID: v.UserID, Result: v.Result}) + memberListResp.UserIDResultList = append(memberListResp.UserIDResultList, &api.UserIDResult{UserID: v.UserID, Result: v.Result}) } + if len(memberListResp.UserIDResultList) == 0 { + memberListResp.UserIDResultList = []*api.UserIDResult{} + } + log.NewInfo(req.OperationID, "KickGroupMember api return ", memberListResp) c.JSON(http.StatusOK, memberListResp) } @@ -180,7 +184,7 @@ func GetJoinedGroupList(c *gin.Context) { return } - GroupListResp := api.GetJoinedGroupListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, Data: RpcResp.GroupList} + GroupListResp := api.GetJoinedGroupListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, GroupInfoList: RpcResp.GroupList} c.JSON(http.StatusOK, GroupListResp) log.NewInfo(req.OperationID, "GetJoinedGroupList api return ", GroupListResp) } @@ -214,7 +218,7 @@ func InviteUserToGroup(c *gin.Context) { Resp := api.InviteUserToGroupResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}} for _, v := range RpcResp.Id2ResultList { - Resp.Data = append(Resp.Data, api.Id2Result{UserID: v.UserID, Result: v.Result}) + Resp.UserIDResultList = append(Resp.UserIDResultList, api.UserIDResult{UserID: v.UserID, Result: v.Result}) } c.JSON(http.StatusOK, Resp) log.NewInfo(req.OperationID, "InviteUserToGroup api return ", Resp) diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 17228a4aa..525c4422f 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -300,7 +300,7 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou ownerList, err := imdb.GetOwnerManagerByGroupID(req.GroupID) if err != nil { log.NewError(req.OperationID, "GetOwnerManagerByGroupId failed ", err.Error(), req.GroupID) - return &pbGroup.KickGroupMemberResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}, nil + return &pbGroup.KickGroupMemberResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil } //op is group owner? var flag = 0 @@ -352,6 +352,7 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou log.NewError(req.OperationID, "RemoveGroupMember failed ", err.Error(), req.GroupID, v) resp.Id2ResultList = append(resp.Id2ResultList, &pbGroup.Id2Result{UserID: v, Result: -1}) } else { + log.NewDebug(req.OperationID, "kicked ", v) resp.Id2ResultList = append(resp.Id2ResultList, &pbGroup.Id2Result{UserID: v, Result: 0}) okUserIDList = append(okUserIDList, v) } diff --git a/pkg/base_info/group_api_struct.go b/pkg/base_info/group_api_struct.go index f4c8fa666..7c14bb7b4 100644 --- a/pkg/base_info/group_api_struct.go +++ b/pkg/base_info/group_api_struct.go @@ -9,10 +9,6 @@ type CommResp struct { ErrCode int32 `json:"errCode"` ErrMsg string `json:"errMsg"` } -type Id2Result struct { - UserID string `json:"userID"` - Result int32 `json:"result"` -} type KickGroupMemberReq struct { GroupID string `json:"groupID" binding:"required"` @@ -22,7 +18,7 @@ type KickGroupMemberReq struct { } type KickGroupMemberResp struct { CommResp - Data []*Id2Result `json:"data"` + UserIDResultList []*UserIDResult `json:"data"` } type GetGroupMembersInfoReq struct { @@ -43,7 +39,7 @@ type InviteUserToGroupReq struct { } type InviteUserToGroupResp struct { CommResp - Data []Id2Result `json:"data"` + UserIDResultList []UserIDResult `json:"data"` } type GetJoinedGroupListReq struct { @@ -52,7 +48,7 @@ type GetJoinedGroupListReq struct { } type GetJoinedGroupListResp struct { CommResp - Data []*open_im_sdk.GroupInfo `json:"data"` + GroupInfoList []*open_im_sdk.GroupInfo `json:"data"` } type GetGroupMemberListReq struct { From 6d0f454e6aede1583ff5e05fd5d7dceeff13439e Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 14:17:29 +0800 Subject: [PATCH 195/337] Refactor code --- cmd/open_im_api/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index a737d4162..f2a0a7793 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -55,7 +55,7 @@ func main() { groupRouterGroup.POST("/transfer_group", group.TransferGroupOwner) //1 groupRouterGroup.POST("/get_group_applicationList", group.GetGroupApplicationList) //1 groupRouterGroup.POST("/get_groups_info", group.GetGroupsInfo) //1 - groupRouterGroup.POST("/kick_group", group.KickGroupMember) + groupRouterGroup.POST("/kick_group", group.KickGroupMember) //1 groupRouterGroup.POST("/get_group_member_list", group.GetGroupMemberList) groupRouterGroup.POST("/get_group_all_member_list", group.GetGroupAllMember) groupRouterGroup.POST("/get_group_members_info", group.GetGroupMembersInfo) From bd14e5019f5972bd048cdf82804858ef7e6ead60 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 16:19:06 +0800 Subject: [PATCH 196/337] Refactor code --- cmd/open_im_api/main.go | 10 +++++----- internal/api/group/group.go | 10 +++++----- pkg/base_info/group_api_struct.go | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index f2a0a7793..8efc36ab1 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -38,11 +38,11 @@ func main() { friendRouterGroup.POST("/add_blacklist", friend.AddBlacklist) //1 friendRouterGroup.POST("/get_blacklist", friend.GetBlacklist) //1 friendRouterGroup.POST("/remove_blacklist", friend.RemoveBlacklist) //1 - friendRouterGroup.POST("/delete_friend", friend.DeleteFriend) - friendRouterGroup.POST("/add_friend_response", friend.AddFriendResponse) //1 - friendRouterGroup.POST("/set_friend_remark", friend.SetFriendRemark) //1 - friendRouterGroup.POST("/is_friend", friend.IsFriend) //1 - friendRouterGroup.POST("/import_friend", friend.ImportFriend) //1 + friendRouterGroup.POST("/delete_friend", friend.DeleteFriend) //1 + friendRouterGroup.POST("/add_friend_response", friend.AddFriendResponse) //1 + friendRouterGroup.POST("/set_friend_remark", friend.SetFriendRemark) //1 + friendRouterGroup.POST("/is_friend", friend.IsFriend) //1 + friendRouterGroup.POST("/import_friend", friend.ImportFriend) //1 } //group related routing group groupRouterGroup := r.Group("/group") diff --git a/internal/api/group/group.go b/internal/api/group/group.go index 790836089..f400154aa 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -197,7 +197,7 @@ func InviteUserToGroup(c *gin.Context) { return } req := &rpc.InviteUserToGroupReq{} - utils.CopyStructFields(req, params) + utils.CopyStructFields(req, ¶ms) var ok bool ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { @@ -216,12 +216,12 @@ func InviteUserToGroup(c *gin.Context) { return } - Resp := api.InviteUserToGroupResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}} + resp := api.InviteUserToGroupResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}} for _, v := range RpcResp.Id2ResultList { - Resp.UserIDResultList = append(Resp.UserIDResultList, api.UserIDResult{UserID: v.UserID, Result: v.Result}) + resp.UserIDResultList = append(resp.UserIDResultList, api.UserIDResult{UserID: v.UserID, Result: v.Result}) } - c.JSON(http.StatusOK, Resp) - log.NewInfo(req.OperationID, "InviteUserToGroup api return ", Resp) + c.JSON(http.StatusOK, resp) + log.NewInfo(req.OperationID, "InviteUserToGroup api return ", resp) } func CreateGroup(c *gin.Context) { diff --git a/pkg/base_info/group_api_struct.go b/pkg/base_info/group_api_struct.go index 7c14bb7b4..690506146 100644 --- a/pkg/base_info/group_api_struct.go +++ b/pkg/base_info/group_api_struct.go @@ -33,7 +33,7 @@ type GetGroupMembersInfoResp struct { type InviteUserToGroupReq struct { GroupID string `json:"groupID" binding:"required"` - InvitedUserIDList []string `json:"uidList" binding:"required"` + InvitedUserIDList []string `json:"invitedUserIDList" binding:"required"` Reason string `json:"reason"` OperationID string `json:"operationID" binding:"required"` } From a0f28c07f2f7c1e7b829dade4bde945edadf97a0 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 16:24:37 +0800 Subject: [PATCH 197/337] Refactor code --- internal/rpc/group/group.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 525c4422f..80b871851 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -226,6 +226,7 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite utils.CopyStructFields(&toInsertInfo, toUserInfo) toInsertInfo.GroupID = req.GroupID toInsertInfo.RoleLevel = constant.GroupOrdinaryUsers + toInsertInfo.OperatorUserID = req.OpUserID err = imdb.InsertIntoGroupMember(toInsertInfo) if err != nil { log.NewError(req.OperationID, "InsertIntoGroupMember failed ", req.GroupID, toUserInfo.UserID, toUserInfo.Nickname, toUserInfo.FaceUrl) From 93e669d7d3b36623e5f9e61e055d9b41d7f466a2 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 16:27:57 +0800 Subject: [PATCH 198/337] Refactor code --- cmd/open_im_api/main.go | 2 +- internal/api/group/group.go | 7 +++++-- pkg/base_info/group_api_struct.go | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index 8efc36ab1..8afb38d63 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -59,7 +59,7 @@ func main() { groupRouterGroup.POST("/get_group_member_list", group.GetGroupMemberList) groupRouterGroup.POST("/get_group_all_member_list", group.GetGroupAllMember) groupRouterGroup.POST("/get_group_members_info", group.GetGroupMembersInfo) - groupRouterGroup.POST("/invite_user_to_group", group.InviteUserToGroup) + groupRouterGroup.POST("/invite_user_to_group", group.InviteUserToGroup) //1 groupRouterGroup.POST("/get_joined_group_list", group.GetJoinedGroupList) } //certificate diff --git a/internal/api/group/group.go b/internal/api/group/group.go index f400154aa..0238df400 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -120,9 +120,12 @@ func GetGroupMemberList(c *gin.Context) { return } - memberListResp := api.GetGroupMemberListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, Data: RpcResp.MemberList, NextSeq: RpcResp.NextSeq} - c.JSON(http.StatusOK, memberListResp) + memberListResp := api.GetGroupMemberListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, MemberList: RpcResp.MemberList, NextSeq: RpcResp.NextSeq} + if len(memberListResp.MemberList) == 0 { + memberListResp.MemberList = []*open_im_sdk.GroupMemberFullInfo{} + } log.NewInfo(req.OperationID, "GetGroupMemberList api return ", memberListResp) + c.JSON(http.StatusOK, memberListResp) } func GetGroupAllMember(c *gin.Context) { diff --git a/pkg/base_info/group_api_struct.go b/pkg/base_info/group_api_struct.go index 690506146..3bfa090d5 100644 --- a/pkg/base_info/group_api_struct.go +++ b/pkg/base_info/group_api_struct.go @@ -59,8 +59,8 @@ type GetGroupMemberListReq struct { } type GetGroupMemberListResp struct { CommResp - NextSeq int32 `json:"nextSeq"` - Data []*open_im_sdk.GroupMemberFullInfo `json:"data"` + NextSeq int32 `json:"nextSeq"` + MemberList []*open_im_sdk.GroupMemberFullInfo `json:"data"` } type GetGroupAllMemberReq struct { From ccecd8f4f08ecadb9e8aca58e36e552abd6cdac5 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 16:30:13 +0800 Subject: [PATCH 199/337] Refactor code --- internal/rpc/group/group.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 80b871851..e2327a78b 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -269,7 +269,7 @@ func (s *groupServer) GetGroupAllMember(ctx context.Context, req *pbGroup.GetGro } func (s *groupServer) GetGroupMemberList(ctx context.Context, req *pbGroup.GetGroupMemberListReq) (*pbGroup.GetGroupMemberListResp, error) { - log.NewInfo(req.OperationID, "GetGroupMemberList, args ", req.String()) + log.NewInfo(req.OperationID, "GetGroupMemberList args ", req.String()) var resp pbGroup.GetGroupMemberListResp memberList, err := imdb.GetGroupMemberByGroupID(req.GroupID, req.Filter, req.NextSeq, 30) if err != nil { @@ -281,7 +281,7 @@ func (s *groupServer) GetGroupMemberList(ctx context.Context, req *pbGroup.GetGr for _, v := range memberList { var node open_im_sdk.GroupMemberFullInfo - utils.CopyStructFields(&node, v) + utils.CopyStructFields(&node, &v) resp.MemberList = append(resp.MemberList, &node) } //db operate get db sorted by join time From 7301bc30b15864668541429cf5ca120c3bcffcce Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 30 Dec 2021 16:53:06 +0800 Subject: [PATCH 200/337] add null value handle --- cmd/open_im_api/main.go | 14 +++++++------- internal/api/group/group.go | 4 +++- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index 510d8cf55..b55486522 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -84,18 +84,18 @@ func main() { //Manager managementGroup := r.Group("/manager") { - managementGroup.POST("/delete_user", manage.DeleteUser) + managementGroup.POST("/delete_user", manage.DeleteUser) //1 managementGroup.POST("/send_msg", manage.ManagementSendMsg) - managementGroup.POST("/get_all_users_uid", manage.GetAllUsersUid) - managementGroup.POST("/account_check", manage.AccountCheck) - managementGroup.POST("/get_users_online_status", manage.GetUsersOnlineStatus) + managementGroup.POST("/get_all_users_uid", manage.GetAllUsersUid) //1 + managementGroup.POST("/account_check", manage.AccountCheck) //1 + managementGroup.POST("/get_users_online_status", manage.GetUsersOnlineStatus) //1 } //Conversation conversationGroup := r.Group("/conversation") { - conversationGroup.POST("/set_receive_message_opt", conversation.SetReceiveMessageOpt) - conversationGroup.POST("/get_receive_message_opt", conversation.GetReceiveMessageOpt) - conversationGroup.POST("/get_all_conversation_message_opt", conversation.GetAllConversationMessageOpt) + conversationGroup.POST("/set_receive_message_opt", conversation.SetReceiveMessageOpt) //1 + conversationGroup.POST("/get_receive_message_opt", conversation.GetReceiveMessageOpt) //1 + conversationGroup.POST("/get_all_conversation_message_opt", conversation.GetAllConversationMessageOpt) //1 } log.NewPrivateLog("api") diff --git a/internal/api/group/group.go b/internal/api/group/group.go index c7297e083..6f39e0223 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -181,6 +181,9 @@ func GetJoinedGroupList(c *gin.Context) { } GroupListResp := api.GetJoinedGroupListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, Data: RpcResp.GroupList} + if len(RpcResp.GroupList) == 0 { + GroupListResp.Data = []*open_im_sdk.GroupInfo{} + } c.JSON(http.StatusOK, GroupListResp) log.NewInfo(req.OperationID, "GetJoinedGroupList api return ", GroupListResp) } @@ -482,7 +485,6 @@ func TransferGroupOwner(c *gin.Context) { c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) return } - resp := api.CommResp{ErrCode: reply.CommonResp.ErrCode, ErrMsg: reply.CommonResp.ErrMsg} c.JSON(http.StatusOK, resp) log.NewInfo(req.OperationID, "TransferGroupOwner api return ", resp) From 1e9ef321f08eccad4206379f4cd9fe4779a66db9 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 17:27:11 +0800 Subject: [PATCH 201/337] Refactor code --- cmd/rpc/open_im_auth/main.go | 1 + internal/api/group/group.go | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/cmd/rpc/open_im_auth/main.go b/cmd/rpc/open_im_auth/main.go index ed4656d35..110ea05c6 100644 --- a/cmd/rpc/open_im_auth/main.go +++ b/cmd/rpc/open_im_auth/main.go @@ -10,4 +10,5 @@ func main() { flag.Parse() rpcServer := rpcAuth.NewRpcAuthServer(*rpcPort) rpcServer.Run() + } diff --git a/internal/api/group/group.go b/internal/api/group/group.go index 0238df400..02ea2aaa1 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -124,6 +124,16 @@ func GetGroupMemberList(c *gin.Context) { if len(memberListResp.MemberList) == 0 { memberListResp.MemberList = []*open_im_sdk.GroupMemberFullInfo{} } + /* + jsm := &jsonpb.Marshaler{ + OrigName: true, + EnumsAsInts: false, + EmitDefaults: true, + } + + var b bytes.Buffer + err = jsm.MarshalToString(memberListResp.MemberList[0]) + */ log.NewInfo(req.OperationID, "GetGroupMemberList api return ", memberListResp) c.JSON(http.StatusOK, memberListResp) } From 0c02afa54eaa9275629fe9c9133069d3b6770a9f Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 17:34:54 +0800 Subject: [PATCH 202/337] Refactor code --- cmd/open_im_api/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index 8afb38d63..b38e452fc 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -56,7 +56,7 @@ func main() { groupRouterGroup.POST("/get_group_applicationList", group.GetGroupApplicationList) //1 groupRouterGroup.POST("/get_groups_info", group.GetGroupsInfo) //1 groupRouterGroup.POST("/kick_group", group.KickGroupMember) //1 - groupRouterGroup.POST("/get_group_member_list", group.GetGroupMemberList) + groupRouterGroup.POST("/get_group_member_list", group.GetGroupMemberList) //no use groupRouterGroup.POST("/get_group_all_member_list", group.GetGroupAllMember) groupRouterGroup.POST("/get_group_members_info", group.GetGroupMembersInfo) groupRouterGroup.POST("/invite_user_to_group", group.InviteUserToGroup) //1 From 79a39b39d9cab69aa4c8e633cf3c55cf08bf4dc2 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 17:44:06 +0800 Subject: [PATCH 203/337] Refactor code --- internal/api/group/group.go | 9 ++++++--- internal/rpc/group/group.go | 2 +- pkg/base_info/group_api_struct.go | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/internal/api/group/group.go b/internal/api/group/group.go index 02ea2aaa1..6ce7412cd 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -146,7 +146,7 @@ func GetGroupAllMember(c *gin.Context) { return } req := &rpc.GetGroupAllMemberReq{} - utils.CopyStructFields(req, params) + utils.CopyStructFields(req, ¶ms) var ok bool ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { @@ -165,9 +165,12 @@ func GetGroupAllMember(c *gin.Context) { return } - memberListResp := api.GetGroupAllMemberResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, Data: RpcResp.MemberList} - c.JSON(http.StatusOK, memberListResp) + memberListResp := api.GetGroupAllMemberResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, MemberList: RpcResp.MemberList} + if len(memberListResp.MemberList) == 0 { + memberListResp.MemberList = []*open_im_sdk.GroupMemberFullInfo{} + } log.NewInfo(req.OperationID, "GetGroupAllMember api return ", memberListResp) + c.JSON(http.StatusOK, memberListResp) } func GetJoinedGroupList(c *gin.Context) { diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index e2327a78b..2af77fa97 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -261,7 +261,7 @@ func (s *groupServer) GetGroupAllMember(ctx context.Context, req *pbGroup.GetGro for _, v := range memberList { var node open_im_sdk.GroupMemberFullInfo - utils.CopyStructFields(node, v) + utils.CopyStructFields(&node, &v) resp.MemberList = append(resp.MemberList, &node) } log.NewInfo(req.OperationID, "GetGroupAllMember rpc return ", resp.String()) diff --git a/pkg/base_info/group_api_struct.go b/pkg/base_info/group_api_struct.go index 3bfa090d5..a602b790f 100644 --- a/pkg/base_info/group_api_struct.go +++ b/pkg/base_info/group_api_struct.go @@ -69,7 +69,7 @@ type GetGroupAllMemberReq struct { } type GetGroupAllMemberResp struct { CommResp - Data []*open_im_sdk.GroupMemberFullInfo `json:"data"` + MemberList []*open_im_sdk.GroupMemberFullInfo `json:"data"` } type CreateGroupReq struct { From b135de80c0eb774bd85cc95492aad984362ad4e1 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 17:46:11 +0800 Subject: [PATCH 204/337] Refactor code --- cmd/open_im_api/main.go | 2 +- internal/api/group/group.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index b38e452fc..4c79239a6 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -57,7 +57,7 @@ func main() { groupRouterGroup.POST("/get_groups_info", group.GetGroupsInfo) //1 groupRouterGroup.POST("/kick_group", group.KickGroupMember) //1 groupRouterGroup.POST("/get_group_member_list", group.GetGroupMemberList) //no use - groupRouterGroup.POST("/get_group_all_member_list", group.GetGroupAllMember) + groupRouterGroup.POST("/get_group_all_member_list", group.GetGroupAllMemberList) groupRouterGroup.POST("/get_group_members_info", group.GetGroupMembersInfo) groupRouterGroup.POST("/invite_user_to_group", group.InviteUserToGroup) //1 groupRouterGroup.POST("/get_joined_group_list", group.GetJoinedGroupList) diff --git a/internal/api/group/group.go b/internal/api/group/group.go index 6ce7412cd..9ec4cfb33 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -138,7 +138,7 @@ func GetGroupMemberList(c *gin.Context) { c.JSON(http.StatusOK, memberListResp) } -func GetGroupAllMember(c *gin.Context) { +func GetGroupAllMemberList(c *gin.Context) { params := api.GetGroupAllMemberReq{} if err := c.BindJSON(¶ms); err != nil { log.NewError("0", "BindJSON failed ", err.Error()) From e4989d8b9ffdd8c9de0d6198d74fdae3e8bb194c Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 30 Dec 2021 17:46:29 +0800 Subject: [PATCH 205/337] add null value handle --- internal/api/group/group.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/api/group/group.go b/internal/api/group/group.go index 6f39e0223..c0998e0e4 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -84,6 +84,9 @@ func GetGroupMembersInfo(c *gin.Context) { } memberListResp := api.GetGroupMembersInfoResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, Data: RpcResp.MemberList} + if len(RpcResp.MemberList) == 0 { + memberListResp.Data = []*open_im_sdk.GroupMemberFullInfo{} + } log.NewInfo(req.OperationID, "GetGroupMembersInfo api return ", memberListResp) c.JSON(http.StatusOK, memberListResp) } From a09b39dd69a4b9d1616ad4e585c2eb6a8f5fbf2f Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 17:48:19 +0800 Subject: [PATCH 206/337] Refactor code --- cmd/open_im_api/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index 4c79239a6..36d5248dd 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -57,7 +57,7 @@ func main() { groupRouterGroup.POST("/get_groups_info", group.GetGroupsInfo) //1 groupRouterGroup.POST("/kick_group", group.KickGroupMember) //1 groupRouterGroup.POST("/get_group_member_list", group.GetGroupMemberList) //no use - groupRouterGroup.POST("/get_group_all_member_list", group.GetGroupAllMemberList) + groupRouterGroup.POST("/get_group_all_member_list", group.GetGroupAllMemberList) //1 groupRouterGroup.POST("/get_group_members_info", group.GetGroupMembersInfo) groupRouterGroup.POST("/invite_user_to_group", group.InviteUserToGroup) //1 groupRouterGroup.POST("/get_joined_group_list", group.GetJoinedGroupList) From fdf1c0448be87c50eef250a8c2060fb4bde0734c Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 30 Dec 2021 17:48:20 +0800 Subject: [PATCH 207/337] add null value handle --- cmd/open_im_api/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index b55486522..8b6b70b81 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -58,9 +58,9 @@ func main() { groupRouterGroup.POST("/kick_group", group.KickGroupMember) groupRouterGroup.POST("/get_group_member_list", group.GetGroupMemberList) groupRouterGroup.POST("/get_group_all_member_list", group.GetGroupAllMember) - groupRouterGroup.POST("/get_group_members_info", group.GetGroupMembersInfo) + groupRouterGroup.POST("/get_group_members_info", group.GetGroupMembersInfo) //1 groupRouterGroup.POST("/invite_user_to_group", group.InviteUserToGroup) - groupRouterGroup.POST("/get_joined_group_list", group.GetJoinedGroupList) + groupRouterGroup.POST("/get_joined_group_list", group.GetJoinedGroupList) //1 } //certificate authRouterGroup := r.Group("/auth") From f3a9857747afc3af676b252ab39e3688555deafb Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 17:54:11 +0800 Subject: [PATCH 208/337] Refactor code --- internal/api/group/group.go | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/internal/api/group/group.go b/internal/api/group/group.go index 9ec4cfb33..e5d23f87f 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -11,6 +11,7 @@ import ( "Open_IM/pkg/utils" "context" "github.com/gin-gonic/gin" + "github.com/golang/protobuf/jsonpb" "net/http" "strings" ) @@ -124,16 +125,7 @@ func GetGroupMemberList(c *gin.Context) { if len(memberListResp.MemberList) == 0 { memberListResp.MemberList = []*open_im_sdk.GroupMemberFullInfo{} } - /* - jsm := &jsonpb.Marshaler{ - OrigName: true, - EnumsAsInts: false, - EmitDefaults: true, - } - var b bytes.Buffer - err = jsm.MarshalToString(memberListResp.MemberList[0]) - */ log.NewInfo(req.OperationID, "GetGroupMemberList api return ", memberListResp) c.JSON(http.StatusOK, memberListResp) } @@ -169,6 +161,18 @@ func GetGroupAllMemberList(c *gin.Context) { if len(memberListResp.MemberList) == 0 { memberListResp.MemberList = []*open_im_sdk.GroupMemberFullInfo{} } + + jsm := &jsonpb.Marshaler{ + OrigName: true, + EnumsAsInts: false, + EmitDefaults: true, + } + + if len(memberListResp.MemberList) > 0 { + s, err := jsm.MarshalToString(memberListResp.MemberList[0]) + log.NewDebug(req.OperationID, "MarshalToString ", s, err) + } + log.NewInfo(req.OperationID, "GetGroupAllMember api return ", memberListResp) c.JSON(http.StatusOK, memberListResp) } From 627419aa5f7523e0889e646bfc6177f2fae4024f Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 30 Dec 2021 17:56:12 +0800 Subject: [PATCH 209/337] add null value handle --- cmd/open_im_api/main.go | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index bb592de31..46c79536e 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -57,13 +57,10 @@ func main() { groupRouterGroup.POST("/get_groups_info", group.GetGroupsInfo) //1 groupRouterGroup.POST("/kick_group", group.KickGroupMember) //1 groupRouterGroup.POST("/get_group_member_list", group.GetGroupMemberList) //no use - groupRouterGroup.POST("/get_group_all_member_list", group.GetGroupAllMember) - groupRouterGroup.POST("/get_group_members_info", group.GetGroupMembersInfo) - groupRouterGroup.POST("/invite_user_to_group", group.InviteUserToGroup) //1 - groupRouterGroup.POST("/get_joined_group_list", group.GetJoinedGroupList) - groupRouterGroup.POST("/get_group_members_info", group.GetGroupMembersInfo) //1 - groupRouterGroup.POST("/invite_user_to_group", group.InviteUserToGroup) - groupRouterGroup.POST("/get_joined_group_list", group.GetJoinedGroupList) //1 + groupRouterGroup.POST("/get_group_all_member_list", group.GetGroupAllMember) //1 + groupRouterGroup.POST("/get_group_members_info", group.GetGroupMembersInfo) //1 + groupRouterGroup.POST("/invite_user_to_group", group.InviteUserToGroup) //1 + groupRouterGroup.POST("/get_joined_group_list", group.GetJoinedGroupList) //1 } //certificate authRouterGroup := r.Group("/auth") From 1b11cd571e428f58b3bbafdb7428b8de4f7eb2cb Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 18:19:54 +0800 Subject: [PATCH 210/337] Refactor code --- internal/api/group/group.go | 20 ++++++++++++++++++++ pkg/base_info/group_api_struct.go | 5 +++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/internal/api/group/group.go b/internal/api/group/group.go index e5d23f87f..2849e5531 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -10,8 +10,10 @@ import ( open_im_sdk "Open_IM/pkg/proto/sdk_ws" "Open_IM/pkg/utils" "context" + "encoding/json" "github.com/gin-gonic/gin" "github.com/golang/protobuf/jsonpb" + "github.com/golang/protobuf/proto" "net/http" "strings" ) @@ -170,13 +172,31 @@ func GetGroupAllMemberList(c *gin.Context) { if len(memberListResp.MemberList) > 0 { s, err := jsm.MarshalToString(memberListResp.MemberList[0]) + //{"GroupID":"7836e478bc43ce1d3b8889cac983f59b","UserID":"openIM001","roleLevel":1,"JoinTime":"0","NickName":"","FaceUrl":"https://oss.com.cn/head","AppMangerLevel":0,"JoinSource":0,"OperatorUserID":"","Ex":"xxx"} log.NewDebug(req.OperationID, "MarshalToString ", s, err) + m := ProtoToMap(memberListResp.MemberList[0], false) + log.NewDebug(req.OperationID, "mmm ", m) + memberListResp.Test = m } log.NewInfo(req.OperationID, "GetGroupAllMember api return ", memberListResp) c.JSON(http.StatusOK, memberListResp) } +func ProtoToMap(pb proto.Message, idFix bool) map[string]interface{} { + marshaler := jsonpb.Marshaler{} + s, _ := marshaler.MarshalToString(pb) + out := make(map[string]interface{}) + json.Unmarshal([]byte(s), &out) + if idFix { + if _, ok := out["id"]; ok { + out["_id"] = out["id"] + delete(out, "id") + } + } + return out +} + func GetJoinedGroupList(c *gin.Context) { params := api.GetJoinedGroupListReq{} if err := c.BindJSON(¶ms); err != nil { diff --git a/pkg/base_info/group_api_struct.go b/pkg/base_info/group_api_struct.go index a602b790f..33ae4b845 100644 --- a/pkg/base_info/group_api_struct.go +++ b/pkg/base_info/group_api_struct.go @@ -64,12 +64,13 @@ type GetGroupMemberListResp struct { } type GetGroupAllMemberReq struct { - GroupID string `json:"groupID"` - OperationID string `json:"operationID"` + GroupID string `json:"groupID" binding:"required"` + OperationID string `json:"operationID" binding:"required"` } type GetGroupAllMemberResp struct { CommResp MemberList []*open_im_sdk.GroupMemberFullInfo `json:"data"` + Test map[string]interface{} `json:"data2"` } type CreateGroupReq struct { From 324152e363b53be74545edfb7b9852e8e688b182 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 18:22:56 +0800 Subject: [PATCH 211/337] Refactor code --- internal/api/group/group.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/api/group/group.go b/internal/api/group/group.go index 2849e5531..749f2d293 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -184,7 +184,11 @@ func GetGroupAllMemberList(c *gin.Context) { } func ProtoToMap(pb proto.Message, idFix bool) map[string]interface{} { - marshaler := jsonpb.Marshaler{} + marshaler := jsonpb.Marshaler{ + OrigName: true, + EnumsAsInts: false, + EmitDefaults: true, + } s, _ := marshaler.MarshalToString(pb) out := make(map[string]interface{}) json.Unmarshal([]byte(s), &out) From 816ceab0574c947108b1c55c1d91a6777e067e61 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 18:28:37 +0800 Subject: [PATCH 212/337] Refactor code --- pkg/proto/sdk_ws/ws.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/proto/sdk_ws/ws.proto b/pkg/proto/sdk_ws/ws.proto index d757cc41f..3f552891f 100644 --- a/pkg/proto/sdk_ws/ws.proto +++ b/pkg/proto/sdk_ws/ws.proto @@ -26,7 +26,7 @@ message GroupMemberFullInfo { string UserID = 2 ; int32 roleLevel = 3; int64 JoinTime = 4; - string NickName = 5; + string Nickname = 5; string FaceUrl = 6; int32 AppMangerLevel = 7; //if >0 int32 JoinSource = 8; From 887028a1b46acb5a44703b7d025d18512d7e2652 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 18:30:03 +0800 Subject: [PATCH 213/337] Refactor code --- pkg/proto/sdk_ws/ws.pb.go | 285 +++++++++++++++++++------------------- 1 file changed, 142 insertions(+), 143 deletions(-) diff --git a/pkg/proto/sdk_ws/ws.pb.go b/pkg/proto/sdk_ws/ws.pb.go index b9857aad1..0b30328b4 100644 --- a/pkg/proto/sdk_ws/ws.pb.go +++ b/pkg/proto/sdk_ws/ws.pb.go @@ -40,7 +40,7 @@ func (m *GroupInfo) Reset() { *m = GroupInfo{} } func (m *GroupInfo) String() string { return proto.CompactTextString(m) } func (*GroupInfo) ProtoMessage() {} func (*GroupInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_c6aceb61f76d5c8d, []int{0} + return fileDescriptor_ws_8a45d93b14f6e420, []int{0} } func (m *GroupInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfo.Unmarshal(m, b) @@ -149,7 +149,7 @@ type GroupMemberFullInfo struct { UserID string `protobuf:"bytes,2,opt,name=UserID" json:"UserID,omitempty"` RoleLevel int32 `protobuf:"varint,3,opt,name=roleLevel" json:"roleLevel,omitempty"` JoinTime int64 `protobuf:"varint,4,opt,name=JoinTime" json:"JoinTime,omitempty"` - NickName string `protobuf:"bytes,5,opt,name=NickName" json:"NickName,omitempty"` + Nickname string `protobuf:"bytes,5,opt,name=Nickname" json:"Nickname,omitempty"` FaceUrl string `protobuf:"bytes,6,opt,name=FaceUrl" json:"FaceUrl,omitempty"` AppMangerLevel int32 `protobuf:"varint,7,opt,name=AppMangerLevel" json:"AppMangerLevel,omitempty"` JoinSource int32 `protobuf:"varint,8,opt,name=JoinSource" json:"JoinSource,omitempty"` @@ -164,7 +164,7 @@ func (m *GroupMemberFullInfo) Reset() { *m = GroupMemberFullInfo{} } func (m *GroupMemberFullInfo) String() string { return proto.CompactTextString(m) } func (*GroupMemberFullInfo) ProtoMessage() {} func (*GroupMemberFullInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_c6aceb61f76d5c8d, []int{1} + return fileDescriptor_ws_8a45d93b14f6e420, []int{1} } func (m *GroupMemberFullInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupMemberFullInfo.Unmarshal(m, b) @@ -212,9 +212,9 @@ func (m *GroupMemberFullInfo) GetJoinTime() int64 { return 0 } -func (m *GroupMemberFullInfo) GetNickName() string { +func (m *GroupMemberFullInfo) GetNickname() string { if m != nil { - return m.NickName + return m.Nickname } return "" } @@ -269,7 +269,7 @@ func (m *PublicUserInfo) Reset() { *m = PublicUserInfo{} } func (m *PublicUserInfo) String() string { return proto.CompactTextString(m) } func (*PublicUserInfo) ProtoMessage() {} func (*PublicUserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_c6aceb61f76d5c8d, []int{2} + return fileDescriptor_ws_8a45d93b14f6e420, []int{2} } func (m *PublicUserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PublicUserInfo.Unmarshal(m, b) @@ -344,7 +344,7 @@ func (m *UserInfo) Reset() { *m = UserInfo{} } func (m *UserInfo) String() string { return proto.CompactTextString(m) } func (*UserInfo) ProtoMessage() {} func (*UserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_c6aceb61f76d5c8d, []int{3} + return fileDescriptor_ws_8a45d93b14f6e420, []int{3} } func (m *UserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserInfo.Unmarshal(m, b) @@ -451,7 +451,7 @@ func (m *FriendInfo) Reset() { *m = FriendInfo{} } func (m *FriendInfo) String() string { return proto.CompactTextString(m) } func (*FriendInfo) ProtoMessage() {} func (*FriendInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_c6aceb61f76d5c8d, []int{4} + return fileDescriptor_ws_8a45d93b14f6e420, []int{4} } func (m *FriendInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfo.Unmarshal(m, b) @@ -536,7 +536,7 @@ func (m *BlackInfo) Reset() { *m = BlackInfo{} } func (m *BlackInfo) String() string { return proto.CompactTextString(m) } func (*BlackInfo) ProtoMessage() {} func (*BlackInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_c6aceb61f76d5c8d, []int{5} + return fileDescriptor_ws_8a45d93b14f6e420, []int{5} } func (m *BlackInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackInfo.Unmarshal(m, b) @@ -617,7 +617,7 @@ func (m *GroupRequest) Reset() { *m = GroupRequest{} } func (m *GroupRequest) String() string { return proto.CompactTextString(m) } func (*GroupRequest) ProtoMessage() {} func (*GroupRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_c6aceb61f76d5c8d, []int{6} + return fileDescriptor_ws_8a45d93b14f6e420, []int{6} } func (m *GroupRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupRequest.Unmarshal(m, b) @@ -719,7 +719,7 @@ func (m *FriendRequest) Reset() { *m = FriendRequest{} } func (m *FriendRequest) String() string { return proto.CompactTextString(m) } func (*FriendRequest) ProtoMessage() {} func (*FriendRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_c6aceb61f76d5c8d, []int{7} + return fileDescriptor_ws_8a45d93b14f6e420, []int{7} } func (m *FriendRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendRequest.Unmarshal(m, b) @@ -818,7 +818,7 @@ func (m *PullMessageBySeqListResp) Reset() { *m = PullMessageBySeqListRe func (m *PullMessageBySeqListResp) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListResp) ProtoMessage() {} func (*PullMessageBySeqListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_c6aceb61f76d5c8d, []int{8} + return fileDescriptor_ws_8a45d93b14f6e420, []int{8} } func (m *PullMessageBySeqListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListResp.Unmarshal(m, b) @@ -893,7 +893,7 @@ func (m *PullMessageBySeqListReq) Reset() { *m = PullMessageBySeqListReq func (m *PullMessageBySeqListReq) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListReq) ProtoMessage() {} func (*PullMessageBySeqListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_c6aceb61f76d5c8d, []int{9} + return fileDescriptor_ws_8a45d93b14f6e420, []int{9} } func (m *PullMessageBySeqListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListReq.Unmarshal(m, b) @@ -948,7 +948,7 @@ func (m *PullMessageReq) Reset() { *m = PullMessageReq{} } func (m *PullMessageReq) String() string { return proto.CompactTextString(m) } func (*PullMessageReq) ProtoMessage() {} func (*PullMessageReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_c6aceb61f76d5c8d, []int{10} + return fileDescriptor_ws_8a45d93b14f6e420, []int{10} } func (m *PullMessageReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageReq.Unmarshal(m, b) @@ -1012,7 +1012,7 @@ func (m *PullMessageResp) Reset() { *m = PullMessageResp{} } func (m *PullMessageResp) String() string { return proto.CompactTextString(m) } func (*PullMessageResp) ProtoMessage() {} func (*PullMessageResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_c6aceb61f76d5c8d, []int{11} + return fileDescriptor_ws_8a45d93b14f6e420, []int{11} } func (m *PullMessageResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageResp.Unmarshal(m, b) @@ -1084,7 +1084,7 @@ func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} } func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqReq) ProtoMessage() {} func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_c6aceb61f76d5c8d, []int{12} + return fileDescriptor_ws_8a45d93b14f6e420, []int{12} } func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) @@ -1116,7 +1116,7 @@ func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} } func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqResp) ProtoMessage() {} func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_c6aceb61f76d5c8d, []int{13} + return fileDescriptor_ws_8a45d93b14f6e420, []int{13} } func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) @@ -1164,7 +1164,7 @@ func (m *GatherFormat) Reset() { *m = GatherFormat{} } func (m *GatherFormat) String() string { return proto.CompactTextString(m) } func (*GatherFormat) ProtoMessage() {} func (*GatherFormat) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_c6aceb61f76d5c8d, []int{14} + return fileDescriptor_ws_8a45d93b14f6e420, []int{14} } func (m *GatherFormat) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GatherFormat.Unmarshal(m, b) @@ -1211,7 +1211,7 @@ func (m *UserSendMsgResp) Reset() { *m = UserSendMsgResp{} } func (m *UserSendMsgResp) String() string { return proto.CompactTextString(m) } func (*UserSendMsgResp) ProtoMessage() {} func (*UserSendMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_c6aceb61f76d5c8d, []int{15} + return fileDescriptor_ws_8a45d93b14f6e420, []int{15} } func (m *UserSendMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserSendMsgResp.Unmarshal(m, b) @@ -1280,7 +1280,7 @@ func (m *MsgData) Reset() { *m = MsgData{} } func (m *MsgData) String() string { return proto.CompactTextString(m) } func (*MsgData) ProtoMessage() {} func (*MsgData) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_c6aceb61f76d5c8d, []int{16} + return fileDescriptor_ws_8a45d93b14f6e420, []int{16} } func (m *MsgData) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgData.Unmarshal(m, b) @@ -1441,7 +1441,7 @@ func (m *OfflinePushInfo) Reset() { *m = OfflinePushInfo{} } func (m *OfflinePushInfo) String() string { return proto.CompactTextString(m) } func (*OfflinePushInfo) ProtoMessage() {} func (*OfflinePushInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_c6aceb61f76d5c8d, []int{17} + return fileDescriptor_ws_8a45d93b14f6e420, []int{17} } func (m *OfflinePushInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OfflinePushInfo.Unmarshal(m, b) @@ -1508,7 +1508,7 @@ func (m *TipsComm) Reset() { *m = TipsComm{} } func (m *TipsComm) String() string { return proto.CompactTextString(m) } func (*TipsComm) ProtoMessage() {} func (*TipsComm) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_c6aceb61f76d5c8d, []int{18} + return fileDescriptor_ws_8a45d93b14f6e420, []int{18} } func (m *TipsComm) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TipsComm.Unmarshal(m, b) @@ -1557,7 +1557,7 @@ func (m *MemberEnterTips) Reset() { *m = MemberEnterTips{} } func (m *MemberEnterTips) String() string { return proto.CompactTextString(m) } func (*MemberEnterTips) ProtoMessage() {} func (*MemberEnterTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_c6aceb61f76d5c8d, []int{19} + return fileDescriptor_ws_8a45d93b14f6e420, []int{19} } func (m *MemberEnterTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberEnterTips.Unmarshal(m, b) @@ -1612,7 +1612,7 @@ func (m *MemberLeaveTips) Reset() { *m = MemberLeaveTips{} } func (m *MemberLeaveTips) String() string { return proto.CompactTextString(m) } func (*MemberLeaveTips) ProtoMessage() {} func (*MemberLeaveTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_c6aceb61f76d5c8d, []int{20} + return fileDescriptor_ws_8a45d93b14f6e420, []int{20} } func (m *MemberLeaveTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberLeaveTips.Unmarshal(m, b) @@ -1667,7 +1667,7 @@ func (m *MemberInvitedTips) Reset() { *m = MemberInvitedTips{} } func (m *MemberInvitedTips) String() string { return proto.CompactTextString(m) } func (*MemberInvitedTips) ProtoMessage() {} func (*MemberInvitedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_c6aceb61f76d5c8d, []int{21} + return fileDescriptor_ws_8a45d93b14f6e420, []int{21} } func (m *MemberInvitedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInvitedTips.Unmarshal(m, b) @@ -1729,7 +1729,7 @@ func (m *MemberKickedTips) Reset() { *m = MemberKickedTips{} } func (m *MemberKickedTips) String() string { return proto.CompactTextString(m) } func (*MemberKickedTips) ProtoMessage() {} func (*MemberKickedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_c6aceb61f76d5c8d, []int{22} + return fileDescriptor_ws_8a45d93b14f6e420, []int{22} } func (m *MemberKickedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberKickedTips.Unmarshal(m, b) @@ -1792,7 +1792,7 @@ func (m *MemberInfoChangedTips) Reset() { *m = MemberInfoChangedTips{} } func (m *MemberInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*MemberInfoChangedTips) ProtoMessage() {} func (*MemberInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_c6aceb61f76d5c8d, []int{23} + return fileDescriptor_ws_8a45d93b14f6e420, []int{23} } func (m *MemberInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInfoChangedTips.Unmarshal(m, b) @@ -1861,7 +1861,7 @@ func (m *GroupCreatedTips) Reset() { *m = GroupCreatedTips{} } func (m *GroupCreatedTips) String() string { return proto.CompactTextString(m) } func (*GroupCreatedTips) ProtoMessage() {} func (*GroupCreatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_c6aceb61f76d5c8d, []int{24} + return fileDescriptor_ws_8a45d93b14f6e420, []int{24} } func (m *GroupCreatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupCreatedTips.Unmarshal(m, b) @@ -1922,7 +1922,7 @@ func (m *GroupInfoChangedTips) Reset() { *m = GroupInfoChangedTips{} } func (m *GroupInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*GroupInfoChangedTips) ProtoMessage() {} func (*GroupInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_c6aceb61f76d5c8d, []int{25} + return fileDescriptor_ws_8a45d93b14f6e420, []int{25} } func (m *GroupInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfoChangedTips.Unmarshal(m, b) @@ -1976,7 +1976,7 @@ func (m *JoinGroupApplicationTips) Reset() { *m = JoinGroupApplicationTi func (m *JoinGroupApplicationTips) String() string { return proto.CompactTextString(m) } func (*JoinGroupApplicationTips) ProtoMessage() {} func (*JoinGroupApplicationTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_c6aceb61f76d5c8d, []int{26} + return fileDescriptor_ws_8a45d93b14f6e420, []int{26} } func (m *JoinGroupApplicationTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JoinGroupApplicationTips.Unmarshal(m, b) @@ -2031,7 +2031,7 @@ func (m *ApplicationProcessedTips) Reset() { *m = ApplicationProcessedTi func (m *ApplicationProcessedTips) String() string { return proto.CompactTextString(m) } func (*ApplicationProcessedTips) ProtoMessage() {} func (*ApplicationProcessedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_c6aceb61f76d5c8d, []int{27} + return fileDescriptor_ws_8a45d93b14f6e420, []int{27} } func (m *ApplicationProcessedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ApplicationProcessedTips.Unmarshal(m, b) @@ -2092,7 +2092,7 @@ func (m *FriendApplication) Reset() { *m = FriendApplication{} } func (m *FriendApplication) String() string { return proto.CompactTextString(m) } func (*FriendApplication) ProtoMessage() {} func (*FriendApplication) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_c6aceb61f76d5c8d, []int{28} + return fileDescriptor_ws_8a45d93b14f6e420, []int{28} } func (m *FriendApplication) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplication.Unmarshal(m, b) @@ -2145,7 +2145,7 @@ func (m *FromToUserID) Reset() { *m = FromToUserID{} } func (m *FromToUserID) String() string { return proto.CompactTextString(m) } func (*FromToUserID) ProtoMessage() {} func (*FromToUserID) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_c6aceb61f76d5c8d, []int{29} + return fileDescriptor_ws_8a45d93b14f6e420, []int{29} } func (m *FromToUserID) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FromToUserID.Unmarshal(m, b) @@ -2191,7 +2191,7 @@ func (m *FriendApplicationAddedTips) Reset() { *m = FriendApplicationAdd func (m *FriendApplicationAddedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationAddedTips) ProtoMessage() {} func (*FriendApplicationAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_c6aceb61f76d5c8d, []int{30} + return fileDescriptor_ws_8a45d93b14f6e420, []int{30} } func (m *FriendApplicationAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationAddedTips.Unmarshal(m, b) @@ -2230,7 +2230,7 @@ func (m *FriendApplicationProcessedTips) Reset() { *m = FriendApplicatio func (m *FriendApplicationProcessedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationProcessedTips) ProtoMessage() {} func (*FriendApplicationProcessedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_c6aceb61f76d5c8d, []int{31} + return fileDescriptor_ws_8a45d93b14f6e420, []int{31} } func (m *FriendApplicationProcessedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationProcessedTips.Unmarshal(m, b) @@ -2271,7 +2271,7 @@ func (m *FriendAddedTips) Reset() { *m = FriendAddedTips{} } func (m *FriendAddedTips) String() string { return proto.CompactTextString(m) } func (*FriendAddedTips) ProtoMessage() {} func (*FriendAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_c6aceb61f76d5c8d, []int{32} + return fileDescriptor_ws_8a45d93b14f6e420, []int{32} } func (m *FriendAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendAddedTips.Unmarshal(m, b) @@ -2324,7 +2324,7 @@ func (m *FriendDeletedTips) Reset() { *m = FriendDeletedTips{} } func (m *FriendDeletedTips) String() string { return proto.CompactTextString(m) } func (*FriendDeletedTips) ProtoMessage() {} func (*FriendDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_c6aceb61f76d5c8d, []int{33} + return fileDescriptor_ws_8a45d93b14f6e420, []int{33} } func (m *FriendDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendDeletedTips.Unmarshal(m, b) @@ -2362,7 +2362,7 @@ func (m *BlackAddedTips) Reset() { *m = BlackAddedTips{} } func (m *BlackAddedTips) String() string { return proto.CompactTextString(m) } func (*BlackAddedTips) ProtoMessage() {} func (*BlackAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_c6aceb61f76d5c8d, []int{34} + return fileDescriptor_ws_8a45d93b14f6e420, []int{34} } func (m *BlackAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackAddedTips.Unmarshal(m, b) @@ -2400,7 +2400,7 @@ func (m *BlackDeletedTips) Reset() { *m = BlackDeletedTips{} } func (m *BlackDeletedTips) String() string { return proto.CompactTextString(m) } func (*BlackDeletedTips) ProtoMessage() {} func (*BlackDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_c6aceb61f76d5c8d, []int{35} + return fileDescriptor_ws_8a45d93b14f6e420, []int{35} } func (m *BlackDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackDeletedTips.Unmarshal(m, b) @@ -2438,7 +2438,7 @@ func (m *FriendInfoChangedTips) Reset() { *m = FriendInfoChangedTips{} } func (m *FriendInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*FriendInfoChangedTips) ProtoMessage() {} func (*FriendInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_c6aceb61f76d5c8d, []int{36} + return fileDescriptor_ws_8a45d93b14f6e420, []int{36} } func (m *FriendInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfoChangedTips.Unmarshal(m, b) @@ -2477,7 +2477,7 @@ func (m *SelfInfoUpdatedTips) Reset() { *m = SelfInfoUpdatedTips{} } func (m *SelfInfoUpdatedTips) String() string { return proto.CompactTextString(m) } func (*SelfInfoUpdatedTips) ProtoMessage() {} func (*SelfInfoUpdatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_c6aceb61f76d5c8d, []int{37} + return fileDescriptor_ws_8a45d93b14f6e420, []int{37} } func (m *SelfInfoUpdatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SelfInfoUpdatedTips.Unmarshal(m, b) @@ -2546,10 +2546,10 @@ func init() { proto.RegisterType((*SelfInfoUpdatedTips)(nil), "open_im_sdk.SelfInfoUpdatedTips") } -func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_c6aceb61f76d5c8d) } +func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_8a45d93b14f6e420) } -var fileDescriptor_ws_c6aceb61f76d5c8d = []byte{ - // 1923 bytes of a gzipped FileDescriptorProto +var fileDescriptor_ws_8a45d93b14f6e420 = []byte{ + // 1920 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x59, 0xcd, 0x8f, 0x1b, 0x49, 0x15, 0x57, 0xb7, 0xdd, 0xfe, 0x78, 0xf6, 0x8c, 0x27, 0x9d, 0x64, 0xb6, 0x09, 0xab, 0xc8, 0xb4, 0x56, 0x68, 0x84, 0x20, 0x2b, 0x65, 0x85, 0xb4, 0x04, 0x2d, 0xe0, 0x19, 0xcf, 0xe4, 0x83, 0x38, @@ -2572,103 +2572,102 @@ var fileDescriptor_ws_c6aceb61f76d5c8d = []byte{ 0xf6, 0x66, 0x41, 0x9c, 0x36, 0x17, 0x50, 0x02, 0xee, 0x5f, 0x4d, 0xb8, 0xc9, 0x29, 0x61, 0xc0, 0x49, 0x16, 0x45, 0xef, 0xc8, 0xc0, 0x3e, 0xd4, 0xa4, 0x3a, 0x11, 0xfe, 0x5a, 0xa9, 0x27, 0x89, 0x23, 0xf2, 0x94, 0x5c, 0x90, 0x88, 0x07, 0xde, 0xf2, 0x4a, 0xc0, 0xbe, 0x03, 0x8d, 0x27, 0x71, - 0x48, 0x79, 0x4c, 0xaa, 0x3c, 0x26, 0x05, 0x8d, 0xdf, 0x9e, 0x85, 0xe3, 0x19, 0x4f, 0xa9, 0x08, - 0x77, 0x41, 0xab, 0x99, 0xa8, 0xe9, 0x99, 0xf8, 0x36, 0xec, 0xf6, 0x16, 0x8b, 0x81, 0x4f, 0xa7, - 0x24, 0x11, 0x4a, 0xeb, 0x5c, 0xe9, 0x0a, 0x8a, 0xf9, 0x40, 0x4d, 0xa3, 0x38, 0x4b, 0xc6, 0x84,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50, 0x8f, 0x6d, - 0x7d, 0x35, 0xb6, 0x57, 0x8d, 0xce, 0x7f, 0x0d, 0x70, 0x4e, 0xb3, 0x28, 0x1a, 0x10, 0xc6, 0xfc, - 0x29, 0x39, 0x7c, 0x33, 0x22, 0xcb, 0xa7, 0x21, 0x4b, 0x3d, 0xc2, 0x16, 0x98, 0x28, 0x92, 0x24, - 0x47, 0x71, 0x40, 0x78, 0x94, 0x2c, 0x2f, 0x27, 0xd1, 0x45, 0x92, 0x24, 0x68, 0x81, 0xec, 0x06, - 0x82, 0x42, 0x7c, 0xee, 0xbf, 0x1e, 0x91, 0xa5, 0xec, 0x04, 0x92, 0xe2, 0x78, 0x48, 0x11, 0xaf, - 0x4a, 0x9c, 0x53, 0xf6, 0x8f, 0x61, 0x87, 0x85, 0x74, 0x2a, 0x92, 0x2b, 0x8a, 0xa5, 0x72, 0xd0, - 0xba, 0xff, 0x0d, 0x6d, 0x03, 0x3d, 0xf4, 0xd3, 0x73, 0x92, 0x9c, 0xc4, 0xc9, 0xdc, 0x4f, 0x3d, - 0x9d, 0xdf, 0xfe, 0x0a, 0xda, 0x53, 0x2c, 0xd8, 0x7c, 0x7d, 0xed, 0x5d, 0xeb, 0x35, 0x76, 0x77, - 0x0e, 0x9f, 0x6c, 0xf6, 0x9e, 0x9b, 0x9c, 0x69, 0x3b, 0x46, 0x50, 0xd8, 0x35, 0x62, 0xbe, 0xf9, - 0xc2, 0x98, 0x16, 0x05, 0xa2, 0x42, 0x18, 0x36, 0x26, 0xe4, 0x38, 0x95, 0x6e, 0x05, 0xeb, 0x5b, - 0x92, 0xee, 0xaf, 0xf0, 0xb8, 0x2c, 0xd4, 0x5d, 0xa6, 0xe5, 0x0e, 0x34, 0x18, 0x59, 0x1e, 0x92, - 0x69, 0x48, 0x65, 0xdf, 0x29, 0x68, 0x5c, 0xc3, 0xc8, 0xf2, 0x98, 0x06, 0x79, 0x90, 0x05, 0xb5, - 0x6a, 0x59, 0x75, 0xcd, 0x32, 0xec, 0xfa, 0x1d, 0xcd, 0x80, 0xff, 0x8b, 0x24, 0xdf, 0x02, 0xfb, - 0x21, 0x49, 0x07, 0xfe, 0xeb, 0x1e, 0x0d, 0x06, 0xdc, 0x24, 0x8f, 0x2c, 0xdd, 0x63, 0xb8, 0xb9, - 0x86, 0xb2, 0x85, 0xe2, 0x9c, 0xf1, 0x16, 0xe7, 0x4c, 0xd5, 0x39, 0xf7, 0x11, 0xb4, 0x55, 0xd5, - 0xb8, 0xc1, 0xc2, 0x40, 0x26, 0xd3, 0x0c, 0x03, 0xfb, 0x00, 0xaa, 0x11, 0x56, 0x82, 0xc9, 0x6d, - 0xbe, 0xa5, 0xd9, 0x3c, 0x60, 0xd3, 0xbe, 0x9f, 0xfa, 0x1e, 0xe7, 0x70, 0x97, 0xd0, 0x41, 0x8b, - 0x47, 0x84, 0x06, 0x03, 0x36, 0xe5, 0xc6, 0x74, 0xa1, 0x35, 0x22, 0xc9, 0x05, 0x77, 0xa3, 0x3c, - 0xa1, 0x14, 0x08, 0x39, 0x8e, 0xa2, 0x90, 0xd0, 0x54, 0x70, 0xc8, 0x6a, 0x54, 0x20, 0x51, 0x49, - 0x34, 0x50, 0x8e, 0xe7, 0x82, 0x76, 0xff, 0x62, 0x41, 0x5d, 0x1a, 0x21, 0xaa, 0x8a, 0x06, 0x65, - 0x25, 0x0a, 0x0a, 0xf1, 0x84, 0x8c, 0x2f, 0xca, 0x59, 0x57, 0x50, 0x58, 0x37, 0x53, 0x79, 0x72, - 0xc8, 0xc9, 0x48, 0x92, 0x68, 0xd3, 0x58, 0xb1, 0x49, 0xd6, 0xa1, 0x02, 0x21, 0x07, 0x53, 0xfc, - 0x92, 0x33, 0x92, 0x02, 0xd9, 0xdf, 0x81, 0x3d, 0xc6, 0xe7, 0xa9, 0xd3, 0xc8, 0x4f, 0x27, 0x71, - 0x32, 0x97, 0xed, 0xd0, 0xf2, 0xd6, 0x70, 0x3c, 0x24, 0x05, 0x56, 0x4c, 0x71, 0xa2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, 0xad, 0xb5, 0xaf, 0xf4, 0x38, 0x53, + 0xef, 0x71, 0x2e, 0xb4, 0x1f, 0xf9, 0x34, 0x88, 0x88, 0x47, 0x58, 0x16, 0xa5, 0xf9, 0x39, 0xa2, + 0x62, 0xa2, 0x28, 0x96, 0x03, 0x36, 0x95, 0x27, 0x88, 0xa4, 0xd0, 0x29, 0xc1, 0x87, 0x9f, 0x84, + 0xc5, 0x25, 0x80, 0x3a, 0x3d, 0xb2, 0xe4, 0x21, 0x15, 0x3b, 0x20, 0x27, 0x4b, 0x9d, 0xd2, 0xd6, + 0xba, 0xaa, 0xb3, 0xcc, 0x89, 0xa0, 0xb9, 0x80, 0x86, 0xc8, 0x49, 0x89, 0xac, 0x9e, 0x1c, 0xee, + 0xd7, 0x26, 0xec, 0x88, 0xc2, 0xca, 0x63, 0x71, 0x17, 0x4b, 0x32, 0x9e, 0x6b, 0xf1, 0x50, 0x10, + 0xec, 0x07, 0x67, 0xb1, 0xd6, 0xdf, 0x0b, 0x7a, 0x63, 0x54, 0xac, 0x2d, 0xa3, 0xa2, 0x57, 0x93, + 0xb5, 0x56, 0x4d, 0x9f, 0xc1, 0x8e, 0x90, 0xa3, 0x17, 0xb5, 0x0e, 0xea, 0xb1, 0xad, 0xaf, 0xc6, + 0xf6, 0xaa, 0xd1, 0xf9, 0xaf, 0x01, 0xce, 0x69, 0x16, 0x45, 0x03, 0xc2, 0x98, 0x3f, 0x25, 0x87, + 0x6f, 0x46, 0x64, 0xf9, 0x34, 0x64, 0xa9, 0x47, 0xd8, 0x02, 0x13, 0x45, 0x92, 0xe4, 0x28, 0x0e, + 0x08, 0x8f, 0x92, 0xe5, 0xe5, 0x24, 0xba, 0x48, 0x92, 0x04, 0x2d, 0x90, 0xdd, 0x40, 0x50, 0x88, + 0xcf, 0xfd, 0xd7, 0x23, 0xb2, 0x94, 0x9d, 0x40, 0x52, 0x1c, 0x0f, 0x29, 0xe2, 0x55, 0x89, 0x73, + 0xca, 0xfe, 0x31, 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ep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 18:31:13 +0800 Subject: [PATCH 214/337] Refactor code --- internal/api/group/group.go | 2 +- pkg/base_info/group_api_struct.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/api/group/group.go b/internal/api/group/group.go index 749f2d293..cde682e31 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -176,7 +176,7 @@ func GetGroupAllMemberList(c *gin.Context) { log.NewDebug(req.OperationID, "MarshalToString ", s, err) m := ProtoToMap(memberListResp.MemberList[0], false) log.NewDebug(req.OperationID, "mmm ", m) - memberListResp.Test = m + memberListResp.Test = append(memberListResp.Test, m) } log.NewInfo(req.OperationID, "GetGroupAllMember api return ", memberListResp) diff --git a/pkg/base_info/group_api_struct.go b/pkg/base_info/group_api_struct.go index 33ae4b845..f52590671 100644 --- a/pkg/base_info/group_api_struct.go +++ b/pkg/base_info/group_api_struct.go @@ -70,7 +70,7 @@ type GetGroupAllMemberReq struct { type GetGroupAllMemberResp struct { CommResp MemberList []*open_im_sdk.GroupMemberFullInfo `json:"data"` - Test map[string]interface{} `json:"data2"` + Test []map[string]interface{} `json:"data2"` } type CreateGroupReq struct { From 7b41ce1f24dd6c75c2c50575802dd822e53671b2 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 18:33:01 +0800 Subject: [PATCH 215/337] Refactor code --- internal/api/group/group.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/internal/api/group/group.go b/internal/api/group/group.go index cde682e31..f446d93a1 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -171,12 +171,15 @@ func GetGroupAllMemberList(c *gin.Context) { } if len(memberListResp.MemberList) > 0 { - s, err := jsm.MarshalToString(memberListResp.MemberList[0]) - //{"GroupID":"7836e478bc43ce1d3b8889cac983f59b","UserID":"openIM001","roleLevel":1,"JoinTime":"0","NickName":"","FaceUrl":"https://oss.com.cn/head","AppMangerLevel":0,"JoinSource":0,"OperatorUserID":"","Ex":"xxx"} - log.NewDebug(req.OperationID, "MarshalToString ", s, err) - m := ProtoToMap(memberListResp.MemberList[0], false) - log.NewDebug(req.OperationID, "mmm ", m) - memberListResp.Test = append(memberListResp.Test, m) + for _, v := range memberListResp.MemberList { + s, err := jsm.MarshalToString(v) + //{"GroupID":"7836e478bc43ce1d3b8889cac983f59b","UserID":"openIM001","roleLevel":1,"JoinTime":"0","NickName":"","FaceUrl":"https://oss.com.cn/head","AppMangerLevel":0,"JoinSource":0,"OperatorUserID":"","Ex":"xxx"} + log.NewDebug(req.OperationID, "MarshalToString ", s, err) + m := ProtoToMap(memberListResp.MemberList[0], false) + log.NewDebug(req.OperationID, "mmm ", m) + memberListResp.Test = append(memberListResp.Test, m) + } + } log.NewInfo(req.OperationID, "GetGroupAllMember api return ", memberListResp) From 7a3bb59d3e705cddb933823b5e6e7680426f065b Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 30 Dec 2021 19:12:50 +0800 Subject: [PATCH 216/337] add null value handle --- internal/api/group/group.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/api/group/group.go b/internal/api/group/group.go index 66af1501d..c5132b769 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -234,9 +234,9 @@ func GetJoinedGroupList(c *gin.Context) { return } - GroupListResp := api.GetJoinedGroupListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, Data: RpcResp.GroupList} + GroupListResp := api.GetJoinedGroupListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, GroupInfoList: RpcResp.GroupList} if len(RpcResp.GroupList) == 0 { - GroupListResp.Data = []*open_im_sdk.GroupInfo{} + GroupListResp.GroupInfoList = []*open_im_sdk.GroupInfo{} } c.JSON(http.StatusOK, GroupListResp) log.NewInfo(req.OperationID, "GetJoinedGroupList api return ", GroupListResp) From 18600bcd112ed6026cc07f049fa443392202c450 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 20:09:45 +0800 Subject: [PATCH 217/337] Refactor code --- internal/api/group/group.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/internal/api/group/group.go b/internal/api/group/group.go index f446d93a1..565dcc206 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -182,16 +182,27 @@ func GetGroupAllMemberList(c *gin.Context) { } + memberListResp.Test = JsonData(memberListResp.MemberList) log.NewInfo(req.OperationID, "GetGroupAllMember api return ", memberListResp) c.JSON(http.StatusOK, memberListResp) } +func JsonData(resp interface{}) []map[string]interface{} { + var result []map[string]interface{} + for _, v := range resp.([]proto.Message) { + m := ProtoToMap(v.(proto.Message), false) + result = append(result, m) + } + return result +} + func ProtoToMap(pb proto.Message, idFix bool) map[string]interface{} { marshaler := jsonpb.Marshaler{ OrigName: true, EnumsAsInts: false, EmitDefaults: true, } + s, _ := marshaler.MarshalToString(pb) out := make(map[string]interface{}) json.Unmarshal([]byte(s), &out) From a5765fc25ab6f33a5e9822bf45051574948d4903 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 20:39:49 +0800 Subject: [PATCH 218/337] Refactor code --- internal/api/group/group.go | 1 - 1 file changed, 1 deletion(-) diff --git a/internal/api/group/group.go b/internal/api/group/group.go index 565dcc206..f25fccb74 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -173,7 +173,6 @@ func GetGroupAllMemberList(c *gin.Context) { if len(memberListResp.MemberList) > 0 { for _, v := range memberListResp.MemberList { s, err := jsm.MarshalToString(v) - //{"GroupID":"7836e478bc43ce1d3b8889cac983f59b","UserID":"openIM001","roleLevel":1,"JoinTime":"0","NickName":"","FaceUrl":"https://oss.com.cn/head","AppMangerLevel":0,"JoinSource":0,"OperatorUserID":"","Ex":"xxx"} log.NewDebug(req.OperationID, "MarshalToString ", s, err) m := ProtoToMap(memberListResp.MemberList[0], false) log.NewDebug(req.OperationID, "mmm ", m) From 0fce4c6177e888f771c888a918e13b96013053d8 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 20:51:33 +0800 Subject: [PATCH 219/337] Refactor code --- internal/api/group/group.go | 69 ++++++++++--------------------- internal/utils/utils.go | 39 +++++++++++++++++ pkg/base_info/group_api_struct.go | 4 +- 3 files changed, 62 insertions(+), 50 deletions(-) create mode 100644 internal/utils/utils.go diff --git a/internal/api/group/group.go b/internal/api/group/group.go index f09e86e6b..5b3fd9c4e 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -10,12 +10,13 @@ import ( open_im_sdk "Open_IM/pkg/proto/sdk_ws" "Open_IM/pkg/utils" "context" - "encoding/json" + "github.com/gin-gonic/gin" - "github.com/golang/protobuf/jsonpb" - "github.com/golang/protobuf/proto" + "net/http" "strings" + + jsonData "Open_IM/internal/utils" ) func KickGroupMember(c *gin.Context) { @@ -167,56 +168,28 @@ func GetGroupAllMemberList(c *gin.Context) { memberListResp.MemberList = []*open_im_sdk.GroupMemberFullInfo{} } - jsm := &jsonpb.Marshaler{ - OrigName: true, - EnumsAsInts: false, - EmitDefaults: true, - } + //jsm := &jsonpb.Marshaler{ + // OrigName: true, + // EnumsAsInts: false, + // EmitDefaults: true, + //} + // + //if len(memberListResp.MemberList) > 0 { + // for _, v := range memberListResp.MemberList { + // s, err := jsm.MarshalToString(v) + // log.NewDebug(req.OperationID, "MarshalToString ", s, err) + // m := ProtoToMap(memberListResp.MemberList[0], false) + // log.NewDebug(req.OperationID, "mmm ", m) + // memberListResp.Test = append(memberListResp.Test, m) + // } + // + //} - if len(memberListResp.MemberList) > 0 { - for _, v := range memberListResp.MemberList { - s, err := jsm.MarshalToString(v) - log.NewDebug(req.OperationID, "MarshalToString ", s, err) - m := ProtoToMap(memberListResp.MemberList[0], false) - log.NewDebug(req.OperationID, "mmm ", m) - memberListResp.Test = append(memberListResp.Test, m) - } - - } - - memberListResp.Test = JsonData(memberListResp.MemberList) + memberListResp.Test = jsonData.JsonDataList(memberListResp.MemberList) log.NewInfo(req.OperationID, "GetGroupAllMember api return ", memberListResp) c.JSON(http.StatusOK, memberListResp) } -func JsonData(resp interface{}) []map[string]interface{} { - var result []map[string]interface{} - for _, v := range resp.([]proto.Message) { - m := ProtoToMap(v.(proto.Message), false) - result = append(result, m) - } - return result -} - -func ProtoToMap(pb proto.Message, idFix bool) map[string]interface{} { - marshaler := jsonpb.Marshaler{ - OrigName: true, - EnumsAsInts: false, - EmitDefaults: true, - } - - s, _ := marshaler.MarshalToString(pb) - out := make(map[string]interface{}) - json.Unmarshal([]byte(s), &out) - if idFix { - if _, ok := out["id"]; ok { - out["_id"] = out["id"] - delete(out, "id") - } - } - return out -} - func GetJoinedGroupList(c *gin.Context) { params := api.GetJoinedGroupListReq{} if err := c.BindJSON(¶ms); err != nil { diff --git a/internal/utils/utils.go b/internal/utils/utils.go new file mode 100644 index 000000000..45fe64435 --- /dev/null +++ b/internal/utils/utils.go @@ -0,0 +1,39 @@ +package utils + +import ( + "encoding/json" + "github.com/golang/protobuf/jsonpb" + "github.com/golang/protobuf/proto" +) + +func JsonDataList(resp interface{}) []map[string]interface{} { + result := make([]map[string]interface{}, 0) + for _, v := range resp.([]proto.Message) { + m := ProtoToMap(v.(proto.Message), false) + result = append(result, m) + } + return result +} + +func JsonDataOne(pb proto.Message) map[string]interface{} { + return ProtoToMap(pb, false) +} + +func ProtoToMap(pb proto.Message, idFix bool) map[string]interface{} { + marshaler := jsonpb.Marshaler{ + OrigName: true, + EnumsAsInts: false, + EmitDefaults: true, + } + + s, _ := marshaler.MarshalToString(pb) + out := make(map[string]interface{}) + json.Unmarshal([]byte(s), &out) + if idFix { + if _, ok := out["id"]; ok { + out["_id"] = out["id"] + delete(out, "id") + } + } + return out +} diff --git a/pkg/base_info/group_api_struct.go b/pkg/base_info/group_api_struct.go index f52590671..e11bd1f8f 100644 --- a/pkg/base_info/group_api_struct.go +++ b/pkg/base_info/group_api_struct.go @@ -69,8 +69,8 @@ type GetGroupAllMemberReq struct { } type GetGroupAllMemberResp struct { CommResp - MemberList []*open_im_sdk.GroupMemberFullInfo `json:"data"` - Test []map[string]interface{} `json:"data2"` + MemberList []*open_im_sdk.GroupMemberFullInfo + Test []map[string]interface{} `json:"data"` } type CreateGroupReq struct { From eb417c7e22d38289b471a5c21c26b4bc68ebb780 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 21:03:52 +0800 Subject: [PATCH 220/337] Refactor code --- cmd/open_im_api/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index 46c79536e..ff61b1ccb 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -57,7 +57,7 @@ func main() { groupRouterGroup.POST("/get_groups_info", group.GetGroupsInfo) //1 groupRouterGroup.POST("/kick_group", group.KickGroupMember) //1 groupRouterGroup.POST("/get_group_member_list", group.GetGroupMemberList) //no use - groupRouterGroup.POST("/get_group_all_member_list", group.GetGroupAllMember) //1 + groupRouterGroup.POST("/get_group_all_member_list", group.GetGroupAllMemberList) //1 groupRouterGroup.POST("/get_group_members_info", group.GetGroupMembersInfo) //1 groupRouterGroup.POST("/invite_user_to_group", group.InviteUserToGroup) //1 groupRouterGroup.POST("/get_joined_group_list", group.GetJoinedGroupList) //1 From a654073c71275632b9495bbc849e4dbbee7f513a Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 21:09:37 +0800 Subject: [PATCH 221/337] Refactor code --- internal/utils/utils.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/utils/utils.go b/internal/utils/utils.go index 45fe64435..444e6f730 100644 --- a/internal/utils/utils.go +++ b/internal/utils/utils.go @@ -6,9 +6,9 @@ import ( "github.com/golang/protobuf/proto" ) -func JsonDataList(resp interface{}) []map[string]interface{} { +func JsonDataList(resp ...interface{}) []map[string]interface{} { result := make([]map[string]interface{}, 0) - for _, v := range resp.([]proto.Message) { + for _, v := range resp { m := ProtoToMap(v.(proto.Message), false) result = append(result, m) } From dcba4fef48c46debe33dd8befc56c1b83fba040b Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 21:28:38 +0800 Subject: [PATCH 222/337] Refactor code --- internal/api/group/group.go | 2 ++ internal/utils/utils.go | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/api/group/group.go b/internal/api/group/group.go index 5b3fd9c4e..41281afd6 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -17,6 +17,7 @@ import ( "strings" jsonData "Open_IM/internal/utils" + "github.com/golang/protobuf/proto" ) func KickGroupMember(c *gin.Context) { @@ -186,6 +187,7 @@ func GetGroupAllMemberList(c *gin.Context) { //} memberListResp.Test = jsonData.JsonDataList(memberListResp.MemberList) + log.NewInfo(req.OperationID, "GetGroupAllMember api return ", memberListResp) c.JSON(http.StatusOK, memberListResp) } diff --git a/internal/utils/utils.go b/internal/utils/utils.go index 444e6f730..cc25645ed 100644 --- a/internal/utils/utils.go +++ b/internal/utils/utils.go @@ -8,8 +8,8 @@ import ( func JsonDataList(resp ...interface{}) []map[string]interface{} { result := make([]map[string]interface{}, 0) - for _, v := range resp { - m := ProtoToMap(v.(proto.Message), false) + for _, v := range resp[0].([]proto.Message) { + m := ProtoToMap(v, false) result = append(result, m) } return result From ab5faec68cd2f5d46b7a8890419c3dda724acd21 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 30 Dec 2021 21:29:10 +0800 Subject: [PATCH 223/337] Refactor code --- internal/api/group/group.go | 1 - 1 file changed, 1 deletion(-) diff --git a/internal/api/group/group.go b/internal/api/group/group.go index 41281afd6..541ffa873 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -17,7 +17,6 @@ import ( "strings" jsonData "Open_IM/internal/utils" - "github.com/golang/protobuf/proto" ) func KickGroupMember(c *gin.Context) { From c8d803b559ff0d434d75dd8390b9092cfe3caef5 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Fri, 31 Dec 2021 08:49:05 +0800 Subject: [PATCH 224/337] Refactor code --- internal/api/group/group.go | 17 ----------------- internal/utils/utils.go | 14 ++++++++++++-- pkg/base_info/group_api_struct.go | 3 ++- 3 files changed, 14 insertions(+), 20 deletions(-) diff --git a/internal/api/group/group.go b/internal/api/group/group.go index 541ffa873..d72d1c08f 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -168,23 +168,6 @@ func GetGroupAllMemberList(c *gin.Context) { memberListResp.MemberList = []*open_im_sdk.GroupMemberFullInfo{} } - //jsm := &jsonpb.Marshaler{ - // OrigName: true, - // EnumsAsInts: false, - // EmitDefaults: true, - //} - // - //if len(memberListResp.MemberList) > 0 { - // for _, v := range memberListResp.MemberList { - // s, err := jsm.MarshalToString(v) - // log.NewDebug(req.OperationID, "MarshalToString ", s, err) - // m := ProtoToMap(memberListResp.MemberList[0], false) - // log.NewDebug(req.OperationID, "mmm ", m) - // memberListResp.Test = append(memberListResp.Test, m) - // } - // - //} - memberListResp.Test = jsonData.JsonDataList(memberListResp.MemberList) log.NewInfo(req.OperationID, "GetGroupAllMember api return ", memberListResp) diff --git a/internal/utils/utils.go b/internal/utils/utils.go index cc25645ed..8656534ee 100644 --- a/internal/utils/utils.go +++ b/internal/utils/utils.go @@ -4,11 +4,21 @@ import ( "encoding/json" "github.com/golang/protobuf/jsonpb" "github.com/golang/protobuf/proto" + "reflect" ) -func JsonDataList(resp ...interface{}) []map[string]interface{} { +func JsonDataList(resp interface{}) []map[string]interface{} { + var list []proto.Message + if reflect.TypeOf(resp).Kind() == reflect.Slice { + s := reflect.ValueOf(resp) + for i := 0; i < s.Len(); i++ { + ele := s.Index(i) + list = append(list, ele.Interface().(proto.Message)) + } + } + result := make([]map[string]interface{}, 0) - for _, v := range resp[0].([]proto.Message) { + for _, v := range list { m := ProtoToMap(v, false) result = append(result, m) } diff --git a/pkg/base_info/group_api_struct.go b/pkg/base_info/group_api_struct.go index e11bd1f8f..d3c6d09b6 100644 --- a/pkg/base_info/group_api_struct.go +++ b/pkg/base_info/group_api_struct.go @@ -70,7 +70,8 @@ type GetGroupAllMemberReq struct { type GetGroupAllMemberResp struct { CommResp MemberList []*open_im_sdk.GroupMemberFullInfo - Test []map[string]interface{} `json:"data"` + + Test []map[string]interface{} `json:"data"` } type CreateGroupReq struct { From aab6ad96ebad7229085f4c6ee5372e0b8a2a0bde Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Fri, 31 Dec 2021 09:04:04 +0800 Subject: [PATCH 225/337] Refactor code --- internal/api/group/group.go | 30 ++++++++++++------------------ pkg/base_info/group_api_struct.go | 19 ++++++++++++------- 2 files changed, 24 insertions(+), 25 deletions(-) diff --git a/internal/api/group/group.go b/internal/api/group/group.go index d72d1c08f..2fa527e67 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -91,10 +91,8 @@ func GetGroupMembersInfo(c *gin.Context) { return } - memberListResp := api.GetGroupMembersInfoResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, Data: RpcResp.MemberList} - if len(RpcResp.MemberList) == 0 { - memberListResp.Data = []*open_im_sdk.GroupMemberFullInfo{} - } + memberListResp := api.GetGroupMembersInfoResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, MemberList: RpcResp.MemberList} + memberListResp.Data = jsonData.JsonDataList(RpcResp.MemberList) log.NewInfo(req.OperationID, "GetGroupMembersInfo api return ", memberListResp) c.JSON(http.StatusOK, memberListResp) } @@ -128,9 +126,7 @@ func GetGroupMemberList(c *gin.Context) { } memberListResp := api.GetGroupMemberListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, MemberList: RpcResp.MemberList, NextSeq: RpcResp.NextSeq} - if len(memberListResp.MemberList) == 0 { - memberListResp.MemberList = []*open_im_sdk.GroupMemberFullInfo{} - } + memberListResp.Data = jsonData.JsonDataList(memberListResp.MemberList) log.NewInfo(req.OperationID, "GetGroupMemberList api return ", memberListResp) c.JSON(http.StatusOK, memberListResp) @@ -164,12 +160,7 @@ func GetGroupAllMemberList(c *gin.Context) { } memberListResp := api.GetGroupAllMemberResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, MemberList: RpcResp.MemberList} - if len(memberListResp.MemberList) == 0 { - memberListResp.MemberList = []*open_im_sdk.GroupMemberFullInfo{} - } - - memberListResp.Test = jsonData.JsonDataList(memberListResp.MemberList) - + memberListResp.Data = jsonData.JsonDataList(memberListResp.MemberList) log.NewInfo(req.OperationID, "GetGroupAllMember api return ", memberListResp) c.JSON(http.StatusOK, memberListResp) } @@ -202,11 +193,9 @@ func GetJoinedGroupList(c *gin.Context) { } GroupListResp := api.GetJoinedGroupListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, GroupInfoList: RpcResp.GroupList} - if len(RpcResp.GroupList) == 0 { - GroupListResp.GroupInfoList = []*open_im_sdk.GroupInfo{} - } - c.JSON(http.StatusOK, GroupListResp) + GroupListResp.Data = jsonData.JsonDataList(GroupListResp.GroupInfoList) log.NewInfo(req.OperationID, "GetJoinedGroupList api return ", GroupListResp) + c.JSON(http.StatusOK, GroupListResp) } func InviteUserToGroup(c *gin.Context) { @@ -240,8 +229,13 @@ func InviteUserToGroup(c *gin.Context) { for _, v := range RpcResp.Id2ResultList { resp.UserIDResultList = append(resp.UserIDResultList, api.UserIDResult{UserID: v.UserID, Result: v.Result}) } - c.JSON(http.StatusOK, resp) + + if len(resp.UserIDResultList) == 0 { + resp.UserIDResultList = []api.UserIDResult{} + } + log.NewInfo(req.OperationID, "InviteUserToGroup api return ", resp) + c.JSON(http.StatusOK, resp) } func CreateGroup(c *gin.Context) { diff --git a/pkg/base_info/group_api_struct.go b/pkg/base_info/group_api_struct.go index d3c6d09b6..4817d2669 100644 --- a/pkg/base_info/group_api_struct.go +++ b/pkg/base_info/group_api_struct.go @@ -28,7 +28,8 @@ type GetGroupMembersInfoReq struct { } type GetGroupMembersInfoResp struct { CommResp - Data []*open_im_sdk.GroupMemberFullInfo `json:"data"` + MemberList []*open_im_sdk.GroupMemberFullInfo + Data []map[string]interface{} `json:"data"` } type InviteUserToGroupReq struct { @@ -48,7 +49,8 @@ type GetJoinedGroupListReq struct { } type GetJoinedGroupListResp struct { CommResp - GroupInfoList []*open_im_sdk.GroupInfo `json:"data"` + GroupInfoList []*open_im_sdk.GroupInfo + Data []map[string]interface{} `json:"data"` } type GetGroupMemberListReq struct { @@ -59,8 +61,9 @@ type GetGroupMemberListReq struct { } type GetGroupMemberListResp struct { CommResp - NextSeq int32 `json:"nextSeq"` - MemberList []*open_im_sdk.GroupMemberFullInfo `json:"data"` + NextSeq int32 `json:"nextSeq"` + MemberList []*open_im_sdk.GroupMemberFullInfo + Data []map[string]interface{} `json:"data"` } type GetGroupAllMemberReq struct { @@ -71,7 +74,7 @@ type GetGroupAllMemberResp struct { CommResp MemberList []*open_im_sdk.GroupMemberFullInfo - Test []map[string]interface{} `json:"data"` + Data []map[string]interface{} `json:"data"` } type CreateGroupReq struct { @@ -93,7 +96,8 @@ type GetGroupApplicationListReq struct { } type GetGroupApplicationListResp struct { CommResp - GroupRequestList []*open_im_sdk.GroupRequest `json:"data"` + GroupRequestList []*open_im_sdk.GroupRequest + Data []map[string]interface{} `json:"data"` } type GetGroupInfoReq struct { @@ -102,7 +106,8 @@ type GetGroupInfoReq struct { } type GetGroupInfoResp struct { CommResp - GroupInfoList []*open_im_sdk.GroupInfo `json:"data"` + GroupInfoList []*open_im_sdk.GroupInfo + Data []map[string]interface{} `json:"data"` } type ApplicationGroupResponseReq struct { From 9bee5c79c8189eeafe524ff16be688a6ef6584ff Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Fri, 31 Dec 2021 09:25:11 +0800 Subject: [PATCH 226/337] Refactor code --- internal/api/friend/friend.go | 16 ++++++---------- internal/api/group/group.go | 9 +++------ internal/api/user/user.go | 2 ++ pkg/base_info/friend_api_struct.go | 21 ++++++++++----------- pkg/base_info/group_api_struct.go | 7 +++---- pkg/base_info/user_api_struct.go | 3 ++- 6 files changed, 26 insertions(+), 32 deletions(-) diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go index bbb31236c..eb755879b 100644 --- a/internal/api/friend/friend.go +++ b/internal/api/friend/friend.go @@ -1,6 +1,7 @@ package friend import ( + jsonData "Open_IM/internal/utils" api "Open_IM/pkg/base_info" "Open_IM/pkg/common/config" "Open_IM/pkg/common/log" @@ -214,10 +215,11 @@ func GetBlacklist(c *gin.Context) { resp := api.GetBlackListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}} for _, v := range RpcResp.BlackUserInfoList { - black := api.BlackUserInfo{} + black := open_im_sdk.PublicUserInfo{} utils.CopyStructFields(&black, v) resp.BlackUserInfoList = append(resp.BlackUserInfoList, &black) } + resp.Data = jsonData.JsonDataList(resp.BlackUserInfoList) log.NewInfo(req.CommID.OperationID, "GetBlacklist api return ", resp) c.JSON(http.StatusOK, resp) } @@ -381,9 +383,7 @@ func GetFriendList(c *gin.Context) { } resp := api.GetFriendListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, FriendInfoList: RpcResp.FriendInfoList} - if len(resp.FriendInfoList) == 0 { - resp.FriendInfoList = []*open_im_sdk.FriendInfo{} - } + resp.Data = jsonData.JsonDataList(resp.FriendInfoList) log.NewInfo(req.CommID.OperationID, "GetFriendList api return ", resp) c.JSON(http.StatusOK, resp) } @@ -417,9 +417,7 @@ func GetFriendApplyList(c *gin.Context) { } resp := api.GetFriendApplyListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, FriendRequestList: RpcResp.FriendRequestList} - if len(resp.FriendRequestList) == 0 { - resp.FriendRequestList = []*open_im_sdk.FriendRequest{} - } + resp.Data = jsonData.JsonDataList(resp.FriendRequestList) log.NewInfo(req.CommID.OperationID, "GetFriendApplyList api return ", resp) c.JSON(http.StatusOK, resp) } @@ -451,9 +449,7 @@ func GetSelfApplyList(c *gin.Context) { return } resp := api.GetSelfApplyListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, FriendRequestList: RpcResp.FriendRequestList} - if len(resp.FriendRequestList) == 0 { - resp.FriendRequestList = []*open_im_sdk.FriendRequest{} - } + resp.Data = jsonData.JsonDataList(resp.FriendRequestList) log.NewInfo(req.CommID.OperationID, "GetSelfApplyList api return ", resp) c.JSON(http.StatusOK, resp) } diff --git a/internal/api/group/group.go b/internal/api/group/group.go index 2fa527e67..ef3c599cb 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -271,6 +271,7 @@ func CreateGroup(c *gin.Context) { resp := api.CreateGroupResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}} if RpcResp.ErrCode == 0 { utils.CopyStructFields(&resp.GroupInfo, RpcResp.GroupInfo) + resp.Data = jsonData.JsonDataOne(&resp.GroupInfo) } log.NewInfo(req.OperationID, "CreateGroup api return ", resp) c.JSON(http.StatusOK, resp) @@ -305,9 +306,7 @@ func GetGroupApplicationList(c *gin.Context) { } resp := api.GetGroupApplicationListResp{CommResp: api.CommResp{ErrCode: reply.ErrCode, ErrMsg: reply.ErrMsg}, GroupRequestList: reply.GroupRequestList} - if len(resp.GroupRequestList) == 0 { - resp.GroupRequestList = []*open_im_sdk.GroupRequest{} - } + resp.Data = jsonData.JsonDataList(resp.GroupRequestList) log.NewInfo(req.OperationID, "GetGroupApplicationList api return ", resp) c.JSON(http.StatusOK, resp) } @@ -340,9 +339,7 @@ func GetGroupsInfo(c *gin.Context) { } resp := api.GetGroupInfoResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, GroupInfoList: RpcResp.GroupInfoList} - if len(resp.GroupInfoList) == 0 { - resp.GroupInfoList = []*open_im_sdk.GroupInfo{} - } + resp.Data = jsonData.JsonDataList(resp.GroupInfoList) log.NewInfo(req.OperationID, "GetGroupsInfo api return ", resp) c.JSON(http.StatusOK, resp) } diff --git a/internal/api/user/user.go b/internal/api/user/user.go index 3a2620d51..ebc5decf7 100644 --- a/internal/api/user/user.go +++ b/internal/api/user/user.go @@ -1,6 +1,7 @@ package user import ( + jsonData "Open_IM/internal/utils" api "Open_IM/pkg/base_info" "Open_IM/pkg/common/config" "Open_IM/pkg/common/log" @@ -43,6 +44,7 @@ func GetUserInfo(c *gin.Context) { } resp := api.GetUserInfoResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, UserInfoList: RpcResp.UserInfoList} + resp.Data = jsonData.JsonDataList(resp.UserInfoList) log.NewInfo(req.OperationID, "GetUserInfo api return ", resp) c.JSON(http.StatusOK, resp) } diff --git a/pkg/base_info/friend_api_struct.go b/pkg/base_info/friend_api_struct.go index 653730fc0..4b99b71e3 100644 --- a/pkg/base_info/friend_api_struct.go +++ b/pkg/base_info/friend_api_struct.go @@ -39,8 +39,6 @@ type AddFriendResp struct { type AddFriendResponseReq struct { ParamsCommFriend - //binding:"oneof=0 1 2"` - //} Flag int32 `json:"flag" binding:"required,oneof=-1 0 1"` HandleMsg string `json:"handleMsg"` } @@ -61,7 +59,8 @@ type GetBlackListReq struct { } type GetBlackListResp struct { CommResp - BlackUserInfoList []*BlackUserInfo `json:"data"` + BlackUserInfoList []*open_im_sdk.PublicUserInfo + Data []map[string]interface{} `json:"data"` } //type PublicUserInfo struct { @@ -71,10 +70,6 @@ type GetBlackListResp struct { // Gender int32 `json:"gender"` //} -type BlackUserInfo struct { - open_im_sdk.PublicUserInfo -} - type SetFriendRemarkReq struct { ParamsCommFriend Remark string `json:"remark" binding:"required"` @@ -106,7 +101,8 @@ type GetFriendsInfoReq struct { } type GetFriendsInfoResp struct { CommResp - FriendInfoList []*open_im_sdk.FriendInfo `json:"data"` + FriendInfoList []*open_im_sdk.FriendInfo + Data []map[string]interface{} `json:"data"` } type GetFriendListReq struct { @@ -115,7 +111,8 @@ type GetFriendListReq struct { } type GetFriendListResp struct { CommResp - FriendInfoList []*open_im_sdk.FriendInfo `json:"data"` + FriendInfoList []*open_im_sdk.FriendInfo + Data []map[string]interface{} `json:"data"` } type GetFriendApplyListReq struct { @@ -124,7 +121,8 @@ type GetFriendApplyListReq struct { } type GetFriendApplyListResp struct { CommResp - FriendRequestList []*open_im_sdk.FriendRequest `json:"data"` + FriendRequestList []*open_im_sdk.FriendRequest + Data []map[string]interface{} `json:"data"` } type GetSelfApplyListReq struct { @@ -133,5 +131,6 @@ type GetSelfApplyListReq struct { } type GetSelfApplyListResp struct { CommResp - FriendRequestList []*open_im_sdk.FriendRequest `json:"data"` + FriendRequestList []*open_im_sdk.FriendRequest + Data []map[string]interface{} `json:"data"` } diff --git a/pkg/base_info/group_api_struct.go b/pkg/base_info/group_api_struct.go index 4817d2669..69c124561 100644 --- a/pkg/base_info/group_api_struct.go +++ b/pkg/base_info/group_api_struct.go @@ -73,8 +73,7 @@ type GetGroupAllMemberReq struct { type GetGroupAllMemberResp struct { CommResp MemberList []*open_im_sdk.GroupMemberFullInfo - - Data []map[string]interface{} `json:"data"` + Data []map[string]interface{} `json:"data"` } type CreateGroupReq struct { @@ -84,10 +83,10 @@ type CreateGroupReq struct { GroupType int32 `json:"groupType"` OperationID string `json:"operationID" binding:"required"` } - type CreateGroupResp struct { CommResp - GroupInfo open_im_sdk.GroupInfo `json:"data"` + GroupInfo open_im_sdk.GroupInfo + Data map[string]interface{} `json:"data"` } type GetGroupApplicationListReq struct { diff --git a/pkg/base_info/user_api_struct.go b/pkg/base_info/user_api_struct.go index 8b9d54b4f..d8412f069 100644 --- a/pkg/base_info/user_api_struct.go +++ b/pkg/base_info/user_api_struct.go @@ -10,7 +10,8 @@ type GetUserInfoReq struct { } type GetUserInfoResp struct { CommResp - UserInfoList []*open_im_sdk.UserInfo `json:"data"` + UserInfoList []*open_im_sdk.UserInfo + Data []map[string]interface{} `json:"data"` } type UpdateUserInfoReq struct { From da1a563a3c4e880c239f57563a6a91ead639a4cf Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Fri, 31 Dec 2021 09:40:08 +0800 Subject: [PATCH 227/337] Refactor code --- pkg/base_info/group_api_struct.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/base_info/group_api_struct.go b/pkg/base_info/group_api_struct.go index 69c124561..75248bc20 100644 --- a/pkg/base_info/group_api_struct.go +++ b/pkg/base_info/group_api_struct.go @@ -28,8 +28,8 @@ type GetGroupMembersInfoReq struct { } type GetGroupMembersInfoResp struct { CommResp - MemberList []*open_im_sdk.GroupMemberFullInfo - Data []map[string]interface{} `json:"data"` + MemberList []*open_im_sdk.GroupMemberFullInfo `json:"-"` + Data []map[string]interface{} `json:"data"` } type InviteUserToGroupReq struct { From 9b2fde6ea26364e8ea728c516433b47e0d7645ab Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Fri, 31 Dec 2021 09:43:22 +0800 Subject: [PATCH 228/337] Refactor code --- pkg/base_info/group_api_struct.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/base_info/group_api_struct.go b/pkg/base_info/group_api_struct.go index 75248bc20..68b19f93a 100644 --- a/pkg/base_info/group_api_struct.go +++ b/pkg/base_info/group_api_struct.go @@ -72,8 +72,8 @@ type GetGroupAllMemberReq struct { } type GetGroupAllMemberResp struct { CommResp - MemberList []*open_im_sdk.GroupMemberFullInfo - Data []map[string]interface{} `json:"data"` + MemberList []*open_im_sdk.GroupMemberFullInfo `json:"-"` + Data []map[string]interface{} `json:"data"` } type CreateGroupReq struct { From da7d1876123da5827d079922194e15c78bf6dc11 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Fri, 31 Dec 2021 10:40:32 +0800 Subject: [PATCH 229/337] Refactor code --- .../im_mysql_model => }/model_struct.go | 2 +- pkg/common/db/mongoModel.go | 6 ++-- pkg/common/db/mysql.go | 20 +++++++++-- .../im_mysql_model/friend_model.go | 10 +++--- .../im_mysql_model/friend_request_model.go | 16 ++++----- .../im_mysql_model/group_member_model.go | 34 +++++++++---------- .../mysql_model/im_mysql_model/group_model.go | 8 ++--- .../im_mysql_model/group_request_model.go | 18 +++++----- .../im_mysql_model/user_black_list_model.go | 8 ++--- .../mysql_model/im_mysql_model/user_model.go | 12 +++---- 10 files changed, 75 insertions(+), 59 deletions(-) rename pkg/common/db/{mysql_model/im_mysql_model => }/model_struct.go (99%) diff --git a/pkg/common/db/mysql_model/im_mysql_model/model_struct.go b/pkg/common/db/model_struct.go similarity index 99% rename from pkg/common/db/mysql_model/im_mysql_model/model_struct.go rename to pkg/common/db/model_struct.go index d47ca5334..c2ab763c5 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/model_struct.go +++ b/pkg/common/db/model_struct.go @@ -1,4 +1,4 @@ -package im_mysql_model +package db import "time" diff --git a/pkg/common/db/mongoModel.go b/pkg/common/db/mongoModel.go index 99da02b0b..bb8650309 100644 --- a/pkg/common/db/mongoModel.go +++ b/pkg/common/db/mongoModel.go @@ -28,7 +28,7 @@ type UserChat struct { Msg []MsgInfo } -type GroupMember struct { +type GroupMember_x struct { GroupID string UIDList []string } @@ -248,7 +248,7 @@ func (d *DataBases) MgoSkipUID(count int) (string, error) { } func (d *DataBases) GetGroupMember(groupID string) []string { - groupInfo := GroupMember{} + groupInfo := GroupMember_x{} groupInfo.GroupID = groupID groupInfo.UIDList = make([]string, 0) @@ -282,7 +282,7 @@ func (d *DataBases) AddGroupMember(groupID, uid string) error { } if n == 0 { - groupInfo := GroupMember{} + groupInfo := GroupMember_x{} groupInfo.GroupID = groupID groupInfo.UIDList = append(groupInfo.UIDList, uid) err = c.Insert(&groupInfo) diff --git a/pkg/common/db/mysql.go b/pkg/common/db/mysql.go index 152273f97..173843ec1 100644 --- a/pkg/common/db/mysql.go +++ b/pkg/common/db/mysql.go @@ -23,19 +23,22 @@ func initMysqlDB() { var err1 error db, err := gorm.Open("mysql", dsn) if err != nil { - log.Error("", "", dsn) + log.NewError("0", "Open failed ", err.Error(), dsn) } if err != nil { time.Sleep(time.Duration(30) * time.Second) db, err1 = gorm.Open("mysql", dsn) if err1 != nil { + log.NewError("0", "Open failed ", err1.Error(), dsn) panic(err1.Error()) } } + //Check the database and table during initialization - sql := fmt.Sprintf("CREATE DATABASE IF NOT EXISTS %s ;", config.Config.Mysql.DBDatabaseName) + sql := fmt.Sprintf("CREATE DATABASE IF NOT EXISTS %s ;", config.Config.Mysql.DBDatabaseName+"test1") err = db.Exec(sql).Error if err != nil { + log.NewError("0", "Exec failed ", err.Error(), sql) panic(err.Error()) } db.Close() @@ -44,9 +47,22 @@ func initMysqlDB() { config.Config.Mysql.DBUserName, config.Config.Mysql.DBPassword, config.Config.Mysql.DBAddress[0], config.Config.Mysql.DBDatabaseName) db, err = gorm.Open("mysql", dsn) if err != nil { + log.NewError("0", "Open failed ", err.Error(), dsn) panic(err.Error()) } + log.NewInfo("open db ok ", dsn) + + db.AutoMigrate(&Friend{}, + &FriendRequest{}, + &Group{}, + &GroupMember{}, + &GroupRequest{}, + &User{}, + &Black{}) + + return + sqlTable := "CREATE TABLE IF NOT EXISTS `user` (" + " `uid` varchar(64) NOT NULL," + " `name` varchar(64) DEFAULT NULL," + diff --git a/pkg/common/db/mysql_model/im_mysql_model/friend_model.go b/pkg/common/db/mysql_model/im_mysql_model/friend_model.go index a5e6a5de2..089224e79 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/friend_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/friend_model.go @@ -6,7 +6,7 @@ import ( "time" ) -func InsertToFriend(toInsertFollow *Friend) error { +func InsertToFriend(toInsertFollow *db.Friend) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return err @@ -20,12 +20,12 @@ func InsertToFriend(toInsertFollow *Friend) error { return nil } -func GetFriendRelationshipFromFriend(OwnerUserID, FriendUserID string) (*Friend, error) { +func GetFriendRelationshipFromFriend(OwnerUserID, FriendUserID string) (*db.Friend, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err } - var friend Friend + var friend db.Friend err = dbConn.Table("friend").Where("owner_user_id=? and friend_user_id=?", OwnerUserID, FriendUserID).Find(&friend).Error if err != nil { return nil, err @@ -33,12 +33,12 @@ func GetFriendRelationshipFromFriend(OwnerUserID, FriendUserID string) (*Friend, return &friend, err } -func GetFriendListByUserID(OwnerUserID string) ([]Friend, error) { +func GetFriendListByUserID(OwnerUserID string) ([]db.Friend, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err } - var friends []Friend + var friends []db.Friend err = dbConn.Table("friend").Where("owner_user_id=?", OwnerUserID).Find(&friends).Error if err != nil { return nil, err diff --git a/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go b/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go index 5e99dcf5d..299cdfc69 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go @@ -19,12 +19,12 @@ import ( //} // who apply to add me -func GetReceivedFriendsApplicationListByUserID(ToUserID string) ([]FriendRequest, error) { +func GetReceivedFriendsApplicationListByUserID(ToUserID string) ([]db.FriendRequest, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err } - var usersInfo []FriendRequest + var usersInfo []db.FriendRequest err = dbConn.Table("friend_request").Where("to_user_id=?", ToUserID).Find(&usersInfo).Error if err != nil { return nil, err @@ -33,12 +33,12 @@ func GetReceivedFriendsApplicationListByUserID(ToUserID string) ([]FriendRequest } //I apply to add somebody -func GetSendFriendApplicationListByUserID(FromUserID string) ([]FriendRequest, error) { +func GetSendFriendApplicationListByUserID(FromUserID string) ([]db.FriendRequest, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err } - var usersInfo []FriendRequest + var usersInfo []db.FriendRequest err = dbConn.Table("friend_request").Where("from_user_id=?", FromUserID).Find(&usersInfo).Error if err != nil { return nil, err @@ -47,12 +47,12 @@ func GetSendFriendApplicationListByUserID(FromUserID string) ([]FriendRequest, e } //FromUserId apply to add ToUserID -func GetFriendApplicationByBothUserID(FromUserID, ToUserID string) (*FriendRequest, error) { +func GetFriendApplicationByBothUserID(FromUserID, ToUserID string) (*db.FriendRequest, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err } - var friendRequest FriendRequest + var friendRequest db.FriendRequest err = dbConn.Table("friend_request").Where("from_user_id=? and to_user_id=?", FromUserID, ToUserID).Find(&friendRequest).Error if err != nil { return nil, err @@ -60,7 +60,7 @@ func GetFriendApplicationByBothUserID(FromUserID, ToUserID string) (*FriendReque return &friendRequest, nil } -func UpdateFriendApplication(friendRequest *FriendRequest) error { +func UpdateFriendApplication(friendRequest *db.FriendRequest) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return err @@ -71,7 +71,7 @@ func UpdateFriendApplication(friendRequest *FriendRequest) error { friendRequest.FromUserID, friendRequest.ToUserID).Update(&friendRequest).Error } -func InsertFriendApplication(friendRequest *FriendRequest) error { +func InsertFriendApplication(friendRequest *db.FriendRequest) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return err diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go index 95f4c5723..ce115fcda 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go @@ -18,7 +18,7 @@ import ( // Ex string `gorm:"column:ex"` //} -func InsertIntoGroupMember(toInsertInfo GroupMember) error { +func InsertIntoGroupMember(toInsertInfo db.GroupMember) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return err @@ -34,12 +34,12 @@ func InsertIntoGroupMember(toInsertInfo GroupMember) error { return nil } -func GetGroupMemberListByUserID(userID string) ([]GroupMember, error) { +func GetGroupMemberListByUserID(userID string) ([]db.GroupMember, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err } - var groupMemberList []GroupMember + var groupMemberList []db.GroupMember err = dbConn.Table("group_member").Where("user_id=?", userID).Find(&groupMemberList).Error if err != nil { return nil, err @@ -47,12 +47,12 @@ func GetGroupMemberListByUserID(userID string) ([]GroupMember, error) { return groupMemberList, nil } -func GetGroupMemberListByGroupID(groupID string) ([]GroupMember, error) { +func GetGroupMemberListByGroupID(groupID string) ([]db.GroupMember, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err } - var groupMemberList []GroupMember + var groupMemberList []db.GroupMember err = dbConn.Table("group_member").Where("group_id=?", groupID).Find(&groupMemberList).Error if err != nil { return nil, err @@ -60,12 +60,12 @@ func GetGroupMemberListByGroupID(groupID string) ([]GroupMember, error) { return groupMemberList, nil } -func GetGroupMemberListByGroupIDAndRoleLevel(groupID string, roleLevel int32) ([]GroupMember, error) { +func GetGroupMemberListByGroupIDAndRoleLevel(groupID string, roleLevel int32) ([]db.GroupMember, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err } - var groupMemberList []GroupMember + var groupMemberList []db.GroupMember err = dbConn.Table("group_member").Where("group_id=? and role_level=?", groupID, roleLevel).Find(&groupMemberList).Error if err != nil { return nil, err @@ -73,12 +73,12 @@ func GetGroupMemberListByGroupIDAndRoleLevel(groupID string, roleLevel int32) ([ return groupMemberList, nil } -func GetGroupMemberInfoByGroupIDAndUserID(groupID, userID string) (*GroupMember, error) { +func GetGroupMemberInfoByGroupIDAndUserID(groupID, userID string) (*db.GroupMember, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err } - var groupMember GroupMember + var groupMember db.GroupMember err = dbConn.Table("group_member").Where("group_id=? and user_id=? ", groupID, userID).Limit(1).Find(&groupMember).Error if err != nil { return nil, err @@ -91,14 +91,14 @@ func DeleteGroupMemberByGroupIDAndUserID(groupID, userID string) error { if err != nil { return err } - err = dbConn.Table("group_member").Where("group_id=? and user_id=? ", groupID, userID).Delete(&GroupMember{}).Error + err = dbConn.Table("group_member").Where("group_id=? and user_id=? ", groupID, userID).Delete(&db.GroupMember{}).Error if err != nil { return err } return nil } -func UpdateGroupMemberInfo(groupMemberInfo GroupMember) error { +func UpdateGroupMemberInfo(groupMemberInfo db.GroupMember) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return err @@ -110,12 +110,12 @@ func UpdateGroupMemberInfo(groupMemberInfo GroupMember) error { return nil } -func GetOwnerManagerByGroupID(groupID string) ([]GroupMember, error) { +func GetOwnerManagerByGroupID(groupID string) ([]db.GroupMember, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err } - var groupMemberList []GroupMember + var groupMemberList []db.GroupMember err = dbConn.Table("group_member").Where("group_id=? and role_level>?", groupID, constant.GroupOrdinaryUsers).Find(&groupMemberList).Error if err != nil { return nil, err @@ -136,7 +136,7 @@ func GetGroupMemberNumByGroupID(groupID string) uint32 { return number } -func GetGroupOwnerInfoByGroupID(groupID string) (*GroupMember, error) { +func GetGroupOwnerInfoByGroupID(groupID string) (*db.GroupMember, error) { omList, err := GetOwnerManagerByGroupID(groupID) if err != nil { return nil, err @@ -169,12 +169,12 @@ func RemoveGroupMember(groupID string, UserID string) error { return DeleteGroupMemberByGroupIDAndUserID(groupID, UserID) } -func GetMemberInfoByID(groupID string, userID string) (*GroupMember, error) { +func GetMemberInfoByID(groupID string, userID string) (*db.GroupMember, error) { return GetGroupMemberInfoByGroupIDAndUserID(groupID, userID) } -func GetGroupMemberByGroupID(groupID string, filter int32, begin int32, maxNumber int32) ([]GroupMember, error) { - var memberList []GroupMember +func GetGroupMemberByGroupID(groupID string, filter int32, begin int32, maxNumber int32) ([]db.GroupMember, error) { + var memberList []db.GroupMember var err error if filter >= 0 { memberList, err = GetGroupMemberListByGroupIDAndRoleLevel(groupID, filter) //sorted by join time diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_model.go index 12c809c28..18eba61f8 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_model.go @@ -18,7 +18,7 @@ import ( // Ex string `gorm:"column:ex"` //} -func InsertIntoGroup(groupInfo Group) error { +func InsertIntoGroup(groupInfo db.Group) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return err @@ -34,12 +34,12 @@ func InsertIntoGroup(groupInfo Group) error { return nil } -func GetGroupInfoByGroupID(groupId string) (*Group, error) { +func GetGroupInfoByGroupID(groupId string) (*db.Group, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err } - var groupInfo Group + var groupInfo db.Group err = dbConn.Table("group").Where("group_id=?", groupId).Find(&groupInfo).Error if err != nil { return nil, err @@ -47,7 +47,7 @@ func GetGroupInfoByGroupID(groupId string) (*Group, error) { return &groupInfo, nil } -func SetGroupInfo(groupInfo Group) error { +func SetGroupInfo(groupInfo db.Group) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return err diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go index 9ccffeaba..7ee352718 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go @@ -19,7 +19,7 @@ import ( // Ex string `gorm:"column:ex"` //} -func UpdateGroupRequest(groupRequest GroupRequest) error { +func UpdateGroupRequest(groupRequest db.GroupRequest) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return err @@ -30,7 +30,7 @@ func UpdateGroupRequest(groupRequest GroupRequest) error { return dbConn.Table("group_request").Where("group_id=? and user_id=?", groupRequest.GroupID, groupRequest.UserID).Update(&groupRequest).Error } -func InsertIntoGroupRequest(toInsertInfo GroupRequest) error { +func InsertIntoGroupRequest(toInsertInfo db.GroupRequest) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return err @@ -48,12 +48,12 @@ func InsertIntoGroupRequest(toInsertInfo GroupRequest) error { return nil } -func GetGroupRequestByGroupIDAndUserID(groupID, userID string) (*GroupRequest, error) { +func GetGroupRequestByGroupIDAndUserID(groupID, userID string) (*db.GroupRequest, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err } - var groupRequest GroupRequest + var groupRequest db.GroupRequest err = dbConn.Table("group_request").Where("user_id=? and group_id=?", userID, groupID).Find(&groupRequest).Error if err != nil { return nil, err @@ -66,19 +66,19 @@ func DelGroupRequestByGroupIDAndUserID(groupID, userID string) error { if err != nil { return err } - err = dbConn.Table("group_request").Where("group_id=? and user_id=?", groupID, userID).Delete(&GroupRequest{}).Error + err = dbConn.Table("group_request").Where("group_id=? and user_id=?", groupID, userID).Delete(&db.GroupRequest{}).Error if err != nil { return err } return nil } -func GetGroupRequestByGroupID(groupID string) ([]GroupRequest, error) { +func GetGroupRequestByGroupID(groupID string) ([]db.GroupRequest, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err } - var groupRequestList []GroupRequest + var groupRequestList []db.GroupRequest err = dbConn.Table("group_request").Where("group_id=?", groupID).Find(&groupRequestList).Error if err != nil { return nil, err @@ -87,8 +87,8 @@ func GetGroupRequestByGroupID(groupID string) ([]GroupRequest, error) { } //received -func GetGroupApplicationList(userID string) ([]GroupRequest, error) { - var groupRequestList []GroupRequest +func GetGroupApplicationList(userID string) ([]db.GroupRequest, error) { + var groupRequestList []db.GroupRequest memberList, err := GetGroupMemberListByUserID(userID) if err != nil { return nil, err diff --git a/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go b/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go index 42a7c2fa9..fe161c851 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go @@ -5,7 +5,7 @@ import ( "time" ) -func InsertInToUserBlackList(black Black) error { +func InsertInToUserBlackList(black db.Black) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return err @@ -29,7 +29,7 @@ func CheckBlack(ownerUserID, blockUserID string) error { if err != nil { return err } - var black Black + var black db.Black err = dbConn.Table("user_black_list").Where("owner_user_id=? and block_user_id=?", ownerUserID, blockUserID).Find(&black).Error return err } @@ -44,12 +44,12 @@ func RemoveBlackList(ownerUserID, blockUserID string) error { return err } -func GetBlackListByUserID(ownerUserID string) ([]Black, error) { +func GetBlackListByUserID(ownerUserID string) ([]db.Black, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err } - var blackListUsersInfo []Black + var blackListUsersInfo []db.Black err = dbConn.Table("user_black_list").Where("owner_user_id=?", ownerUserID).Find(&blackListUsersInfo).Error if err != nil { return nil, err diff --git a/pkg/common/db/mysql_model/im_mysql_model/user_model.go b/pkg/common/db/mysql_model/im_mysql_model/user_model.go index 6c9069558..3ae38f4b2 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/user_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/user_model.go @@ -19,7 +19,7 @@ func init() { } else { continue } - var appMgr User + var appMgr db.User appMgr.UserID = v appMgr.Nickname = "AppManager" + utils.IntToString(k+1) appMgr.AppMangerLevel = constant.AppAdmin @@ -31,7 +31,7 @@ func init() { } } -func UserRegister(user User) error { +func UserRegister(user db.User) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return err @@ -67,16 +67,16 @@ func DeleteUser(userID string) (i int64) { if err != nil { return 0 } - i = dbConn.Table("user").Where("user_id=?", userID).Delete(User{}).RowsAffected + i = dbConn.Table("user").Where("user_id=?", userID).Delete(db.User{}).RowsAffected return i } -func GetUserByUserID(userID string) (*User, error) { +func GetUserByUserID(userID string) (*db.User, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return nil, err } - var user User + var user db.User err = dbConn.Table("user").Where("user_id=?", userID).First(&user).Error if err != nil { return nil, err @@ -84,7 +84,7 @@ func GetUserByUserID(userID string) (*User, error) { return &user, nil } -func UpdateUserInfo(user User) error { +func UpdateUserInfo(user db.User) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return err From fe285ecd6b095e97f1798bd43b1ee5417776bf31 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Fri, 31 Dec 2021 10:41:06 +0800 Subject: [PATCH 230/337] Refactor code --- pkg/common/db/mysql_model/im_mysql_model/friend_model.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/db/mysql_model/im_mysql_model/friend_model.go b/pkg/common/db/mysql_model/im_mysql_model/friend_model.go index 089224e79..aa527698f 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/friend_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/friend_model.go @@ -60,7 +60,7 @@ func DeleteSingleFriendInfo(OwnerUserID, FriendUserID string) error { if err != nil { return err } - err = dbConn.Table("friend").Where("owner_user_id=? and friend_user_id=?", OwnerUserID, FriendUserID).Delete(Friend{}).Error + err = dbConn.Table("friend").Where("owner_user_id=? and friend_user_id=?", OwnerUserID, FriendUserID).Delete(db.Friend{}).Error return err } From 1290bc8cc9f30b6372bf99a6701e1acf94d06495 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Fri, 31 Dec 2021 10:45:11 +0800 Subject: [PATCH 231/337] Refactor code --- .../db/mysql_model/im_mysql_model/user_black_list_model.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go b/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go index fe161c851..09c7d6c29 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go @@ -40,7 +40,7 @@ func RemoveBlackList(ownerUserID, blockUserID string) error { return err } - err = dbConn.Table("user_black_list").Where("owner_user_id=? and block_user_id=?", ownerUserID, blockUserID).Delete(&Black{}).Error + err = dbConn.Table("user_black_list").Where("owner_user_id=? and block_user_id=?", ownerUserID, blockUserID).Delete(&db.Black{}).Error return err } From cd62d7f0d988b38c5fb860469995ae7c25516735 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Fri, 31 Dec 2021 10:49:37 +0800 Subject: [PATCH 232/337] Refactor code --- pkg/common/utils/utils.go | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/pkg/common/utils/utils.go b/pkg/common/utils/utils.go index 61dc47be0..1df23b0b2 100644 --- a/pkg/common/utils/utils.go +++ b/pkg/common/utils/utils.go @@ -1,6 +1,7 @@ package utils import ( + db "Open_IM/pkg/common/db" imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" "Open_IM/pkg/common/token_verify" open_im_sdk "Open_IM/pkg/proto/sdk_ws" @@ -14,12 +15,12 @@ func OperationIDGenerator() string { return strconv.FormatInt(time.Now().UnixNano()+int64(rand.Uint32()), 10) } -func FriendOpenIMCopyDB(dst *imdb.Friend, src *open_im_sdk.FriendInfo) { +func FriendOpenIMCopyDB(dst *db.Friend, src *open_im_sdk.FriendInfo) { utils.CopyStructFields(dst, src) dst.FriendUserID = src.FriendUser.UserID } -func FriendDBCopyOpenIM(dst *open_im_sdk.FriendInfo, src *imdb.Friend) { +func FriendDBCopyOpenIM(dst *open_im_sdk.FriendInfo, src *db.Friend) { utils.CopyStructFields(dst, src) user, _ := imdb.GetUserByUserID(src.FriendUserID) if user != nil { @@ -30,21 +31,21 @@ func FriendDBCopyOpenIM(dst *open_im_sdk.FriendInfo, src *imdb.Friend) { } // -func FriendRequestOpenIMCopyDB(dst *imdb.FriendRequest, src *open_im_sdk.FriendRequest) { +func FriendRequestOpenIMCopyDB(dst *db.FriendRequest, src *open_im_sdk.FriendRequest) { utils.CopyStructFields(dst, src) } -func FriendRequestDBCopyOpenIM(dst *open_im_sdk.FriendRequest, src *imdb.FriendRequest) { +func FriendRequestDBCopyOpenIM(dst *open_im_sdk.FriendRequest, src *db.FriendRequest) { utils.CopyStructFields(dst, src) dst.CreateTime = src.CreateTime.Unix() dst.HandleTime = src.HandleTime.Unix() } -func GroupOpenIMCopyDB(dst *imdb.Group, src *open_im_sdk.GroupInfo) { +func GroupOpenIMCopyDB(dst *db.Group, src *open_im_sdk.GroupInfo) { utils.CopyStructFields(dst, src) } -func GroupDBCopyOpenIM(dst *open_im_sdk.GroupInfo, src *imdb.Group) { +func GroupDBCopyOpenIM(dst *open_im_sdk.GroupInfo, src *db.Group) { utils.CopyStructFields(dst, src) user, _ := imdb.GetGroupOwnerInfoByGroupID(src.GroupID) if user != nil { @@ -54,11 +55,11 @@ func GroupDBCopyOpenIM(dst *open_im_sdk.GroupInfo, src *imdb.Group) { dst.CreateTime = src.CreateTime.Unix() } -func GroupMemberOpenIMCopyDB(dst *imdb.GroupMember, src *open_im_sdk.GroupMemberFullInfo) { +func GroupMemberOpenIMCopyDB(dst *db.GroupMember, src *open_im_sdk.GroupMemberFullInfo) { utils.CopyStructFields(dst, src) } -func GroupMemberDBCopyOpenIM(dst *open_im_sdk.GroupMemberFullInfo, src *imdb.GroupMember) { +func GroupMemberDBCopyOpenIM(dst *open_im_sdk.GroupMemberFullInfo, src *db.GroupMember) { utils.CopyStructFields(dst, src) if token_verify.IsMangerUserID(src.UserID) { u, _ := imdb.GetUserByUserID(src.UserID) @@ -70,31 +71,31 @@ func GroupMemberDBCopyOpenIM(dst *open_im_sdk.GroupMemberFullInfo, src *imdb.Gro dst.JoinTime = src.JoinTime.Unix() } -func GroupRequestOpenIMCopyDB(dst *imdb.GroupRequest, src *open_im_sdk.GroupRequest) { +func GroupRequestOpenIMCopyDB(dst *db.GroupRequest, src *open_im_sdk.GroupRequest) { utils.CopyStructFields(dst, src) } -func GroupRequestDBCopyOpenIM(dst *open_im_sdk.GroupRequest, src *imdb.GroupRequest) { +func GroupRequestDBCopyOpenIM(dst *open_im_sdk.GroupRequest, src *db.GroupRequest) { utils.CopyStructFields(dst, src) dst.ReqTime = src.ReqTime.Unix() dst.HandleTime = src.HandledTime.Unix() } -func UserOpenIMCopyDB(dst *imdb.User, src *open_im_sdk.UserInfo) { +func UserOpenIMCopyDB(dst *db.User, src *open_im_sdk.UserInfo) { utils.CopyStructFields(dst, src) } -func UserDBCopyOpenIM(dst *open_im_sdk.UserInfo, src *imdb.User) { +func UserDBCopyOpenIM(dst *open_im_sdk.UserInfo, src *db.User) { utils.CopyStructFields(dst, src) dst.CreateTime = src.CreateTime.Unix() } -func BlackOpenIMCopyDB(dst *imdb.Black, src *open_im_sdk.BlackInfo) { +func BlackOpenIMCopyDB(dst *db.Black, src *open_im_sdk.BlackInfo) { utils.CopyStructFields(dst, src) dst.BlockUserID = src.BlackUserInfo.UserID } -func BlackDBCopyOpenIM(dst *open_im_sdk.BlackInfo, src *imdb.Black) { +func BlackDBCopyOpenIM(dst *open_im_sdk.BlackInfo, src *db.Black) { utils.CopyStructFields(dst, src) dst.CreateTime = src.CreateTime.Unix() user, _ := imdb.GetUserByUserID(src.BlockUserID) From 87659b56a47b05cb2043a7db98ee2748c5a29cf3 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Fri, 31 Dec 2021 10:57:45 +0800 Subject: [PATCH 233/337] Refactor code --- internal/rpc/auth/auth.go | 3 ++- internal/rpc/friend/firend.go | 13 ++++++------ internal/rpc/group/group.go | 37 +++++++++++++++++------------------ internal/rpc/user/user.go | 2 +- 4 files changed, 28 insertions(+), 27 deletions(-) diff --git a/internal/rpc/auth/auth.go b/internal/rpc/auth/auth.go index d0137d012..d05c9d3d1 100644 --- a/internal/rpc/auth/auth.go +++ b/internal/rpc/auth/auth.go @@ -2,6 +2,7 @@ package auth import ( "Open_IM/pkg/common/constant" + "Open_IM/pkg/common/db" imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" "Open_IM/pkg/common/log" "Open_IM/pkg/common/token_verify" @@ -20,7 +21,7 @@ import ( func (rpc *rpcAuth) UserRegister(_ context.Context, req *pbAuth.UserRegisterReq) (*pbAuth.UserRegisterResp, error) { log.NewInfo(req.OperationID, "UserRegister args ", req.String()) - var user imdb.User + var user db.User utils.CopyStructFields(&user, req.UserInfo) if req.UserInfo.Birth != 0 { user.Birth = utils.UnixSecondToTime(req.UserInfo.Birth) diff --git a/internal/rpc/friend/firend.go b/internal/rpc/friend/firend.go index f548a21b6..6d2348324 100644 --- a/internal/rpc/friend/firend.go +++ b/internal/rpc/friend/firend.go @@ -4,6 +4,7 @@ import ( chat "Open_IM/internal/rpc/msg" "Open_IM/pkg/common/config" "Open_IM/pkg/common/constant" + "Open_IM/pkg/common/db" imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" "Open_IM/pkg/common/log" "Open_IM/pkg/common/token_verify" @@ -116,7 +117,7 @@ func (s *friendServer) AddBlacklist(ctx context.Context, req *pbFriend.AddBlackl log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID) return &pbFriend.AddBlacklistResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil } - black := imdb.Black{OwnerUserID: req.CommID.FromUserID, BlockUserID: req.CommID.ToUserID, OperatorUserID: req.CommID.OpUserID} + black := db.Black{OwnerUserID: req.CommID.FromUserID, BlockUserID: req.CommID.ToUserID, OperatorUserID: req.CommID.OpUserID} err := imdb.InsertInToUserBlackList(black) if err != nil { @@ -142,7 +143,7 @@ func (s *friendServer) AddFriend(ctx context.Context, req *pbFriend.AddFriendReq } //Establish a latest relationship in the friend request table - friendRequest := imdb.FriendRequest{ReqMsg: req.ReqMsg} + friendRequest := db.FriendRequest{ReqMsg: req.ReqMsg} utils.CopyStructFields(&friendRequest, req.CommID) // {openIM001 openIM002 0 test add friend 0001-01-01 00:00:00 +0000 UTC 0001-01-01 00:00:00 +0000 UTC }] log.NewDebug(req.CommID.OperationID, "UpdateFriendApplication args ", friendRequest) @@ -190,14 +191,14 @@ func (s *friendServer) ImportFriend(ctx context.Context, req *pbFriend.ImportFri } else { if _, err := imdb.GetFriendRelationshipFromFriend(req.FromUserID, v); err != nil { //Establish two single friendship - toInsertFollow := imdb.Friend{OwnerUserID: req.FromUserID, FriendUserID: v} + toInsertFollow := db.Friend{OwnerUserID: req.FromUserID, FriendUserID: v} err1 := imdb.InsertToFriend(&toInsertFollow) if err1 != nil { log.NewError(req.OperationID, "InsertToFriend failed ", err1.Error(), toInsertFollow) resp.UserIDResultList = append(resp.UserIDResultList, &pbFriend.UserIDResult{UserID: v, Result: -1}) continue } - toInsertFollow = imdb.Friend{OwnerUserID: v, FriendUserID: req.FromUserID} + toInsertFollow = db.Friend{OwnerUserID: v, FriendUserID: req.FromUserID} err2 := imdb.InsertToFriend(&toInsertFollow) if err2 != nil { log.NewError(req.OperationID, "InsertToFriend failed ", err2.Error(), toInsertFollow) @@ -253,7 +254,7 @@ func (s *friendServer) AddFriendResponse(ctx context.Context, req *pbFriend.AddF log.NewWarn(req.CommID.OperationID, "GetFriendRelationshipFromFriend exist", req.CommID.FromUserID, req.CommID.ToUserID) } else { //Establish two single friendship - toInsertFollow := imdb.Friend{OwnerUserID: req.CommID.FromUserID, FriendUserID: req.CommID.ToUserID, OperatorUserID: req.CommID.OpUserID} + toInsertFollow := db.Friend{OwnerUserID: req.CommID.FromUserID, FriendUserID: req.CommID.ToUserID, OperatorUserID: req.CommID.OpUserID} err = imdb.InsertToFriend(&toInsertFollow) if err != nil { log.NewError(req.CommID.OperationID, "InsertToFriend failed ", err.Error(), toInsertFollow) @@ -265,7 +266,7 @@ func (s *friendServer) AddFriendResponse(ctx context.Context, req *pbFriend.AddF if err == nil { log.NewWarn(req.CommID.OperationID, "GetFriendRelationshipFromFriend exist", req.CommID.ToUserID, req.CommID.FromUserID) } else { - toInsertFollow := imdb.Friend{OwnerUserID: req.CommID.ToUserID, FriendUserID: req.CommID.FromUserID, OperatorUserID: req.CommID.OpUserID} + toInsertFollow := db.Friend{OwnerUserID: req.CommID.ToUserID, FriendUserID: req.CommID.FromUserID, OperatorUserID: req.CommID.OpUserID} err = imdb.InsertToFriend(&toInsertFollow) if err != nil { log.NewError(req.CommID.OperationID, "InsertToFriend failed ", err.Error(), toInsertFollow) diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 2af77fa97..322039a75 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -5,7 +5,6 @@ import ( "Open_IM/pkg/common/config" "Open_IM/pkg/common/constant" "Open_IM/pkg/common/db" - "Open_IM/pkg/common/db/mysql_model/im_mysql_model" imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" "Open_IM/pkg/common/log" "Open_IM/pkg/common/token_verify" @@ -79,10 +78,10 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR //Time stamp + MD5 to generate group chat id groupId := utils.Md5(strconv.FormatInt(time.Now().UnixNano(), 10)) //to group - groupInfo := imdb.Group{GroupID: groupId} + groupInfo := db.Group{GroupID: groupId} utils.CopyStructFields(&groupInfo, req.GroupInfo) groupInfo.CreatorUserID = req.OpUserID - err := im_mysql_model.InsertIntoGroup(groupInfo) + err := imdb.InsertIntoGroup(groupInfo) if err != nil { log.NewError(req.OperationID, "InsertIntoGroup failed, ", err.Error(), groupInfo) return &pbGroup.CreateGroupResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil @@ -95,9 +94,9 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR } //to group member - groupMember := imdb.GroupMember{GroupID: groupId, RoleLevel: constant.GroupOwner, OperatorUserID: req.OpUserID} + groupMember := db.GroupMember{GroupID: groupId, RoleLevel: constant.GroupOwner, OperatorUserID: req.OpUserID} utils.CopyStructFields(&groupMember, us) - err = im_mysql_model.InsertIntoGroupMember(groupMember) + err = imdb.InsertIntoGroupMember(groupMember) if err != nil { log.NewError(req.OperationID, "InsertIntoGroupMember failed ", err.Error(), groupMember) return &pbGroup.CreateGroupResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}, nil @@ -110,7 +109,7 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR var okUserIDList []string //to group member for _, user := range req.InitMemberList { - us, err := im_mysql_model.GetUserByUserID(user.UserID) + us, err := imdb.GetUserByUserID(user.UserID) if err != nil { log.NewError(req.OperationID, "GetUserByUserID failed ", err.Error(), user.UserID) continue @@ -121,7 +120,7 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR } groupMember.RoleLevel = user.RoleLevel utils.CopyStructFields(&groupMember, us) - err = im_mysql_model.InsertIntoGroupMember(groupMember) + err = imdb.InsertIntoGroupMember(groupMember) if err != nil { log.NewError(req.OperationID, "InsertIntoGroupMember failed ", err.Error(), groupMember) continue @@ -135,7 +134,7 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR } resp := &pbGroup.CreateGroupResp{GroupInfo: &open_im_sdk.GroupInfo{}} - group, err := im_mysql_model.GetGroupInfoByGroupID(groupId) + group, err := imdb.GetGroupInfoByGroupID(groupId) if err != nil { log.NewError(req.OperationID, "GetGroupInfoByGroupID failed ", err.Error(), groupId) resp.ErrCode = constant.ErrDB.ErrCode @@ -222,7 +221,7 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite resp.Id2ResultList = append(resp.Id2ResultList, &resultNode) continue } - var toInsertInfo imdb.GroupMember + var toInsertInfo db.GroupMember utils.CopyStructFields(&toInsertInfo, toUserInfo) toInsertInfo.GroupID = req.GroupID toInsertInfo.RoleLevel = constant.GroupOrdinaryUsers @@ -393,7 +392,7 @@ func (s *groupServer) GetGroupMembersInfo(ctx context.Context, req *pbGroup.GetG func (s *groupServer) GetGroupApplicationList(_ context.Context, req *pbGroup.GetGroupApplicationListReq) (*pbGroup.GetGroupApplicationListResp, error) { log.NewInfo(req.OperationID, "GetGroupMembersInfo args ", req.String()) - reply, err := im_mysql_model.GetGroupApplicationList(req.FromUserID) + reply, err := imdb.GetGroupApplicationList(req.FromUserID) if err != nil { log.NewError(req.OperationID, "GetGroupApplicationList failed ", err.Error(), req.FromUserID) return &pbGroup.GetGroupApplicationListResp{ErrCode: 701, ErrMsg: "GetGroupApplicationList failed"}, nil @@ -415,7 +414,7 @@ func (s *groupServer) GetGroupsInfo(ctx context.Context, req *pbGroup.GetGroupsI log.NewInfo(req.OperationID, "GetGroupsInfo args ", req.String()) groupsInfoList := make([]*open_im_sdk.GroupInfo, 0) for _, groupID := range req.GroupIDList { - groupInfoFromMysql, err := im_mysql_model.GetGroupInfoByGroupID(groupID) + groupInfoFromMysql, err := imdb.GetGroupInfoByGroupID(groupID) if err != nil { log.NewError(req.OperationID, "GetGroupInfoByGroupID failed ", err.Error(), groupID) continue @@ -433,7 +432,7 @@ func (s *groupServer) GetGroupsInfo(ctx context.Context, req *pbGroup.GetGroupsI func (s *groupServer) GroupApplicationResponse(_ context.Context, req *pbGroup.GroupApplicationResponseReq) (*pbGroup.GroupApplicationResponseResp, error) { log.NewInfo(req.OperationID, "GroupApplicationResponse args ", req.String()) - groupRequest := imdb.GroupRequest{} + groupRequest := db.GroupRequest{} utils.CopyStructFields(&groupRequest, req) groupRequest.UserID = req.FromUserID groupRequest.HandleUserID = req.OpUserID @@ -457,7 +456,7 @@ func (s *groupServer) GroupApplicationResponse(_ context.Context, req *pbGroup.G log.NewError(req.OperationID, "GroupApplicationResponse failed ", err.Error(), req.FromUserID) return &pbGroup.GroupApplicationResponseResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } - member := imdb.GroupMember{} + member := db.GroupMember{} member.GroupID = req.GroupID member.UserID = req.FromUserID member.RoleLevel = constant.GroupOrdinaryUsers @@ -486,7 +485,7 @@ func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq) return &pbGroup.JoinGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } - var groupRequest imdb.GroupRequest + var groupRequest db.GroupRequest groupRequest.UserID = req.OpUserID groupRequest.ReqMsg = req.ReqMessage groupRequest.GroupID = req.GroupID @@ -538,7 +537,7 @@ func hasAccess(req *pbGroup.SetGroupInfoReq) bool { if utils.IsContain(req.OpUserID, config.Config.Manager.AppManagerUid) { return true } - groupUserInfo, err := im_mysql_model.GetGroupMemberInfoByGroupIDAndUserID(req.GroupInfo.GroupID, req.OpUserID) + groupUserInfo, err := imdb.GetGroupMemberInfoByGroupIDAndUserID(req.GroupInfo.GroupID, req.OpUserID) if err != nil { log.NewError(req.OperationID, "GetGroupMemberInfoByGroupIDAndUserID failed, ", err.Error(), req.GroupInfo.GroupID, req.OpUserID) return false @@ -557,7 +556,7 @@ func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInf return &pbGroup.SetGroupInfoResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil } - group, err := im_mysql_model.GetGroupInfoByGroupID(req.GroupInfo.GroupID) + group, err := imdb.GetGroupInfoByGroupID(req.GroupInfo.GroupID) if err != nil { log.NewError(req.OperationID, "GetGroupInfoByGroupID failed ", err.Error(), req.GroupInfo.GroupID) return &pbGroup.SetGroupInfoResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil @@ -578,7 +577,7 @@ func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInf changedType = changedType | (1 << 3) } //only administrators can set group information - var groupInfo imdb.Group + var groupInfo db.Group utils.CopyStructFields(&groupInfo, req.GroupInfo) err = imdb.SetGroupInfo(groupInfo) if err != nil { @@ -600,13 +599,13 @@ func (s *groupServer) TransferGroupOwner(_ context.Context, req *pbGroup.Transfe log.NewError(req.OperationID, "same owner ", req.OldOwnerUserID, req.NewOwnerUserID) return &pbGroup.TransferGroupOwnerResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrArgs.ErrCode, ErrMsg: constant.ErrArgs.ErrMsg}}, nil } - groupMemberInfo := imdb.GroupMember{GroupID: req.GroupID, UserID: req.OldOwnerUserID, RoleLevel: constant.GroupOrdinaryUsers} + groupMemberInfo := db.GroupMember{GroupID: req.GroupID, UserID: req.OldOwnerUserID, RoleLevel: constant.GroupOrdinaryUsers} err := imdb.UpdateGroupMemberInfo(groupMemberInfo) if err != nil { log.NewError(req.OperationID, "UpdateGroupMemberInfo failed ", groupMemberInfo) return &pbGroup.TransferGroupOwnerResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } - groupMemberInfo = imdb.GroupMember{GroupID: req.GroupID, UserID: req.NewOwnerUserID, RoleLevel: constant.GroupOwner} + groupMemberInfo = db.GroupMember{GroupID: req.GroupID, UserID: req.NewOwnerUserID, RoleLevel: constant.GroupOwner} err = imdb.UpdateGroupMemberInfo(groupMemberInfo) if err != nil { log.NewError(req.OperationID, "UpdateGroupMemberInfo failed ", groupMemberInfo) diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index bcdea833f..7eb330c31 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -213,7 +213,7 @@ func (s *userServer) UpdateUserInfo(ctx context.Context, req *pbUser.UpdateUserI return &pbUser.UpdateUserInfoResp{CommonResp: &pbUser.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil } - var user imdb.User + var user db.User utils.CopyStructFields(&user, req.UserInfo) if req.UserInfo.Birth != 0 { user.Birth = utils.UnixSecondToTime(req.UserInfo.Birth) From 9782802bd85defa5b924efea5c8836e2b490484e Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Fri, 31 Dec 2021 11:01:48 +0800 Subject: [PATCH 234/337] Refactor code --- pkg/base_info/group_api_struct.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/base_info/group_api_struct.go b/pkg/base_info/group_api_struct.go index 68b19f93a..e4be9d179 100644 --- a/pkg/base_info/group_api_struct.go +++ b/pkg/base_info/group_api_struct.go @@ -1,7 +1,7 @@ package base_info import ( - imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" + "Open_IM/pkg/common/db" open_im_sdk "Open_IM/pkg/proto/sdk_ws" ) @@ -138,7 +138,7 @@ type QuitGroupResp struct { } type SetGroupInfoReq struct { - imdb.Group + db.Group OperationID string `json:"operationID" binding:"required"` } type SetGroupInfoResp struct { From 82c0f8a863763e3347d740ed79087db0d4293f29 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Fri, 31 Dec 2021 11:08:16 +0800 Subject: [PATCH 235/337] Refactor code --- pkg/common/db/mysql.go | 49 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 42 insertions(+), 7 deletions(-) diff --git a/pkg/common/db/mysql.go b/pkg/common/db/mysql.go index 173843ec1..22dc3e714 100644 --- a/pkg/common/db/mysql.go +++ b/pkg/common/db/mysql.go @@ -53,13 +53,48 @@ func initMysqlDB() { log.NewInfo("open db ok ", dsn) - db.AutoMigrate(&Friend{}, - &FriendRequest{}, - &Group{}, - &GroupMember{}, - &GroupRequest{}, - &User{}, - &Black{}) + //db.AutoMigrate(&Friend{}, + // &FriendRequest{}, + // &Group{}, + // &GroupMember{}, + // &GroupRequest{}, + // &User{}, + // &Black{}) + + if !db.HasTable(&Friend{}) { + log.NewInfo("CreateTable Friend") + db.CreateTable(&Friend{}) + } + + if !db.HasTable(&FriendRequest{}) { + log.NewInfo("CreateTable FriendRequest") + db.CreateTable(&FriendRequest{}) + } + + if !db.HasTable(&Group{}) { + log.NewInfo("CreateTable Group") + db.CreateTable(&Group{}) + } + + if !db.HasTable(&GroupMember{}) { + log.NewInfo("CreateTable GroupMember") + db.CreateTable(&GroupMember{}) + } + + if !db.HasTable(&GroupRequest{}) { + log.NewInfo("CreateTable GroupRequest") + db.CreateTable(&GroupRequest{}) + } + + if !db.HasTable(&User{}) { + log.NewInfo("CreateTable User") + db.CreateTable(&User{}) + } + + if !db.HasTable(&Black{}) { + log.NewInfo("CreateTable Black") + db.CreateTable(&Black{}) + } return From b6bd2687d2053864bbbe5d40deede89e91a5d953 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Fri, 31 Dec 2021 11:11:41 +0800 Subject: [PATCH 236/337] Refactor code --- pkg/common/db/mysql.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/db/mysql.go b/pkg/common/db/mysql.go index 22dc3e714..a257f7562 100644 --- a/pkg/common/db/mysql.go +++ b/pkg/common/db/mysql.go @@ -44,7 +44,7 @@ func initMysqlDB() { db.Close() dsn = fmt.Sprintf("%s:%s@tcp(%s)/%s?charset=utf8mb4&parseTime=true&loc=Local", - config.Config.Mysql.DBUserName, config.Config.Mysql.DBPassword, config.Config.Mysql.DBAddress[0], config.Config.Mysql.DBDatabaseName) + config.Config.Mysql.DBUserName, config.Config.Mysql.DBPassword, config.Config.Mysql.DBAddress[0], config.Config.Mysql.DBDatabaseName+"test1") db, err = gorm.Open("mysql", dsn) if err != nil { log.NewError("0", "Open failed ", err.Error(), dsn) From 9b7640719345a8c4f9eecb8f7bccb6d1f6327aaa Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Fri, 31 Dec 2021 11:18:32 +0800 Subject: [PATCH 237/337] Refactor code --- pkg/common/db/mysql.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg/common/db/mysql.go b/pkg/common/db/mysql.go index a257f7562..41347190b 100644 --- a/pkg/common/db/mysql.go +++ b/pkg/common/db/mysql.go @@ -53,13 +53,13 @@ func initMysqlDB() { log.NewInfo("open db ok ", dsn) - //db.AutoMigrate(&Friend{}, - // &FriendRequest{}, - // &Group{}, - // &GroupMember{}, - // &GroupRequest{}, - // &User{}, - // &Black{}) + db.AutoMigrate(&Friend{}, + &FriendRequest{}, + &Group{}, + &GroupMember{}, + &GroupRequest{}, + &User{}, + &Black{}) if !db.HasTable(&Friend{}) { log.NewInfo("CreateTable Friend") From 7e88621aa1d0b87fb369993553cedb8c6c5759c0 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 4 Jan 2022 12:56:10 +0800 Subject: [PATCH 238/337] Refactor code --- internal/rpc/friend/firend.go | 1 - pkg/common/db/model_struct.go | 6 +++--- .../mysql_model/im_mysql_model/friend_model.go | 3 +++ pkg/utils/utils.go | 16 ++++++++++++++++ 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/internal/rpc/friend/firend.go b/internal/rpc/friend/firend.go index 6d2348324..14de9bb20 100644 --- a/internal/rpc/friend/firend.go +++ b/internal/rpc/friend/firend.go @@ -288,7 +288,6 @@ func (s *friendServer) DeleteFriend(ctx context.Context, req *pbFriend.DeleteFri log.NewError(req.CommID.OperationID, "CheckAccess false ", req.CommID.OpUserID, req.CommID.FromUserID) return &pbFriend.DeleteFriendResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg}}, nil } - err := imdb.DeleteSingleFriendInfo(req.CommID.FromUserID, req.CommID.ToUserID) if err != nil { log.NewError(req.CommID.OperationID, "DeleteSingleFriendInfo failed", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID) diff --git a/pkg/common/db/model_struct.go b/pkg/common/db/model_struct.go index c2ab763c5..efd0d980e 100644 --- a/pkg/common/db/model_struct.go +++ b/pkg/common/db/model_struct.go @@ -14,10 +14,10 @@ import "time" //} //open_im_sdk.FriendInfo(FriendUser) != imdb.Friend(FriendUserID) type Friend struct { - OwnerUserID string `gorm:"column:owner_user_id;primaryKey;"` + OwnerUserID string `gorm:"column:owner_user_id;primary_key;"` Remark string `gorm:"column:remark"` CreateTime time.Time `gorm:"column:create_time"` - FriendUserID string `gorm:"column:friend_user_id;primaryKey;"` + FriendUserID string `gorm:"column:friend_user_id;primary_key;"` AddSource int32 `gorm:"column:add_source"` OperatorUserID string `gorm:"column:operator_user_id"` Ex string `gorm:"column:ex"` @@ -159,7 +159,7 @@ type User struct { //} // open_im_sdk.BlackInfo(BlackUserInfo) != imdb.Black (BlockUserID) type Black struct { - OwnerUserID string `gorm:"column:owner_user_id;primaryKey;"` + OwnerUserID string `gorm:"column:owner_user_id;primaryKey;size:256"` CreateTime time.Time `gorm:"column:create_time"` BlockUserID string `gorm:"column:block_user_id;primaryKey;"` AddSource int32 `gorm:"column:add_source"` diff --git a/pkg/common/db/mysql_model/im_mysql_model/friend_model.go b/pkg/common/db/mysql_model/im_mysql_model/friend_model.go index aa527698f..b8de9b120 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/friend_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/friend_model.go @@ -39,7 +39,10 @@ func GetFriendListByUserID(OwnerUserID string) ([]db.Friend, error) { return nil, err } var friends []db.Friend + var x db.Friend + x.OwnerUserID = OwnerUserID err = dbConn.Table("friend").Where("owner_user_id=?", OwnerUserID).Find(&friends).Error + if err != nil { return nil, err } diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index 224e459e3..2e8274207 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -2,9 +2,25 @@ package utils import ( "github.com/jinzhu/copier" + "github.com/pkg/errors" + "runtime" + "strconv" ) // copy a by b b->a func CopyStructFields(a interface{}, b interface{}, fields ...string) (err error) { return copier.Copy(a, b) } + +func Wrap(err error, message string) error { + return errors.Wrap(err, "==> "+printCallerNameAndLine()+message) +} + +func WithMessage(err error, message string) error { + return errors.WithMessage(err, "==> "+printCallerNameAndLine()+message) +} + +func printCallerNameAndLine() string { + pc, _, line, _ := runtime.Caller(2) + return runtime.FuncForPC(pc).Name() + "()@" + strconv.Itoa(line) + ": " +} From 0e39aac5cd1df01f6420b24a050a4ca597d2b142 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 4 Jan 2022 12:58:11 +0800 Subject: [PATCH 239/337] Refactor code --- pkg/common/db/model_struct.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/common/db/model_struct.go b/pkg/common/db/model_struct.go index efd0d980e..5ed77ed99 100644 --- a/pkg/common/db/model_struct.go +++ b/pkg/common/db/model_struct.go @@ -159,9 +159,9 @@ type User struct { //} // open_im_sdk.BlackInfo(BlackUserInfo) != imdb.Black (BlockUserID) type Black struct { - OwnerUserID string `gorm:"column:owner_user_id;primaryKey;size:256"` + OwnerUserID string `gorm:"column:owner_user_id;primary_key;size:64"` CreateTime time.Time `gorm:"column:create_time"` - BlockUserID string `gorm:"column:block_user_id;primaryKey;"` + BlockUserID string `gorm:"column:block_user_id;primary_key;size:64"` AddSource int32 `gorm:"column:add_source"` OperatorUserID string `gorm:"column:operator_user_id"` Ex string `gorm:"column:ex"` From ea0b8df5d45f4db0594388dcd08884658142bbb3 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 4 Jan 2022 13:01:07 +0800 Subject: [PATCH 240/337] Refactor code --- pkg/common/db/model_struct.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/common/db/model_struct.go b/pkg/common/db/model_struct.go index 5ed77ed99..06ff6dfc9 100644 --- a/pkg/common/db/model_struct.go +++ b/pkg/common/db/model_struct.go @@ -163,6 +163,6 @@ type Black struct { CreateTime time.Time `gorm:"column:create_time"` BlockUserID string `gorm:"column:block_user_id;primary_key;size:64"` AddSource int32 `gorm:"column:add_source"` - OperatorUserID string `gorm:"column:operator_user_id"` - Ex string `gorm:"column:ex"` + OperatorUserID string `gorm:"column:operator_user_id;size:64"` + Ex string `gorm:"column:ex;size:1024"` } From 1ad80e1870750b8e480aec7ce29ad4eb2e7b1dab Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 4 Jan 2022 13:01:57 +0800 Subject: [PATCH 241/337] Refactor code --- pkg/common/db/model_struct.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/db/model_struct.go b/pkg/common/db/model_struct.go index 06ff6dfc9..e0cec0e0a 100644 --- a/pkg/common/db/model_struct.go +++ b/pkg/common/db/model_struct.go @@ -160,8 +160,8 @@ type User struct { // open_im_sdk.BlackInfo(BlackUserInfo) != imdb.Black (BlockUserID) type Black struct { OwnerUserID string `gorm:"column:owner_user_id;primary_key;size:64"` - CreateTime time.Time `gorm:"column:create_time"` BlockUserID string `gorm:"column:block_user_id;primary_key;size:64"` + CreateTime time.Time `gorm:"column:create_time"` AddSource int32 `gorm:"column:add_source"` OperatorUserID string `gorm:"column:operator_user_id;size:64"` Ex string `gorm:"column:ex;size:1024"` From 3d6f1e42d21f513bfa5dc695aedf12c9d311e972 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 4 Jan 2022 13:19:14 +0800 Subject: [PATCH 242/337] Refactor code --- go.mod | 1 + pkg/common/db/model_struct.go | 73 +++++++++++++++++------------------ 2 files changed, 37 insertions(+), 37 deletions(-) diff --git a/go.mod b/go.mod index a53930ed5..767401200 100644 --- a/go.mod +++ b/go.mod @@ -35,6 +35,7 @@ require ( github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 github.com/olivere/elastic/v7 v7.0.23 github.com/pierrec/lz4 v2.6.1+incompatible // indirect + github.com/pkg/errors v0.9.1 github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5 github.com/sirupsen/logrus v1.8.1 diff --git a/pkg/common/db/model_struct.go b/pkg/common/db/model_struct.go index e0cec0e0a..1aa4d5a91 100644 --- a/pkg/common/db/model_struct.go +++ b/pkg/common/db/model_struct.go @@ -14,13 +14,13 @@ import "time" //} //open_im_sdk.FriendInfo(FriendUser) != imdb.Friend(FriendUserID) type Friend struct { - OwnerUserID string `gorm:"column:owner_user_id;primary_key;"` - Remark string `gorm:"column:remark"` + OwnerUserID string `gorm:"column:owner_user_id;primary_key;size:64"` + FriendUserID string `gorm:"column:friend_user_id;primary_key;size:64"` + Remark string `gorm:"column:remark;size:255"` CreateTime time.Time `gorm:"column:create_time"` - FriendUserID string `gorm:"column:friend_user_id;primary_key;"` AddSource int32 `gorm:"column:add_source"` - OperatorUserID string `gorm:"column:operator_user_id"` - Ex string `gorm:"column:ex"` + OperatorUserID string `gorm:"column:operator_user_id;size:64"` + Ex string `gorm:"column:ex;size:1024"` } //message FriendRequest{ @@ -36,15 +36,15 @@ type Friend struct { //} //open_im_sdk.FriendRequest == imdb.FriendRequest type FriendRequest struct { - FromUserID string `gorm:"column:from_user_id;primaryKey;"` - ToUserID string `gorm:"column:to_user_id;primaryKey;"` + FromUserID string `gorm:"column:from_user_id;primary_key;size:64"` + ToUserID string `gorm:"column:to_user_id;primary_key;size:64"` HandleResult int32 `gorm:"column:handle_result"` - ReqMsg string `gorm:"column:req_msg"` + ReqMsg string `gorm:"column:req_msg;size:255"` CreateTime time.Time `gorm:"column:create_time"` - HandlerUserID string `gorm:"column:handler_user_id"` - HandleMsg string `gorm:"column:handle_msg"` + HandlerUserID string `gorm:"column:handler_user_id;size:64"` + HandleMsg string `gorm:"column:handle_msg;size:255"` HandleTime time.Time `gorm:"column:handle_time"` - Ex string `gorm:"column:ex"` + Ex string `gorm:"column:ex;size:1024"` } //message GroupInfo{ @@ -65,17 +65,16 @@ type FriendRequest struct { type Group struct { //`json:"operationID" binding:"required"` //`protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` `json:"operationID" binding:"required"` - GroupID string `gorm:"column:group_id;primaryKey;" json:"groupID" binding:"required"` - GroupName string `gorm:"column:name" json:"groupName"` - Notification string `gorm:"column:notification" json:"notification"` - Introduction string `gorm:"column:introduction" json:"introduction"` - FaceUrl string `gorm:"column:face_url" json:"faceUrl"` - + GroupID string `gorm:"column:group_id;primary_key;size:64" json:"groupID" binding:"required"` + GroupName string `gorm:"column:name;size:255" json:"groupName"` + Notification string `gorm:"column:notification;size:255" json:"notification"` + Introduction string `gorm:"column:introduction;size:255" json:"introduction"` + FaceUrl string `gorm:"column:face_url;size:255" json:"faceUrl"` CreateTime time.Time `gorm:"column:create_time"` + Ex string `gorm:"column:ex" json:"ex;size:1024"` Status int32 `gorm:"column:status"` - CreatorUserID string `gorm:"column:creator_user_id"` + CreatorUserID string `gorm:"column:creator_user_id;size:64"` GroupType int32 `gorm:"column:group_type"` - Ex string `gorm:"column:ex" json:"ex"` } //message GroupMemberFullInfo { @@ -91,15 +90,15 @@ type Group struct { //int32 AppMangerLevel = 7; //if >0 //} open_im_sdk.GroupMemberFullInfo(AppMangerLevel) > imdb.GroupMember type GroupMember struct { - GroupID string `gorm:"column:group_id;primaryKey;"` - UserID string `gorm:"column:user_id;primaryKey;"` + GroupID string `gorm:"column:group_id;primary_key;size:64"` + UserID string `gorm:"column:user_id;primary_key;size:64"` + Nickname string `gorm:"column:nickname;size:255"` + FaceUrl string `gorm:"column:user_group_face_url;size:255"` RoleLevel int32 `gorm:"column:role_level"` JoinTime time.Time `gorm:"column:join_time"` - Nickname string `gorm:"column:nickname"` - FaceUrl string `gorm:"column:user_group_face_url"` JoinSource int32 `gorm:"column:join_source"` - OperatorUserID string `gorm:"column:operator_user_id"` - Ex string `gorm:"column:ex"` + OperatorUserID string `gorm:"column:operator_user_id;size:64"` + Ex string `gorm:"column:ex;size:1024"` } //message GroupRequest{ @@ -114,15 +113,15 @@ type GroupMember struct { //string Ex = 9; //}open_im_sdk.GroupRequest == imdb.GroupRequest type GroupRequest struct { - UserID string `gorm:"column:user_id;primaryKey;"` - GroupID string `gorm:"column:group_id;primaryKey;"` + UserID string `gorm:"column:user_id;primary_key;size:64"` + GroupID string `gorm:"column:group_id;primary_key;size:64"` HandleResult int32 `gorm:"column:handle_result"` - ReqMsg string `gorm:"column:req_msg"` - HandledMsg string `gorm:"column:handle_msg"` + ReqMsg string `gorm:"column:req_msg;size:255"` + HandledMsg string `gorm:"column:handle_msg;size:255"` ReqTime time.Time `gorm:"column:req_time"` - HandleUserID string `gorm:"column:handle_user_id"` + HandleUserID string `gorm:"column:handle_user_id;size:64"` HandledTime time.Time `gorm:"column:handle_time"` - Ex string `gorm:"column:ex"` + Ex string `gorm:"column:ex;size:1024"` } //string UserID = 1; @@ -137,14 +136,14 @@ type GroupRequest struct { //int32 AppMangerLevel = 10; //open_im_sdk.User == imdb.User type User struct { - UserID string `gorm:"column:user_id;primaryKey;"` - Nickname string `gorm:"column:name"` - FaceUrl string `gorm:"column:face_url"` + UserID string `gorm:"column:user_id;primary_key;size:64"` + Nickname string `gorm:"column:name;size:255"` + FaceUrl string `gorm:"column:face_url;size:255"` Gender int32 `gorm:"column:gender"` - PhoneNumber string `gorm:"column:phone_number"` + PhoneNumber string `gorm:"column:phone_number;size:32"` Birth time.Time `gorm:"column:birth"` - Email string `gorm:"column:email"` - Ex string `gorm:"column:ex"` + Email string `gorm:"column:email;size:64"` + Ex string `gorm:"column:ex;size:1024"` CreateTime time.Time `gorm:"column:create_time"` AppMangerLevel int32 `gorm:"column:app_manger_level"` } From fea89ad45167a9ea2cfeff385a4c52fd202a1f8b Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 4 Jan 2022 13:38:38 +0800 Subject: [PATCH 243/337] Refactor code --- .../im_mysql_model/friend_model.go | 10 ++++----- .../im_mysql_model/friend_request_model.go | 10 ++++----- .../im_mysql_model/group_member_model.go | 21 ++++++++++--------- .../mysql_model/im_mysql_model/group_model.go | 6 +++--- .../im_mysql_model/group_request_model.go | 10 ++++----- .../im_mysql_model/user_black_list_model.go | 8 +++---- .../mysql_model/im_mysql_model/user_model.go | 12 +++++------ 7 files changed, 39 insertions(+), 38 deletions(-) diff --git a/pkg/common/db/mysql_model/im_mysql_model/friend_model.go b/pkg/common/db/mysql_model/im_mysql_model/friend_model.go index b8de9b120..45650357b 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/friend_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/friend_model.go @@ -13,7 +13,7 @@ func InsertToFriend(toInsertFollow *db.Friend) error { } toInsertFollow.CreateTime = time.Now() - err = dbConn.Table("friend").Create(toInsertFollow).Error + err = dbConn.Table("friends").Create(toInsertFollow).Error if err != nil { return err } @@ -26,7 +26,7 @@ func GetFriendRelationshipFromFriend(OwnerUserID, FriendUserID string) (*db.Frie return nil, err } var friend db.Friend - err = dbConn.Table("friend").Where("owner_user_id=? and friend_user_id=?", OwnerUserID, FriendUserID).Find(&friend).Error + err = dbConn.Table("friends").Where("owner_user_id=? and friend_user_id=?", OwnerUserID, FriendUserID).Find(&friend).Error if err != nil { return nil, err } @@ -41,7 +41,7 @@ func GetFriendListByUserID(OwnerUserID string) ([]db.Friend, error) { var friends []db.Friend var x db.Friend x.OwnerUserID = OwnerUserID - err = dbConn.Table("friend").Where("owner_user_id=?", OwnerUserID).Find(&friends).Error + err = dbConn.Table("friends").Where("owner_user_id=?", OwnerUserID).Find(&friends).Error if err != nil { return nil, err @@ -54,7 +54,7 @@ func UpdateFriendComment(OwnerUserID, FriendUserID, Remark string) error { if err != nil { return err } - err = dbConn.Exec("update friend set remark=? where owner_user_id=? and friend_user_id=?", Remark, OwnerUserID, FriendUserID).Error + err = dbConn.Exec("update friends set remark=? where owner_user_id=? and friend_user_id=?", Remark, OwnerUserID, FriendUserID).Error return err } @@ -63,7 +63,7 @@ func DeleteSingleFriendInfo(OwnerUserID, FriendUserID string) error { if err != nil { return err } - err = dbConn.Table("friend").Where("owner_user_id=? and friend_user_id=?", OwnerUserID, FriendUserID).Delete(db.Friend{}).Error + err = dbConn.Table("friends").Where("owner_user_id=? and friend_user_id=?", OwnerUserID, FriendUserID).Delete(db.Friend{}).Error return err } diff --git a/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go b/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go index 299cdfc69..2591426a2 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/friend_request_model.go @@ -25,7 +25,7 @@ func GetReceivedFriendsApplicationListByUserID(ToUserID string) ([]db.FriendRequ return nil, err } var usersInfo []db.FriendRequest - err = dbConn.Table("friend_request").Where("to_user_id=?", ToUserID).Find(&usersInfo).Error + err = dbConn.Table("friend_requests").Where("to_user_id=?", ToUserID).Find(&usersInfo).Error if err != nil { return nil, err } @@ -39,7 +39,7 @@ func GetSendFriendApplicationListByUserID(FromUserID string) ([]db.FriendRequest return nil, err } var usersInfo []db.FriendRequest - err = dbConn.Table("friend_request").Where("from_user_id=?", FromUserID).Find(&usersInfo).Error + err = dbConn.Table("friend_requests").Where("from_user_id=?", FromUserID).Find(&usersInfo).Error if err != nil { return nil, err } @@ -53,7 +53,7 @@ func GetFriendApplicationByBothUserID(FromUserID, ToUserID string) (*db.FriendRe return nil, err } var friendRequest db.FriendRequest - err = dbConn.Table("friend_request").Where("from_user_id=? and to_user_id=?", FromUserID, ToUserID).Find(&friendRequest).Error + err = dbConn.Table("friend_requests").Where("from_user_id=? and to_user_id=?", FromUserID, ToUserID).Find(&friendRequest).Error if err != nil { return nil, err } @@ -67,7 +67,7 @@ func UpdateFriendApplication(friendRequest *db.FriendRequest) error { } friendRequest.CreateTime = time.Now() - return dbConn.Table("friend_request").Where("from_user_id=? and to_user_id=?", + return dbConn.Table("friend_requests").Where("from_user_id=? and to_user_id=?", friendRequest.FromUserID, friendRequest.ToUserID).Update(&friendRequest).Error } @@ -82,7 +82,7 @@ func InsertFriendApplication(friendRequest *db.FriendRequest) error { if friendRequest.HandleTime.Unix() < 0 { friendRequest.HandleTime = utils.UnixSecondToTime(0) } - err = dbConn.Table("friend_request").Create(friendRequest).Error + err = dbConn.Table("friend_requests").Create(friendRequest).Error if err != nil { return err } diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go index ce115fcda..6b895a8ee 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go @@ -27,7 +27,7 @@ func InsertIntoGroupMember(toInsertInfo db.GroupMember) error { if toInsertInfo.RoleLevel == 0 { toInsertInfo.RoleLevel = constant.GroupOrdinaryUsers } - err = dbConn.Table("group_member").Create(toInsertInfo).Error + err = dbConn.Table("group_members").Create(toInsertInfo).Error if err != nil { return err } @@ -40,7 +40,7 @@ func GetGroupMemberListByUserID(userID string) ([]db.GroupMember, error) { return nil, err } var groupMemberList []db.GroupMember - err = dbConn.Table("group_member").Where("user_id=?", userID).Find(&groupMemberList).Error + err = dbConn.Table("group_members").Where("user_id=?", userID).Find(&groupMemberList).Error if err != nil { return nil, err } @@ -53,7 +53,8 @@ func GetGroupMemberListByGroupID(groupID string) ([]db.GroupMember, error) { return nil, err } var groupMemberList []db.GroupMember - err = dbConn.Table("group_member").Where("group_id=?", groupID).Find(&groupMemberList).Error + err = dbConn.Table("group_members").Where("group_id=?", groupID).Find(&groupMemberList).Error + if err != nil { return nil, err } @@ -66,7 +67,7 @@ func GetGroupMemberListByGroupIDAndRoleLevel(groupID string, roleLevel int32) ([ return nil, err } var groupMemberList []db.GroupMember - err = dbConn.Table("group_member").Where("group_id=? and role_level=?", groupID, roleLevel).Find(&groupMemberList).Error + err = dbConn.Table("group_members").Where("group_id=? and role_level=?", groupID, roleLevel).Find(&groupMemberList).Error if err != nil { return nil, err } @@ -79,7 +80,7 @@ func GetGroupMemberInfoByGroupIDAndUserID(groupID, userID string) (*db.GroupMemb return nil, err } var groupMember db.GroupMember - err = dbConn.Table("group_member").Where("group_id=? and user_id=? ", groupID, userID).Limit(1).Find(&groupMember).Error + err = dbConn.Table("group_members").Where("group_id=? and user_id=? ", groupID, userID).Limit(1).Find(&groupMember).Error if err != nil { return nil, err } @@ -91,7 +92,7 @@ func DeleteGroupMemberByGroupIDAndUserID(groupID, userID string) error { if err != nil { return err } - err = dbConn.Table("group_member").Where("group_id=? and user_id=? ", groupID, userID).Delete(&db.GroupMember{}).Error + err = dbConn.Table("group_members").Where("group_id=? and user_id=? ", groupID, userID).Delete(&db.GroupMember{}).Error if err != nil { return err } @@ -103,7 +104,7 @@ func UpdateGroupMemberInfo(groupMemberInfo db.GroupMember) error { if err != nil { return err } - err = dbConn.Table("group_member").Where("group_id=? and user_id=?", groupMemberInfo.GroupID, groupMemberInfo.UserID).Update(&groupMemberInfo).Error + err = dbConn.Table("group_members").Where("group_id=? and user_id=?", groupMemberInfo.GroupID, groupMemberInfo.UserID).Update(&groupMemberInfo).Error if err != nil { return err } @@ -116,7 +117,7 @@ func GetOwnerManagerByGroupID(groupID string) ([]db.GroupMember, error) { return nil, err } var groupMemberList []db.GroupMember - err = dbConn.Table("group_member").Where("group_id=? and role_level>?", groupID, constant.GroupOrdinaryUsers).Find(&groupMemberList).Error + err = dbConn.Table("group_members").Where("group_id=? and role_level>?", groupID, constant.GroupOrdinaryUsers).Find(&groupMemberList).Error if err != nil { return nil, err } @@ -129,7 +130,7 @@ func GetGroupMemberNumByGroupID(groupID string) uint32 { return 0 } var number uint32 - err = dbConn.Table("group_member").Where("group_id=?", groupID).Count(&number).Error + err = dbConn.Table("group_members").Where("group_id=?", groupID).Count(&number).Error if err != nil { return 0 } @@ -155,7 +156,7 @@ func IsExistGroupMember(groupID, userID string) bool { return false } var number int32 - err = dbConn.Table("group_member").Where("group_id = ? and user_id = ?", groupID, userID).Count(&number).Error + err = dbConn.Table("group_members").Where("group_id = ? and user_id = ?", groupID, userID).Count(&number).Error if err != nil { return false } diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_model.go index 18eba61f8..21e9d5156 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_model.go @@ -27,7 +27,7 @@ func InsertIntoGroup(groupInfo db.Group) error { groupInfo.GroupName = "Group Chat" } groupInfo.CreateTime = time.Now() - err = dbConn.Table("group").Create(groupInfo).Error + err = dbConn.Table("groups").Create(groupInfo).Error if err != nil { return err } @@ -40,7 +40,7 @@ func GetGroupInfoByGroupID(groupId string) (*db.Group, error) { return nil, err } var groupInfo db.Group - err = dbConn.Table("group").Where("group_id=?", groupId).Find(&groupInfo).Error + err = dbConn.Table("groups").Where("group_id=?", groupId).Find(&groupInfo).Error if err != nil { return nil, err } @@ -52,6 +52,6 @@ func SetGroupInfo(groupInfo db.Group) error { if err != nil { return err } - err = dbConn.Table("group").Where("group_id=?", groupInfo.GroupID).Update(&groupInfo).Error + err = dbConn.Table("groups").Where("group_id=?", groupInfo.GroupID).Update(&groupInfo).Error return err } diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go index 7ee352718..b1436e17b 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go @@ -27,7 +27,7 @@ func UpdateGroupRequest(groupRequest db.GroupRequest) error { if groupRequest.HandledTime.Unix() < 0 { groupRequest.HandledTime = utils.UnixSecondToTime(0) } - return dbConn.Table("group_request").Where("group_id=? and user_id=?", groupRequest.GroupID, groupRequest.UserID).Update(&groupRequest).Error + return dbConn.Table("group_requests").Where("group_id=? and user_id=?", groupRequest.GroupID, groupRequest.UserID).Update(&groupRequest).Error } func InsertIntoGroupRequest(toInsertInfo db.GroupRequest) error { @@ -41,7 +41,7 @@ func InsertIntoGroupRequest(toInsertInfo db.GroupRequest) error { toInsertInfo.HandledTime = utils.UnixSecondToTime(0) } - err = dbConn.Table("group_request").Create(&toInsertInfo).Error + err = dbConn.Table("group_requests").Create(&toInsertInfo).Error if err != nil { return err } @@ -54,7 +54,7 @@ func GetGroupRequestByGroupIDAndUserID(groupID, userID string) (*db.GroupRequest return nil, err } var groupRequest db.GroupRequest - err = dbConn.Table("group_request").Where("user_id=? and group_id=?", userID, groupID).Find(&groupRequest).Error + err = dbConn.Table("group_requests").Where("user_id=? and group_id=?", userID, groupID).Find(&groupRequest).Error if err != nil { return nil, err } @@ -66,7 +66,7 @@ func DelGroupRequestByGroupIDAndUserID(groupID, userID string) error { if err != nil { return err } - err = dbConn.Table("group_request").Where("group_id=? and user_id=?", groupID, userID).Delete(&db.GroupRequest{}).Error + err = dbConn.Table("group_requests").Where("group_id=? and user_id=?", groupID, userID).Delete(&db.GroupRequest{}).Error if err != nil { return err } @@ -79,7 +79,7 @@ func GetGroupRequestByGroupID(groupID string) ([]db.GroupRequest, error) { return nil, err } var groupRequestList []db.GroupRequest - err = dbConn.Table("group_request").Where("group_id=?", groupID).Find(&groupRequestList).Error + err = dbConn.Table("group_requests").Where("group_id=?", groupID).Find(&groupRequestList).Error if err != nil { return nil, err } diff --git a/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go b/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go index 09c7d6c29..1c7bda90c 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go @@ -11,7 +11,7 @@ func InsertInToUserBlackList(black db.Black) error { return err } black.CreateTime = time.Now() - err = dbConn.Table("user_black_list").Create(black).Error + err = dbConn.Table("blacks").Create(black).Error return err } @@ -30,7 +30,7 @@ func CheckBlack(ownerUserID, blockUserID string) error { return err } var black db.Black - err = dbConn.Table("user_black_list").Where("owner_user_id=? and block_user_id=?", ownerUserID, blockUserID).Find(&black).Error + err = dbConn.Table("blacks").Where("owner_user_id=? and block_user_id=?", ownerUserID, blockUserID).Find(&black).Error return err } @@ -40,7 +40,7 @@ func RemoveBlackList(ownerUserID, blockUserID string) error { return err } - err = dbConn.Table("user_black_list").Where("owner_user_id=? and block_user_id=?", ownerUserID, blockUserID).Delete(&db.Black{}).Error + err = dbConn.Table("blacks").Where("owner_user_id=? and block_user_id=?", ownerUserID, blockUserID).Delete(&db.Black{}).Error return err } @@ -50,7 +50,7 @@ func GetBlackListByUserID(ownerUserID string) ([]db.Black, error) { return nil, err } var blackListUsersInfo []db.Black - err = dbConn.Table("user_black_list").Where("owner_user_id=?", ownerUserID).Find(&blackListUsersInfo).Error + err = dbConn.Table("blacks").Where("owner_user_id=?", ownerUserID).Find(&blackListUsersInfo).Error if err != nil { return nil, err } diff --git a/pkg/common/db/mysql_model/im_mysql_model/user_model.go b/pkg/common/db/mysql_model/im_mysql_model/user_model.go index 3ae38f4b2..5c3b226d5 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/user_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/user_model.go @@ -43,7 +43,7 @@ func UserRegister(user db.User) error { if user.Birth.Unix() < 0 { user.Birth = utils.UnixSecondToTime(0) } - err = dbConn.Table("user").Create(&user).Error + err = dbConn.Table("users").Create(&user).Error if err != nil { return err } @@ -67,7 +67,7 @@ func DeleteUser(userID string) (i int64) { if err != nil { return 0 } - i = dbConn.Table("user").Where("user_id=?", userID).Delete(db.User{}).RowsAffected + i = dbConn.Table("users").Where("user_id=?", userID).Delete(db.User{}).RowsAffected return i } @@ -77,7 +77,7 @@ func GetUserByUserID(userID string) (*db.User, error) { return nil, err } var user db.User - err = dbConn.Table("user").Where("user_id=?", userID).First(&user).Error + err = dbConn.Table("users").Where("user_id=?", userID).First(&user).Error if err != nil { return nil, err } @@ -90,7 +90,7 @@ func UpdateUserInfo(user db.User) error { return err } - err = dbConn.Table("user").Where("user_id=?", user.UserID).Update(&user).Error + err = dbConn.Table("users").Where("user_id=?", user.UserID).Update(&user).Error return err } @@ -100,7 +100,7 @@ func SelectAllUserID() ([]string, error) { return nil, err } var resultArr []string - err = dbConn.Table("user").Pluck("user_id", &resultArr).Error + err = dbConn.Table("users").Pluck("user_id", &resultArr).Error if err != nil { return nil, err } @@ -114,7 +114,7 @@ func SelectSomeUserID(userIDList []string) ([]string, error) { return nil, err } var resultArr []string - err = dbConn.Table("user").Where("user_id IN (?) ", userIDList).Pluck("user_id", &resultArr).Error + err = dbConn.Table("users").Where("user_id IN (?) ", userIDList).Pluck("user_id", &resultArr).Error if err != nil { return nil, err From d5b5929e9bc1b4a77535182d67b73601092d4227 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 6 Jan 2022 14:17:25 +0800 Subject: [PATCH 244/337] Refactor code --- pkg/base_info/group_api_struct.go | 5 +++++ pkg/common/db/model_struct.go | 2 +- pkg/common/db/mysql.go | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/pkg/base_info/group_api_struct.go b/pkg/base_info/group_api_struct.go index e4be9d179..7c70d5a0e 100644 --- a/pkg/base_info/group_api_struct.go +++ b/pkg/base_info/group_api_struct.go @@ -10,6 +10,11 @@ type CommResp struct { ErrMsg string `json:"errMsg"` } +type CommDataResp struct { + CommResp + Data []map[string]interface{} `json:"data"` +} + type KickGroupMemberReq struct { GroupID string `json:"groupID" binding:"required"` KickedUserIDList []string `json:"kickedUserIDList" binding:"required"` diff --git a/pkg/common/db/model_struct.go b/pkg/common/db/model_struct.go index 1aa4d5a91..65a57b96a 100644 --- a/pkg/common/db/model_struct.go +++ b/pkg/common/db/model_struct.go @@ -71,7 +71,7 @@ type Group struct { Introduction string `gorm:"column:introduction;size:255" json:"introduction"` FaceUrl string `gorm:"column:face_url;size:255" json:"faceUrl"` CreateTime time.Time `gorm:"column:create_time"` - Ex string `gorm:"column:ex" json:"ex;size:1024"` + Ex string `gorm:"column:ex" json:"ex;size:1024" json:"ex"` Status int32 `gorm:"column:status"` CreatorUserID string `gorm:"column:creator_user_id;size:64"` GroupType int32 `gorm:"column:group_type"` diff --git a/pkg/common/db/mysql.go b/pkg/common/db/mysql.go index 41347190b..dba24ae61 100644 --- a/pkg/common/db/mysql.go +++ b/pkg/common/db/mysql.go @@ -35,7 +35,7 @@ func initMysqlDB() { } //Check the database and table during initialization - sql := fmt.Sprintf("CREATE DATABASE IF NOT EXISTS %s ;", config.Config.Mysql.DBDatabaseName+"test1") + sql := fmt.Sprintf("CREATE DATABASE IF NOT EXISTS %s ;", config.Config.Mysql.DBDatabaseName) err = db.Exec(sql).Error if err != nil { log.NewError("0", "Exec failed ", err.Error(), sql) From 29e2a001094dfdddc013f31c041ba86a3f2a485a Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 6 Jan 2022 15:18:23 +0800 Subject: [PATCH 245/337] Refactor code --- pkg/base_info/user_api_struct.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/base_info/user_api_struct.go b/pkg/base_info/user_api_struct.go index d8412f069..632c6ea77 100644 --- a/pkg/base_info/user_api_struct.go +++ b/pkg/base_info/user_api_struct.go @@ -10,7 +10,7 @@ type GetUserInfoReq struct { } type GetUserInfoResp struct { CommResp - UserInfoList []*open_im_sdk.UserInfo + UserInfoList []*open_im_sdk.UserInfo `json:"-"` Data []map[string]interface{} `json:"data"` } From 06af2b6aa3c5a885cea89733f9700f173282fb59 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 6 Jan 2022 15:19:24 +0800 Subject: [PATCH 246/337] Refactor code --- pkg/base_info/friend_api_struct.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pkg/base_info/friend_api_struct.go b/pkg/base_info/friend_api_struct.go index 4b99b71e3..64b71b284 100644 --- a/pkg/base_info/friend_api_struct.go +++ b/pkg/base_info/friend_api_struct.go @@ -59,8 +59,8 @@ type GetBlackListReq struct { } type GetBlackListResp struct { CommResp - BlackUserInfoList []*open_im_sdk.PublicUserInfo - Data []map[string]interface{} `json:"data"` + BlackUserInfoList []*open_im_sdk.PublicUserInfo `json:"-"` + Data []map[string]interface{} `json:"data"` } //type PublicUserInfo struct { @@ -101,8 +101,8 @@ type GetFriendsInfoReq struct { } type GetFriendsInfoResp struct { CommResp - FriendInfoList []*open_im_sdk.FriendInfo - Data []map[string]interface{} `json:"data"` + FriendInfoList []*open_im_sdk.FriendInfo `json:"-"` + Data []map[string]interface{} `json:"data"` } type GetFriendListReq struct { @@ -111,8 +111,8 @@ type GetFriendListReq struct { } type GetFriendListResp struct { CommResp - FriendInfoList []*open_im_sdk.FriendInfo - Data []map[string]interface{} `json:"data"` + FriendInfoList []*open_im_sdk.FriendInfo `json:"-"` + Data []map[string]interface{} `json:"data"` } type GetFriendApplyListReq struct { @@ -121,8 +121,8 @@ type GetFriendApplyListReq struct { } type GetFriendApplyListResp struct { CommResp - FriendRequestList []*open_im_sdk.FriendRequest - Data []map[string]interface{} `json:"data"` + FriendRequestList []*open_im_sdk.FriendRequest `json:"-"` + Data []map[string]interface{} `json:"data"` } type GetSelfApplyListReq struct { @@ -131,6 +131,6 @@ type GetSelfApplyListReq struct { } type GetSelfApplyListResp struct { CommResp - FriendRequestList []*open_im_sdk.FriendRequest - Data []map[string]interface{} `json:"data"` + FriendRequestList []*open_im_sdk.FriendRequest `json:"-"` + Data []map[string]interface{} `json:"data"` } From 136e0cde0663f9c5e150a2175639d919b81aac1e Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 6 Jan 2022 15:24:57 +0800 Subject: [PATCH 247/337] Refactor code --- internal/utils/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/utils/utils.go b/internal/utils/utils.go index 8656534ee..73ebbf127 100644 --- a/internal/utils/utils.go +++ b/internal/utils/utils.go @@ -33,7 +33,7 @@ func ProtoToMap(pb proto.Message, idFix bool) map[string]interface{} { marshaler := jsonpb.Marshaler{ OrigName: true, EnumsAsInts: false, - EmitDefaults: true, + EmitDefaults: false, } s, _ := marshaler.MarshalToString(pb) From a677d4da5fafc3f6a3ef206103fd2834a49288d5 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 6 Jan 2022 17:55:37 +0800 Subject: [PATCH 248/337] Refactor code --- internal/api/friend/friend.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go index eb755879b..d6d960f24 100644 --- a/internal/api/friend/friend.go +++ b/internal/api/friend/friend.go @@ -383,6 +383,7 @@ func GetFriendList(c *gin.Context) { } resp := api.GetFriendListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, FriendInfoList: RpcResp.FriendInfoList} + resp.FriendInfoList[0].CreateTime = resp.FriendInfoList[0].CreateTime / 100 resp.Data = jsonData.JsonDataList(resp.FriendInfoList) log.NewInfo(req.CommID.OperationID, "GetFriendList api return ", resp) c.JSON(http.StatusOK, resp) From 5fef41e1325397a459ed013c8e1fd57ed39dd02d Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 6 Jan 2022 18:00:15 +0800 Subject: [PATCH 249/337] Refactor code --- internal/api/friend/friend.go | 3 ++- pkg/base_info/friend_api_struct.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go index d6d960f24..5d9b0060a 100644 --- a/internal/api/friend/friend.go +++ b/internal/api/friend/friend.go @@ -383,10 +383,11 @@ func GetFriendList(c *gin.Context) { } resp := api.GetFriendListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, FriendInfoList: RpcResp.FriendInfoList} - resp.FriendInfoList[0].CreateTime = resp.FriendInfoList[0].CreateTime / 100 + resp.TestTime = 1641450220 resp.Data = jsonData.JsonDataList(resp.FriendInfoList) log.NewInfo(req.CommID.OperationID, "GetFriendList api return ", resp) c.JSON(http.StatusOK, resp) + //c.JSON(http.StatusOK, resp) } func GetFriendApplyList(c *gin.Context) { diff --git a/pkg/base_info/friend_api_struct.go b/pkg/base_info/friend_api_struct.go index 64b71b284..fed88743f 100644 --- a/pkg/base_info/friend_api_struct.go +++ b/pkg/base_info/friend_api_struct.go @@ -111,7 +111,8 @@ type GetFriendListReq struct { } type GetFriendListResp struct { CommResp - FriendInfoList []*open_im_sdk.FriendInfo `json:"-"` + TestTime uint32 `json:"test_time"` + FriendInfoList []*open_im_sdk.FriendInfo `json:"test_data"` Data []map[string]interface{} `json:"data"` } From 5c9dc62015a2e701720193271164f29d0d9e8ca6 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 6 Jan 2022 18:04:30 +0800 Subject: [PATCH 250/337] Refactor code --- pkg/base_info/friend_api_struct.go | 3 +-- pkg/proto/sdk_ws/ws.pb.go | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/base_info/friend_api_struct.go b/pkg/base_info/friend_api_struct.go index fed88743f..64b71b284 100644 --- a/pkg/base_info/friend_api_struct.go +++ b/pkg/base_info/friend_api_struct.go @@ -111,8 +111,7 @@ type GetFriendListReq struct { } type GetFriendListResp struct { CommResp - TestTime uint32 `json:"test_time"` - FriendInfoList []*open_im_sdk.FriendInfo `json:"test_data"` + FriendInfoList []*open_im_sdk.FriendInfo `json:"-"` Data []map[string]interface{} `json:"data"` } diff --git a/pkg/proto/sdk_ws/ws.pb.go b/pkg/proto/sdk_ws/ws.pb.go index 0b30328b4..7f9bd2271 100644 --- a/pkg/proto/sdk_ws/ws.pb.go +++ b/pkg/proto/sdk_ws/ws.pb.go @@ -437,7 +437,7 @@ func (m *UserInfo) GetAppMangerLevel() int32 { type FriendInfo struct { OwnerUserID string `protobuf:"bytes,1,opt,name=OwnerUserID" json:"OwnerUserID,omitempty"` Remark string `protobuf:"bytes,2,opt,name=Remark" json:"Remark,omitempty"` - CreateTime int64 `protobuf:"varint,3,opt,name=CreateTime" json:"CreateTime,omitempty"` + CreateTime uint32 `protobuf:"varint,3,opt,name=CreateTime" json:"CreateTime,omitempty"` FriendUser *UserInfo `protobuf:"bytes,4,opt,name=FriendUser" json:"FriendUser,omitempty"` AddSource int32 `protobuf:"varint,5,opt,name=AddSource" json:"AddSource,omitempty"` OperatorUserID string `protobuf:"bytes,6,opt,name=OperatorUserID" json:"OperatorUserID,omitempty"` From aafbee2a28ca0347b4cfd858a62b11e8dacbb061 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 6 Jan 2022 18:08:54 +0800 Subject: [PATCH 251/337] Refactor code --- pkg/proto/sdk_ws/ws.pb.go | 2 +- pkg/proto/sdk_ws/ws.proto | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/proto/sdk_ws/ws.pb.go b/pkg/proto/sdk_ws/ws.pb.go index 7f9bd2271..0b30328b4 100644 --- a/pkg/proto/sdk_ws/ws.pb.go +++ b/pkg/proto/sdk_ws/ws.pb.go @@ -437,7 +437,7 @@ func (m *UserInfo) GetAppMangerLevel() int32 { type FriendInfo struct { OwnerUserID string `protobuf:"bytes,1,opt,name=OwnerUserID" json:"OwnerUserID,omitempty"` Remark string `protobuf:"bytes,2,opt,name=Remark" json:"Remark,omitempty"` - CreateTime uint32 `protobuf:"varint,3,opt,name=CreateTime" json:"CreateTime,omitempty"` + CreateTime int64 `protobuf:"varint,3,opt,name=CreateTime" json:"CreateTime,omitempty"` FriendUser *UserInfo `protobuf:"bytes,4,opt,name=FriendUser" json:"FriendUser,omitempty"` AddSource int32 `protobuf:"varint,5,opt,name=AddSource" json:"AddSource,omitempty"` OperatorUserID string `protobuf:"bytes,6,opt,name=OperatorUserID" json:"OperatorUserID,omitempty"` diff --git a/pkg/proto/sdk_ws/ws.proto b/pkg/proto/sdk_ws/ws.proto index 3f552891f..0f8f845eb 100644 --- a/pkg/proto/sdk_ws/ws.proto +++ b/pkg/proto/sdk_ws/ws.proto @@ -58,7 +58,7 @@ message UserInfo{ message FriendInfo{ string OwnerUserID = 1; string Remark = 2; - int64 CreateTime = 3; + uint32 CreateTime = 3; UserInfo FriendUser = 4; int32 AddSource = 5; string OperatorUserID = 6; From edfb89a8d9f438180a31fa87400cf2d44e60211b Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 6 Jan 2022 18:09:48 +0800 Subject: [PATCH 252/337] Refactor code --- internal/api/friend/friend.go | 1 - 1 file changed, 1 deletion(-) diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go index 5d9b0060a..3cd14ff73 100644 --- a/internal/api/friend/friend.go +++ b/internal/api/friend/friend.go @@ -383,7 +383,6 @@ func GetFriendList(c *gin.Context) { } resp := api.GetFriendListResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, FriendInfoList: RpcResp.FriendInfoList} - resp.TestTime = 1641450220 resp.Data = jsonData.JsonDataList(resp.FriendInfoList) log.NewInfo(req.CommID.OperationID, "GetFriendList api return ", resp) c.JSON(http.StatusOK, resp) From d6133c325ad65bbda95d8d9848e159792291d285 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 6 Jan 2022 18:14:54 +0800 Subject: [PATCH 253/337] Refactor code --- pkg/proto/sdk_ws/ws.pb.go | 325 +++++++++++++++++++------------------- 1 file changed, 163 insertions(+), 162 deletions(-) diff --git a/pkg/proto/sdk_ws/ws.pb.go b/pkg/proto/sdk_ws/ws.pb.go index 0b30328b4..3fbfb6e81 100644 --- a/pkg/proto/sdk_ws/ws.pb.go +++ b/pkg/proto/sdk_ws/ws.pb.go @@ -40,7 +40,7 @@ func (m *GroupInfo) Reset() { *m = GroupInfo{} } func (m *GroupInfo) String() string { return proto.CompactTextString(m) } func (*GroupInfo) ProtoMessage() {} func (*GroupInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_8a45d93b14f6e420, []int{0} + return fileDescriptor_ws_996ebd499da55dba, []int{0} } func (m *GroupInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfo.Unmarshal(m, b) @@ -164,7 +164,7 @@ func (m *GroupMemberFullInfo) Reset() { *m = GroupMemberFullInfo{} } func (m *GroupMemberFullInfo) String() string { return proto.CompactTextString(m) } func (*GroupMemberFullInfo) ProtoMessage() {} func (*GroupMemberFullInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_8a45d93b14f6e420, []int{1} + return fileDescriptor_ws_996ebd499da55dba, []int{1} } func (m *GroupMemberFullInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupMemberFullInfo.Unmarshal(m, b) @@ -269,7 +269,7 @@ func (m *PublicUserInfo) Reset() { *m = PublicUserInfo{} } func (m *PublicUserInfo) String() string { return proto.CompactTextString(m) } func (*PublicUserInfo) ProtoMessage() {} func (*PublicUserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_8a45d93b14f6e420, []int{2} + return fileDescriptor_ws_996ebd499da55dba, []int{2} } func (m *PublicUserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PublicUserInfo.Unmarshal(m, b) @@ -344,7 +344,7 @@ func (m *UserInfo) Reset() { *m = UserInfo{} } func (m *UserInfo) String() string { return proto.CompactTextString(m) } func (*UserInfo) ProtoMessage() {} func (*UserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_8a45d93b14f6e420, []int{3} + return fileDescriptor_ws_996ebd499da55dba, []int{3} } func (m *UserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserInfo.Unmarshal(m, b) @@ -437,7 +437,7 @@ func (m *UserInfo) GetAppMangerLevel() int32 { type FriendInfo struct { OwnerUserID string `protobuf:"bytes,1,opt,name=OwnerUserID" json:"OwnerUserID,omitempty"` Remark string `protobuf:"bytes,2,opt,name=Remark" json:"Remark,omitempty"` - CreateTime int64 `protobuf:"varint,3,opt,name=CreateTime" json:"CreateTime,omitempty"` + CreateTime uint32 `protobuf:"varint,3,opt,name=CreateTime" json:"CreateTime,omitempty"` FriendUser *UserInfo `protobuf:"bytes,4,opt,name=FriendUser" json:"FriendUser,omitempty"` AddSource int32 `protobuf:"varint,5,opt,name=AddSource" json:"AddSource,omitempty"` OperatorUserID string `protobuf:"bytes,6,opt,name=OperatorUserID" json:"OperatorUserID,omitempty"` @@ -451,7 +451,7 @@ func (m *FriendInfo) Reset() { *m = FriendInfo{} } func (m *FriendInfo) String() string { return proto.CompactTextString(m) } func (*FriendInfo) ProtoMessage() {} func (*FriendInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_8a45d93b14f6e420, []int{4} + return fileDescriptor_ws_996ebd499da55dba, []int{4} } func (m *FriendInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfo.Unmarshal(m, b) @@ -485,7 +485,7 @@ func (m *FriendInfo) GetRemark() string { return "" } -func (m *FriendInfo) GetCreateTime() int64 { +func (m *FriendInfo) GetCreateTime() uint32 { if m != nil { return m.CreateTime } @@ -536,7 +536,7 @@ func (m *BlackInfo) Reset() { *m = BlackInfo{} } func (m *BlackInfo) String() string { return proto.CompactTextString(m) } func (*BlackInfo) ProtoMessage() {} func (*BlackInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_8a45d93b14f6e420, []int{5} + return fileDescriptor_ws_996ebd499da55dba, []int{5} } func (m *BlackInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackInfo.Unmarshal(m, b) @@ -617,7 +617,7 @@ func (m *GroupRequest) Reset() { *m = GroupRequest{} } func (m *GroupRequest) String() string { return proto.CompactTextString(m) } func (*GroupRequest) ProtoMessage() {} func (*GroupRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_8a45d93b14f6e420, []int{6} + return fileDescriptor_ws_996ebd499da55dba, []int{6} } func (m *GroupRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupRequest.Unmarshal(m, b) @@ -719,7 +719,7 @@ func (m *FriendRequest) Reset() { *m = FriendRequest{} } func (m *FriendRequest) String() string { return proto.CompactTextString(m) } func (*FriendRequest) ProtoMessage() {} func (*FriendRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_8a45d93b14f6e420, []int{7} + return fileDescriptor_ws_996ebd499da55dba, []int{7} } func (m *FriendRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendRequest.Unmarshal(m, b) @@ -818,7 +818,7 @@ func (m *PullMessageBySeqListResp) Reset() { *m = PullMessageBySeqListRe func (m *PullMessageBySeqListResp) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListResp) ProtoMessage() {} func (*PullMessageBySeqListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_8a45d93b14f6e420, []int{8} + return fileDescriptor_ws_996ebd499da55dba, []int{8} } func (m *PullMessageBySeqListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListResp.Unmarshal(m, b) @@ -893,7 +893,7 @@ func (m *PullMessageBySeqListReq) Reset() { *m = PullMessageBySeqListReq func (m *PullMessageBySeqListReq) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListReq) ProtoMessage() {} func (*PullMessageBySeqListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_8a45d93b14f6e420, []int{9} + return fileDescriptor_ws_996ebd499da55dba, []int{9} } func (m *PullMessageBySeqListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListReq.Unmarshal(m, b) @@ -948,7 +948,7 @@ func (m *PullMessageReq) Reset() { *m = PullMessageReq{} } func (m *PullMessageReq) String() string { return proto.CompactTextString(m) } func (*PullMessageReq) ProtoMessage() {} func (*PullMessageReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_8a45d93b14f6e420, []int{10} + return fileDescriptor_ws_996ebd499da55dba, []int{10} } func (m *PullMessageReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageReq.Unmarshal(m, b) @@ -1012,7 +1012,7 @@ func (m *PullMessageResp) Reset() { *m = PullMessageResp{} } func (m *PullMessageResp) String() string { return proto.CompactTextString(m) } func (*PullMessageResp) ProtoMessage() {} func (*PullMessageResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_8a45d93b14f6e420, []int{11} + return fileDescriptor_ws_996ebd499da55dba, []int{11} } func (m *PullMessageResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageResp.Unmarshal(m, b) @@ -1084,7 +1084,7 @@ func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} } func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqReq) ProtoMessage() {} func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_8a45d93b14f6e420, []int{12} + return fileDescriptor_ws_996ebd499da55dba, []int{12} } func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) @@ -1116,7 +1116,7 @@ func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} } func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqResp) ProtoMessage() {} func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_8a45d93b14f6e420, []int{13} + return fileDescriptor_ws_996ebd499da55dba, []int{13} } func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) @@ -1164,7 +1164,7 @@ func (m *GatherFormat) Reset() { *m = GatherFormat{} } func (m *GatherFormat) String() string { return proto.CompactTextString(m) } func (*GatherFormat) ProtoMessage() {} func (*GatherFormat) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_8a45d93b14f6e420, []int{14} + return fileDescriptor_ws_996ebd499da55dba, []int{14} } func (m *GatherFormat) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GatherFormat.Unmarshal(m, b) @@ -1211,7 +1211,7 @@ func (m *UserSendMsgResp) Reset() { *m = UserSendMsgResp{} } func (m *UserSendMsgResp) String() string { return proto.CompactTextString(m) } func (*UserSendMsgResp) ProtoMessage() {} func (*UserSendMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_8a45d93b14f6e420, []int{15} + return fileDescriptor_ws_996ebd499da55dba, []int{15} } func (m *UserSendMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserSendMsgResp.Unmarshal(m, b) @@ -1280,7 +1280,7 @@ func (m *MsgData) Reset() { *m = MsgData{} } func (m *MsgData) String() string { return proto.CompactTextString(m) } func (*MsgData) ProtoMessage() {} func (*MsgData) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_8a45d93b14f6e420, []int{16} + return fileDescriptor_ws_996ebd499da55dba, []int{16} } func (m *MsgData) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgData.Unmarshal(m, b) @@ -1441,7 +1441,7 @@ func (m *OfflinePushInfo) Reset() { *m = OfflinePushInfo{} } func (m *OfflinePushInfo) String() string { return proto.CompactTextString(m) } func (*OfflinePushInfo) ProtoMessage() {} func (*OfflinePushInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_8a45d93b14f6e420, []int{17} + return fileDescriptor_ws_996ebd499da55dba, []int{17} } func (m *OfflinePushInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OfflinePushInfo.Unmarshal(m, b) @@ -1508,7 +1508,7 @@ func (m *TipsComm) Reset() { *m = TipsComm{} } func (m *TipsComm) String() string { return proto.CompactTextString(m) } func (*TipsComm) ProtoMessage() {} func (*TipsComm) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_8a45d93b14f6e420, []int{18} + return fileDescriptor_ws_996ebd499da55dba, []int{18} } func (m *TipsComm) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TipsComm.Unmarshal(m, b) @@ -1557,7 +1557,7 @@ func (m *MemberEnterTips) Reset() { *m = MemberEnterTips{} } func (m *MemberEnterTips) String() string { return proto.CompactTextString(m) } func (*MemberEnterTips) ProtoMessage() {} func (*MemberEnterTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_8a45d93b14f6e420, []int{19} + return fileDescriptor_ws_996ebd499da55dba, []int{19} } func (m *MemberEnterTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberEnterTips.Unmarshal(m, b) @@ -1612,7 +1612,7 @@ func (m *MemberLeaveTips) Reset() { *m = MemberLeaveTips{} } func (m *MemberLeaveTips) String() string { return proto.CompactTextString(m) } func (*MemberLeaveTips) ProtoMessage() {} func (*MemberLeaveTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_8a45d93b14f6e420, []int{20} + return fileDescriptor_ws_996ebd499da55dba, []int{20} } func (m *MemberLeaveTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberLeaveTips.Unmarshal(m, b) @@ -1667,7 +1667,7 @@ func (m *MemberInvitedTips) Reset() { *m = MemberInvitedTips{} } func (m *MemberInvitedTips) String() string { return proto.CompactTextString(m) } func (*MemberInvitedTips) ProtoMessage() {} func (*MemberInvitedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_8a45d93b14f6e420, []int{21} + return fileDescriptor_ws_996ebd499da55dba, []int{21} } func (m *MemberInvitedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInvitedTips.Unmarshal(m, b) @@ -1729,7 +1729,7 @@ func (m *MemberKickedTips) Reset() { *m = MemberKickedTips{} } func (m *MemberKickedTips) String() string { return proto.CompactTextString(m) } func (*MemberKickedTips) ProtoMessage() {} func (*MemberKickedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_8a45d93b14f6e420, []int{22} + return fileDescriptor_ws_996ebd499da55dba, []int{22} } func (m *MemberKickedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberKickedTips.Unmarshal(m, b) @@ -1792,7 +1792,7 @@ func (m *MemberInfoChangedTips) Reset() { *m = MemberInfoChangedTips{} } func (m *MemberInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*MemberInfoChangedTips) ProtoMessage() {} func (*MemberInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_8a45d93b14f6e420, []int{23} + return fileDescriptor_ws_996ebd499da55dba, []int{23} } func (m *MemberInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInfoChangedTips.Unmarshal(m, b) @@ -1861,7 +1861,7 @@ func (m *GroupCreatedTips) Reset() { *m = GroupCreatedTips{} } func (m *GroupCreatedTips) String() string { return proto.CompactTextString(m) } func (*GroupCreatedTips) ProtoMessage() {} func (*GroupCreatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_8a45d93b14f6e420, []int{24} + return fileDescriptor_ws_996ebd499da55dba, []int{24} } func (m *GroupCreatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupCreatedTips.Unmarshal(m, b) @@ -1922,7 +1922,7 @@ func (m *GroupInfoChangedTips) Reset() { *m = GroupInfoChangedTips{} } func (m *GroupInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*GroupInfoChangedTips) ProtoMessage() {} func (*GroupInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_8a45d93b14f6e420, []int{25} + return fileDescriptor_ws_996ebd499da55dba, []int{25} } func (m *GroupInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfoChangedTips.Unmarshal(m, b) @@ -1976,7 +1976,7 @@ func (m *JoinGroupApplicationTips) Reset() { *m = JoinGroupApplicationTi func (m *JoinGroupApplicationTips) String() string { return proto.CompactTextString(m) } func (*JoinGroupApplicationTips) ProtoMessage() {} func (*JoinGroupApplicationTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_8a45d93b14f6e420, []int{26} + return fileDescriptor_ws_996ebd499da55dba, []int{26} } func (m *JoinGroupApplicationTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JoinGroupApplicationTips.Unmarshal(m, b) @@ -2031,7 +2031,7 @@ func (m *ApplicationProcessedTips) Reset() { *m = ApplicationProcessedTi func (m *ApplicationProcessedTips) String() string { return proto.CompactTextString(m) } func (*ApplicationProcessedTips) ProtoMessage() {} func (*ApplicationProcessedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_8a45d93b14f6e420, []int{27} + return fileDescriptor_ws_996ebd499da55dba, []int{27} } func (m *ApplicationProcessedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ApplicationProcessedTips.Unmarshal(m, b) @@ -2092,7 +2092,7 @@ func (m *FriendApplication) Reset() { *m = FriendApplication{} } func (m *FriendApplication) String() string { return proto.CompactTextString(m) } func (*FriendApplication) ProtoMessage() {} func (*FriendApplication) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_8a45d93b14f6e420, []int{28} + return fileDescriptor_ws_996ebd499da55dba, []int{28} } func (m *FriendApplication) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplication.Unmarshal(m, b) @@ -2145,7 +2145,7 @@ func (m *FromToUserID) Reset() { *m = FromToUserID{} } func (m *FromToUserID) String() string { return proto.CompactTextString(m) } func (*FromToUserID) ProtoMessage() {} func (*FromToUserID) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_8a45d93b14f6e420, []int{29} + return fileDescriptor_ws_996ebd499da55dba, []int{29} } func (m *FromToUserID) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FromToUserID.Unmarshal(m, b) @@ -2191,7 +2191,7 @@ func (m *FriendApplicationAddedTips) Reset() { *m = FriendApplicationAdd func (m *FriendApplicationAddedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationAddedTips) ProtoMessage() {} func (*FriendApplicationAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_8a45d93b14f6e420, []int{30} + return fileDescriptor_ws_996ebd499da55dba, []int{30} } func (m *FriendApplicationAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationAddedTips.Unmarshal(m, b) @@ -2230,7 +2230,7 @@ func (m *FriendApplicationProcessedTips) Reset() { *m = FriendApplicatio func (m *FriendApplicationProcessedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationProcessedTips) ProtoMessage() {} func (*FriendApplicationProcessedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_8a45d93b14f6e420, []int{31} + return fileDescriptor_ws_996ebd499da55dba, []int{31} } func (m *FriendApplicationProcessedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationProcessedTips.Unmarshal(m, b) @@ -2271,7 +2271,7 @@ func (m *FriendAddedTips) Reset() { *m = FriendAddedTips{} } func (m *FriendAddedTips) String() string { return proto.CompactTextString(m) } func (*FriendAddedTips) ProtoMessage() {} func (*FriendAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_8a45d93b14f6e420, []int{32} + return fileDescriptor_ws_996ebd499da55dba, []int{32} } func (m *FriendAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendAddedTips.Unmarshal(m, b) @@ -2324,7 +2324,7 @@ func (m *FriendDeletedTips) Reset() { *m = FriendDeletedTips{} } func (m *FriendDeletedTips) String() string { return proto.CompactTextString(m) } func (*FriendDeletedTips) ProtoMessage() {} func (*FriendDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_8a45d93b14f6e420, []int{33} + return fileDescriptor_ws_996ebd499da55dba, []int{33} } func (m *FriendDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendDeletedTips.Unmarshal(m, b) @@ -2362,7 +2362,7 @@ func (m *BlackAddedTips) Reset() { *m = BlackAddedTips{} } func (m *BlackAddedTips) String() string { return proto.CompactTextString(m) } func (*BlackAddedTips) ProtoMessage() {} func (*BlackAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_8a45d93b14f6e420, []int{34} + return fileDescriptor_ws_996ebd499da55dba, []int{34} } func (m *BlackAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackAddedTips.Unmarshal(m, b) @@ -2400,7 +2400,7 @@ func (m *BlackDeletedTips) Reset() { *m = BlackDeletedTips{} } func (m *BlackDeletedTips) String() string { return proto.CompactTextString(m) } func (*BlackDeletedTips) ProtoMessage() {} func (*BlackDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_8a45d93b14f6e420, []int{35} + return fileDescriptor_ws_996ebd499da55dba, []int{35} } func (m *BlackDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackDeletedTips.Unmarshal(m, b) @@ -2438,7 +2438,7 @@ func (m *FriendInfoChangedTips) Reset() { *m = FriendInfoChangedTips{} } func (m *FriendInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*FriendInfoChangedTips) ProtoMessage() {} func (*FriendInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_8a45d93b14f6e420, []int{36} + return fileDescriptor_ws_996ebd499da55dba, []int{36} } func (m *FriendInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfoChangedTips.Unmarshal(m, b) @@ -2477,7 +2477,7 @@ func (m *SelfInfoUpdatedTips) Reset() { *m = SelfInfoUpdatedTips{} } func (m *SelfInfoUpdatedTips) String() string { return proto.CompactTextString(m) } func (*SelfInfoUpdatedTips) ProtoMessage() {} func (*SelfInfoUpdatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_8a45d93b14f6e420, []int{37} + return fileDescriptor_ws_996ebd499da55dba, []int{37} } func (m *SelfInfoUpdatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SelfInfoUpdatedTips.Unmarshal(m, b) @@ -2546,128 +2546,129 @@ func init() { proto.RegisterType((*SelfInfoUpdatedTips)(nil), "open_im_sdk.SelfInfoUpdatedTips") } -func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_8a45d93b14f6e420) } +func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_996ebd499da55dba) } -var fileDescriptor_ws_8a45d93b14f6e420 = []byte{ - // 1920 bytes of a gzipped FileDescriptorProto +var fileDescriptor_ws_996ebd499da55dba = []byte{ + // 1924 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x59, 0xcd, 0x8f, 0x1b, 0x49, - 0x15, 0x57, 0xb7, 0xdd, 0xfe, 0x78, 0xf6, 0x8c, 0x27, 0x9d, 0x64, 0xb6, 0x09, 0xab, 0xc8, 0xb4, - 0x56, 0x68, 0x84, 0x20, 0x2b, 0x65, 0x85, 0xb4, 0x04, 0x2d, 0xe0, 0x19, 0xcf, 0xe4, 0x83, 0x38, - 0x1e, 0xda, 0x13, 0x38, 0x70, 0x88, 0x3a, 0xee, 0xb2, 0xa7, 0xe5, 0x76, 0xb5, 0xdd, 0xd5, 0x3d, - 0x49, 0x2e, 0x9c, 0xf9, 0x07, 0xe0, 0xb2, 0x02, 0x71, 0x43, 0x5c, 0x39, 0xc0, 0x3f, 0x84, 0x38, - 0x20, 0x71, 0x42, 0x9c, 0xe0, 0x80, 0x5e, 0x55, 0x75, 0x77, 0x95, 0xed, 0x4c, 0x3c, 0x99, 0x28, - 0x17, 0x6e, 0x7e, 0xbf, 0x7e, 0xf5, 0xbe, 0xeb, 0xd5, 0xab, 0x32, 0x74, 0x58, 0x30, 0x7b, 0xf1, - 0x8a, 0x7d, 0xfe, 0x8a, 0xdd, 0x5b, 0x24, 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, 0x58, 0x16, 0xa5, 0xf9, 0x39, 0xa2, - 0x62, 0xa2, 0x28, 0x96, 0x03, 0x36, 0x95, 0x27, 0x88, 0xa4, 0xd0, 0x29, 0xc1, 0x87, 0x9f, 0x84, - 0xc5, 0x25, 0x80, 0x3a, 0x3d, 0xb2, 0xe4, 0x21, 0x15, 0x3b, 0x20, 0x27, 0x4b, 0x9d, 0xd2, 0xd6, - 0xba, 0xaa, 0xb3, 0xcc, 0x89, 0xa0, 0xb9, 0x80, 0x86, 0xc8, 0x49, 0x89, 0xac, 0x9e, 0x1c, 0xee, - 0xd7, 0x26, 0xec, 0x88, 0xc2, 0xca, 0x63, 0x71, 0x17, 0x4b, 0x32, 0x9e, 0x6b, 0xf1, 0x50, 0x10, - 0xec, 0x07, 0x67, 0xb1, 0xd6, 0xdf, 0x0b, 0x7a, 0x63, 0x54, 0xac, 0x2d, 0xa3, 0xa2, 0x57, 0x93, - 0xb5, 0x56, 0x4d, 0x9f, 0xc1, 0x8e, 0x90, 0xa3, 0x17, 0xb5, 0x0e, 0xea, 0xb1, 0xad, 0xaf, 0xc6, - 0xf6, 0xaa, 0xd1, 0xf9, 0xaf, 0x01, 0xce, 0x69, 0x16, 0x45, 0x03, 0xc2, 0x98, 0x3f, 0x25, 0x87, - 0x6f, 0x46, 0x64, 0xf9, 0x34, 0x64, 0xa9, 0x47, 0xd8, 0x02, 0x13, 0x45, 0x92, 0xe4, 0x28, 0x0e, - 0x08, 0x8f, 0x92, 0xe5, 0xe5, 0x24, 0xba, 0x48, 0x92, 0x04, 0x2d, 0x90, 0xdd, 0x40, 0x50, 0x88, - 0xcf, 0xfd, 0xd7, 0x23, 0xb2, 0x94, 0x9d, 0x40, 0x52, 0x1c, 0x0f, 0x29, 0xe2, 0x55, 0x89, 0x73, - 0xca, 0xfe, 0x31, 0xec, 0xb0, 0x90, 0x4e, 0x45, 0x72, 0x45, 0xb1, 0x54, 0x0e, 0x5a, 0xf7, 0xbf, - 0xa1, 0x6d, 0xa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62, 0x96, 0x7d, 0x18, 0x9f, 0x87, 0xb0, 0x45, 0xaf, 0x73, 0x1f, 0x2c, 0x4b, 0x3f, 0x83, + 0x6d, 0x12, 0xf8, 0x01, 0x6d, 0xfc, 0x39, 0xdc, 0xac, 0x02, 0xad, 0x37, 0xc1, 0xf7, 0x94, 0xfb, + 0x3d, 0xb8, 0x3e, 0x62, 0xf1, 0x04, 0xa5, 0x3e, 0x9b, 0x87, 0xe5, 0x29, 0xf2, 0x86, 0x87, 0xc3, + 0x17, 0x4d, 0xfa, 0x03, 0xeb, 0x8b, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x2d, 0x7a, 0x1a, 0xf5, + 0xd3, 0x1a, 0x00, 0x00, } From 0ae46455af2bb9eff2a2b1d6b112a3aa2ffafd3d Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 6 Jan 2022 18:16:08 +0800 Subject: [PATCH 254/337] Refactor code --- pkg/common/utils/utils.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/common/utils/utils.go b/pkg/common/utils/utils.go index 1df23b0b2..d5c6f2bb7 100644 --- a/pkg/common/utils/utils.go +++ b/pkg/common/utils/utils.go @@ -26,8 +26,8 @@ func FriendDBCopyOpenIM(dst *open_im_sdk.FriendInfo, src *db.Friend) { if user != nil { utils.CopyStructFields(dst.FriendUser, user) } - dst.CreateTime = src.CreateTime.Unix() - dst.FriendUser.CreateTime = user.CreateTime.Unix() + dst.CreateTime = uint32(src.CreateTime.Unix()) + dst.FriendUser.CreateTime = uint32(user.CreateTime.Unix()) } // From cb80742eaaba9cbf53caf9c40d2dfec6e53c977d Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 6 Jan 2022 18:16:36 +0800 Subject: [PATCH 255/337] Refactor code --- pkg/common/utils/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/utils/utils.go b/pkg/common/utils/utils.go index d5c6f2bb7..25599eb2a 100644 --- a/pkg/common/utils/utils.go +++ b/pkg/common/utils/utils.go @@ -27,7 +27,7 @@ func FriendDBCopyOpenIM(dst *open_im_sdk.FriendInfo, src *db.Friend) { utils.CopyStructFields(dst.FriendUser, user) } dst.CreateTime = uint32(src.CreateTime.Unix()) - dst.FriendUser.CreateTime = uint32(user.CreateTime.Unix()) + dst.FriendUser.CreateTime = user.CreateTime.Unix() } // From fa330c766f2f79eb10082af2d3c86c70432759e2 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 6 Jan 2022 18:22:09 +0800 Subject: [PATCH 256/337] Refactor code --- pkg/proto/sdk_ws/ws.proto | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkg/proto/sdk_ws/ws.proto b/pkg/proto/sdk_ws/ws.proto index 0f8f845eb..2ef641334 100644 --- a/pkg/proto/sdk_ws/ws.proto +++ b/pkg/proto/sdk_ws/ws.proto @@ -12,7 +12,7 @@ message GroupInfo{ string Introduction = 4; string FaceUrl = 5; string OwnerUserID = 6; - int64 CreateTime = 7; + uint32 CreateTime = 7; uint32 MemberCount = 8; string Ex = 9; int32 Status = 10; @@ -48,10 +48,10 @@ message UserInfo{ string FaceUrl = 3; int32 Gender = 4; string PhoneNumber = 5; - int64 Birth = 6; + uint32 Birth = 6; string Email = 7; string Ex = 8; - int64 CreateTime = 9; + uint32 CreateTime = 9; int32 AppMangerLevel = 10; } @@ -67,7 +67,7 @@ message FriendInfo{ message BlackInfo{ string OwnerUserID = 1; - int64 CreateTime = 2; + uint32 CreateTime = 2; PublicUserInfo BlackUserInfo = 3; int32 AddSource = 4; string OperatorUserID = 5; @@ -80,9 +80,9 @@ message GroupRequest{ string HandleResult = 3; string ReqMsg = 4; string HandleMsg = 5; - int64 ReqTime = 6; + uint32 ReqTime = 6; string HandleUserID = 7; - int64 HandleTime = 8; + uint32 HandleTime = 8; string Ex = 9; } @@ -91,10 +91,10 @@ message FriendRequest{ string ToUserID = 2; int32 HandleResult = 3; string ReqMsg = 4; - int64 CreateTime = 5; + uint32 CreateTime = 5; string HandlerUserID = 6; string HandleMsg = 7; - int64 HandleTime = 8; + uint32 HandleTime = 8; string Ex = 9; } From 03fc008dfc42419cef0c3f66362b74088b8545ab Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 6 Jan 2022 18:23:29 +0800 Subject: [PATCH 257/337] Refactor code --- pkg/proto/sdk_ws/ws.pb.go | 354 +++++++++++++++++++------------------- 1 file changed, 177 insertions(+), 177 deletions(-) diff --git a/pkg/proto/sdk_ws/ws.pb.go b/pkg/proto/sdk_ws/ws.pb.go index 3fbfb6e81..91870ccd9 100644 --- a/pkg/proto/sdk_ws/ws.pb.go +++ b/pkg/proto/sdk_ws/ws.pb.go @@ -25,7 +25,7 @@ type GroupInfo struct { Introduction string `protobuf:"bytes,4,opt,name=Introduction" json:"Introduction,omitempty"` FaceUrl string `protobuf:"bytes,5,opt,name=FaceUrl" json:"FaceUrl,omitempty"` OwnerUserID string `protobuf:"bytes,6,opt,name=OwnerUserID" json:"OwnerUserID,omitempty"` - CreateTime int64 `protobuf:"varint,7,opt,name=CreateTime" json:"CreateTime,omitempty"` + CreateTime uint32 `protobuf:"varint,7,opt,name=CreateTime" json:"CreateTime,omitempty"` MemberCount uint32 `protobuf:"varint,8,opt,name=MemberCount" json:"MemberCount,omitempty"` Ex string `protobuf:"bytes,9,opt,name=Ex" json:"Ex,omitempty"` Status int32 `protobuf:"varint,10,opt,name=Status" json:"Status,omitempty"` @@ -40,7 +40,7 @@ func (m *GroupInfo) Reset() { *m = GroupInfo{} } func (m *GroupInfo) String() string { return proto.CompactTextString(m) } func (*GroupInfo) ProtoMessage() {} func (*GroupInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_996ebd499da55dba, []int{0} + return fileDescriptor_ws_a718f3fde1e8b012, []int{0} } func (m *GroupInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfo.Unmarshal(m, b) @@ -102,7 +102,7 @@ func (m *GroupInfo) GetOwnerUserID() string { return "" } -func (m *GroupInfo) GetCreateTime() int64 { +func (m *GroupInfo) GetCreateTime() uint32 { if m != nil { return m.CreateTime } @@ -164,7 +164,7 @@ func (m *GroupMemberFullInfo) Reset() { *m = GroupMemberFullInfo{} } func (m *GroupMemberFullInfo) String() string { return proto.CompactTextString(m) } func (*GroupMemberFullInfo) ProtoMessage() {} func (*GroupMemberFullInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_996ebd499da55dba, []int{1} + return fileDescriptor_ws_a718f3fde1e8b012, []int{1} } func (m *GroupMemberFullInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupMemberFullInfo.Unmarshal(m, b) @@ -269,7 +269,7 @@ func (m *PublicUserInfo) Reset() { *m = PublicUserInfo{} } func (m *PublicUserInfo) String() string { return proto.CompactTextString(m) } func (*PublicUserInfo) ProtoMessage() {} func (*PublicUserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_996ebd499da55dba, []int{2} + return fileDescriptor_ws_a718f3fde1e8b012, []int{2} } func (m *PublicUserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PublicUserInfo.Unmarshal(m, b) @@ -330,10 +330,10 @@ type UserInfo struct { FaceUrl string `protobuf:"bytes,3,opt,name=FaceUrl" json:"FaceUrl,omitempty"` Gender int32 `protobuf:"varint,4,opt,name=Gender" json:"Gender,omitempty"` PhoneNumber string `protobuf:"bytes,5,opt,name=PhoneNumber" json:"PhoneNumber,omitempty"` - Birth int64 `protobuf:"varint,6,opt,name=Birth" json:"Birth,omitempty"` + Birth uint32 `protobuf:"varint,6,opt,name=Birth" json:"Birth,omitempty"` Email string `protobuf:"bytes,7,opt,name=Email" json:"Email,omitempty"` Ex string `protobuf:"bytes,8,opt,name=Ex" json:"Ex,omitempty"` - CreateTime int64 `protobuf:"varint,9,opt,name=CreateTime" json:"CreateTime,omitempty"` + CreateTime uint32 `protobuf:"varint,9,opt,name=CreateTime" json:"CreateTime,omitempty"` AppMangerLevel int32 `protobuf:"varint,10,opt,name=AppMangerLevel" json:"AppMangerLevel,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -344,7 +344,7 @@ func (m *UserInfo) Reset() { *m = UserInfo{} } func (m *UserInfo) String() string { return proto.CompactTextString(m) } func (*UserInfo) ProtoMessage() {} func (*UserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_996ebd499da55dba, []int{3} + return fileDescriptor_ws_a718f3fde1e8b012, []int{3} } func (m *UserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserInfo.Unmarshal(m, b) @@ -399,7 +399,7 @@ func (m *UserInfo) GetPhoneNumber() string { return "" } -func (m *UserInfo) GetBirth() int64 { +func (m *UserInfo) GetBirth() uint32 { if m != nil { return m.Birth } @@ -420,7 +420,7 @@ func (m *UserInfo) GetEx() string { return "" } -func (m *UserInfo) GetCreateTime() int64 { +func (m *UserInfo) GetCreateTime() uint32 { if m != nil { return m.CreateTime } @@ -451,7 +451,7 @@ func (m *FriendInfo) Reset() { *m = FriendInfo{} } func (m *FriendInfo) String() string { return proto.CompactTextString(m) } func (*FriendInfo) ProtoMessage() {} func (*FriendInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_996ebd499da55dba, []int{4} + return fileDescriptor_ws_a718f3fde1e8b012, []int{4} } func (m *FriendInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfo.Unmarshal(m, b) @@ -522,7 +522,7 @@ func (m *FriendInfo) GetEx() string { type BlackInfo struct { OwnerUserID string `protobuf:"bytes,1,opt,name=OwnerUserID" json:"OwnerUserID,omitempty"` - CreateTime int64 `protobuf:"varint,2,opt,name=CreateTime" json:"CreateTime,omitempty"` + CreateTime uint32 `protobuf:"varint,2,opt,name=CreateTime" json:"CreateTime,omitempty"` BlackUserInfo *PublicUserInfo `protobuf:"bytes,3,opt,name=BlackUserInfo" json:"BlackUserInfo,omitempty"` AddSource int32 `protobuf:"varint,4,opt,name=AddSource" json:"AddSource,omitempty"` OperatorUserID string `protobuf:"bytes,5,opt,name=OperatorUserID" json:"OperatorUserID,omitempty"` @@ -536,7 +536,7 @@ func (m *BlackInfo) Reset() { *m = BlackInfo{} } func (m *BlackInfo) String() string { return proto.CompactTextString(m) } func (*BlackInfo) ProtoMessage() {} func (*BlackInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_996ebd499da55dba, []int{5} + return fileDescriptor_ws_a718f3fde1e8b012, []int{5} } func (m *BlackInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackInfo.Unmarshal(m, b) @@ -563,7 +563,7 @@ func (m *BlackInfo) GetOwnerUserID() string { return "" } -func (m *BlackInfo) GetCreateTime() int64 { +func (m *BlackInfo) GetCreateTime() uint32 { if m != nil { return m.CreateTime } @@ -604,9 +604,9 @@ type GroupRequest struct { HandleResult string `protobuf:"bytes,3,opt,name=HandleResult" json:"HandleResult,omitempty"` ReqMsg string `protobuf:"bytes,4,opt,name=ReqMsg" json:"ReqMsg,omitempty"` HandleMsg string `protobuf:"bytes,5,opt,name=HandleMsg" json:"HandleMsg,omitempty"` - ReqTime int64 `protobuf:"varint,6,opt,name=ReqTime" json:"ReqTime,omitempty"` + ReqTime uint32 `protobuf:"varint,6,opt,name=ReqTime" json:"ReqTime,omitempty"` HandleUserID string `protobuf:"bytes,7,opt,name=HandleUserID" json:"HandleUserID,omitempty"` - HandleTime int64 `protobuf:"varint,8,opt,name=HandleTime" json:"HandleTime,omitempty"` + HandleTime uint32 `protobuf:"varint,8,opt,name=HandleTime" json:"HandleTime,omitempty"` Ex string `protobuf:"bytes,9,opt,name=Ex" json:"Ex,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -617,7 +617,7 @@ func (m *GroupRequest) Reset() { *m = GroupRequest{} } func (m *GroupRequest) String() string { return proto.CompactTextString(m) } func (*GroupRequest) ProtoMessage() {} func (*GroupRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_996ebd499da55dba, []int{6} + return fileDescriptor_ws_a718f3fde1e8b012, []int{6} } func (m *GroupRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupRequest.Unmarshal(m, b) @@ -672,7 +672,7 @@ func (m *GroupRequest) GetHandleMsg() string { return "" } -func (m *GroupRequest) GetReqTime() int64 { +func (m *GroupRequest) GetReqTime() uint32 { if m != nil { return m.ReqTime } @@ -686,7 +686,7 @@ func (m *GroupRequest) GetHandleUserID() string { return "" } -func (m *GroupRequest) GetHandleTime() int64 { +func (m *GroupRequest) GetHandleTime() uint32 { if m != nil { return m.HandleTime } @@ -705,10 +705,10 @@ type FriendRequest struct { ToUserID string `protobuf:"bytes,2,opt,name=ToUserID" json:"ToUserID,omitempty"` HandleResult int32 `protobuf:"varint,3,opt,name=HandleResult" json:"HandleResult,omitempty"` ReqMsg string `protobuf:"bytes,4,opt,name=ReqMsg" json:"ReqMsg,omitempty"` - CreateTime int64 `protobuf:"varint,5,opt,name=CreateTime" json:"CreateTime,omitempty"` + CreateTime uint32 `protobuf:"varint,5,opt,name=CreateTime" json:"CreateTime,omitempty"` HandlerUserID string `protobuf:"bytes,6,opt,name=HandlerUserID" json:"HandlerUserID,omitempty"` HandleMsg string `protobuf:"bytes,7,opt,name=HandleMsg" json:"HandleMsg,omitempty"` - HandleTime int64 `protobuf:"varint,8,opt,name=HandleTime" json:"HandleTime,omitempty"` + HandleTime uint32 `protobuf:"varint,8,opt,name=HandleTime" json:"HandleTime,omitempty"` Ex string `protobuf:"bytes,9,opt,name=Ex" json:"Ex,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -719,7 +719,7 @@ func (m *FriendRequest) Reset() { *m = FriendRequest{} } func (m *FriendRequest) String() string { return proto.CompactTextString(m) } func (*FriendRequest) ProtoMessage() {} func (*FriendRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_996ebd499da55dba, []int{7} + return fileDescriptor_ws_a718f3fde1e8b012, []int{7} } func (m *FriendRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendRequest.Unmarshal(m, b) @@ -767,7 +767,7 @@ func (m *FriendRequest) GetReqMsg() string { return "" } -func (m *FriendRequest) GetCreateTime() int64 { +func (m *FriendRequest) GetCreateTime() uint32 { if m != nil { return m.CreateTime } @@ -788,7 +788,7 @@ func (m *FriendRequest) GetHandleMsg() string { return "" } -func (m *FriendRequest) GetHandleTime() int64 { +func (m *FriendRequest) GetHandleTime() uint32 { if m != nil { return m.HandleTime } @@ -818,7 +818,7 @@ func (m *PullMessageBySeqListResp) Reset() { *m = PullMessageBySeqListRe func (m *PullMessageBySeqListResp) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListResp) ProtoMessage() {} func (*PullMessageBySeqListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_996ebd499da55dba, []int{8} + return fileDescriptor_ws_a718f3fde1e8b012, []int{8} } func (m *PullMessageBySeqListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListResp.Unmarshal(m, b) @@ -893,7 +893,7 @@ func (m *PullMessageBySeqListReq) Reset() { *m = PullMessageBySeqListReq func (m *PullMessageBySeqListReq) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListReq) ProtoMessage() {} func (*PullMessageBySeqListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_996ebd499da55dba, []int{9} + return fileDescriptor_ws_a718f3fde1e8b012, []int{9} } func (m *PullMessageBySeqListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListReq.Unmarshal(m, b) @@ -948,7 +948,7 @@ func (m *PullMessageReq) Reset() { *m = PullMessageReq{} } func (m *PullMessageReq) String() string { return proto.CompactTextString(m) } func (*PullMessageReq) ProtoMessage() {} func (*PullMessageReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_996ebd499da55dba, []int{10} + return fileDescriptor_ws_a718f3fde1e8b012, []int{10} } func (m *PullMessageReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageReq.Unmarshal(m, b) @@ -1012,7 +1012,7 @@ func (m *PullMessageResp) Reset() { *m = PullMessageResp{} } func (m *PullMessageResp) String() string { return proto.CompactTextString(m) } func (*PullMessageResp) ProtoMessage() {} func (*PullMessageResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_996ebd499da55dba, []int{11} + return fileDescriptor_ws_a718f3fde1e8b012, []int{11} } func (m *PullMessageResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageResp.Unmarshal(m, b) @@ -1084,7 +1084,7 @@ func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} } func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqReq) ProtoMessage() {} func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_996ebd499da55dba, []int{12} + return fileDescriptor_ws_a718f3fde1e8b012, []int{12} } func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) @@ -1116,7 +1116,7 @@ func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} } func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqResp) ProtoMessage() {} func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_996ebd499da55dba, []int{13} + return fileDescriptor_ws_a718f3fde1e8b012, []int{13} } func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) @@ -1164,7 +1164,7 @@ func (m *GatherFormat) Reset() { *m = GatherFormat{} } func (m *GatherFormat) String() string { return proto.CompactTextString(m) } func (*GatherFormat) ProtoMessage() {} func (*GatherFormat) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_996ebd499da55dba, []int{14} + return fileDescriptor_ws_a718f3fde1e8b012, []int{14} } func (m *GatherFormat) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GatherFormat.Unmarshal(m, b) @@ -1211,7 +1211,7 @@ func (m *UserSendMsgResp) Reset() { *m = UserSendMsgResp{} } func (m *UserSendMsgResp) String() string { return proto.CompactTextString(m) } func (*UserSendMsgResp) ProtoMessage() {} func (*UserSendMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_996ebd499da55dba, []int{15} + return fileDescriptor_ws_a718f3fde1e8b012, []int{15} } func (m *UserSendMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserSendMsgResp.Unmarshal(m, b) @@ -1280,7 +1280,7 @@ func (m *MsgData) Reset() { *m = MsgData{} } func (m *MsgData) String() string { return proto.CompactTextString(m) } func (*MsgData) ProtoMessage() {} func (*MsgData) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_996ebd499da55dba, []int{16} + return fileDescriptor_ws_a718f3fde1e8b012, []int{16} } func (m *MsgData) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgData.Unmarshal(m, b) @@ -1441,7 +1441,7 @@ func (m *OfflinePushInfo) Reset() { *m = OfflinePushInfo{} } func (m *OfflinePushInfo) String() string { return proto.CompactTextString(m) } func (*OfflinePushInfo) ProtoMessage() {} func (*OfflinePushInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_996ebd499da55dba, []int{17} + return fileDescriptor_ws_a718f3fde1e8b012, []int{17} } func (m *OfflinePushInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OfflinePushInfo.Unmarshal(m, b) @@ -1508,7 +1508,7 @@ func (m *TipsComm) Reset() { *m = TipsComm{} } func (m *TipsComm) String() string { return proto.CompactTextString(m) } func (*TipsComm) ProtoMessage() {} func (*TipsComm) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_996ebd499da55dba, []int{18} + return fileDescriptor_ws_a718f3fde1e8b012, []int{18} } func (m *TipsComm) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TipsComm.Unmarshal(m, b) @@ -1557,7 +1557,7 @@ func (m *MemberEnterTips) Reset() { *m = MemberEnterTips{} } func (m *MemberEnterTips) String() string { return proto.CompactTextString(m) } func (*MemberEnterTips) ProtoMessage() {} func (*MemberEnterTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_996ebd499da55dba, []int{19} + return fileDescriptor_ws_a718f3fde1e8b012, []int{19} } func (m *MemberEnterTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberEnterTips.Unmarshal(m, b) @@ -1612,7 +1612,7 @@ func (m *MemberLeaveTips) Reset() { *m = MemberLeaveTips{} } func (m *MemberLeaveTips) String() string { return proto.CompactTextString(m) } func (*MemberLeaveTips) ProtoMessage() {} func (*MemberLeaveTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_996ebd499da55dba, []int{20} + return fileDescriptor_ws_a718f3fde1e8b012, []int{20} } func (m *MemberLeaveTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberLeaveTips.Unmarshal(m, b) @@ -1667,7 +1667,7 @@ func (m *MemberInvitedTips) Reset() { *m = MemberInvitedTips{} } func (m *MemberInvitedTips) String() string { return proto.CompactTextString(m) } func (*MemberInvitedTips) ProtoMessage() {} func (*MemberInvitedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_996ebd499da55dba, []int{21} + return fileDescriptor_ws_a718f3fde1e8b012, []int{21} } func (m *MemberInvitedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInvitedTips.Unmarshal(m, b) @@ -1729,7 +1729,7 @@ func (m *MemberKickedTips) Reset() { *m = MemberKickedTips{} } func (m *MemberKickedTips) String() string { return proto.CompactTextString(m) } func (*MemberKickedTips) ProtoMessage() {} func (*MemberKickedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_996ebd499da55dba, []int{22} + return fileDescriptor_ws_a718f3fde1e8b012, []int{22} } func (m *MemberKickedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberKickedTips.Unmarshal(m, b) @@ -1792,7 +1792,7 @@ func (m *MemberInfoChangedTips) Reset() { *m = MemberInfoChangedTips{} } func (m *MemberInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*MemberInfoChangedTips) ProtoMessage() {} func (*MemberInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_996ebd499da55dba, []int{23} + return fileDescriptor_ws_a718f3fde1e8b012, []int{23} } func (m *MemberInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInfoChangedTips.Unmarshal(m, b) @@ -1861,7 +1861,7 @@ func (m *GroupCreatedTips) Reset() { *m = GroupCreatedTips{} } func (m *GroupCreatedTips) String() string { return proto.CompactTextString(m) } func (*GroupCreatedTips) ProtoMessage() {} func (*GroupCreatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_996ebd499da55dba, []int{24} + return fileDescriptor_ws_a718f3fde1e8b012, []int{24} } func (m *GroupCreatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupCreatedTips.Unmarshal(m, b) @@ -1922,7 +1922,7 @@ func (m *GroupInfoChangedTips) Reset() { *m = GroupInfoChangedTips{} } func (m *GroupInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*GroupInfoChangedTips) ProtoMessage() {} func (*GroupInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_996ebd499da55dba, []int{25} + return fileDescriptor_ws_a718f3fde1e8b012, []int{25} } func (m *GroupInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfoChangedTips.Unmarshal(m, b) @@ -1976,7 +1976,7 @@ func (m *JoinGroupApplicationTips) Reset() { *m = JoinGroupApplicationTi func (m *JoinGroupApplicationTips) String() string { return proto.CompactTextString(m) } func (*JoinGroupApplicationTips) ProtoMessage() {} func (*JoinGroupApplicationTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_996ebd499da55dba, []int{26} + return fileDescriptor_ws_a718f3fde1e8b012, []int{26} } func (m *JoinGroupApplicationTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JoinGroupApplicationTips.Unmarshal(m, b) @@ -2031,7 +2031,7 @@ func (m *ApplicationProcessedTips) Reset() { *m = ApplicationProcessedTi func (m *ApplicationProcessedTips) String() string { return proto.CompactTextString(m) } func (*ApplicationProcessedTips) ProtoMessage() {} func (*ApplicationProcessedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_996ebd499da55dba, []int{27} + return fileDescriptor_ws_a718f3fde1e8b012, []int{27} } func (m *ApplicationProcessedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ApplicationProcessedTips.Unmarshal(m, b) @@ -2092,7 +2092,7 @@ func (m *FriendApplication) Reset() { *m = FriendApplication{} } func (m *FriendApplication) String() string { return proto.CompactTextString(m) } func (*FriendApplication) ProtoMessage() {} func (*FriendApplication) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_996ebd499da55dba, []int{28} + return fileDescriptor_ws_a718f3fde1e8b012, []int{28} } func (m *FriendApplication) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplication.Unmarshal(m, b) @@ -2145,7 +2145,7 @@ func (m *FromToUserID) Reset() { *m = FromToUserID{} } func (m *FromToUserID) String() string { return proto.CompactTextString(m) } func (*FromToUserID) ProtoMessage() {} func (*FromToUserID) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_996ebd499da55dba, []int{29} + return fileDescriptor_ws_a718f3fde1e8b012, []int{29} } func (m *FromToUserID) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FromToUserID.Unmarshal(m, b) @@ -2191,7 +2191,7 @@ func (m *FriendApplicationAddedTips) Reset() { *m = FriendApplicationAdd func (m *FriendApplicationAddedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationAddedTips) ProtoMessage() {} func (*FriendApplicationAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_996ebd499da55dba, []int{30} + return fileDescriptor_ws_a718f3fde1e8b012, []int{30} } func (m *FriendApplicationAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationAddedTips.Unmarshal(m, b) @@ -2230,7 +2230,7 @@ func (m *FriendApplicationProcessedTips) Reset() { *m = FriendApplicatio func (m *FriendApplicationProcessedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationProcessedTips) ProtoMessage() {} func (*FriendApplicationProcessedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_996ebd499da55dba, []int{31} + return fileDescriptor_ws_a718f3fde1e8b012, []int{31} } func (m *FriendApplicationProcessedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationProcessedTips.Unmarshal(m, b) @@ -2271,7 +2271,7 @@ func (m *FriendAddedTips) Reset() { *m = FriendAddedTips{} } func (m *FriendAddedTips) String() string { return proto.CompactTextString(m) } func (*FriendAddedTips) ProtoMessage() {} func (*FriendAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_996ebd499da55dba, []int{32} + return fileDescriptor_ws_a718f3fde1e8b012, []int{32} } func (m *FriendAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendAddedTips.Unmarshal(m, b) @@ -2324,7 +2324,7 @@ func (m *FriendDeletedTips) Reset() { *m = FriendDeletedTips{} } func (m *FriendDeletedTips) String() string { return proto.CompactTextString(m) } func (*FriendDeletedTips) ProtoMessage() {} func (*FriendDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_996ebd499da55dba, []int{33} + return fileDescriptor_ws_a718f3fde1e8b012, []int{33} } func (m *FriendDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendDeletedTips.Unmarshal(m, b) @@ -2362,7 +2362,7 @@ func (m *BlackAddedTips) Reset() { *m = BlackAddedTips{} } func (m *BlackAddedTips) String() string { return proto.CompactTextString(m) } func (*BlackAddedTips) ProtoMessage() {} func (*BlackAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_996ebd499da55dba, []int{34} + return fileDescriptor_ws_a718f3fde1e8b012, []int{34} } func (m *BlackAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackAddedTips.Unmarshal(m, b) @@ -2400,7 +2400,7 @@ func (m *BlackDeletedTips) Reset() { *m = BlackDeletedTips{} } func (m *BlackDeletedTips) String() string { return proto.CompactTextString(m) } func (*BlackDeletedTips) ProtoMessage() {} func (*BlackDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_996ebd499da55dba, []int{35} + return fileDescriptor_ws_a718f3fde1e8b012, []int{35} } func (m *BlackDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackDeletedTips.Unmarshal(m, b) @@ -2438,7 +2438,7 @@ func (m *FriendInfoChangedTips) Reset() { *m = FriendInfoChangedTips{} } func (m *FriendInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*FriendInfoChangedTips) ProtoMessage() {} func (*FriendInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_996ebd499da55dba, []int{36} + return fileDescriptor_ws_a718f3fde1e8b012, []int{36} } func (m *FriendInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfoChangedTips.Unmarshal(m, b) @@ -2477,7 +2477,7 @@ func (m *SelfInfoUpdatedTips) Reset() { *m = SelfInfoUpdatedTips{} } func (m *SelfInfoUpdatedTips) String() string { return proto.CompactTextString(m) } func (*SelfInfoUpdatedTips) ProtoMessage() {} func (*SelfInfoUpdatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_996ebd499da55dba, []int{37} + return fileDescriptor_ws_a718f3fde1e8b012, []int{37} } func (m *SelfInfoUpdatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SelfInfoUpdatedTips.Unmarshal(m, b) @@ -2546,129 +2546,129 @@ func init() { proto.RegisterType((*SelfInfoUpdatedTips)(nil), "open_im_sdk.SelfInfoUpdatedTips") } -func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_996ebd499da55dba) } +func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_a718f3fde1e8b012) } -var fileDescriptor_ws_996ebd499da55dba = []byte{ - // 1924 bytes of a gzipped FileDescriptorProto +var fileDescriptor_ws_a718f3fde1e8b012 = []byte{ + // 1921 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x59, 0xcd, 0x8f, 0x1b, 0x49, - 0x15, 0x57, 0xb7, 0xbf, 0xc6, 0xcf, 0x9e, 0xf1, 0xa4, 0xf3, 0xb1, 0x4d, 0x58, 0x45, 0xa6, 0xb5, - 0x42, 0x23, 0x04, 0x59, 0x29, 0x2b, 0xa4, 0x25, 0x68, 0x81, 0xf9, 0xcc, 0x07, 0x71, 0x3c, 0xb4, - 0x27, 0x70, 0xe0, 0x10, 0x75, 0xdc, 0x65, 0x4f, 0x6b, 0xda, 0xd5, 0x76, 0x57, 0xf7, 0x24, 0xb9, - 0x70, 0xe6, 0x1f, 0x80, 0xcb, 0x0a, 0xc4, 0x0d, 0x71, 0xe5, 0x00, 0xff, 0x10, 0xe2, 0x80, 0xc4, - 0x09, 0x71, 0x82, 0x03, 0x7a, 0xaf, 0xaa, 0xbb, 0xab, 0x6c, 0x67, 0x32, 0x93, 0x44, 0xb9, 0x70, - 0xf3, 0xfb, 0xf5, 0xab, 0xf7, 0x5d, 0xaf, 0x5e, 0x95, 0xa1, 0x27, 0xc2, 0xb3, 0xe7, 0x2f, 0xc5, - 0xe7, 0x2f, 0xc5, 0xdd, 0x79, 0x9a, 0x64, 0x89, 0xd3, 0x49, 0xe6, 0x8c, 0x3f, 0x8f, 0x66, 0xcf, - 0x45, 0x78, 0xe6, 0xfd, 0xdb, 0x86, 0xf6, 0x83, 0x34, 0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x21, 0xcf, 0xfa, + 0xfe, 0xeb, 0x5d, 0x11, 0xf4, 0xc9, 0x24, 0xc6, 0xe7, 0xde, 0x21, 0xdc, 0x5c, 0x42, 0xd3, 0x99, + 0xe6, 0x9c, 0xf5, 0x16, 0xe7, 0x6c, 0xdd, 0x39, 0xef, 0x11, 0x74, 0x74, 0xd5, 0xb8, 0xc1, 0xc2, + 0x40, 0x25, 0xd3, 0x0e, 0x03, 0x67, 0x07, 0xd6, 0x22, 0xac, 0x04, 0x9b, 0x6c, 0xbe, 0x65, 0xd8, + 0xdc, 0x4f, 0x27, 0x07, 0x7e, 0xe6, 0x33, 0xe2, 0xf0, 0xe6, 0xd0, 0x45, 0x8b, 0x87, 0x5c, 0x04, + 0xfd, 0x74, 0x42, 0xc6, 0xf4, 0xa0, 0x3d, 0xe4, 0xc9, 0x39, 0xb9, 0x51, 0x9d, 0x50, 0x1a, 0x84, + 0x1c, 0xfb, 0x51, 0xc8, 0x45, 0x26, 0x39, 0x54, 0x35, 0x6a, 0x90, 0xac, 0x24, 0x11, 0x94, 0xc7, + 0x33, 0x55, 0x92, 0xa4, 0xbd, 0xbf, 0xd4, 0xa1, 0xa9, 0x8c, 0x90, 0x55, 0x25, 0x82, 0xaa, 0x12, + 0x25, 0x85, 0x78, 0xc2, 0x47, 0xe7, 0xd5, 0xac, 0x2b, 0x29, 0xac, 0x9b, 0x89, 0x3a, 0x39, 0xd4, + 0x64, 0xa4, 0x48, 0xb4, 0x69, 0xa4, 0xd9, 0xa4, 0xea, 0x50, 0x83, 0x90, 0x23, 0xd5, 0xfc, 0x52, + 0x33, 0x92, 0x06, 0x39, 0xdf, 0x81, 0xad, 0x94, 0xe6, 0xa9, 0xe3, 0xc8, 0xcf, 0xc6, 0x71, 0x32, + 0x55, 0xed, 0xb0, 0xce, 0x96, 0x70, 0x3c, 0x24, 0x25, 0x56, 0x4e, 0x71, 0xb2, 0x2d, 0x2e, 0xa0, + 0xd8, 0x5f, 0x25, 0x42, 0x23, 0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, 0x16, 0x09, 0xfc, + 0x80, 0x36, 0xfe, 0x1c, 0x6e, 0x57, 0x81, 0xd6, 0x9b, 0xe0, 0x35, 0xe5, 0x7e, 0x0f, 0x6e, 0x0e, + 0x79, 0x34, 0x46, 0xa9, 0xcf, 0x67, 0x41, 0x79, 0x8a, 0xbc, 0xe5, 0xe1, 0xf0, 0x65, 0x83, 0xfe, + 0xc0, 0xfa, 0xe2, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x65, 0x07, 0x6a, 0xb9, 0xd3, 0x1a, 0x00, + 0x00, } From df6643f1c5a056429fb02b15ec200391448460c8 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 6 Jan 2022 18:26:50 +0800 Subject: [PATCH 258/337] Refactor code --- pkg/common/utils/utils.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkg/common/utils/utils.go b/pkg/common/utils/utils.go index 25599eb2a..fc4100d7f 100644 --- a/pkg/common/utils/utils.go +++ b/pkg/common/utils/utils.go @@ -27,7 +27,7 @@ func FriendDBCopyOpenIM(dst *open_im_sdk.FriendInfo, src *db.Friend) { utils.CopyStructFields(dst.FriendUser, user) } dst.CreateTime = uint32(src.CreateTime.Unix()) - dst.FriendUser.CreateTime = user.CreateTime.Unix() + dst.FriendUser.CreateTime = uint32(user.CreateTime.Unix()) } // @@ -37,8 +37,8 @@ func FriendRequestOpenIMCopyDB(dst *db.FriendRequest, src *open_im_sdk.FriendReq func FriendRequestDBCopyOpenIM(dst *open_im_sdk.FriendRequest, src *db.FriendRequest) { utils.CopyStructFields(dst, src) - dst.CreateTime = src.CreateTime.Unix() - dst.HandleTime = src.HandleTime.Unix() + dst.CreateTime = uint32(src.CreateTime.Unix()) + dst.HandleTime = uint32(src.HandleTime.Unix()) } func GroupOpenIMCopyDB(dst *db.Group, src *open_im_sdk.GroupInfo) { @@ -52,7 +52,7 @@ func GroupDBCopyOpenIM(dst *open_im_sdk.GroupInfo, src *db.Group) { dst.OwnerUserID = user.UserID } dst.MemberCount = imdb.GetGroupMemberNumByGroupID(src.GroupID) - dst.CreateTime = src.CreateTime.Unix() + dst.CreateTime = uint32(src.CreateTime.Unix()) } func GroupMemberOpenIMCopyDB(dst *db.GroupMember, src *open_im_sdk.GroupMemberFullInfo) { @@ -77,8 +77,8 @@ func GroupRequestOpenIMCopyDB(dst *db.GroupRequest, src *open_im_sdk.GroupReques func GroupRequestDBCopyOpenIM(dst *open_im_sdk.GroupRequest, src *db.GroupRequest) { utils.CopyStructFields(dst, src) - dst.ReqTime = src.ReqTime.Unix() - dst.HandleTime = src.HandledTime.Unix() + dst.ReqTime = uint32(src.ReqTime.Unix()) + dst.HandleTime = uint32(src.HandledTime.Unix()) } func UserOpenIMCopyDB(dst *db.User, src *open_im_sdk.UserInfo) { @@ -87,7 +87,7 @@ func UserOpenIMCopyDB(dst *db.User, src *open_im_sdk.UserInfo) { func UserDBCopyOpenIM(dst *open_im_sdk.UserInfo, src *db.User) { utils.CopyStructFields(dst, src) - dst.CreateTime = src.CreateTime.Unix() + dst.CreateTime = uint32(src.CreateTime.Unix()) } func BlackOpenIMCopyDB(dst *db.Black, src *open_im_sdk.BlackInfo) { @@ -97,7 +97,7 @@ func BlackOpenIMCopyDB(dst *db.Black, src *open_im_sdk.BlackInfo) { func BlackDBCopyOpenIM(dst *open_im_sdk.BlackInfo, src *db.Black) { utils.CopyStructFields(dst, src) - dst.CreateTime = src.CreateTime.Unix() + dst.CreateTime = uint32(src.CreateTime.Unix()) user, _ := imdb.GetUserByUserID(src.BlockUserID) if user != nil { utils.CopyStructFields(dst.BlackUserInfo, user) From 1a69fdf1e08c43c578e87f1408acf39e573257a1 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 6 Jan 2022 18:30:58 +0800 Subject: [PATCH 259/337] Refactor code --- internal/rpc/user/user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index 7eb330c31..0cf426051 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -216,7 +216,7 @@ func (s *userServer) UpdateUserInfo(ctx context.Context, req *pbUser.UpdateUserI var user db.User utils.CopyStructFields(&user, req.UserInfo) if req.UserInfo.Birth != 0 { - user.Birth = utils.UnixSecondToTime(req.UserInfo.Birth) + user.Birth = utils.UnixSecondToTime(int64(req.UserInfo.Birth)) } err := imdb.UpdateUserInfo(user) if err != nil { From bc0c5d4fcb915e60f235c90a4ef905cb635db573 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 6 Jan 2022 19:59:13 +0800 Subject: [PATCH 260/337] Refactor code --- .../db/mysql_model/im_mysql_model/user_black_list_model.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go b/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go index 1c7bda90c..cd95aaa95 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go @@ -2,6 +2,7 @@ package im_mysql_model import ( "Open_IM/pkg/common/db" + "Open_IM/pkg/utils" "time" ) @@ -39,9 +40,8 @@ func RemoveBlackList(ownerUserID, blockUserID string) error { if err != nil { return err } - - err = dbConn.Table("blacks").Where("owner_user_id=? and block_user_id=?", ownerUserID, blockUserID).Delete(&db.Black{}).Error - return err + black := db.Black{OwnerUserID: ownerUserID, BlockUserID: blockUserID} + return utils.Wrap(dbConn.Delete(&black).Error, "RemoveBlackList failed") } func GetBlackListByUserID(ownerUserID string) ([]db.Black, error) { From d80a669515e2c79285f933353eb15838735ea2de Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 6 Jan 2022 20:07:40 +0800 Subject: [PATCH 261/337] Refactor code --- .../db/mysql_model/im_mysql_model/user_black_list_model.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go b/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go index cd95aaa95..6ad58bb3a 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go @@ -41,7 +41,7 @@ func RemoveBlackList(ownerUserID, blockUserID string) error { return err } black := db.Black{OwnerUserID: ownerUserID, BlockUserID: blockUserID} - return utils.Wrap(dbConn.Delete(&black).Error, "RemoveBlackList failed") + return utils.Wrap(dbConn.Table("blacks").Delete(&black).Error, "RemoveBlackList failed") } func GetBlackListByUserID(ownerUserID string) ([]db.Black, error) { From 59a5f675f6bda758e08652ce849e5c5a01a00b52 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 6 Jan 2022 20:16:14 +0800 Subject: [PATCH 262/337] Refactor code --- .../db/mysql_model/im_mysql_model/user_black_list_model.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go b/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go index 6ad58bb3a..3465f915c 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go @@ -40,8 +40,8 @@ func RemoveBlackList(ownerUserID, blockUserID string) error { if err != nil { return err } - black := db.Black{OwnerUserID: ownerUserID, BlockUserID: blockUserID} - return utils.Wrap(dbConn.Table("blacks").Delete(&black).Error, "RemoveBlackList failed") + err = dbConn.Table("blacks").Where("owner_user_id=? and block_user_id=?", ownerUserID, blockUserID).Delete(&db.GroupRequest{}).Error + return utils.Wrap(err, "RemoveBlackList failed") } func GetBlackListByUserID(ownerUserID string) ([]db.Black, error) { From 548c92dc0d25242c11dec751f4dd969fa0e1c5a6 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 6 Jan 2022 20:17:22 +0800 Subject: [PATCH 263/337] Refactor code --- internal/rpc/auth/auth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/rpc/auth/auth.go b/internal/rpc/auth/auth.go index d05c9d3d1..bb804d6e2 100644 --- a/internal/rpc/auth/auth.go +++ b/internal/rpc/auth/auth.go @@ -24,7 +24,7 @@ func (rpc *rpcAuth) UserRegister(_ context.Context, req *pbAuth.UserRegisterReq) var user db.User utils.CopyStructFields(&user, req.UserInfo) if req.UserInfo.Birth != 0 { - user.Birth = utils.UnixSecondToTime(req.UserInfo.Birth) + user.Birth = utils.UnixSecondToTime(int64(req.UserInfo.Birth)) } err := imdb.UserRegister(user) if err != nil { From c71f2f7fae5383221188254a77f5b318c5532c13 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 6 Jan 2022 20:21:13 +0800 Subject: [PATCH 264/337] Refactor code --- .../db/mysql_model/im_mysql_model/user_black_list_model.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go b/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go index 3465f915c..1f8c43c16 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go @@ -40,7 +40,7 @@ func RemoveBlackList(ownerUserID, blockUserID string) error { if err != nil { return err } - err = dbConn.Table("blacks").Where("owner_user_id=? and block_user_id=?", ownerUserID, blockUserID).Delete(&db.GroupRequest{}).Error + err = dbConn.Table("blacks").Where("owner_user_id=? and block_user_id=?", ownerUserID, blockUserID).Delete(&db.Black{}).Error return utils.Wrap(err, "RemoveBlackList failed") } From 29e92015d52223dade3f8113975f135126de1d33 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 6 Jan 2022 20:33:09 +0800 Subject: [PATCH 265/337] Refactor code --- .../db/mysql_model/im_mysql_model/user_black_list_model.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go b/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go index 1f8c43c16..7a60287a6 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/user_black_list_model.go @@ -40,7 +40,7 @@ func RemoveBlackList(ownerUserID, blockUserID string) error { if err != nil { return err } - err = dbConn.Table("blacks").Where("owner_user_id=? and block_user_id=?", ownerUserID, blockUserID).Delete(&db.Black{}).Error + err = dbConn.Table("blacks").Where("owner_user_id=? and block_user_id=?", ownerUserID, blockUserID).Delete(db.Black{}).Error return utils.Wrap(err, "RemoveBlackList failed") } From b49576128337fcb56cb4aa342625994d94fffbdc Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 6 Jan 2022 20:34:00 +0800 Subject: [PATCH 266/337] Refactor code --- pkg/common/db/mysql_model/im_mysql_model/group_member_model.go | 2 +- pkg/common/db/mysql_model/im_mysql_model/group_request_model.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go index 6b895a8ee..e9bfdcbac 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go @@ -92,7 +92,7 @@ func DeleteGroupMemberByGroupIDAndUserID(groupID, userID string) error { if err != nil { return err } - err = dbConn.Table("group_members").Where("group_id=? and user_id=? ", groupID, userID).Delete(&db.GroupMember{}).Error + err = dbConn.Table("group_members").Where("group_id=? and user_id=? ", groupID, userID).Delete(db.GroupMember{}).Error if err != nil { return err } diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go index b1436e17b..84988a3f4 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_request_model.go @@ -66,7 +66,7 @@ func DelGroupRequestByGroupIDAndUserID(groupID, userID string) error { if err != nil { return err } - err = dbConn.Table("group_requests").Where("group_id=? and user_id=?", groupID, userID).Delete(&db.GroupRequest{}).Error + err = dbConn.Table("group_requests").Where("group_id=? and user_id=?", groupID, userID).Delete(db.GroupRequest{}).Error if err != nil { return err } From 89eb39ca3e158487deece94c3852b67d3cf3643e Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 13 Jan 2022 11:10:29 +0800 Subject: [PATCH 267/337] Refactor code --- cmd/open_im_api/main.go | 5 +-- internal/api/group/group.go | 4 +-- internal/api/user/user.go | 53 ++++++++++++++++++++++++++++--- pkg/base_info/group_api_struct.go | 2 +- pkg/base_info/user_api_struct.go | 18 ++++++++--- 5 files changed, 69 insertions(+), 13 deletions(-) diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index ff61b1ccb..65ab3aae1 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -24,8 +24,9 @@ func main() { // user routing group, which handles user registration and login services userRouterGroup := r.Group("/user") { - userRouterGroup.POST("/update_user_info", user.UpdateUserInfo) //1 - userRouterGroup.POST("/get_user_info", user.GetUserInfo) //1 + userRouterGroup.POST("/update_user_info", user.UpdateUserInfo) //1 + userRouterGroup.POST("/get_user_info", user.GetUsersInfo) //1 + userRouterGroup.POST("/get_self_user_info", user.GetSelfUserInfo) //1 } //friend routing group friendRouterGroup := r.Group("/friend") diff --git a/internal/api/group/group.go b/internal/api/group/group.go index ef3c599cb..61bc95495 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -227,11 +227,11 @@ func InviteUserToGroup(c *gin.Context) { resp := api.InviteUserToGroupResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}} for _, v := range RpcResp.Id2ResultList { - resp.UserIDResultList = append(resp.UserIDResultList, api.UserIDResult{UserID: v.UserID, Result: v.Result}) + resp.UserIDResultList = append(resp.UserIDResultList, &api.UserIDResult{UserID: v.UserID, Result: v.Result}) } if len(resp.UserIDResultList) == 0 { - resp.UserIDResultList = []api.UserIDResult{} + resp.UserIDResultList = *new([]*api.UserIDResult) } log.NewInfo(req.OperationID, "InviteUserToGroup api return ", resp) diff --git a/internal/api/user/user.go b/internal/api/user/user.go index ebc5decf7..f5f02c8cd 100644 --- a/internal/api/user/user.go +++ b/internal/api/user/user.go @@ -16,8 +16,8 @@ import ( "strings" ) -func GetUserInfo(c *gin.Context) { - params := api.GetUserInfoReq{} +func GetUsersInfo(c *gin.Context) { + params := api.GetUsersInfoReq{} if err := c.BindJSON(¶ms); err != nil { log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": http.StatusBadRequest, "errMsg": err.Error()}) @@ -42,15 +42,20 @@ func GetUserInfo(c *gin.Context) { c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) return } + var publicUserInfoList []*open_im_sdk.PublicUserInfo + for _, v := range RpcResp.UserInfoList { + publicUserInfoList = append(publicUserInfoList, + &open_im_sdk.PublicUserInfo{UserID: v.UserID, Nickname: v.Nickname, FaceUrl: v.FaceUrl, Gender: v.Gender, AppMangerLevel: v.AppMangerLevel}) + } - resp := api.GetUserInfoResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, UserInfoList: RpcResp.UserInfoList} + resp := api.GetUsersInfoResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, UserInfoList: publicUserInfoList} resp.Data = jsonData.JsonDataList(resp.UserInfoList) log.NewInfo(req.OperationID, "GetUserInfo api return ", resp) c.JSON(http.StatusOK, resp) } func UpdateUserInfo(c *gin.Context) { - params := api.UpdateUserInfoReq{} + params := api.UpdateSelfUserInfoReq{} if err := c.BindJSON(¶ms); err != nil { log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) @@ -80,3 +85,43 @@ func UpdateUserInfo(c *gin.Context) { log.NewInfo(req.OperationID, "UpdateUserInfo api return ", resp) c.JSON(http.StatusOK, resp) } + +func GetSelfUserInfo(c *gin.Context) { + params := api.GetSelfUserInfoReq{} + if err := c.BindJSON(¶ms); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) + c.JSON(http.StatusBadRequest, gin.H{"errCode": http.StatusBadRequest, "errMsg": err.Error()}) + return + } + req := &rpc.GetUserInfoReq{} + utils.CopyStructFields(req, ¶ms) + var ok bool + ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + if !ok { + log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) + return + } + log.NewInfo(params.OperationID, "GetUserInfo args ", req.String()) + + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName) + client := rpc.NewUserClient(etcdConn) + RpcResp, err := client.GetUserInfo(context.Background(), req) + if err != nil { + log.NewError(req.OperationID, "GetUserInfo failed ", err.Error(), req.String()) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call rpc server failed"}) + return + } + if len(RpcResp.UserInfoList) == 1 { + resp := api.GetSelfUserInfoResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, UserInfoList: RpcResp.UserInfoList[0]} + resp.Data = jsonData.JsonDataList(resp.UserInfoList) + log.NewInfo(req.OperationID, "GetUserInfo api return ", resp) + c.JSON(http.StatusOK, resp) + } else { + resp := api.GetSelfUserInfoResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} + resp.Data = jsonData.JsonDataList(resp.UserInfoList) + log.NewInfo(req.OperationID, "GetUserInfo api return ", resp) + c.JSON(http.StatusOK, resp) + } + +} diff --git a/pkg/base_info/group_api_struct.go b/pkg/base_info/group_api_struct.go index 7c70d5a0e..71301455a 100644 --- a/pkg/base_info/group_api_struct.go +++ b/pkg/base_info/group_api_struct.go @@ -45,7 +45,7 @@ type InviteUserToGroupReq struct { } type InviteUserToGroupResp struct { CommResp - UserIDResultList []UserIDResult `json:"data"` + UserIDResultList []*UserIDResult `json:"data"` } type GetJoinedGroupListReq struct { diff --git a/pkg/base_info/user_api_struct.go b/pkg/base_info/user_api_struct.go index 632c6ea77..3ca191f98 100644 --- a/pkg/base_info/user_api_struct.go +++ b/pkg/base_info/user_api_struct.go @@ -4,17 +4,17 @@ import ( open_im_sdk "Open_IM/pkg/proto/sdk_ws" ) -type GetUserInfoReq struct { +type GetUsersInfoReq struct { OperationID string `json:"operationID" binding:"required"` UserIDList []string `json:"userIDList" binding:"required"` } -type GetUserInfoResp struct { +type GetUsersInfoResp struct { CommResp - UserInfoList []*open_im_sdk.UserInfo `json:"-"` + UserInfoList []*open_im_sdk.PublicUserInfo Data []map[string]interface{} `json:"data"` } -type UpdateUserInfoReq struct { +type UpdateSelfUserInfoReq struct { UserInfo OperationID string `json:"operationID" binding:"required"` } @@ -22,3 +22,13 @@ type UpdateUserInfoReq struct { type UpdateUserInfoResp struct { CommResp } + +type GetSelfUserInfoReq struct { + OperationID string `json:"operationID" binding:"required"` + UserID string `json:"userID" binding:"required"` +} +type GetSelfUserInfoResp struct { + CommResp + UserInfoList *open_im_sdk.UserInfo `json:"-"` + Data []map[string]interface{} `json:"data"` +} From 1f493c427a0b429e3dc5ea760cf05af2fe30345a Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 13 Jan 2022 11:16:55 +0800 Subject: [PATCH 268/337] Refactor code --- internal/api/user/user.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/api/user/user.go b/internal/api/user/user.go index f5f02c8cd..d249486e6 100644 --- a/internal/api/user/user.go +++ b/internal/api/user/user.go @@ -94,6 +94,7 @@ func GetSelfUserInfo(c *gin.Context) { return } req := &rpc.GetUserInfoReq{} + utils.CopyStructFields(req, ¶ms) var ok bool ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) @@ -102,6 +103,7 @@ func GetSelfUserInfo(c *gin.Context) { c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) return } + req.UserIDList = append(req.UserIDList, req.OpUserID) log.NewInfo(params.OperationID, "GetUserInfo args ", req.String()) etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName) From 3e6302e44a6360f6cfd3160956a0f2a13d7ec368 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 13 Jan 2022 11:20:21 +0800 Subject: [PATCH 269/337] Refactor code --- internal/rpc/group/group.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 322039a75..210c997b5 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -171,7 +171,7 @@ func (s *groupServer) GetJoinedGroupList(ctx context.Context, req *pbGroup.GetJo group, err := imdb.GetGroupInfoByGroupID(v) if num > 0 && owner != nil && err2 == nil && group != nil && err == nil { utils.CopyStructFields(&groupNode, group) - groupNode.CreateTime = group.CreateTime.Unix() + groupNode.CreateTime = uint32(group.CreateTime.Unix()) groupNode.MemberCount = uint32(num) groupNode.OwnerUserID = owner.UserID resp.GroupList = append(resp.GroupList, &groupNode) From b0a8ad1ac1970af3092328eed9e948b9f40473d0 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 13 Jan 2022 18:33:11 +0800 Subject: [PATCH 270/337] tidy --- internal/msg_gateway/gate/ws_server.go | 2 +- pkg/common/constant/constant.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/msg_gateway/gate/ws_server.go b/internal/msg_gateway/gate/ws_server.go index 88fad8c0c..2197fbbc2 100644 --- a/internal/msg_gateway/gate/ws_server.go +++ b/internal/msg_gateway/gate/ws_server.go @@ -128,7 +128,7 @@ func (ws *WServer) MultiTerminalLoginChecker(uid string, platformID int32, newCo } delete(ws.wsConnToUser, oldConn) if err != nil { - log.NewError("", "conn close err", err.Error()) + log.NewError("", "conn close err", err.Error(), uid, platformID) } } diff --git a/pkg/common/constant/constant.go b/pkg/common/constant/constant.go index 636096176..d0bfec2e0 100644 --- a/pkg/common/constant/constant.go +++ b/pkg/common/constant/constant.go @@ -78,13 +78,13 @@ const ( ExpiredToken = 3 //MultiTerminalLogin - //全端登录,但是同端互斥 + //Full-end login, but the same end is mutually exclusive AllLoginButSameTermKick = 1 - //所有端中只能有一端能够登录 + //Only one of the endpoints can log in SingleTerminalLogin = 2 - //web端可以同时在线,其他端只能有一端登录 + //The web side can be online at the same time, and the other side can only log in at one end WebAndOther = 3 - //Pc端互斥,移动端互斥,但是web端可以同时在线 + //The PC side is mutually exclusive, and the mobile side is mutually exclusive, but the web side can be online at the same time PcMobileAndWeb = 4 OnlineStatus = "online" From 0db2c271a0ef3e4f13f7fce7ebc68e400575c828 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Fri, 14 Jan 2022 09:51:43 +0800 Subject: [PATCH 271/337] proto json tag modify --- cmd/open_im_api/main.go | 1 + pkg/proto/sdk_ws/ws.pb.go | 585 +++++++++++++++++++------------------- pkg/proto/sdk_ws/ws.proto | 246 ++++++++-------- 3 files changed, 416 insertions(+), 416 deletions(-) diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index 65ab3aae1..fccba41c1 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -19,6 +19,7 @@ import ( ) func main() { + gin.SetMode(gin.ReleaseMode) r := gin.Default() r.Use(utils.CorsHandler()) // user routing group, which handles user registration and login services diff --git a/pkg/proto/sdk_ws/ws.pb.go b/pkg/proto/sdk_ws/ws.pb.go index 91870ccd9..31bcf268d 100644 --- a/pkg/proto/sdk_ws/ws.pb.go +++ b/pkg/proto/sdk_ws/ws.pb.go @@ -19,18 +19,18 @@ var _ = math.Inf const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type GroupInfo struct { - GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` - GroupName string `protobuf:"bytes,2,opt,name=GroupName" json:"GroupName,omitempty"` - Notification string `protobuf:"bytes,3,opt,name=Notification" json:"Notification,omitempty"` - Introduction string `protobuf:"bytes,4,opt,name=Introduction" json:"Introduction,omitempty"` - FaceUrl string `protobuf:"bytes,5,opt,name=FaceUrl" json:"FaceUrl,omitempty"` - OwnerUserID string `protobuf:"bytes,6,opt,name=OwnerUserID" json:"OwnerUserID,omitempty"` - CreateTime uint32 `protobuf:"varint,7,opt,name=CreateTime" json:"CreateTime,omitempty"` - MemberCount uint32 `protobuf:"varint,8,opt,name=MemberCount" json:"MemberCount,omitempty"` - Ex string `protobuf:"bytes,9,opt,name=Ex" json:"Ex,omitempty"` - Status int32 `protobuf:"varint,10,opt,name=Status" json:"Status,omitempty"` - CreatorUserID string `protobuf:"bytes,11,opt,name=CreatorUserID" json:"CreatorUserID,omitempty"` - GroupType int32 `protobuf:"varint,12,opt,name=GroupType" json:"GroupType,omitempty"` + GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` + GroupName string `protobuf:"bytes,2,opt,name=groupName" json:"groupName,omitempty"` + Notification string `protobuf:"bytes,3,opt,name=notification" json:"notification,omitempty"` + Introduction string `protobuf:"bytes,4,opt,name=introduction" json:"introduction,omitempty"` + FaceURL string `protobuf:"bytes,5,opt,name=faceURL" json:"faceURL,omitempty"` + OwnerUserID string `protobuf:"bytes,6,opt,name=ownerUserID" json:"ownerUserID,omitempty"` + CreateTime uint32 `protobuf:"varint,7,opt,name=createTime" json:"createTime,omitempty"` + MemberCount uint32 `protobuf:"varint,8,opt,name=memberCount" json:"memberCount,omitempty"` + Ex string `protobuf:"bytes,9,opt,name=ex" json:"ex,omitempty"` + Status int32 `protobuf:"varint,10,opt,name=status" json:"status,omitempty"` + CreatorUserID string `protobuf:"bytes,11,opt,name=creatorUserID" json:"creatorUserID,omitempty"` + GroupType int32 `protobuf:"varint,12,opt,name=groupType" json:"groupType,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -40,7 +40,7 @@ func (m *GroupInfo) Reset() { *m = GroupInfo{} } func (m *GroupInfo) String() string { return proto.CompactTextString(m) } func (*GroupInfo) ProtoMessage() {} func (*GroupInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a718f3fde1e8b012, []int{0} + return fileDescriptor_ws_f46b8824c5dbc584, []int{0} } func (m *GroupInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfo.Unmarshal(m, b) @@ -88,9 +88,9 @@ func (m *GroupInfo) GetIntroduction() string { return "" } -func (m *GroupInfo) GetFaceUrl() string { +func (m *GroupInfo) GetFaceURL() string { if m != nil { - return m.FaceUrl + return m.FaceURL } return "" } @@ -145,16 +145,16 @@ func (m *GroupInfo) GetGroupType() int32 { } type GroupMemberFullInfo struct { - GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` - UserID string `protobuf:"bytes,2,opt,name=UserID" json:"UserID,omitempty"` + GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` + UserID string `protobuf:"bytes,2,opt,name=userID" json:"userID,omitempty"` RoleLevel int32 `protobuf:"varint,3,opt,name=roleLevel" json:"roleLevel,omitempty"` - JoinTime int64 `protobuf:"varint,4,opt,name=JoinTime" json:"JoinTime,omitempty"` - Nickname string `protobuf:"bytes,5,opt,name=Nickname" json:"Nickname,omitempty"` - FaceUrl string `protobuf:"bytes,6,opt,name=FaceUrl" json:"FaceUrl,omitempty"` - AppMangerLevel int32 `protobuf:"varint,7,opt,name=AppMangerLevel" json:"AppMangerLevel,omitempty"` - JoinSource int32 `protobuf:"varint,8,opt,name=JoinSource" json:"JoinSource,omitempty"` - OperatorUserID string `protobuf:"bytes,9,opt,name=OperatorUserID" json:"OperatorUserID,omitempty"` - Ex string `protobuf:"bytes,10,opt,name=Ex" json:"Ex,omitempty"` + JoinTime int64 `protobuf:"varint,4,opt,name=joinTime" json:"joinTime,omitempty"` + Nickname string `protobuf:"bytes,5,opt,name=nickname" json:"nickname,omitempty"` + FaceURL string `protobuf:"bytes,6,opt,name=faceURL" json:"faceURL,omitempty"` + AppMangerLevel int32 `protobuf:"varint,7,opt,name=appMangerLevel" json:"appMangerLevel,omitempty"` + JoinSource int32 `protobuf:"varint,8,opt,name=joinSource" json:"joinSource,omitempty"` + OperatorUserID string `protobuf:"bytes,9,opt,name=operatorUserID" json:"operatorUserID,omitempty"` + Ex string `protobuf:"bytes,10,opt,name=ex" json:"ex,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -164,7 +164,7 @@ func (m *GroupMemberFullInfo) Reset() { *m = GroupMemberFullInfo{} } func (m *GroupMemberFullInfo) String() string { return proto.CompactTextString(m) } func (*GroupMemberFullInfo) ProtoMessage() {} func (*GroupMemberFullInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a718f3fde1e8b012, []int{1} + return fileDescriptor_ws_f46b8824c5dbc584, []int{1} } func (m *GroupMemberFullInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupMemberFullInfo.Unmarshal(m, b) @@ -219,9 +219,9 @@ func (m *GroupMemberFullInfo) GetNickname() string { return "" } -func (m *GroupMemberFullInfo) GetFaceUrl() string { +func (m *GroupMemberFullInfo) GetFaceURL() string { if m != nil { - return m.FaceUrl + return m.FaceURL } return "" } @@ -255,11 +255,11 @@ func (m *GroupMemberFullInfo) GetEx() string { } type PublicUserInfo struct { - UserID string `protobuf:"bytes,1,opt,name=UserID" json:"UserID,omitempty"` - Nickname string `protobuf:"bytes,2,opt,name=Nickname" json:"Nickname,omitempty"` - FaceUrl string `protobuf:"bytes,3,opt,name=FaceUrl" json:"FaceUrl,omitempty"` - Gender int32 `protobuf:"varint,4,opt,name=Gender" json:"Gender,omitempty"` - AppMangerLevel int32 `protobuf:"varint,5,opt,name=AppMangerLevel" json:"AppMangerLevel,omitempty"` + UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` + Nickname string `protobuf:"bytes,2,opt,name=nickname" json:"nickname,omitempty"` + FaceURL string `protobuf:"bytes,3,opt,name=faceURL" json:"faceURL,omitempty"` + Gender int32 `protobuf:"varint,4,opt,name=gender" json:"gender,omitempty"` + AppMangerLevel int32 `protobuf:"varint,5,opt,name=appMangerLevel" json:"appMangerLevel,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -269,7 +269,7 @@ func (m *PublicUserInfo) Reset() { *m = PublicUserInfo{} } func (m *PublicUserInfo) String() string { return proto.CompactTextString(m) } func (*PublicUserInfo) ProtoMessage() {} func (*PublicUserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a718f3fde1e8b012, []int{2} + return fileDescriptor_ws_f46b8824c5dbc584, []int{2} } func (m *PublicUserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PublicUserInfo.Unmarshal(m, b) @@ -303,9 +303,9 @@ func (m *PublicUserInfo) GetNickname() string { return "" } -func (m *PublicUserInfo) GetFaceUrl() string { +func (m *PublicUserInfo) GetFaceURL() string { if m != nil { - return m.FaceUrl + return m.FaceURL } return "" } @@ -325,16 +325,16 @@ func (m *PublicUserInfo) GetAppMangerLevel() int32 { } type UserInfo struct { - UserID string `protobuf:"bytes,1,opt,name=UserID" json:"UserID,omitempty"` - Nickname string `protobuf:"bytes,2,opt,name=Nickname" json:"Nickname,omitempty"` - FaceUrl string `protobuf:"bytes,3,opt,name=FaceUrl" json:"FaceUrl,omitempty"` - Gender int32 `protobuf:"varint,4,opt,name=Gender" json:"Gender,omitempty"` - PhoneNumber string `protobuf:"bytes,5,opt,name=PhoneNumber" json:"PhoneNumber,omitempty"` - Birth uint32 `protobuf:"varint,6,opt,name=Birth" json:"Birth,omitempty"` - Email string `protobuf:"bytes,7,opt,name=Email" json:"Email,omitempty"` - Ex string `protobuf:"bytes,8,opt,name=Ex" json:"Ex,omitempty"` - CreateTime uint32 `protobuf:"varint,9,opt,name=CreateTime" json:"CreateTime,omitempty"` - AppMangerLevel int32 `protobuf:"varint,10,opt,name=AppMangerLevel" json:"AppMangerLevel,omitempty"` + UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` + Nickname string `protobuf:"bytes,2,opt,name=nickname" json:"nickname,omitempty"` + FaceURL string `protobuf:"bytes,3,opt,name=faceURL" json:"faceURL,omitempty"` + Gender int32 `protobuf:"varint,4,opt,name=gender" json:"gender,omitempty"` + PhoneNumber string `protobuf:"bytes,5,opt,name=phoneNumber" json:"phoneNumber,omitempty"` + Birth uint32 `protobuf:"varint,6,opt,name=birth" json:"birth,omitempty"` + Email string `protobuf:"bytes,7,opt,name=email" json:"email,omitempty"` + Ex string `protobuf:"bytes,8,opt,name=ex" json:"ex,omitempty"` + CreateTime uint32 `protobuf:"varint,9,opt,name=createTime" json:"createTime,omitempty"` + AppMangerLevel int32 `protobuf:"varint,10,opt,name=appMangerLevel" json:"appMangerLevel,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -344,7 +344,7 @@ func (m *UserInfo) Reset() { *m = UserInfo{} } func (m *UserInfo) String() string { return proto.CompactTextString(m) } func (*UserInfo) ProtoMessage() {} func (*UserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a718f3fde1e8b012, []int{3} + return fileDescriptor_ws_f46b8824c5dbc584, []int{3} } func (m *UserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserInfo.Unmarshal(m, b) @@ -378,9 +378,9 @@ func (m *UserInfo) GetNickname() string { return "" } -func (m *UserInfo) GetFaceUrl() string { +func (m *UserInfo) GetFaceURL() string { if m != nil { - return m.FaceUrl + return m.FaceURL } return "" } @@ -435,13 +435,13 @@ func (m *UserInfo) GetAppMangerLevel() int32 { } type FriendInfo struct { - OwnerUserID string `protobuf:"bytes,1,opt,name=OwnerUserID" json:"OwnerUserID,omitempty"` - Remark string `protobuf:"bytes,2,opt,name=Remark" json:"Remark,omitempty"` - CreateTime uint32 `protobuf:"varint,3,opt,name=CreateTime" json:"CreateTime,omitempty"` - FriendUser *UserInfo `protobuf:"bytes,4,opt,name=FriendUser" json:"FriendUser,omitempty"` - AddSource int32 `protobuf:"varint,5,opt,name=AddSource" json:"AddSource,omitempty"` - OperatorUserID string `protobuf:"bytes,6,opt,name=OperatorUserID" json:"OperatorUserID,omitempty"` - Ex string `protobuf:"bytes,7,opt,name=Ex" json:"Ex,omitempty"` + OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID" json:"ownerUserID,omitempty"` + Remark string `protobuf:"bytes,2,opt,name=remark" json:"remark,omitempty"` + CreateTime uint32 `protobuf:"varint,3,opt,name=createTime" json:"createTime,omitempty"` + FriendUser *UserInfo `protobuf:"bytes,4,opt,name=friendUser" json:"friendUser,omitempty"` + AddSource int32 `protobuf:"varint,5,opt,name=addSource" json:"addSource,omitempty"` + OperatorUserID string `protobuf:"bytes,6,opt,name=operatorUserID" json:"operatorUserID,omitempty"` + Ex string `protobuf:"bytes,7,opt,name=ex" json:"ex,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -451,7 +451,7 @@ func (m *FriendInfo) Reset() { *m = FriendInfo{} } func (m *FriendInfo) String() string { return proto.CompactTextString(m) } func (*FriendInfo) ProtoMessage() {} func (*FriendInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a718f3fde1e8b012, []int{4} + return fileDescriptor_ws_f46b8824c5dbc584, []int{4} } func (m *FriendInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfo.Unmarshal(m, b) @@ -521,12 +521,12 @@ func (m *FriendInfo) GetEx() string { } type BlackInfo struct { - OwnerUserID string `protobuf:"bytes,1,opt,name=OwnerUserID" json:"OwnerUserID,omitempty"` - CreateTime uint32 `protobuf:"varint,2,opt,name=CreateTime" json:"CreateTime,omitempty"` - BlackUserInfo *PublicUserInfo `protobuf:"bytes,3,opt,name=BlackUserInfo" json:"BlackUserInfo,omitempty"` - AddSource int32 `protobuf:"varint,4,opt,name=AddSource" json:"AddSource,omitempty"` - OperatorUserID string `protobuf:"bytes,5,opt,name=OperatorUserID" json:"OperatorUserID,omitempty"` - Ex string `protobuf:"bytes,6,opt,name=Ex" json:"Ex,omitempty"` + OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID" json:"ownerUserID,omitempty"` + CreateTime uint32 `protobuf:"varint,2,opt,name=createTime" json:"createTime,omitempty"` + BlackUserInfo *PublicUserInfo `protobuf:"bytes,3,opt,name=blackUserInfo" json:"blackUserInfo,omitempty"` + AddSource int32 `protobuf:"varint,4,opt,name=addSource" json:"addSource,omitempty"` + OperatorUserID string `protobuf:"bytes,5,opt,name=operatorUserID" json:"operatorUserID,omitempty"` + Ex string `protobuf:"bytes,6,opt,name=ex" json:"ex,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -536,7 +536,7 @@ func (m *BlackInfo) Reset() { *m = BlackInfo{} } func (m *BlackInfo) String() string { return proto.CompactTextString(m) } func (*BlackInfo) ProtoMessage() {} func (*BlackInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a718f3fde1e8b012, []int{5} + return fileDescriptor_ws_f46b8824c5dbc584, []int{5} } func (m *BlackInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackInfo.Unmarshal(m, b) @@ -599,15 +599,15 @@ func (m *BlackInfo) GetEx() string { } type GroupRequest struct { - UserID string `protobuf:"bytes,1,opt,name=UserID" json:"UserID,omitempty"` - GroupID string `protobuf:"bytes,2,opt,name=GroupID" json:"GroupID,omitempty"` - HandleResult string `protobuf:"bytes,3,opt,name=HandleResult" json:"HandleResult,omitempty"` - ReqMsg string `protobuf:"bytes,4,opt,name=ReqMsg" json:"ReqMsg,omitempty"` - HandleMsg string `protobuf:"bytes,5,opt,name=HandleMsg" json:"HandleMsg,omitempty"` - ReqTime uint32 `protobuf:"varint,6,opt,name=ReqTime" json:"ReqTime,omitempty"` - HandleUserID string `protobuf:"bytes,7,opt,name=HandleUserID" json:"HandleUserID,omitempty"` - HandleTime uint32 `protobuf:"varint,8,opt,name=HandleTime" json:"HandleTime,omitempty"` - Ex string `protobuf:"bytes,9,opt,name=Ex" json:"Ex,omitempty"` + UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` + GroupID string `protobuf:"bytes,2,opt,name=groupID" json:"groupID,omitempty"` + HandleResult string `protobuf:"bytes,3,opt,name=handleResult" json:"handleResult,omitempty"` + ReqMsg string `protobuf:"bytes,4,opt,name=reqMsg" json:"reqMsg,omitempty"` + HandleMsg string `protobuf:"bytes,5,opt,name=handleMsg" json:"handleMsg,omitempty"` + ReqTime uint32 `protobuf:"varint,6,opt,name=reqTime" json:"reqTime,omitempty"` + HandleUserID string `protobuf:"bytes,7,opt,name=handleUserID" json:"handleUserID,omitempty"` + HandleTime uint32 `protobuf:"varint,8,opt,name=handleTime" json:"handleTime,omitempty"` + Ex string `protobuf:"bytes,9,opt,name=ex" json:"ex,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -617,7 +617,7 @@ func (m *GroupRequest) Reset() { *m = GroupRequest{} } func (m *GroupRequest) String() string { return proto.CompactTextString(m) } func (*GroupRequest) ProtoMessage() {} func (*GroupRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a718f3fde1e8b012, []int{6} + return fileDescriptor_ws_f46b8824c5dbc584, []int{6} } func (m *GroupRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupRequest.Unmarshal(m, b) @@ -701,15 +701,15 @@ func (m *GroupRequest) GetEx() string { } type FriendRequest struct { - FromUserID string `protobuf:"bytes,1,opt,name=FromUserID" json:"FromUserID,omitempty"` - ToUserID string `protobuf:"bytes,2,opt,name=ToUserID" json:"ToUserID,omitempty"` - HandleResult int32 `protobuf:"varint,3,opt,name=HandleResult" json:"HandleResult,omitempty"` - ReqMsg string `protobuf:"bytes,4,opt,name=ReqMsg" json:"ReqMsg,omitempty"` - CreateTime uint32 `protobuf:"varint,5,opt,name=CreateTime" json:"CreateTime,omitempty"` - HandlerUserID string `protobuf:"bytes,6,opt,name=HandlerUserID" json:"HandlerUserID,omitempty"` - HandleMsg string `protobuf:"bytes,7,opt,name=HandleMsg" json:"HandleMsg,omitempty"` - HandleTime uint32 `protobuf:"varint,8,opt,name=HandleTime" json:"HandleTime,omitempty"` - Ex string `protobuf:"bytes,9,opt,name=Ex" json:"Ex,omitempty"` + FromUserID string `protobuf:"bytes,1,opt,name=fromUserID" json:"fromUserID,omitempty"` + ToUserID string `protobuf:"bytes,2,opt,name=toUserID" json:"toUserID,omitempty"` + HandleResult int32 `protobuf:"varint,3,opt,name=handleResult" json:"handleResult,omitempty"` + ReqMsg string `protobuf:"bytes,4,opt,name=reqMsg" json:"reqMsg,omitempty"` + CreateTime uint32 `protobuf:"varint,5,opt,name=createTime" json:"createTime,omitempty"` + HandlerUserID string `protobuf:"bytes,6,opt,name=handlerUserID" json:"handlerUserID,omitempty"` + HandleMsg string `protobuf:"bytes,7,opt,name=handleMsg" json:"handleMsg,omitempty"` + HandleTime uint32 `protobuf:"varint,8,opt,name=handleTime" json:"handleTime,omitempty"` + Ex string `protobuf:"bytes,9,opt,name=ex" json:"ex,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -719,7 +719,7 @@ func (m *FriendRequest) Reset() { *m = FriendRequest{} } func (m *FriendRequest) String() string { return proto.CompactTextString(m) } func (*FriendRequest) ProtoMessage() {} func (*FriendRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a718f3fde1e8b012, []int{7} + return fileDescriptor_ws_f46b8824c5dbc584, []int{7} } func (m *FriendRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendRequest.Unmarshal(m, b) @@ -818,7 +818,7 @@ func (m *PullMessageBySeqListResp) Reset() { *m = PullMessageBySeqListRe func (m *PullMessageBySeqListResp) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListResp) ProtoMessage() {} func (*PullMessageBySeqListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a718f3fde1e8b012, []int{8} + return fileDescriptor_ws_f46b8824c5dbc584, []int{8} } func (m *PullMessageBySeqListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListResp.Unmarshal(m, b) @@ -893,7 +893,7 @@ func (m *PullMessageBySeqListReq) Reset() { *m = PullMessageBySeqListReq func (m *PullMessageBySeqListReq) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListReq) ProtoMessage() {} func (*PullMessageBySeqListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a718f3fde1e8b012, []int{9} + return fileDescriptor_ws_f46b8824c5dbc584, []int{9} } func (m *PullMessageBySeqListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListReq.Unmarshal(m, b) @@ -948,7 +948,7 @@ func (m *PullMessageReq) Reset() { *m = PullMessageReq{} } func (m *PullMessageReq) String() string { return proto.CompactTextString(m) } func (*PullMessageReq) ProtoMessage() {} func (*PullMessageReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a718f3fde1e8b012, []int{10} + return fileDescriptor_ws_f46b8824c5dbc584, []int{10} } func (m *PullMessageReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageReq.Unmarshal(m, b) @@ -1012,7 +1012,7 @@ func (m *PullMessageResp) Reset() { *m = PullMessageResp{} } func (m *PullMessageResp) String() string { return proto.CompactTextString(m) } func (*PullMessageResp) ProtoMessage() {} func (*PullMessageResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a718f3fde1e8b012, []int{11} + return fileDescriptor_ws_f46b8824c5dbc584, []int{11} } func (m *PullMessageResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageResp.Unmarshal(m, b) @@ -1084,7 +1084,7 @@ func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} } func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqReq) ProtoMessage() {} func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a718f3fde1e8b012, []int{12} + return fileDescriptor_ws_f46b8824c5dbc584, []int{12} } func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) @@ -1116,7 +1116,7 @@ func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} } func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqResp) ProtoMessage() {} func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a718f3fde1e8b012, []int{13} + return fileDescriptor_ws_f46b8824c5dbc584, []int{13} } func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) @@ -1164,7 +1164,7 @@ func (m *GatherFormat) Reset() { *m = GatherFormat{} } func (m *GatherFormat) String() string { return proto.CompactTextString(m) } func (*GatherFormat) ProtoMessage() {} func (*GatherFormat) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a718f3fde1e8b012, []int{14} + return fileDescriptor_ws_f46b8824c5dbc584, []int{14} } func (m *GatherFormat) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GatherFormat.Unmarshal(m, b) @@ -1199,8 +1199,8 @@ func (m *GatherFormat) GetList() []*MsgData { } type UserSendMsgResp struct { - ServerMsgID string `protobuf:"bytes,1,opt,name=ServerMsgID" json:"ServerMsgID,omitempty"` - ClientMsgID string `protobuf:"bytes,2,opt,name=ClientMsgID" json:"ClientMsgID,omitempty"` + ServerMsgID string `protobuf:"bytes,1,opt,name=serverMsgID" json:"serverMsgID,omitempty"` + ClientMsgID string `protobuf:"bytes,2,opt,name=clientMsgID" json:"clientMsgID,omitempty"` SendTime int64 `protobuf:"varint,3,opt,name=sendTime" json:"sendTime,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1211,7 +1211,7 @@ func (m *UserSendMsgResp) Reset() { *m = UserSendMsgResp{} } func (m *UserSendMsgResp) String() string { return proto.CompactTextString(m) } func (*UserSendMsgResp) ProtoMessage() {} func (*UserSendMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a718f3fde1e8b012, []int{15} + return fileDescriptor_ws_f46b8824c5dbc584, []int{15} } func (m *UserSendMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserSendMsgResp.Unmarshal(m, b) @@ -1269,7 +1269,7 @@ type MsgData struct { Seq int64 `protobuf:"varint,14,opt,name=seq" json:"seq,omitempty"` SendTime int64 `protobuf:"varint,15,opt,name=sendTime" json:"sendTime,omitempty"` CreateTime int64 `protobuf:"varint,16,opt,name=createTime" json:"createTime,omitempty"` - Options map[string]bool `protobuf:"bytes,17,rep,name=Options" json:"Options,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Options map[string]bool `protobuf:"bytes,17,rep,name=options" json:"options,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` OfflinePushInfo *OfflinePushInfo `protobuf:"bytes,18,opt,name=offlinePushInfo" json:"offlinePushInfo,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1280,7 +1280,7 @@ func (m *MsgData) Reset() { *m = MsgData{} } func (m *MsgData) String() string { return proto.CompactTextString(m) } func (*MsgData) ProtoMessage() {} func (*MsgData) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a718f3fde1e8b012, []int{16} + return fileDescriptor_ws_f46b8824c5dbc584, []int{16} } func (m *MsgData) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgData.Unmarshal(m, b) @@ -1427,9 +1427,9 @@ func (m *MsgData) GetOfflinePushInfo() *OfflinePushInfo { } type OfflinePushInfo struct { - Title string `protobuf:"bytes,1,opt,name=Title" json:"Title,omitempty"` - Desc string `protobuf:"bytes,2,opt,name=Desc" json:"Desc,omitempty"` - Ex string `protobuf:"bytes,3,opt,name=Ex" json:"Ex,omitempty"` + Title string `protobuf:"bytes,1,opt,name=title" json:"title,omitempty"` + Desc string `protobuf:"bytes,2,opt,name=desc" json:"desc,omitempty"` + Ex string `protobuf:"bytes,3,opt,name=ex" json:"ex,omitempty"` IOSPushSound string `protobuf:"bytes,4,opt,name=iOSPushSound" json:"iOSPushSound,omitempty"` IOSBadgeCount bool `protobuf:"varint,5,opt,name=iOSBadgeCount" json:"iOSBadgeCount,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -1441,7 +1441,7 @@ func (m *OfflinePushInfo) Reset() { *m = OfflinePushInfo{} } func (m *OfflinePushInfo) String() string { return proto.CompactTextString(m) } func (*OfflinePushInfo) ProtoMessage() {} func (*OfflinePushInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a718f3fde1e8b012, []int{17} + return fileDescriptor_ws_f46b8824c5dbc584, []int{17} } func (m *OfflinePushInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OfflinePushInfo.Unmarshal(m, b) @@ -1497,8 +1497,8 @@ func (m *OfflinePushInfo) GetIOSBadgeCount() bool { } type TipsComm struct { - Detail []byte `protobuf:"bytes,1,opt,name=Detail,proto3" json:"Detail,omitempty"` - DefaultTips string `protobuf:"bytes,2,opt,name=DefaultTips" json:"DefaultTips,omitempty"` + Detail []byte `protobuf:"bytes,1,opt,name=detail,proto3" json:"detail,omitempty"` + DefaultTips string `protobuf:"bytes,2,opt,name=defaultTips" json:"defaultTips,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1508,7 +1508,7 @@ func (m *TipsComm) Reset() { *m = TipsComm{} } func (m *TipsComm) String() string { return proto.CompactTextString(m) } func (*TipsComm) ProtoMessage() {} func (*TipsComm) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a718f3fde1e8b012, []int{18} + return fileDescriptor_ws_f46b8824c5dbc584, []int{18} } func (m *TipsComm) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TipsComm.Unmarshal(m, b) @@ -1545,9 +1545,9 @@ func (m *TipsComm) GetDefaultTips() string { // ////////////////////group///////////////////// // Actively join the group type MemberEnterTips struct { - Group *GroupInfo `protobuf:"bytes,1,opt,name=Group" json:"Group,omitempty"` - EntrantUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=EntrantUser" json:"EntrantUser,omitempty"` - OperationTime int64 `protobuf:"varint,3,opt,name=OperationTime" json:"OperationTime,omitempty"` + Group *GroupInfo `protobuf:"bytes,1,opt,name=group" json:"group,omitempty"` + EntrantUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=entrantUser" json:"entrantUser,omitempty"` + OperationTime int64 `protobuf:"varint,3,opt,name=operationTime" json:"operationTime,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1557,7 +1557,7 @@ func (m *MemberEnterTips) Reset() { *m = MemberEnterTips{} } func (m *MemberEnterTips) String() string { return proto.CompactTextString(m) } func (*MemberEnterTips) ProtoMessage() {} func (*MemberEnterTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a718f3fde1e8b012, []int{19} + return fileDescriptor_ws_f46b8824c5dbc584, []int{19} } func (m *MemberEnterTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberEnterTips.Unmarshal(m, b) @@ -1600,9 +1600,9 @@ func (m *MemberEnterTips) GetOperationTime() int64 { // Actively leave the group type MemberLeaveTips struct { - Group *GroupInfo `protobuf:"bytes,1,opt,name=Group" json:"Group,omitempty"` - LeaverUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=LeaverUser" json:"LeaverUser,omitempty"` - OperationTime int64 `protobuf:"varint,3,opt,name=OperationTime" json:"OperationTime,omitempty"` + Group *GroupInfo `protobuf:"bytes,1,opt,name=group" json:"group,omitempty"` + LeaverUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=leaverUser" json:"leaverUser,omitempty"` + OperationTime int64 `protobuf:"varint,3,opt,name=operationTime" json:"operationTime,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1612,7 +1612,7 @@ func (m *MemberLeaveTips) Reset() { *m = MemberLeaveTips{} } func (m *MemberLeaveTips) String() string { return proto.CompactTextString(m) } func (*MemberLeaveTips) ProtoMessage() {} func (*MemberLeaveTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a718f3fde1e8b012, []int{20} + return fileDescriptor_ws_f46b8824c5dbc584, []int{20} } func (m *MemberLeaveTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberLeaveTips.Unmarshal(m, b) @@ -1654,10 +1654,10 @@ func (m *MemberLeaveTips) GetOperationTime() int64 { } type MemberInvitedTips struct { - Group *GroupInfo `protobuf:"bytes,1,opt,name=Group" json:"Group,omitempty"` - OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=OpUser" json:"OpUser,omitempty"` - InvitedUserList []*GroupMemberFullInfo `protobuf:"bytes,3,rep,name=InvitedUserList" json:"InvitedUserList,omitempty"` - OperationTime int64 `protobuf:"varint,4,opt,name=OperationTime" json:"OperationTime,omitempty"` + Group *GroupInfo `protobuf:"bytes,1,opt,name=group" json:"group,omitempty"` + OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser" json:"opUser,omitempty"` + InvitedUserList []*GroupMemberFullInfo `protobuf:"bytes,3,rep,name=invitedUserList" json:"invitedUserList,omitempty"` + OperationTime int64 `protobuf:"varint,4,opt,name=operationTime" json:"operationTime,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1667,7 +1667,7 @@ func (m *MemberInvitedTips) Reset() { *m = MemberInvitedTips{} } func (m *MemberInvitedTips) String() string { return proto.CompactTextString(m) } func (*MemberInvitedTips) ProtoMessage() {} func (*MemberInvitedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a718f3fde1e8b012, []int{21} + return fileDescriptor_ws_f46b8824c5dbc584, []int{21} } func (m *MemberInvitedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInvitedTips.Unmarshal(m, b) @@ -1716,10 +1716,10 @@ func (m *MemberInvitedTips) GetOperationTime() int64 { } type MemberKickedTips struct { - Group *GroupInfo `protobuf:"bytes,1,opt,name=Group" json:"Group,omitempty"` - OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=OpUser" json:"OpUser,omitempty"` - KickedUserList []*GroupMemberFullInfo `protobuf:"bytes,3,rep,name=KickedUserList" json:"KickedUserList,omitempty"` - OperationTime int64 `protobuf:"varint,4,opt,name=OperationTime" json:"OperationTime,omitempty"` + Group *GroupInfo `protobuf:"bytes,1,opt,name=group" json:"group,omitempty"` + OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser" json:"opUser,omitempty"` + KickedUserList []*GroupMemberFullInfo `protobuf:"bytes,3,rep,name=kickedUserList" json:"kickedUserList,omitempty"` + OperationTime int64 `protobuf:"varint,4,opt,name=operationTime" json:"operationTime,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1729,7 +1729,7 @@ func (m *MemberKickedTips) Reset() { *m = MemberKickedTips{} } func (m *MemberKickedTips) String() string { return proto.CompactTextString(m) } func (*MemberKickedTips) ProtoMessage() {} func (*MemberKickedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a718f3fde1e8b012, []int{22} + return fileDescriptor_ws_f46b8824c5dbc584, []int{22} } func (m *MemberKickedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberKickedTips.Unmarshal(m, b) @@ -1778,11 +1778,11 @@ func (m *MemberKickedTips) GetOperationTime() int64 { } type MemberInfoChangedTips struct { - ChangeType int32 `protobuf:"varint,1,opt,name=ChangeType" json:"ChangeType,omitempty"` - OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=OpUser" json:"OpUser,omitempty"` - FinalInfo *GroupMemberFullInfo `protobuf:"bytes,3,opt,name=FinalInfo" json:"FinalInfo,omitempty"` - MuteTime int64 `protobuf:"varint,4,opt,name=MuteTime" json:"MuteTime,omitempty"` - Group *GroupInfo `protobuf:"bytes,5,opt,name=Group" json:"Group,omitempty"` + ChangeType int32 `protobuf:"varint,1,opt,name=changeType" json:"changeType,omitempty"` + OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser" json:"opUser,omitempty"` + FinalInfo *GroupMemberFullInfo `protobuf:"bytes,3,opt,name=finalInfo" json:"finalInfo,omitempty"` + MuteTime int64 `protobuf:"varint,4,opt,name=muteTime" json:"muteTime,omitempty"` + Group *GroupInfo `protobuf:"bytes,5,opt,name=group" json:"group,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1792,7 +1792,7 @@ func (m *MemberInfoChangedTips) Reset() { *m = MemberInfoChangedTips{} } func (m *MemberInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*MemberInfoChangedTips) ProtoMessage() {} func (*MemberInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a718f3fde1e8b012, []int{23} + return fileDescriptor_ws_f46b8824c5dbc584, []int{23} } func (m *MemberInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInfoChangedTips.Unmarshal(m, b) @@ -1848,10 +1848,10 @@ func (m *MemberInfoChangedTips) GetGroup() *GroupInfo { } type GroupCreatedTips struct { - Group *GroupInfo `protobuf:"bytes,1,opt,name=Group" json:"Group,omitempty"` - Creator *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=Creator" json:"Creator,omitempty"` - MemberList []*GroupMemberFullInfo `protobuf:"bytes,3,rep,name=MemberList" json:"MemberList,omitempty"` - OperationTime int64 `protobuf:"varint,4,opt,name=OperationTime" json:"OperationTime,omitempty"` + Group *GroupInfo `protobuf:"bytes,1,opt,name=group" json:"group,omitempty"` + Creator *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=creator" json:"creator,omitempty"` + MemberList []*GroupMemberFullInfo `protobuf:"bytes,3,rep,name=memberList" json:"memberList,omitempty"` + OperationTime int64 `protobuf:"varint,4,opt,name=operationTime" json:"operationTime,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1861,7 +1861,7 @@ func (m *GroupCreatedTips) Reset() { *m = GroupCreatedTips{} } func (m *GroupCreatedTips) String() string { return proto.CompactTextString(m) } func (*GroupCreatedTips) ProtoMessage() {} func (*GroupCreatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a718f3fde1e8b012, []int{24} + return fileDescriptor_ws_f46b8824c5dbc584, []int{24} } func (m *GroupCreatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupCreatedTips.Unmarshal(m, b) @@ -1910,9 +1910,9 @@ func (m *GroupCreatedTips) GetOperationTime() int64 { } type GroupInfoChangedTips struct { - ChangedType int32 `protobuf:"varint,1,opt,name=ChangedType" json:"ChangedType,omitempty"` - Group *GroupInfo `protobuf:"bytes,2,opt,name=Group" json:"Group,omitempty"` - OpUser *GroupMemberFullInfo `protobuf:"bytes,3,opt,name=OpUser" json:"OpUser,omitempty"` + ChangedType int32 `protobuf:"varint,1,opt,name=changedType" json:"changedType,omitempty"` + Group *GroupInfo `protobuf:"bytes,2,opt,name=group" json:"group,omitempty"` + OpUser *GroupMemberFullInfo `protobuf:"bytes,3,opt,name=opUser" json:"opUser,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1922,7 +1922,7 @@ func (m *GroupInfoChangedTips) Reset() { *m = GroupInfoChangedTips{} } func (m *GroupInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*GroupInfoChangedTips) ProtoMessage() {} func (*GroupInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a718f3fde1e8b012, []int{25} + return fileDescriptor_ws_f46b8824c5dbc584, []int{25} } func (m *GroupInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfoChangedTips.Unmarshal(m, b) @@ -1964,9 +1964,9 @@ func (m *GroupInfoChangedTips) GetOpUser() *GroupMemberFullInfo { } type JoinGroupApplicationTips struct { - Group *GroupInfo `protobuf:"bytes,1,opt,name=Group" json:"Group,omitempty"` - Applicant *PublicUserInfo `protobuf:"bytes,2,opt,name=Applicant" json:"Applicant,omitempty"` - Reason string `protobuf:"bytes,3,opt,name=Reason" json:"Reason,omitempty"` + Group *GroupInfo `protobuf:"bytes,1,opt,name=group" json:"group,omitempty"` + Applicant *PublicUserInfo `protobuf:"bytes,2,opt,name=applicant" json:"applicant,omitempty"` + Reason string `protobuf:"bytes,3,opt,name=reason" json:"reason,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1976,7 +1976,7 @@ func (m *JoinGroupApplicationTips) Reset() { *m = JoinGroupApplicationTi func (m *JoinGroupApplicationTips) String() string { return proto.CompactTextString(m) } func (*JoinGroupApplicationTips) ProtoMessage() {} func (*JoinGroupApplicationTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a718f3fde1e8b012, []int{26} + return fileDescriptor_ws_f46b8824c5dbc584, []int{26} } func (m *JoinGroupApplicationTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JoinGroupApplicationTips.Unmarshal(m, b) @@ -2018,10 +2018,10 @@ func (m *JoinGroupApplicationTips) GetReason() string { } type ApplicationProcessedTips struct { - Group *GroupInfo `protobuf:"bytes,1,opt,name=Group" json:"Group,omitempty"` - OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=OpUser" json:"OpUser,omitempty"` - Result int32 `protobuf:"varint,3,opt,name=Result" json:"Result,omitempty"` - Reason string `protobuf:"bytes,4,opt,name=Reason" json:"Reason,omitempty"` + Group *GroupInfo `protobuf:"bytes,1,opt,name=group" json:"group,omitempty"` + OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser" json:"opUser,omitempty"` + Result int32 `protobuf:"varint,3,opt,name=result" json:"result,omitempty"` + Reason string `protobuf:"bytes,4,opt,name=reason" json:"reason,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2031,7 +2031,7 @@ func (m *ApplicationProcessedTips) Reset() { *m = ApplicationProcessedTi func (m *ApplicationProcessedTips) String() string { return proto.CompactTextString(m) } func (*ApplicationProcessedTips) ProtoMessage() {} func (*ApplicationProcessedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a718f3fde1e8b012, []int{27} + return fileDescriptor_ws_f46b8824c5dbc584, []int{27} } func (m *ApplicationProcessedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ApplicationProcessedTips.Unmarshal(m, b) @@ -2080,9 +2080,9 @@ func (m *ApplicationProcessedTips) GetReason() string { } type FriendApplication struct { - AddTime int64 `protobuf:"varint,1,opt,name=AddTime" json:"AddTime,omitempty"` - AddSource string `protobuf:"bytes,2,opt,name=AddSource" json:"AddSource,omitempty"` - AddWording string `protobuf:"bytes,3,opt,name=AddWording" json:"AddWording,omitempty"` + AddTime int64 `protobuf:"varint,1,opt,name=addTime" json:"addTime,omitempty"` + AddSource string `protobuf:"bytes,2,opt,name=addSource" json:"addSource,omitempty"` + AddWording string `protobuf:"bytes,3,opt,name=addWording" json:"addWording,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2092,7 +2092,7 @@ func (m *FriendApplication) Reset() { *m = FriendApplication{} } func (m *FriendApplication) String() string { return proto.CompactTextString(m) } func (*FriendApplication) ProtoMessage() {} func (*FriendApplication) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a718f3fde1e8b012, []int{28} + return fileDescriptor_ws_f46b8824c5dbc584, []int{28} } func (m *FriendApplication) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplication.Unmarshal(m, b) @@ -2134,8 +2134,8 @@ func (m *FriendApplication) GetAddWording() string { } type FromToUserID struct { - FromUserID string `protobuf:"bytes,1,opt,name=FromUserID" json:"FromUserID,omitempty"` - ToUserID string `protobuf:"bytes,2,opt,name=ToUserID" json:"ToUserID,omitempty"` + FromUserID string `protobuf:"bytes,1,opt,name=fromUserID" json:"fromUserID,omitempty"` + ToUserID string `protobuf:"bytes,2,opt,name=toUserID" json:"toUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2145,7 +2145,7 @@ func (m *FromToUserID) Reset() { *m = FromToUserID{} } func (m *FromToUserID) String() string { return proto.CompactTextString(m) } func (*FromToUserID) ProtoMessage() {} func (*FromToUserID) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a718f3fde1e8b012, []int{29} + return fileDescriptor_ws_f46b8824c5dbc584, []int{29} } func (m *FromToUserID) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FromToUserID.Unmarshal(m, b) @@ -2181,7 +2181,7 @@ func (m *FromToUserID) GetToUserID() string { // FromUserID apply to add ToUserID type FriendApplicationAddedTips struct { - FromToUserID *FromToUserID `protobuf:"bytes,1,opt,name=FromToUserID" json:"FromToUserID,omitempty"` + FromToUserID *FromToUserID `protobuf:"bytes,1,opt,name=fromToUserID" json:"fromToUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2191,7 +2191,7 @@ func (m *FriendApplicationAddedTips) Reset() { *m = FriendApplicationAdd func (m *FriendApplicationAddedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationAddedTips) ProtoMessage() {} func (*FriendApplicationAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a718f3fde1e8b012, []int{30} + return fileDescriptor_ws_f46b8824c5dbc584, []int{30} } func (m *FriendApplicationAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationAddedTips.Unmarshal(m, b) @@ -2220,7 +2220,7 @@ func (m *FriendApplicationAddedTips) GetFromToUserID() *FromToUserID { // FromUserID accept or reject ToUserID type FriendApplicationProcessedTips struct { - FromToUserID *FromToUserID `protobuf:"bytes,1,opt,name=FromToUserID" json:"FromToUserID,omitempty"` + FromToUserID *FromToUserID `protobuf:"bytes,1,opt,name=fromToUserID" json:"fromToUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2230,7 +2230,7 @@ func (m *FriendApplicationProcessedTips) Reset() { *m = FriendApplicatio func (m *FriendApplicationProcessedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationProcessedTips) ProtoMessage() {} func (*FriendApplicationProcessedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a718f3fde1e8b012, []int{31} + return fileDescriptor_ws_f46b8824c5dbc584, []int{31} } func (m *FriendApplicationProcessedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationProcessedTips.Unmarshal(m, b) @@ -2259,9 +2259,9 @@ func (m *FriendApplicationProcessedTips) GetFromToUserID() *FromToUserID { // FromUserID Added a friend ToUserID type FriendAddedTips struct { - Friend *FriendInfo `protobuf:"bytes,1,opt,name=Friend" json:"Friend,omitempty"` - OperationTime int64 `protobuf:"varint,2,opt,name=OperationTime" json:"OperationTime,omitempty"` - OpUser *PublicUserInfo `protobuf:"bytes,3,opt,name=OpUser" json:"OpUser,omitempty"` + Friend *FriendInfo `protobuf:"bytes,1,opt,name=friend" json:"friend,omitempty"` + OperationTime int64 `protobuf:"varint,2,opt,name=operationTime" json:"operationTime,omitempty"` + OpUser *PublicUserInfo `protobuf:"bytes,3,opt,name=opUser" json:"opUser,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2271,7 +2271,7 @@ func (m *FriendAddedTips) Reset() { *m = FriendAddedTips{} } func (m *FriendAddedTips) String() string { return proto.CompactTextString(m) } func (*FriendAddedTips) ProtoMessage() {} func (*FriendAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a718f3fde1e8b012, []int{32} + return fileDescriptor_ws_f46b8824c5dbc584, []int{32} } func (m *FriendAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendAddedTips.Unmarshal(m, b) @@ -2314,7 +2314,7 @@ func (m *FriendAddedTips) GetOpUser() *PublicUserInfo { // FromUserID deleted a friend ToUserID type FriendDeletedTips struct { - FromToUserID *FromToUserID `protobuf:"bytes,1,opt,name=FromToUserID" json:"FromToUserID,omitempty"` + FromToUserID *FromToUserID `protobuf:"bytes,1,opt,name=fromToUserID" json:"fromToUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2324,7 +2324,7 @@ func (m *FriendDeletedTips) Reset() { *m = FriendDeletedTips{} } func (m *FriendDeletedTips) String() string { return proto.CompactTextString(m) } func (*FriendDeletedTips) ProtoMessage() {} func (*FriendDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a718f3fde1e8b012, []int{33} + return fileDescriptor_ws_f46b8824c5dbc584, []int{33} } func (m *FriendDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendDeletedTips.Unmarshal(m, b) @@ -2352,7 +2352,7 @@ func (m *FriendDeletedTips) GetFromToUserID() *FromToUserID { } type BlackAddedTips struct { - FromToUserID *FromToUserID `protobuf:"bytes,1,opt,name=FromToUserID" json:"FromToUserID,omitempty"` + FromToUserID *FromToUserID `protobuf:"bytes,1,opt,name=fromToUserID" json:"fromToUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2362,7 +2362,7 @@ func (m *BlackAddedTips) Reset() { *m = BlackAddedTips{} } func (m *BlackAddedTips) String() string { return proto.CompactTextString(m) } func (*BlackAddedTips) ProtoMessage() {} func (*BlackAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a718f3fde1e8b012, []int{34} + return fileDescriptor_ws_f46b8824c5dbc584, []int{34} } func (m *BlackAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackAddedTips.Unmarshal(m, b) @@ -2390,7 +2390,7 @@ func (m *BlackAddedTips) GetFromToUserID() *FromToUserID { } type BlackDeletedTips struct { - FromToUserID *FromToUserID `protobuf:"bytes,1,opt,name=FromToUserID" json:"FromToUserID,omitempty"` + FromToUserID *FromToUserID `protobuf:"bytes,1,opt,name=fromToUserID" json:"fromToUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2400,7 +2400,7 @@ func (m *BlackDeletedTips) Reset() { *m = BlackDeletedTips{} } func (m *BlackDeletedTips) String() string { return proto.CompactTextString(m) } func (*BlackDeletedTips) ProtoMessage() {} func (*BlackDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a718f3fde1e8b012, []int{35} + return fileDescriptor_ws_f46b8824c5dbc584, []int{35} } func (m *BlackDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackDeletedTips.Unmarshal(m, b) @@ -2428,7 +2428,7 @@ func (m *BlackDeletedTips) GetFromToUserID() *FromToUserID { } type FriendInfoChangedTips struct { - FromToUserID *FromToUserID `protobuf:"bytes,1,opt,name=FromToUserID" json:"FromToUserID,omitempty"` + FromToUserID *FromToUserID `protobuf:"bytes,1,opt,name=fromToUserID" json:"fromToUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2438,7 +2438,7 @@ func (m *FriendInfoChangedTips) Reset() { *m = FriendInfoChangedTips{} } func (m *FriendInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*FriendInfoChangedTips) ProtoMessage() {} func (*FriendInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a718f3fde1e8b012, []int{36} + return fileDescriptor_ws_f46b8824c5dbc584, []int{36} } func (m *FriendInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfoChangedTips.Unmarshal(m, b) @@ -2467,7 +2467,7 @@ func (m *FriendInfoChangedTips) GetFromToUserID() *FromToUserID { // ////////////////////user///////////////////// type SelfInfoUpdatedTips struct { - UserID string `protobuf:"bytes,1,opt,name=UserID" json:"UserID,omitempty"` + UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2477,7 +2477,7 @@ func (m *SelfInfoUpdatedTips) Reset() { *m = SelfInfoUpdatedTips{} } func (m *SelfInfoUpdatedTips) String() string { return proto.CompactTextString(m) } func (*SelfInfoUpdatedTips) ProtoMessage() {} func (*SelfInfoUpdatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_a718f3fde1e8b012, []int{37} + return fileDescriptor_ws_f46b8824c5dbc584, []int{37} } func (m *SelfInfoUpdatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SelfInfoUpdatedTips.Unmarshal(m, b) @@ -2546,129 +2546,128 @@ func init() { proto.RegisterType((*SelfInfoUpdatedTips)(nil), "open_im_sdk.SelfInfoUpdatedTips") } -func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_a718f3fde1e8b012) } +func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_f46b8824c5dbc584) } -var fileDescriptor_ws_a718f3fde1e8b012 = []byte{ - // 1921 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x59, 0xcd, 0x8f, 0x1b, 0x49, - 0x15, 0x57, 0xb7, 0xc7, 0xf6, 0xf8, 0xd9, 0x33, 0x9e, 0x74, 0x92, 0xd9, 0x26, 0xac, 0x22, 0xd3, - 0x5a, 0xa1, 0x11, 0x82, 0xac, 0x94, 0x15, 0xd2, 0x12,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, 0xc3, 0x80, 0xff, 0x8b, 0x24, 0xdf, 0x02, 0xe7, 0x21, 0xcf, 0xfa, - 0xfe, 0xeb, 0x5d, 0x11, 0xf4, 0xc9, 0x24, 0xc6, 0xe7, 0xde, 0x21, 0xdc, 0x5c, 0x42, 0xd3, 0x99, - 0xe6, 0x9c, 0xf5, 0x16, 0xe7, 0x6c, 0xdd, 0x39, 0xef, 0x11, 0x74, 0x74, 0xd5, 0xb8, 0xc1, 0xc2, - 0x40, 0x25, 0xd3, 0x0e, 0x03, 0x67, 0x07, 0xd6, 0x22, 0xac, 0x04, 0x9b, 0x6c, 0xbe, 0x65, 0xd8, - 0xdc, 0x4f, 0x27, 0x07, 0x7e, 0xe6, 0x33, 0xe2, 0xf0, 0xe6, 0xd0, 0x45, 0x8b, 0x87, 0x5c, 0x04, - 0xfd, 0x74, 0x42, 0xc6, 0xf4, 0xa0, 0x3d, 0xe4, 0xc9, 0x39, 0xb9, 0x51, 0x9d, 0x50, 0x1a, 0x84, - 0x1c, 0xfb, 0x51, 0xc8, 0x45, 0x26, 0x39, 0x54, 0x35, 0x6a, 0x90, 0xac, 0x24, 0x11, 0x94, 0xc7, - 0x33, 0x55, 0x92, 0xa4, 0xbd, 0xbf, 0xd4, 0xa1, 0xa9, 0x8c, 0x90, 0x55, 0x25, 0x82, 0xaa, 0x12, - 0x25, 0x85, 0x78, 0xc2, 0x47, 0xe7, 0xd5, 0xac, 0x2b, 0x29, 0xac, 0x9b, 0x89, 0x3a, 0x39, 0xd4, - 0x64, 0xa4, 0x48, 0xb4, 0x69, 0xa4, 0xd9, 0xa4, 0xea, 0x50, 0x83, 0x90, 0x23, 0xd5, 0xfc, 0x52, - 0x33, 0x92, 0x06, 0x39, 0xdf, 0x81, 0xad, 0x94, 0xe6, 0xa9, 0xe3, 0xc8, 0xcf, 0xc6, 0x71, 0x32, - 0x55, 0xed, 0xb0, 0xce, 0x96, 0x70, 0x3c, 0x24, 0x25, 0x56, 0x4e, 0x71, 0xb2, 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, 0xa4, 0xd7, 0xb9, 0x0f, 0x96, 0xa5, 0x9f, 0xc1, 0x16, 0x09, 0xfc, - 0x80, 0x36, 0xfe, 0x1c, 0x6e, 0x57, 0x81, 0xd6, 0x9b, 0xe0, 0x35, 0xe5, 0x7e, 0x0f, 0x6e, 0x0e, - 0x79, 0x34, 0x46, 0xa9, 0xcf, 0x67, 0x41, 0x79, 0x8a, 0xbc, 0xe5, 0xe1, 0xf0, 0x65, 0x83, 0xfe, - 0xc0, 0xfa, 0xe2, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x65, 0x07, 0x6a, 0xb9, 0xd3, 0x1a, 0x00, - 0x00, +var fileDescriptor_ws_f46b8824c5dbc584 = []byte{ + // 1917 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x59, 0x4f, 0x6f, 0x1c, 0x49, + 0x15, 0x57, 0xf7, 0x4c, 0xcf, 0x78, 0xde, 0x8c, 0x3d, 0x4e, 0xe7, 0xcf, 0x36, 0x61, 0x15, 0x0d, + 0xad, 0x15, 0xb2, 0x10, 0x64, 0xa5, 0xac, 0x90, 0x96, 0xa0, 0x05, 0x62, 0x3b, 0xce, 0x26, 0xc4, + 0xb1, 0x69, 0x27, 0x70, 0xe0, 0x10, 0xb5, 0xa7, 0x6b, 0xc6, 0xcd, 0x74, 0x57, 0xcd, 0x74, 0x75, + 0x3b, 0xc9, 0x85, 0x33, 0x5f, 0x00, 0x2e, 0x2b, 0x10, 0x37, 0xc4, 0x95, 0x03, 0x7c, 0x21, 0xc4, + 0x01, 0x89, 0x13, 0xe2, 0x04, 0x07, 0x54, 0xaf, 0xaa, 0xbb, 0xab, 0x7a, 0xc6, 0x8e, 0xed, 0x44, + 0xb9, 0xec, 0x6d, 0xde, 0xaf, 0x5f, 0xbd, 0xff, 0xf5, 0xea, 0x55, 0x0d, 0x0c, 0x79, 0x34, 0x7b, + 0xf9, 0x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 0x31, 0xc1, 0x2a, 0x62, 0xcf, 0xdf, 0xcc, 0x89, + 0x37, 0x40, 0x01, 0x35, 0xe0, 0xff, 0xcd, 0x86, 0xeb, 0x18, 0xf7, 0x7d, 0x34, 0x60, 0xaf, 0x48, + 0x92, 0xb7, 0x64, 0xe0, 0x16, 0x74, 0x0a, 0xa9, 0x4e, 0x86, 0x5f, 0x51, 0x42, 0x4f, 0xc6, 0x12, + 0xf2, 0x94, 0x9c, 0x92, 0x04, 0x03, 0xef, 0x04, 0x35, 0xe0, 0xde, 0x86, 0xb5, 0x5f, 0xb1, 0x98, + 0x62, 0x4c, 0x44, 0xc4, 0x5b, 0x41, 0x45, 0x8b, 0x6f, 0x34, 0x1e, 0xcf, 0xa8, 0x48, 0xa9, 0x0c, + 0x77, 0x45, 0xeb, 0x99, 0xe8, 0x98, 0x99, 0xf8, 0x36, 0x6c, 0x84, 0xf3, 0xf9, 0x7e, 0x48, 0xa7, + 0x24, 0x93, 0x4a, 0xbb, 0xa8, 0xb4, 0x81, 0x8a, 0x7c, 0x08, 0x4d, 0x47, 0xac, 0xc8, 0xc6, 0x04, + 0xc3, 0xed, 0x04, 0x1a, 0x22, 0xe4, 0xb0, 0x39, 0xc9, 0xb4, 0x30, 0xca, 0xc8, 0x37, 0x50, 0x95, + 0x15, 0x28, 0xb3, 0xe2, 0xff, 0xc1, 0x82, 0x8d, 0xc3, 0xe2, 0x38, 0x89, 0xc7, 0xc8, 0x20, 0x82, + 0x56, 0x87, 0xc6, 0x32, 0x42, 0xa3, 0x3b, 0x68, 0x9f, 0xed, 0x60, 0xcb, 0x74, 0xf0, 0x16, 0x74, + 0xa6, 0x84, 0x46, 0x24, 0xc3, 0x80, 0x39, 0x81, 0xa2, 0x56, 0x38, 0xee, 0xac, 0x72, 0xdc, 0xff, + 0x9d, 0x0d, 0x6b, 0x1f, 0xd8, 0xb4, 0x11, 0xf4, 0xe7, 0x27, 0x8c, 0x92, 0x67, 0x85, 0x28, 0x26, + 0x95, 0x4c, 0x1d, 0x72, 0x6f, 0x80, 0x73, 0x1c, 0x67, 0xf9, 0x09, 0x66, 0x73, 0x3d, 0x90, 0x84, + 0x40, 0x49, 0x1a, 0xc6, 0x32, 0x85, 0xbd, 0x40, 0x12, 0x2a, 0xe2, 0x6b, 0xd5, 0x3e, 0x30, 0x77, + 0x56, 0x6f, 0x69, 0x67, 0x2d, 0x07, 0x06, 0x56, 0x06, 0xe6, 0xdf, 0x16, 0xc0, 0x5e, 0x16, 0x13, + 0x1a, 0x61, 0x68, 0x1a, 0x5b, 0xda, 0x5a, 0xde, 0xd2, 0xb7, 0xa0, 0x93, 0x91, 0x34, 0xcc, 0x66, + 0x65, 0xc9, 0x4b, 0xaa, 0x61, 0x50, 0x6b, 0xc9, 0xa0, 0xef, 0x03, 0x4c, 0x50, 0x8f, 0x90, 0x83, + 0xa1, 0xea, 0xdf, 0xbb, 0x79, 0x57, 0x6b, 0x7b, 0x77, 0xcb, 0xfc, 0x04, 0x1a, 0xa3, 0xd8, 0x49, + 0x61, 0x14, 0xa9, 0x82, 0x95, 0xb9, 0xad, 0x81, 0x15, 0xf5, 0xda, 0x39, 0xa7, 0x5e, 0xbb, 0x55, + 0xbd, 0xfe, 0xc3, 0x82, 0xde, 0x76, 0x12, 0x8e, 0x67, 0x17, 0x74, 0xda, 0x74, 0xce, 0x5e, 0x72, + 0xee, 0x01, 0xac, 0x1f, 0x0b, 0x71, 0xa5, 0x0b, 0xe8, 0x7f, 0xff, 0xde, 0x37, 0x0d, 0xff, 0xcc, + 0x0d, 0x12, 0x98, 0x2b, 0x4c, 0x47, 0xdb, 0x6f, 0x77, 0xd4, 0x39, 0xc7, 0xd1, 0x4e, 0xe5, 0xe8, + 0x6f, 0x6c, 0x18, 0x60, 0x4b, 0x0b, 0xc8, 0xa2, 0x20, 0x3c, 0x3f, 0xb3, 0xf6, 0xb5, 0x1e, 0x67, + 0x9b, 0x3d, 0xce, 0x87, 0xc1, 0x49, 0x48, 0xa3, 0x84, 0x04, 0x84, 0x17, 0x49, 0x5e, 0x9e, 0x23, + 0x3a, 0x26, 0x8b, 0x62, 0xb1, 0xcf, 0xa7, 0xea, 0x04, 0x51, 0x94, 0x70, 0x4a, 0xf2, 0x89, 0x4f, + 0xd2, 0xe2, 0x1a, 0x10, 0x3a, 0x33, 0xb2, 0xc0, 0x90, 0xca, 0x1d, 0x50, 0x92, 0xb5, 0x4e, 0xe5, + 0x6c, 0x57, 0xd7, 0x59, 0xe7, 0x44, 0xd2, 0x28, 0x40, 0x1e, 0x1d, 0x1a, 0xd2, 0x3c, 0x39, 0xfc, + 0xaf, 0x6c, 0x58, 0x97, 0x95, 0x5e, 0xc6, 0xe2, 0x8e, 0x28, 0x49, 0x96, 0x1a, 0x69, 0xd7, 0x10, + 0xd1, 0x0f, 0x72, 0xf6, 0x42, 0xef, 0xef, 0x15, 0xbd, 0x32, 0x2a, 0xce, 0x05, 0xa3, 0x62, 0x56, + 0x93, 0xb3, 0x54, 0x4d, 0x9f, 0xc0, 0xba, 0x94, 0x63, 0x16, 0xb5, 0x09, 0x9a, 0xb1, 0xed, 0x36, + 0x63, 0x7b, 0xd9, 0xe8, 0xfc, 0xcf, 0x02, 0xef, 0xb0, 0x48, 0x92, 0x7d, 0xc2, 0x79, 0x38, 0x25, + 0xdb, 0x6f, 0x8e, 0xc8, 0xe2, 0x69, 0xcc, 0xf3, 0x80, 0xf0, 0xb9, 0x48, 0x14, 0xc9, 0xb2, 0x1d, + 0x16, 0x11, 0x8c, 0x92, 0x13, 0x94, 0xa4, 0x70, 0x91, 0x64, 0x99, 0xb0, 0x40, 0x75, 0x03, 0x49, + 0x09, 0x3c, 0x0d, 0x5f, 0x1f, 0x91, 0x05, 0x06, 0xa6, 0x15, 0x28, 0x0a, 0xf1, 0x98, 0x0a, 0xbc, + 0xad, 0x70, 0xa4, 0xdc, 0x1f, 0xc3, 0x3a, 0x8f, 0xe9, 0x54, 0x26, 0x57, 0x16, 0x4b, 0x6b, 0xab, + 0x7f, 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 0xc9, 0x3d, 0x67, 0xf5, 0x6b, 0xc3, 0x55, 0xdf, 0x0a, 0xfc, 0x5f, 0xc2, 0xed, 0x25, + 0xc3, 0x1f, 0x44, 0x91, 0x0a, 0xf7, 0x17, 0x30, 0x98, 0x68, 0x9a, 0x54, 0xd4, 0xcd, 0x4b, 0x8d, + 0x6e, 0x4a, 0x60, 0xb0, 0xfb, 0x2f, 0xe1, 0xce, 0x92, 0x70, 0x33, 0x9f, 0xef, 0xa8, 0xe0, 0xf7, + 0x16, 0x0c, 0x95, 0x86, 0xca, 0xe6, 0x4f, 0xa1, 0x23, 0xdf, 0xe8, 0x94, 0xb0, 0x8f, 0x1a, 0xc2, + 0xca, 0xf7, 0xc4, 0x40, 0xb1, 0x2d, 0xef, 0x6b, 0x7b, 0xc5, 0xbe, 0x76, 0x3f, 0x6b, 0x6c, 0xb7, + 0x73, 0xcb, 0xbc, 0xdc, 0x69, 0x41, 0x59, 0x16, 0xbb, 0x24, 0x21, 0xf9, 0xfb, 0xf1, 0xf9, 0x00, + 0x36, 0xf0, 0x79, 0xf0, 0xbd, 0x65, 0xe9, 0x67, 0xb0, 0x89, 0x02, 0xdf, 0xa3, 0x8d, 0x3f, 0x87, + 0x9b, 0x75, 0xa0, 0xf5, 0x26, 0xf8, 0x8e, 0x72, 0xbf, 0x07, 0xd7, 0x8f, 0x48, 0x32, 0x11, 0x52, + 0x5f, 0xcc, 0xa3, 0xea, 0x14, 0x39, 0xe3, 0x81, 0xe2, 0xb8, 0x83, 0x7f, 0x60, 0x7d, 0xf6, 0xff, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x5a, 0xf7, 0xb0, 0x0f, 0xd3, 0x1a, 0x00, 0x00, } diff --git a/pkg/proto/sdk_ws/ws.proto b/pkg/proto/sdk_ws/ws.proto index 2ef641334..bd3729e85 100644 --- a/pkg/proto/sdk_ws/ws.proto +++ b/pkg/proto/sdk_ws/ws.proto @@ -6,96 +6,96 @@ package open_im_sdk;//The package name to which the proto file belongs message GroupInfo{ - string GroupID = 1; - string GroupName = 2; - string Notification = 3; - string Introduction = 4; - string FaceUrl = 5; - string OwnerUserID = 6; - uint32 CreateTime = 7; - uint32 MemberCount = 8; - string Ex = 9; - int32 Status = 10; - string CreatorUserID = 11; - int32 GroupType = 12; + string groupID = 1; + string groupName = 2; + string notification = 3; + string introduction = 4; + string faceURL = 5; + string ownerUserID = 6; + uint32 createTime = 7; + uint32 memberCount = 8; + string ex = 9; + int32 status = 10; + string creatorUserID = 11; + int32 groupType = 12; } message GroupMemberFullInfo { - string GroupID = 1 ; - string UserID = 2 ; + string groupID = 1 ; + string userID = 2 ; int32 roleLevel = 3; - int64 JoinTime = 4; - string Nickname = 5; - string FaceUrl = 6; - int32 AppMangerLevel = 7; //if >0 - int32 JoinSource = 8; - string OperatorUserID = 9; - string Ex = 10; + int64 joinTime = 4; + string nickname = 5; + string faceURL = 6; + int32 appMangerLevel = 7; //if >0 + int32 joinSource = 8; + string operatorUserID = 9; + string ex = 10; } message PublicUserInfo{ - string UserID = 1; - string Nickname = 2; - string FaceUrl = 3; - int32 Gender = 4; - int32 AppMangerLevel = 5; //if >0 + string userID = 1; + string nickname = 2; + string faceURL = 3; + int32 gender = 4; + int32 appMangerLevel = 5; //if >0 } message UserInfo{ - string UserID = 1; - string Nickname = 2; - string FaceUrl = 3; - int32 Gender = 4; - string PhoneNumber = 5; - uint32 Birth = 6; - string Email = 7; - string Ex = 8; - uint32 CreateTime = 9; - int32 AppMangerLevel = 10; + string userID = 1; + string nickname = 2; + string faceURL = 3; + int32 gender = 4; + string phoneNumber = 5; + uint32 birth = 6; + string email = 7; + string ex = 8; + uint32 createTime = 9; + int32 appMangerLevel = 10; } message FriendInfo{ - string OwnerUserID = 1; - string Remark = 2; - uint32 CreateTime = 3; - UserInfo FriendUser = 4; - int32 AddSource = 5; - string OperatorUserID = 6; - string Ex = 7; + string ownerUserID = 1; + string remark = 2; + uint32 createTime = 3; + UserInfo friendUser = 4; + int32 addSource = 5; + string operatorUserID = 6; + string ex = 7; } message BlackInfo{ - string OwnerUserID = 1; - uint32 CreateTime = 2; - PublicUserInfo BlackUserInfo = 3; - int32 AddSource = 4; - string OperatorUserID = 5; - string Ex = 6; + string ownerUserID = 1; + uint32 createTime = 2; + PublicUserInfo blackUserInfo = 3; + int32 addSource = 4; + string operatorUserID = 5; + string ex = 6; } message GroupRequest{ - string UserID = 1; - string GroupID = 2; - string HandleResult = 3; - string ReqMsg = 4; - string HandleMsg = 5; - uint32 ReqTime = 6; - string HandleUserID = 7; - uint32 HandleTime = 8; - string Ex = 9; + string userID = 1; + string groupID = 2; + string handleResult = 3; + string reqMsg = 4; + string handleMsg = 5; + uint32 reqTime = 6; + string handleUserID = 7; + uint32 handleTime = 8; + string ex = 9; } message FriendRequest{ - string FromUserID = 1; - string ToUserID = 2; - int32 HandleResult = 3; - string ReqMsg = 4; - uint32 CreateTime = 5; - string HandlerUserID = 6; - string HandleMsg = 7; - uint32 HandleTime = 8; - string Ex = 9; + string fromUserID = 1; + string toUserID = 2; + int32 handleResult = 3; + string reqMsg = 4; + uint32 createTime = 5; + string handlerUserID = 6; + string handleMsg = 7; + uint32 handleTime = 8; + string ex = 9; } ///////////////////////////////////base end///////////////////////////////////// @@ -169,8 +169,8 @@ message GatherFormat{ message UserSendMsgResp { - string ServerMsgID = 1; - string ClientMsgID = 2; + string serverMsgID = 1; + string clientMsgID = 2; int64 sendTime = 3; } @@ -191,14 +191,14 @@ message MsgData { int64 seq = 14; int64 sendTime = 15; int64 createTime = 16; - map Options = 17; + map options = 17; OfflinePushInfo offlinePushInfo = 18; } message OfflinePushInfo{ - string Title = 1; - string Desc = 2; - string Ex = 3; + string title = 1; + string desc = 2; + string ex = 3; string iOSPushSound = 4; bool iOSBadgeCount = 5; } @@ -212,71 +212,71 @@ message OfflinePushInfo{ message TipsComm{ - bytes Detail = 1; - string DefaultTips = 2; + bytes detail = 1; + string defaultTips = 2; } //////////////////////group///////////////////// //Actively join the group message MemberEnterTips{ - GroupInfo Group = 1; - GroupMemberFullInfo EntrantUser = 2; - int64 OperationTime = 3; + GroupInfo group = 1; + GroupMemberFullInfo entrantUser = 2; + int64 operationTime = 3; } //Actively leave the group message MemberLeaveTips{ - GroupInfo Group = 1; - GroupMemberFullInfo LeaverUser = 2; - int64 OperationTime = 3; + GroupInfo group = 1; + GroupMemberFullInfo leaverUser = 2; + int64 operationTime = 3; } message MemberInvitedTips{ - GroupInfo Group = 1; - GroupMemberFullInfo OpUser = 2; - repeated GroupMemberFullInfo InvitedUserList = 3; - int64 OperationTime = 4; + GroupInfo group = 1; + GroupMemberFullInfo opUser = 2; + repeated GroupMemberFullInfo invitedUserList = 3; + int64 operationTime = 4; } message MemberKickedTips{ - GroupInfo Group = 1; - GroupMemberFullInfo OpUser = 2; - repeated GroupMemberFullInfo KickedUserList = 3; - int64 OperationTime = 4; + GroupInfo group = 1; + GroupMemberFullInfo opUser = 2; + repeated GroupMemberFullInfo kickedUserList = 3; + int64 operationTime = 4; } message MemberInfoChangedTips{ - int32 ChangeType = 1; ///bitwise operators 0001:member info changed; 0010:mute ; - GroupMemberFullInfo OpUser = 2; //who do this - GroupMemberFullInfo FinalInfo = 3; // - int64 MuteTime = 4; - GroupInfo Group = 5; + int32 changeType = 1; ///bitwise operators 0001:member info changed; 0010:mute ; + GroupMemberFullInfo opUser = 2; //who do this + GroupMemberFullInfo finalInfo = 3; // + int64 muteTime = 4; + GroupInfo group = 5; } message GroupCreatedTips{ - GroupInfo Group = 1; - GroupMemberFullInfo Creator = 2; - repeated GroupMemberFullInfo MemberList = 3; - int64 OperationTime = 4; + GroupInfo group = 1; + GroupMemberFullInfo creator = 2; + repeated GroupMemberFullInfo memberList = 3; + int64 operationTime = 4; } message GroupInfoChangedTips{ - int32 ChangedType = 1; //bitwise operators: 0001:groupName; 0010:Notification 0100:Introduction; 1000:FaceUrl - GroupInfo Group = 2; - GroupMemberFullInfo OpUser = 3; + int32 changedType = 1; //bitwise operators: 0001:groupName; 0010:Notification 0100:Introduction; 1000:FaceUrl + GroupInfo group = 2; + GroupMemberFullInfo opUser = 3; } message JoinGroupApplicationTips{ - GroupInfo Group = 1; - PublicUserInfo Applicant = 2; - string Reason = 3; + GroupInfo group = 1; + PublicUserInfo applicant = 2; + string reason = 3; } message ApplicationProcessedTips{ - GroupInfo Group = 1; - GroupMemberFullInfo OpUser = 2; - int32 Result = 3; - string Reason = 4; + GroupInfo group = 1; + GroupMemberFullInfo opUser = 2; + int32 result = 3; + string reason = 4; } //////////////////////friend///////////////////// @@ -288,53 +288,53 @@ message ApplicationProcessedTips{ //} message FriendApplication{ - int64 AddTime = 1; - string AddSource = 2; - string AddWording = 3; + int64 addTime = 1; + string addSource = 2; + string addWording = 3; } message FromToUserID{ - string FromUserID = 1; - string ToUserID = 2; + string fromUserID = 1; + string toUserID = 2; } //FromUserID apply to add ToUserID message FriendApplicationAddedTips{ - FromToUserID FromToUserID = 1; + FromToUserID fromToUserID = 1; } //FromUserID accept or reject ToUserID message FriendApplicationProcessedTips{ - FromToUserID FromToUserID = 1; + FromToUserID fromToUserID = 1; } // FromUserID Added a friend ToUserID message FriendAddedTips{ - FriendInfo Friend = 1; - int64 OperationTime = 2; - PublicUserInfo OpUser = 3; //who do this + FriendInfo friend = 1; + int64 operationTime = 2; + PublicUserInfo opUser = 3; //who do this } // FromUserID deleted a friend ToUserID message FriendDeletedTips{ - FromToUserID FromToUserID = 1; + FromToUserID fromToUserID = 1; } message BlackAddedTips{ - FromToUserID FromToUserID = 1; + FromToUserID fromToUserID = 1; } message BlackDeletedTips{ - FromToUserID FromToUserID = 1; + FromToUserID fromToUserID = 1; } message FriendInfoChangedTips{ - FromToUserID FromToUserID = 1; + FromToUserID fromToUserID = 1; } //////////////////////user///////////////////// message SelfInfoUpdatedTips{ - string UserID = 1; + string userID = 1; } From 6bc69d5a75f0baf3bbedb6a3409eb2d0bdd6d1f3 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Fri, 14 Jan 2022 09:59:25 +0800 Subject: [PATCH 272/337] proto json tag modify --- cmd/open_im_timer_task/main.go | 2 +- internal/api/user/user.go | 2 +- internal/rpc/group/group.go | 2 +- .../im_mysql_msg_model/receive_model.go | 19 ------------------- 4 files changed, 3 insertions(+), 22 deletions(-) delete mode 100644 pkg/common/db/mysql_model/im_mysql_msg_model/receive_model.go diff --git a/cmd/open_im_timer_task/main.go b/cmd/open_im_timer_task/main.go index 56fd6a4c0..954c41ae6 100644 --- a/cmd/open_im_timer_task/main.go +++ b/cmd/open_im_timer_task/main.go @@ -40,7 +40,7 @@ func main() { // } //} for { - uidList, err := im_mysql_model.SelectAllUID() + uidList, err := im_mysql_model.SelectAllUserID() if err != nil { //log.NewError("999999", err.Error()) } else { diff --git a/internal/api/user/user.go b/internal/api/user/user.go index d249486e6..c57eeb88d 100644 --- a/internal/api/user/user.go +++ b/internal/api/user/user.go @@ -45,7 +45,7 @@ func GetUsersInfo(c *gin.Context) { var publicUserInfoList []*open_im_sdk.PublicUserInfo for _, v := range RpcResp.UserInfoList { publicUserInfoList = append(publicUserInfoList, - &open_im_sdk.PublicUserInfo{UserID: v.UserID, Nickname: v.Nickname, FaceUrl: v.FaceUrl, Gender: v.Gender, AppMangerLevel: v.AppMangerLevel}) + &open_im_sdk.PublicUserInfo{UserID: v.UserID, Nickname: v.Nickname, FaceURL: v.FaceURL, Gender: v.Gender, AppMangerLevel: v.AppMangerLevel}) } resp := api.GetUsersInfoResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, UserInfoList: publicUserInfoList} diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 210c997b5..3ba8d5eea 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -573,7 +573,7 @@ func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInf if group.Introduction != req.GroupInfo.Introduction && req.GroupInfo.Introduction != "" { changedType = changedType | (1 << 2) } - if group.FaceUrl != req.GroupInfo.FaceUrl && req.GroupInfo.FaceUrl != "" { + if group.FaceUrl != req.GroupInfo.FaceURL && req.GroupInfo.FaceURL != "" { changedType = changedType | (1 << 3) } //only administrators can set group information diff --git a/pkg/common/db/mysql_model/im_mysql_msg_model/receive_model.go b/pkg/common/db/mysql_model/im_mysql_msg_model/receive_model.go deleted file mode 100644 index 48d5f6c4d..000000000 --- a/pkg/common/db/mysql_model/im_mysql_msg_model/receive_model.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -** description(""). -** copyright('tuoyun,www.tuoyun.net'). -** author("fg,Gordon@tuoyun.net"). -** time(2021/3/4 11:18). - */ -package im_mysql_msg_model - -import ( - "time" -) - -// Receive Inbox table structure -type Receive struct { - UserId string `gorm:"primary_key"` // 收件箱主键ID - Seq int64 `gorm:"primary_key"` // 收件箱主键ID - MsgId string - CreateTime *time.Time -} From 3d994cc2cf2b414758e6fde6a8fa2ac5586eaf42 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Fri, 14 Jan 2022 13:44:46 +0800 Subject: [PATCH 273/337] Refactor code --- config/config.yaml | 13 +- internal/rpc/group/group.go | 10 +- internal/rpc/msg/friend_notification.go | 254 ++++++++ internal/rpc/msg/group_notification.go | 359 ++++++++++ internal/rpc/msg/notification.go | 616 ------------------ internal/rpc/msg/send_msg.go | 2 +- .../im_mysql_model/group_member_model.go | 9 +- pkg/common/utils/utils.go | 28 +- pkg/utils/strings.go | 2 - 9 files changed, 653 insertions(+), 640 deletions(-) create mode 100644 internal/rpc/msg/friend_notification.go create mode 100644 internal/rpc/msg/group_notification.go delete mode 100644 internal/rpc/msg/notification.go diff --git a/config/config.yaml b/config/config.yaml index 84728c201..8658ecfd5 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -178,28 +178,29 @@ iOSPush: notification: groupCreated: conversation: - conversationChanged: true + type: 1 unreadCount: true offlinePush: switch: true - title: "create group title" + title: "create group title" # xx create the group desc: "create group desc" ext: "create group ext" defaultTips: tips: "create the group" # xx create the group + groupInfoChanged: conversation: - conversationChanged: true - unreadCount: true + type: 1 + unreadCount: false offlinePush: - switch: true + switch: false title: "group info changed title" desc: "group info changed desc" ext: "group info changed ext" defaultTips: tips: "group info changed by" # group info changed by xx - conversationChanged: 0 + #---------------demo configuration---------------------# diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 210c997b5..8fb541749 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -143,7 +143,13 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR } chat.GroupCreatedNotification(req.OperationID, req.OpUserID, req.OwnerUserID, groupId, okUserIDList) utils.CopyStructFields(resp.GroupInfo, group) - resp.GroupInfo.MemberCount = imdb.GetGroupMemberNumByGroupID(groupId) + resp.GroupInfo.MemberCount, err = imdb.GetGroupMemberNumByGroupID(groupId) + if err != nil { + log.NewError(req.OperationID, "GetGroupMemberNumByGroupID failed ", err.Error(), groupId) + resp.ErrCode = constant.ErrDB.ErrCode + resp.ErrMsg = constant.ErrDB.ErrMsg + return resp, nil + } resp.GroupInfo.OwnerUserID = req.OwnerUserID log.NewInfo(req.OperationID, "rpc CreateGroup return ", resp.String()) @@ -166,7 +172,7 @@ func (s *groupServer) GetJoinedGroupList(ctx context.Context, req *pbGroup.GetJo var resp pbGroup.GetJoinedGroupListResp for _, v := range joinedGroupList { var groupNode open_im_sdk.GroupInfo - num := imdb.GetGroupMemberNumByGroupID(v) + num, err := imdb.GetGroupMemberNumByGroupID(v) owner, err2 := imdb.GetGroupOwnerInfoByGroupID(v) group, err := imdb.GetGroupInfoByGroupID(v) if num > 0 && owner != nil && err2 == nil && group != nil && err == nil { diff --git a/internal/rpc/msg/friend_notification.go b/internal/rpc/msg/friend_notification.go new file mode 100644 index 000000000..df71e919f --- /dev/null +++ b/internal/rpc/msg/friend_notification.go @@ -0,0 +1,254 @@ +package msg + +import ( + "Open_IM/pkg/common/constant" + imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" + "Open_IM/pkg/common/log" + pbFriend "Open_IM/pkg/proto/friend" + open_im_sdk "Open_IM/pkg/proto/sdk_ws" + "Open_IM/pkg/utils" + "encoding/json" +) + +//message MemberInfoChangedTips{ +// int32 ChangeType = 1; //1:info changed; 2:mute +// GroupMemberFullInfo OpUser = 2; //who do this +// GroupMemberFullInfo FinalInfo = 3; // +// uint64 MuteTime = 4; +// GroupInfo Group = 5; +//} +//func MemberInfoChangedNotification(operationID string, group *immysql.Group, opUser *immysql.GroupMember, userFinalInfo *immysql.GroupMember) { + +//} + +//message FriendApplicationAddedTips{ +// PublicUserInfo OpUser = 1; //user1 +// FriendApplication Application = 2; +// PublicUserInfo OpedUser = 3; //user2 +//} + +func getFromToUserNickname(fromUserID, toUserID string) (string, string) { + from, err1 := imdb.GetUserByUserID(fromUserID) + to, err2 := imdb.GetUserByUserID(toUserID) + if err1 != nil || err2 != nil { + log.NewError("FindUserByUID failed ", err1, err2, fromUserID, toUserID) + } + fromNickname, toNickname := "", "" + if from != nil { + fromNickname = from.Nickname + } + if to != nil { + toNickname = to.Nickname + } + return fromNickname, toNickname +} + +func FriendApplicationAddedNotification(req *pbFriend.AddFriendReq) { + var n NotificationMsg + n.SendID = req.CommID.FromUserID + n.RecvID = req.CommID.ToUserID + n.ContentType = constant.FriendApplicationAddedNotification + n.SessionType = constant.SingleChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = req.CommID.OperationID + + var FriendApplicationAddedTips open_im_sdk.FriendApplicationAddedTips + FriendApplicationAddedTips.FromToUserID.FromUserID = req.CommID.FromUserID + FriendApplicationAddedTips.FromToUserID.ToUserID = req.CommID.ToUserID + fromUserNickname, toUserNickname := getFromToUserNickname(req.CommID.OperationID, req.CommID.FromUserID, req.CommID.ToUserID) + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(FriendApplicationAddedTips) + tips.DefaultTips = fromUserNickname + " FriendApplicationAddedNotification " + toUserNickname + n.Content, _ = json.Marshal(tips) + Notification(&n, true) +} + +func FriendApplicationProcessedNotification(req *pbFriend.AddFriendResponseReq) { + var n NotificationMsg + n.SendID = req.CommID.FromUserID + n.RecvID = req.CommID.ToUserID + n.ContentType = constant.FriendApplicationProcessedNotification + n.SessionType = constant.SingleChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = req.CommID.OperationID + + var FriendApplicationProcessedTips open_im_sdk.FriendApplicationProcessedTips + FriendApplicationProcessedTips.FromToUserID.FromUserID = req.CommID.FromUserID + FriendApplicationProcessedTips.FromToUserID.ToUserID = req.CommID.ToUserID + fromUserNickname, toUserNickname := getFromToUserNickname(req.CommID.OperationID, req.CommID.FromUserID, req.CommID.ToUserID) + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(FriendApplicationProcessedTips) + tips.DefaultTips = fromUserNickname + " FriendApplicationProcessedNotification " + toUserNickname + n.Content, _ = json.Marshal(tips) + Notification(&n) +} + +func FriendAddedNotification(operationID, opUserID, fromUserID, toUserID string) { + var n NotificationMsg + n.SendID = fromUserID + n.RecvID = toUserID + n.ContentType = constant.FriendAddedNotification + n.SessionType = constant.SingleChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = operationID + + var FriendAddedTips open_im_sdk.FriendAddedTips + + user, err := imdb.GetUserByUserID(opUserID) + if err != nil { + log.NewError(operationID, "FindUserByUID failed ", err.Error(), opUserID) + + } else { + utils.CopyStructFields(FriendAddedTips.OpUser, user) + } + + friend, err := imdb.GetFriendRelationshipFromFriend(fromUserID, toUserID) + if err != nil { + log.NewError(operationID, "FindUserByUID failed ", err.Error(), fromUserID, toUserID) + } else { + FriendAddedTips.Friend.Remark = friend.Remark + } + + from, err := imdb.GetUserByUserID(fromUserID) + if err != nil { + log.NewError(operationID, "FindUserByUID failed ", err.Error(), fromUserID) + + } else { + utils.CopyStructFields(FriendAddedTips.Friend, from) + } + + to, err := imdb.GetUserByUserID(toUserID) + if err != nil { + log.NewError(operationID, "FindUserByUID failed ", err.Error(), toUserID) + + } else { + utils.CopyStructFields(FriendAddedTips.Friend.FriendUser, to) + } + + fromUserNickname, toUserNickname := from.Nickname, to.Nickname + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(FriendAddedTips) + tips.DefaultTips = fromUserNickname + " FriendAddedNotification " + toUserNickname + n.Content, _ = json.Marshal(tips) + Notification(&n) +} + +//message FriendDeletedTips{ +// FriendInfo Friend = 1; +//} +func FriendDeletedNotification(req *pbFriend.DeleteFriendReq) { + var n NotificationMsg + n.SendID = req.CommID.FromUserID + n.RecvID = req.CommID.ToUserID + n.ContentType = constant.FriendDeletedNotification + n.SessionType = constant.SingleChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = req.CommID.OperationID + + var FriendDeletedTips open_im_sdk.FriendDeletedTips + FriendDeletedTips.FromToUserID.FromUserID = req.CommID.FromUserID + FriendDeletedTips.FromToUserID.ToUserID = req.CommID.ToUserID + fromUserNickname, toUserNickname := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(FriendDeletedTips) + tips.DefaultTips = fromUserNickname + " FriendDeletedNotification " + toUserNickname + n.Content, _ = json.Marshal(tips) + Notification(&n) +} + +//message FriendInfoChangedTips{ +// FriendInfo Friend = 1; +// PublicUserInfo OpUser = 2; +// uint64 OperationTime = 3; +//} +func FriendInfoChangedNotification(operationID, opUserID, fromUserID, toUserID string) { + var n NotificationMsg + n.SendID = fromUserID + n.RecvID = toUserID + n.ContentType = constant.FriendInfoChangedNotification + n.SessionType = constant.SingleChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = operationID + + var FriendInfoChangedTips open_im_sdk.FriendInfoChangedTips + FriendInfoChangedTips.FromToUserID.FromUserID = fromUserID + FriendInfoChangedTips.FromToUserID.ToUserID = toUserID + fromUserNickname, toUserNickname := getFromToUserNickname(fromUserID, toUserID) + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(FriendInfoChangedTips) + tips.DefaultTips = fromUserNickname + " FriendDeletedNotification " + toUserNickname + n.Content, _ = json.Marshal(tips) + Notification(&n) +} + +func BlackAddedNotification(req *pbFriend.AddBlacklistReq) { + var n NotificationMsg + n.SendID = req.CommID.FromUserID + n.RecvID = req.CommID.ToUserID + n.ContentType = constant.BlackAddedNotification + n.SessionType = constant.SingleChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = req.CommID.OperationID + + var BlackAddedTips open_im_sdk.BlackAddedTips + BlackAddedTips.FromToUserID.FromUserID = req.CommID.FromUserID + BlackAddedTips.FromToUserID.ToUserID = req.CommID.ToUserID + fromUserNickname, toUserNickname := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(BlackAddedTips) + tips.DefaultTips = fromUserNickname + " BlackAddedNotification " + toUserNickname + n.Content, _ = json.Marshal(tips) + Notification(&n) +} + +//message BlackDeletedTips{ +// BlackInfo Black = 1; +//} +func BlackDeletedNotification(req *pbFriend.RemoveBlacklistReq) { + var n NotificationMsg + n.SendID = req.CommID.FromUserID + n.RecvID = req.CommID.ToUserID + n.ContentType = constant.BlackDeletedNotification + n.SessionType = constant.SingleChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = req.CommID.OperationID + + var BlackDeletedTips open_im_sdk.BlackDeletedTips + BlackDeletedTips.FromToUserID.FromUserID = req.CommID.FromUserID + BlackDeletedTips.FromToUserID.ToUserID = req.CommID.ToUserID + fromUserNickname, toUserNickname := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(BlackDeletedTips) + tips.DefaultTips = fromUserNickname + " BlackDeletedNotification " + toUserNickname + n.Content, _ = json.Marshal(tips) + Notification(&n) +} + +//message SelfInfoUpdatedTips{ +// UserInfo SelfUserInfo = 1; +// PublicUserInfo OpUser = 2; +// uint64 OperationTime = 3; +//} +func SelfInfoUpdatedNotification(operationID, userID string) { + var n NotificationMsg + n.SendID = userID + n.RecvID = userID + n.ContentType = constant.SelfInfoUpdatedNotification + n.SessionType = constant.SingleChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = operationID + + var SelfInfoUpdatedTips open_im_sdk.SelfInfoUpdatedTips + SelfInfoUpdatedTips.UserID = userID + + var tips open_im_sdk.TipsComm + u, err := imdb.GetUserByUserID(userID) + if err != nil { + log.NewError(operationID, "FindUserByUID failed ", err.Error(), userID) + } + + tips.Detail, _ = json.Marshal(SelfInfoUpdatedTips) + tips.DefaultTips = u.Nickname + " SelfInfoUpdatedNotification " + n.Content, _ = json.Marshal(tips) + Notification(&n) +} diff --git a/internal/rpc/msg/group_notification.go b/internal/rpc/msg/group_notification.go new file mode 100644 index 000000000..1d1af7d44 --- /dev/null +++ b/internal/rpc/msg/group_notification.go @@ -0,0 +1,359 @@ +package msg + +import ( + "Open_IM/pkg/common/constant" + imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" + "Open_IM/pkg/common/log" + "Open_IM/pkg/common/token_verify" + utils2 "Open_IM/pkg/common/utils" + pbGroup "Open_IM/pkg/proto/group" + open_im_sdk "Open_IM/pkg/proto/sdk_ws" + "Open_IM/pkg/utils" + "encoding/json" +) + +//message GroupCreatedTips{ +// GroupInfo Group = 1; +// GroupMemberFullInfo Creator = 2; +// repeated GroupMemberFullInfo MemberList = 3; +// uint64 OperationTime = 4; +//} creator->group + +func setOpUserInfo(opUserID, groupID string, groupMemberInfo *open_im_sdk.GroupMemberFullInfo) error { + if token_verify.IsMangerUserID(opUserID) { + u, err := imdb.GetUserByUserID(opUserID) + if err != nil { + return utils.Wrap(err, "GetUserByUserID failed") + } + utils.CopyStructFields(groupMemberInfo, u) + groupMemberInfo.AppMangerLevel = 1 + } else { + u, err := imdb.GetGroupMemberInfoByGroupIDAndUserID(groupID, opUserID) + if err != nil { + return utils.Wrap(err, "GetGroupMemberInfoByGroupIDAndUserID failed") + } + utils.CopyStructFields(groupMemberInfo, u) + } + return nil +} + +func setGroupInfo(groupID string, groupInfo *open_im_sdk.GroupInfo) error { + group, err := imdb.GetGroupInfoByGroupID(groupID) + if err != nil { + return utils.Wrap(err, "GetGroupInfoByGroupID failed") + } + err = utils2.GroupDBCopyOpenIM(groupInfo, group) + if err != nil { + return utils.Wrap(err, "GetGroupMemberNumByGroupID failed") + } + return nil +} + +func setGroupMemberInfo(groupID, userID string, groupMemberInfo *open_im_sdk.GroupMemberFullInfo) error { + groupMember, err := imdb.GetGroupMemberInfoByGroupIDAndUserID(groupID, userID) + if err != nil { + return utils.Wrap(err, "") + } + if err = utils2.GroupMemberDBCopyOpenIM(groupMemberInfo, groupMember); err != nil { + return utils.Wrap(err, "") + } + return nil +} + +//func setGroupPublicUserInfo(operationID, groupID, userID string, publicUserInfo *open_im_sdk.PublicUserInfo) { +// group, err := imdb.GetGroupMemberInfoByGroupIDAndUserID(groupID, userID) +// if err != nil { +// log.NewError(operationID, "FindGroupMemberInfoByGroupIdAndUserId failed ", err.Error(), groupID, userID) +// return +// } +// utils.CopyStructFields(publicUserInfo, group) +//} + +//创建群后调用 +func GroupCreatedNotification(operationID, opUserID, OwnerUserID, groupID string, initMemberList []string) { + var n NotificationMsg + n.SendID = opUserID + n.RecvID = groupID + n.ContentType = constant.GroupCreatedNotification + n.SessionType = constant.GroupChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = operationID + + GroupCreatedTips := open_im_sdk.GroupCreatedTips{Group: &open_im_sdk.GroupInfo{}, + Creator: &open_im_sdk.GroupMemberFullInfo{}} + if err := setOpUserInfo(GroupCreatedTips.Creator.UserID, groupID, GroupCreatedTips.Creator); err != nil { + log.NewError(operationID, "setOpUserInfo failed ", err.Error(), GroupCreatedTips.Creator.UserID, groupID, GroupCreatedTips.Creator) + } + err := setGroupInfo(groupID, GroupCreatedTips.Group) + if err != nil { + log.NewError(operationID, "setGroupInfo failed ", groupID, GroupCreatedTips.Group) + return + } + for _, v := range initMemberList { + var groupMemberInfo open_im_sdk.GroupMemberFullInfo + setGroupMemberInfo(groupID, v, &groupMemberInfo) + GroupCreatedTips.MemberList = append(GroupCreatedTips.MemberList, &groupMemberInfo) + } + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(GroupCreatedTips) + tips.DefaultTips = config.Config.Notification.GroupCreated.DefaultTips.Tips + n.Content, _ = json.Marshal(tips) + log.NewInfo(operationID, "Notification ", n) + Notification(&n) +} + +//message ReceiveJoinApplicationTips{ +// GroupInfo Group = 1; +// PublicUserInfo Applicant = 2; +// string Reason = 3; +//} apply->all managers GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` +// ReqMessage string `protobuf:"bytes,2,opt,name=ReqMessage" json:"ReqMessage,omitempty"` +// OpUserID string `protobuf:"bytes,3,opt,name=OpUserID" json:"OpUserID,omitempty"` +// OperationID string `protobuf:"bytes,4,opt,name=OperationID" json:"OperationID,omitempty"` +//申请进群后调用 +func JoinApplicationNotification(req *pbGroup.JoinGroupReq) { + var n NotificationMsg + n.SendID = req.OpUserID + n.ContentType = constant.JoinApplicationNotification + n.SessionType = constant.SingleChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = req.OperationID + + JoinGroupApplicationTips := open_im_sdk.JoinGroupApplicationTips{Group: &open_im_sdk.GroupInfo{}, Applicant: &open_im_sdk.PublicUserInfo{}} + err := setGroupInfo(req.GroupID, JoinGroupApplicationTips.Group) + if err != nil { + log.NewError(req.OperationID, "setGroupInfo failed ", err.Error(), req.GroupID, JoinGroupApplicationTips.Group) + return + } + + apply, err := imdb.GetUserByUserID(req.OpUserID) + if err != nil { + log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), req.OpUserID) + return + } + utils.CopyStructFields(JoinGroupApplicationTips.Applicant, apply) + JoinGroupApplicationTips.Reason = req.ReqMessage + + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(JoinGroupApplicationTips) + tips.DefaultTips = "JoinGroupApplicationTips" + n.Content, _ = json.Marshal(tips) + managerList, err := imdb.GetOwnerManagerByGroupID(req.GroupID) + if err != nil { + log.NewError(req.OperationID, "GetOwnerManagerByGroupId failed ", err.Error(), req.GroupID) + return + } + for _, v := range managerList { + n.RecvID = v.UserID + log.NewInfo(req.OperationID, "Notification ", n) + Notification(&n) + } +} + +//message ApplicationProcessedTips{ +// GroupInfo Group = 1; +// GroupMemberFullInfo OpUser = 2; +// int32 Result = 3; +// string Reason = 4; +//} +//处理进群请求后调用 +func ApplicationProcessedNotification(req *pbGroup.GroupApplicationResponseReq) { + var n NotificationMsg + n.SendID = req.OpUserID + n.ContentType = constant.ApplicationProcessedNotification + n.SessionType = constant.SingleChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = req.OperationID + n.RecvID = req.FromUserID + ApplicationProcessedTips := open_im_sdk.ApplicationProcessedTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}} + setGroupInfo(req.GroupID, ApplicationProcessedTips.Group) + setOpUserInfo(req.OpUserID, req.GroupID, ApplicationProcessedTips.OpUser) + ApplicationProcessedTips.Reason = req.HandledMsg + ApplicationProcessedTips.Result = req.HandleResult + + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(ApplicationProcessedTips) + tips.DefaultTips = "ApplicationProcessedNotification" + n.Content, _ = json.Marshal(tips) + + Notification(&n) +} + +//message MemberInvitedTips{ +// GroupInfo Group = 1; +// GroupMemberFullInfo OpUser = 2; +// GroupMemberFullInfo InvitedUser = 3; +// uint64 OperationTime = 4; +//} +//被邀请进群后调用 +func MemberInvitedNotification(operationID, groupID, opUserID, reason string, invitedUserIDList []string) { + var n NotificationMsg + n.SendID = opUserID + n.ContentType = constant.MemberInvitedNotification + n.SessionType = constant.GroupChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = operationID + + ApplicationProcessedTips := open_im_sdk.MemberInvitedTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}} + setGroupInfo(groupID, ApplicationProcessedTips.Group) + setOpUserInfo(opUserID, groupID, ApplicationProcessedTips.OpUser) + for _, v := range invitedUserIDList { + var groupMemberInfo open_im_sdk.GroupMemberFullInfo + setGroupMemberInfo(groupID, v, &groupMemberInfo) + ApplicationProcessedTips.InvitedUserList = append(ApplicationProcessedTips.InvitedUserList, &groupMemberInfo) + } + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(ApplicationProcessedTips) + tips.DefaultTips = "MemberInvitedNotification" + n.Content, _ = json.Marshal(tips) + n.RecvID = groupID + Notification(&n) +} + +//message MemberKickedTips{ +// GroupInfo Group = 1; +// GroupMemberFullInfo OpUser = 2; +// GroupMemberFullInfo KickedUser = 3; +// uint64 OperationTime = 4; +//} +//被踢后调用 +func MemberKickedNotification(req *pbGroup.KickGroupMemberReq, kickedUserIDList []string) { + + var n NotificationMsg + n.SendID = req.OpUserID + n.ContentType = constant.MemberKickedNotification + n.SessionType = constant.GroupChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = req.OperationID + + MemberKickedTips := open_im_sdk.MemberKickedTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}} + setGroupInfo(req.GroupID, MemberKickedTips.Group) + setOpUserInfo(req.OpUserID, req.GroupID, MemberKickedTips.OpUser) + for _, v := range kickedUserIDList { + var groupMemberInfo open_im_sdk.GroupMemberFullInfo + setGroupMemberInfo(req.GroupID, v, &groupMemberInfo) + MemberKickedTips.KickedUserList = append(MemberKickedTips.KickedUserList, &groupMemberInfo) + } + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(MemberKickedTips) + tips.DefaultTips = "MemberKickedNotification" + n.Content, _ = json.Marshal(tips) + n.RecvID = req.GroupID + Notification(&n) + + for _, v := range kickedUserIDList { + n.SessionType = constant.SingleChatType + n.RecvID = v + Notification(&n) + } +} + +//message GroupInfoChangedTips{ +// int32 ChangedType = 1; //bitwise operators: 1:groupName; 10:Notification 100:Introduction; 1000:FaceUrl +// GroupInfo Group = 2; +// GroupMemberFullInfo OpUser = 3; +//} + +//群信息改变后掉用 +func GroupInfoChangedNotification(operationID, opUserID, groupID string, changedType int32) { + var n NotificationMsg + n.SendID = opUserID + n.ContentType = constant.GroupInfoChangedNotification + n.SessionType = constant.GroupChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = operationID + + GroupInfoChangedTips := open_im_sdk.GroupInfoChangedTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}} + setGroupInfo(groupID, GroupInfoChangedTips.Group) + setOpUserInfo(opUserID, groupID, GroupInfoChangedTips.OpUser) + GroupInfoChangedTips.ChangedType = changedType + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(GroupInfoChangedTips) + tips.DefaultTips = "GroupInfoChangedNotification" + n.Content, _ = json.Marshal(tips) + n.RecvID = groupID + Notification(&n) +} + +/* +func GroupInfoChangedNotification(operationID string, changedType int32, group *immysql.Group, opUser *immysql.GroupMember) { + var n NotificationMsg + n.SendID = opUser.UserID + n.RecvID = group.GroupID + n.ContentType = constant.ChangeGroupInfoTip + n.SessionType = constant.GroupChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = operationID + + var groupInfoChanged open_im_sdk.GroupInfoChangedTips + groupInfoChanged.Group = &open_im_sdk.GroupInfo{} + utils.CopyStructFields(groupInfoChanged.Group, group) + groupInfoChanged.OpUser = &open_im_sdk.GroupMemberFullInfo{} + utils.CopyStructFields(groupInfoChanged.OpUser, opUser) + groupInfoChanged.ChangedType = changedType + + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(groupInfoChanged) + tips.DefaultTips = config.Config.Notification.GroupInfoChanged.DefaultTips.Tips + n.Content, _ = json.Marshal(tips) + Notification(&n, false) +} +*/ + +//message MemberLeaveTips{ +// GroupInfo Group = 1; +// GroupMemberFullInfo LeaverUser = 2; +// uint64 OperationTime = 3; +//} + +//群成员退群后调用 +func MemberLeaveNotification(req *pbGroup.QuitGroupReq) { + var n NotificationMsg + n.SendID = req.OpUserID + n.ContentType = constant.MemberLeaveNotification + n.SessionType = constant.GroupChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = req.OperationID + + MemberLeaveTips := open_im_sdk.MemberLeaveTips{Group: &open_im_sdk.GroupInfo{}, LeaverUser: &open_im_sdk.GroupMemberFullInfo{}} + setGroupInfo(req.GroupID, MemberLeaveTips.Group) + setOpUserInfo(req.OpUserID, req.GroupID, MemberLeaveTips.LeaverUser) + + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(MemberLeaveTips) + tips.DefaultTips = "MemberLeaveNotification" + n.Content, _ = json.Marshal(tips) + n.RecvID = req.GroupID + Notification(&n) + + n.SessionType = constant.SingleChatType + n.RecvID = req.OpUserID + Notification(&n) +} + +//message MemberEnterTips{ +// GroupInfo Group = 1; +// GroupMemberFullInfo EntrantUser = 2; +// uint64 OperationTime = 3; +//} +//群成员主动申请进群,管理员同意后调用, +func MemberEnterNotification(req *pbGroup.GroupApplicationResponseReq) { + var n NotificationMsg + n.SendID = req.OpUserID + n.ContentType = constant.MemberEnterNotification + n.SessionType = constant.GroupChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = req.OperationID + + MemberLeaveTips := open_im_sdk.MemberEnterTips{Group: &open_im_sdk.GroupInfo{}, EntrantUser: &open_im_sdk.GroupMemberFullInfo{}} + setGroupInfo(req.GroupID, MemberLeaveTips.Group) + setOpUserInfo(req.OpUserID, req.GroupID, MemberLeaveTips.EntrantUser) + + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(MemberLeaveTips) + tips.DefaultTips = "MemberEnterNotification" + n.Content, _ = json.Marshal(tips) + n.RecvID = req.GroupID + Notification(&n) + +} diff --git a/internal/rpc/msg/notification.go b/internal/rpc/msg/notification.go deleted file mode 100644 index 5bb11b21e..000000000 --- a/internal/rpc/msg/notification.go +++ /dev/null @@ -1,616 +0,0 @@ -package msg - -import ( - "Open_IM/pkg/common/config" - "Open_IM/pkg/common/constant" - imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" - "Open_IM/pkg/common/log" - "Open_IM/pkg/common/token_verify" - pbFriend "Open_IM/pkg/proto/friend" - pbGroup "Open_IM/pkg/proto/group" - open_im_sdk "Open_IM/pkg/proto/sdk_ws" - "Open_IM/pkg/utils" - "encoding/json" -) - -//message GroupCreatedTips{ -// GroupInfo Group = 1; -// GroupMemberFullInfo Creator = 2; -// repeated GroupMemberFullInfo MemberList = 3; -// uint64 OperationTime = 4; -//} creator->group - -func setOpUserInfo(operationID, opUserID, groupID string, groupMemberInfo *open_im_sdk.GroupMemberFullInfo) { - return - if token_verify.IsMangerUserID(opUserID) { - u, err := imdb.GetUserByUserID(opUserID) - if err != nil { - log.NewError(operationID, "FindUserByUID failed ", err.Error(), opUserID) - return - } - utils.CopyStructFields(groupMemberInfo, u) - groupMemberInfo.AppMangerLevel = 1 - } else { - u, err := imdb.GetGroupMemberInfoByGroupIDAndUserID(groupID, opUserID) - if err != nil { - log.NewError(operationID, "FindGroupMemberInfoByGroupIdAndUserId failed ", err.Error(), groupID, opUserID) - return - } - utils.CopyStructFields(groupMemberInfo, u) - } -} - -func setGroupInfo(operationID, groupID string, groupInfo *open_im_sdk.GroupInfo, ownerUserID string) { - return - group, err := imdb.GetGroupInfoByGroupID(groupID) - if err != nil { - log.NewError(operationID, "FindGroupInfoByGroupId failed ", err.Error(), groupID) - return - } - utils.CopyStructFields(groupInfo, group) - - if ownerUserID != "" { - groupInfo.OwnerUserID = ownerUserID - // setGroupPublicUserInfo(operationID, groupID, ownerUserID, groupInfo.Owner) - } -} - -func setGroupMemberInfo(operationID, groupID, userID string, groupMemberInfo *open_im_sdk.GroupMemberFullInfo) { - return - group, err := imdb.GetGroupMemberInfoByGroupIDAndUserID(groupID, userID) - if err != nil { - log.NewError(operationID, "FindGroupMemberInfoByGroupIdAndUserId failed ", err.Error(), groupID, userID) - return - } - utils.CopyStructFields(groupMemberInfo, group) -} - -//func setGroupPublicUserInfo(operationID, groupID, userID string, publicUserInfo *open_im_sdk.PublicUserInfo) { -// group, err := imdb.GetGroupMemberInfoByGroupIDAndUserID(groupID, userID) -// if err != nil { -// log.NewError(operationID, "FindGroupMemberInfoByGroupIdAndUserId failed ", err.Error(), groupID, userID) -// return -// } -// utils.CopyStructFields(publicUserInfo, group) -//} - -//创建群后调用 -func GroupCreatedNotification(operationID, opUserID, OwnerUserID, groupID string, initMemberList []string) { - return - var n NotificationMsg - n.SendID = opUserID - n.RecvID = groupID - n.ContentType = constant.GroupCreatedNotification - n.SessionType = constant.GroupChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = operationID - - GroupCreatedTips := open_im_sdk.GroupCreatedTips{Group: &open_im_sdk.GroupInfo{}, - Creator: &open_im_sdk.GroupMemberFullInfo{}} - setOpUserInfo(operationID, GroupCreatedTips.Creator.UserID, groupID, GroupCreatedTips.Creator) - - setGroupInfo(operationID, groupID, GroupCreatedTips.Group, OwnerUserID) - - for _, v := range initMemberList { - var groupMemberInfo open_im_sdk.GroupMemberFullInfo - setGroupMemberInfo(operationID, groupID, v, &groupMemberInfo) - GroupCreatedTips.MemberList = append(GroupCreatedTips.MemberList, &groupMemberInfo) - } - - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(GroupCreatedTips) - tips.DefaultTips = config.Config.Notification.GroupCreated.DefaultTips.Tips - n.Content, _ = json.Marshal(tips) - Notification(&n, false) -} - -//message ReceiveJoinApplicationTips{ -// GroupInfo Group = 1; -// PublicUserInfo Applicant = 2; -// string Reason = 3; -//} apply->all managers GroupID string `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"` -// ReqMessage string `protobuf:"bytes,2,opt,name=ReqMessage" json:"ReqMessage,omitempty"` -// OpUserID string `protobuf:"bytes,3,opt,name=OpUserID" json:"OpUserID,omitempty"` -// OperationID string `protobuf:"bytes,4,opt,name=OperationID" json:"OperationID,omitempty"` -//申请进群后调用 -func JoinApplicationNotification(req *pbGroup.JoinGroupReq) { - return - managerList, err := imdb.GetOwnerManagerByGroupID(req.GroupID) - if err != nil { - log.NewError(req.OperationID, "GetOwnerManagerByGroupId failed ", err.Error(), req.GroupID) - return - } - - var n NotificationMsg - n.SendID = req.OpUserID - n.ContentType = constant.JoinApplicationNotification - n.SessionType = constant.SingleChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = req.OperationID - - JoinGroupApplicationTips := open_im_sdk.JoinGroupApplicationTips{Group: &open_im_sdk.GroupInfo{}, Applicant: &open_im_sdk.PublicUserInfo{}} - setGroupInfo(req.OperationID, req.GroupID, JoinGroupApplicationTips.Group, "") - - apply, err := imdb.GetUserByUserID(req.OpUserID) - if err != nil { - log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), req.OpUserID) - return - } - utils.CopyStructFields(JoinGroupApplicationTips.Applicant, apply) - JoinGroupApplicationTips.Reason = req.ReqMessage - - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(JoinGroupApplicationTips) - tips.DefaultTips = "JoinGroupApplicationTips" - n.Content, _ = json.Marshal(tips) - for _, v := range managerList { - n.RecvID = v.UserID - Notification(&n, true) - } -} - -//message ApplicationProcessedTips{ -// GroupInfo Group = 1; -// GroupMemberFullInfo OpUser = 2; -// int32 Result = 3; -// string Reason = 4; -//} -//处理进群请求后调用 -func ApplicationProcessedNotification(req *pbGroup.GroupApplicationResponseReq) { - return - var n NotificationMsg - n.SendID = req.OpUserID - n.ContentType = constant.ApplicationProcessedNotification - n.SessionType = constant.SingleChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = req.OperationID - n.RecvID = req.FromUserID - - ApplicationProcessedTips := open_im_sdk.ApplicationProcessedTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}} - setGroupInfo(req.OperationID, req.GroupID, ApplicationProcessedTips.Group, "") - setOpUserInfo(req.OperationID, req.OpUserID, req.GroupID, ApplicationProcessedTips.OpUser) - ApplicationProcessedTips.Reason = req.HandledMsg - ApplicationProcessedTips.Result = req.HandleResult - - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(ApplicationProcessedTips) - tips.DefaultTips = "ApplicationProcessedNotification" - n.Content, _ = json.Marshal(tips) - - Notification(&n, true) -} - -//message MemberInvitedTips{ -// GroupInfo Group = 1; -// GroupMemberFullInfo OpUser = 2; -// GroupMemberFullInfo InvitedUser = 3; -// uint64 OperationTime = 4; -//} -//被邀请进群后调用 -func MemberInvitedNotification(operationID, groupID, opUserID, reason string, invitedUserIDList []string) { - return - var n NotificationMsg - n.SendID = opUserID - n.ContentType = constant.MemberInvitedNotification - n.SessionType = constant.GroupChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = operationID - - ApplicationProcessedTips := open_im_sdk.MemberInvitedTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}} - setGroupInfo(operationID, groupID, ApplicationProcessedTips.Group, "") - setOpUserInfo(operationID, opUserID, groupID, ApplicationProcessedTips.OpUser) - for _, v := range invitedUserIDList { - var groupMemberInfo open_im_sdk.GroupMemberFullInfo - setGroupMemberInfo(operationID, groupID, v, &groupMemberInfo) - ApplicationProcessedTips.InvitedUserList = append(ApplicationProcessedTips.InvitedUserList, &groupMemberInfo) - } - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(ApplicationProcessedTips) - tips.DefaultTips = "MemberInvitedNotification" - n.Content, _ = json.Marshal(tips) - n.RecvID = groupID - Notification(&n, true) -} - -//message MemberKickedTips{ -// GroupInfo Group = 1; -// GroupMemberFullInfo OpUser = 2; -// GroupMemberFullInfo KickedUser = 3; -// uint64 OperationTime = 4; -//} -//被踢后调用 -func MemberKickedNotification(req *pbGroup.KickGroupMemberReq, kickedUserIDList []string) { - return - var n NotificationMsg - n.SendID = req.OpUserID - n.ContentType = constant.MemberKickedNotification - n.SessionType = constant.GroupChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = req.OperationID - - MemberKickedTips := open_im_sdk.MemberKickedTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}} - setGroupInfo(req.OperationID, req.GroupID, MemberKickedTips.Group, "") - setOpUserInfo(req.OperationID, req.OpUserID, req.GroupID, MemberKickedTips.OpUser) - for _, v := range kickedUserIDList { - var groupMemberInfo open_im_sdk.GroupMemberFullInfo - setGroupMemberInfo(req.OperationID, req.GroupID, v, &groupMemberInfo) - MemberKickedTips.KickedUserList = append(MemberKickedTips.KickedUserList, &groupMemberInfo) - } - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(MemberKickedTips) - tips.DefaultTips = "MemberKickedNotification" - n.Content, _ = json.Marshal(tips) - n.RecvID = req.GroupID - Notification(&n, true) - - for _, v := range kickedUserIDList { - n.SessionType = constant.SingleChatType - n.RecvID = v - Notification(&n, true) - } -} - -//message GroupInfoChangedTips{ -// int32 ChangedType = 1; //bitwise operators: 1:groupName; 10:Notification 100:Introduction; 1000:FaceUrl -// GroupInfo Group = 2; -// GroupMemberFullInfo OpUser = 3; -//} - -//群信息改变后掉用 -func GroupInfoChangedNotification(operationID, opUserID, groupID string, changedType int32) { - return - var n NotificationMsg - n.SendID = opUserID - n.ContentType = constant.GroupInfoChangedNotification - n.SessionType = constant.GroupChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = operationID - - GroupInfoChangedTips := open_im_sdk.GroupInfoChangedTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}} - setGroupInfo(operationID, groupID, GroupInfoChangedTips.Group, opUserID) - setOpUserInfo(operationID, opUserID, groupID, GroupInfoChangedTips.OpUser) - GroupInfoChangedTips.ChangedType = changedType - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(GroupInfoChangedTips) - tips.DefaultTips = "GroupInfoChangedNotification" - n.Content, _ = json.Marshal(tips) - n.RecvID = groupID - Notification(&n, false) -} - -/* -func GroupInfoChangedNotification(operationID string, changedType int32, group *immysql.Group, opUser *immysql.GroupMember) { - var n NotificationMsg - n.SendID = opUser.UserID - n.RecvID = group.GroupID - n.ContentType = constant.ChangeGroupInfoTip - n.SessionType = constant.GroupChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = operationID - - var groupInfoChanged open_im_sdk.GroupInfoChangedTips - groupInfoChanged.Group = &open_im_sdk.GroupInfo{} - utils.CopyStructFields(groupInfoChanged.Group, group) - groupInfoChanged.OpUser = &open_im_sdk.GroupMemberFullInfo{} - utils.CopyStructFields(groupInfoChanged.OpUser, opUser) - groupInfoChanged.ChangedType = changedType - - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(groupInfoChanged) - tips.DefaultTips = config.Config.Notification.GroupInfoChanged.DefaultTips.Tips - n.Content, _ = json.Marshal(tips) - Notification(&n, false) -} -*/ - -//message MemberLeaveTips{ -// GroupInfo Group = 1; -// GroupMemberFullInfo LeaverUser = 2; -// uint64 OperationTime = 3; -//} - -//群成员退群后调用 -func MemberLeaveNotification(req *pbGroup.QuitGroupReq) { - return - var n NotificationMsg - n.SendID = req.OpUserID - n.ContentType = constant.MemberLeaveNotification - n.SessionType = constant.GroupChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = req.OperationID - - MemberLeaveTips := open_im_sdk.MemberLeaveTips{Group: &open_im_sdk.GroupInfo{}, LeaverUser: &open_im_sdk.GroupMemberFullInfo{}} - setGroupInfo(req.OperationID, req.GroupID, MemberLeaveTips.Group, "") - setOpUserInfo(req.OperationID, req.OpUserID, req.GroupID, MemberLeaveTips.LeaverUser) - - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(MemberLeaveTips) - tips.DefaultTips = "MemberLeaveNotification" - n.Content, _ = json.Marshal(tips) - n.RecvID = req.GroupID - Notification(&n, true) - - n.SessionType = constant.SingleChatType - n.RecvID = req.OpUserID - Notification(&n, true) -} - -//message MemberEnterTips{ -// GroupInfo Group = 1; -// GroupMemberFullInfo EntrantUser = 2; -// uint64 OperationTime = 3; -//} -//群成员主动申请进群,管理员同意后调用, -func MemberEnterNotification(req *pbGroup.GroupApplicationResponseReq) { - return - var n NotificationMsg - n.SendID = req.OpUserID - n.ContentType = constant.MemberEnterNotification - n.SessionType = constant.GroupChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = req.OperationID - - MemberLeaveTips := open_im_sdk.MemberEnterTips{Group: &open_im_sdk.GroupInfo{}, EntrantUser: &open_im_sdk.GroupMemberFullInfo{}} - setGroupInfo(req.OperationID, req.GroupID, MemberLeaveTips.Group, "") - setOpUserInfo(req.OperationID, req.OpUserID, req.GroupID, MemberLeaveTips.EntrantUser) - - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(MemberLeaveTips) - tips.DefaultTips = "MemberEnterNotification" - n.Content, _ = json.Marshal(tips) - n.RecvID = req.GroupID - Notification(&n, true) - -} - -//message MemberInfoChangedTips{ -// int32 ChangeType = 1; //1:info changed; 2:mute -// GroupMemberFullInfo OpUser = 2; //who do this -// GroupMemberFullInfo FinalInfo = 3; // -// uint64 MuteTime = 4; -// GroupInfo Group = 5; -//} -//func MemberInfoChangedNotification(operationID string, group *immysql.Group, opUser *immysql.GroupMember, userFinalInfo *immysql.GroupMember) { - -//} - -//message FriendApplicationAddedTips{ -// PublicUserInfo OpUser = 1; //user1 -// FriendApplication Application = 2; -// PublicUserInfo OpedUser = 3; //user2 -//} - -func getFromToUserNickname(operationID, fromUserID, toUserID string) (string, string) { - return "", "" - from, err1 := imdb.GetUserByUserID(fromUserID) - to, err2 := imdb.GetUserByUserID(toUserID) - if err1 != nil || err2 != nil { - log.NewError("FindUserByUID failed ", err1, err2, fromUserID, toUserID) - } - fromNickname, toNickname := "", "" - if from != nil { - fromNickname = from.Nickname - } - if to != nil { - toNickname = to.Nickname - } - return fromNickname, toNickname -} - -func FriendApplicationAddedNotification(req *pbFriend.AddFriendReq) { - return - var n NotificationMsg - n.SendID = req.CommID.FromUserID - n.RecvID = req.CommID.ToUserID - n.ContentType = constant.FriendApplicationAddedNotification - n.SessionType = constant.SingleChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = req.CommID.OperationID - - var FriendApplicationAddedTips open_im_sdk.FriendApplicationAddedTips - FriendApplicationAddedTips.FromToUserID.FromUserID = req.CommID.FromUserID - FriendApplicationAddedTips.FromToUserID.ToUserID = req.CommID.ToUserID - fromUserNickname, toUserNickname := getFromToUserNickname(req.CommID.OperationID, req.CommID.FromUserID, req.CommID.ToUserID) - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(FriendApplicationAddedTips) - tips.DefaultTips = fromUserNickname + " FriendApplicationAddedNotification " + toUserNickname - n.Content, _ = json.Marshal(tips) - Notification(&n, true) -} - -func FriendApplicationProcessedNotification(req *pbFriend.AddFriendResponseReq) { - return - var n NotificationMsg - n.SendID = req.CommID.FromUserID - n.RecvID = req.CommID.ToUserID - n.ContentType = constant.FriendApplicationProcessedNotification - n.SessionType = constant.SingleChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = req.CommID.OperationID - - var FriendApplicationProcessedTips open_im_sdk.FriendApplicationProcessedTips - FriendApplicationProcessedTips.FromToUserID.FromUserID = req.CommID.FromUserID - FriendApplicationProcessedTips.FromToUserID.ToUserID = req.CommID.ToUserID - fromUserNickname, toUserNickname := getFromToUserNickname(req.CommID.OperationID, req.CommID.FromUserID, req.CommID.ToUserID) - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(FriendApplicationProcessedTips) - tips.DefaultTips = fromUserNickname + " FriendApplicationProcessedNotification " + toUserNickname - n.Content, _ = json.Marshal(tips) - Notification(&n, true) -} - -func FriendAddedNotification(operationID, opUserID, fromUserID, toUserID string) { - return - var n NotificationMsg - n.SendID = fromUserID - n.RecvID = toUserID - n.ContentType = constant.FriendAddedNotification - n.SessionType = constant.SingleChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = operationID - - var FriendAddedTips open_im_sdk.FriendAddedTips - - user, err := imdb.GetUserByUserID(opUserID) - if err != nil { - log.NewError(operationID, "FindUserByUID failed ", err.Error(), opUserID) - - } else { - utils.CopyStructFields(FriendAddedTips.OpUser, user) - } - - friend, err := imdb.GetFriendRelationshipFromFriend(fromUserID, toUserID) - if err != nil { - log.NewError(operationID, "FindUserByUID failed ", err.Error(), fromUserID, toUserID) - } else { - FriendAddedTips.Friend.Remark = friend.Remark - } - - from, err := imdb.GetUserByUserID(fromUserID) - if err != nil { - log.NewError(operationID, "FindUserByUID failed ", err.Error(), fromUserID) - - } else { - utils.CopyStructFields(FriendAddedTips.Friend, from) - } - - to, err := imdb.GetUserByUserID(toUserID) - if err != nil { - log.NewError(operationID, "FindUserByUID failed ", err.Error(), toUserID) - - } else { - utils.CopyStructFields(FriendAddedTips.Friend.FriendUser, to) - } - - fromUserNickname, toUserNickname := from.Nickname, to.Nickname - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(FriendAddedTips) - tips.DefaultTips = fromUserNickname + " FriendAddedNotification " + toUserNickname - n.Content, _ = json.Marshal(tips) - Notification(&n, true) -} - -//message FriendDeletedTips{ -// FriendInfo Friend = 1; -//} -func FriendDeletedNotification(req *pbFriend.DeleteFriendReq) { - return - var n NotificationMsg - n.SendID = req.CommID.FromUserID - n.RecvID = req.CommID.ToUserID - n.ContentType = constant.FriendDeletedNotification - n.SessionType = constant.SingleChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = req.CommID.OperationID - - var FriendDeletedTips open_im_sdk.FriendDeletedTips - FriendDeletedTips.FromToUserID.FromUserID = req.CommID.FromUserID - FriendDeletedTips.FromToUserID.ToUserID = req.CommID.ToUserID - fromUserNickname, toUserNickname := getFromToUserNickname(req.CommID.OperationID, req.CommID.FromUserID, req.CommID.ToUserID) - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(FriendDeletedTips) - tips.DefaultTips = fromUserNickname + " FriendDeletedNotification " + toUserNickname - n.Content, _ = json.Marshal(tips) - Notification(&n, true) -} - -//message FriendInfoChangedTips{ -// FriendInfo Friend = 1; -// PublicUserInfo OpUser = 2; -// uint64 OperationTime = 3; -//} -func FriendInfoChangedNotification(operationID, opUserID, fromUserID, toUserID string) { - return - var n NotificationMsg - n.SendID = fromUserID - n.RecvID = toUserID - n.ContentType = constant.FriendInfoChangedNotification - n.SessionType = constant.SingleChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = operationID - - var FriendInfoChangedTips open_im_sdk.FriendInfoChangedTips - FriendInfoChangedTips.FromToUserID.FromUserID = fromUserID - FriendInfoChangedTips.FromToUserID.ToUserID = toUserID - fromUserNickname, toUserNickname := getFromToUserNickname(operationID, fromUserID, toUserID) - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(FriendInfoChangedTips) - tips.DefaultTips = fromUserNickname + " FriendDeletedNotification " + toUserNickname - n.Content, _ = json.Marshal(tips) - Notification(&n, true) -} - -func BlackAddedNotification(req *pbFriend.AddBlacklistReq) { - return - var n NotificationMsg - n.SendID = req.CommID.FromUserID - n.RecvID = req.CommID.ToUserID - n.ContentType = constant.BlackAddedNotification - n.SessionType = constant.SingleChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = req.CommID.OperationID - - var BlackAddedTips open_im_sdk.BlackAddedTips - BlackAddedTips.FromToUserID.FromUserID = req.CommID.FromUserID - BlackAddedTips.FromToUserID.ToUserID = req.CommID.ToUserID - fromUserNickname, toUserNickname := getFromToUserNickname(req.CommID.OperationID, req.CommID.FromUserID, req.CommID.ToUserID) - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(BlackAddedTips) - tips.DefaultTips = fromUserNickname + " BlackAddedNotification " + toUserNickname - n.Content, _ = json.Marshal(tips) - Notification(&n, true) -} - -//message BlackDeletedTips{ -// BlackInfo Black = 1; -//} -func BlackDeletedNotification(req *pbFriend.RemoveBlacklistReq) { - return - var n NotificationMsg - n.SendID = req.CommID.FromUserID - n.RecvID = req.CommID.ToUserID - n.ContentType = constant.BlackDeletedNotification - n.SessionType = constant.SingleChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = req.CommID.OperationID - - var BlackDeletedTips open_im_sdk.BlackDeletedTips - BlackDeletedTips.FromToUserID.FromUserID = req.CommID.FromUserID - BlackDeletedTips.FromToUserID.ToUserID = req.CommID.ToUserID - fromUserNickname, toUserNickname := getFromToUserNickname(req.CommID.OperationID, req.CommID.FromUserID, req.CommID.ToUserID) - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(BlackDeletedTips) - tips.DefaultTips = fromUserNickname + " BlackDeletedNotification " + toUserNickname - n.Content, _ = json.Marshal(tips) - Notification(&n, true) -} - -//message SelfInfoUpdatedTips{ -// UserInfo SelfUserInfo = 1; -// PublicUserInfo OpUser = 2; -// uint64 OperationTime = 3; -//} -func SelfInfoUpdatedNotification(operationID, userID string) { - return - var n NotificationMsg - n.SendID = userID - n.RecvID = userID - n.ContentType = constant.SelfInfoUpdatedNotification - n.SessionType = constant.SingleChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = operationID - - var SelfInfoUpdatedTips open_im_sdk.SelfInfoUpdatedTips - SelfInfoUpdatedTips.UserID = userID - - var tips open_im_sdk.TipsComm - u, err := imdb.GetUserByUserID(userID) - if err != nil { - log.NewError(operationID, "FindUserByUID failed ", err.Error(), userID) - } - - tips.Detail, _ = json.Marshal(SelfInfoUpdatedTips) - tips.DefaultTips = u.Nickname + " SelfInfoUpdatedNotification " - n.Content, _ = json.Marshal(tips) - Notification(&n, true) -} diff --git a/internal/rpc/msg/send_msg.go b/internal/rpc/msg/send_msg.go index bf371f0a2..481dee2dc 100644 --- a/internal/rpc/msg/send_msg.go +++ b/internal/rpc/msg/send_msg.go @@ -239,7 +239,7 @@ type NotificationMsg struct { OperationID string } -func Notification(n *NotificationMsg, onlineUserOnly bool) { +func Notification(n *NotificationMsg) { var req pbChat.SendMsgReq var msg sdk_ws.MsgData var offlineInfo sdk_ws.OfflinePushInfo diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go index e9bfdcbac..f4684f9a4 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go @@ -3,6 +3,7 @@ package im_mysql_model import ( "Open_IM/pkg/common/constant" "Open_IM/pkg/common/db" + "Open_IM/pkg/utils" "time" ) @@ -124,17 +125,17 @@ func GetOwnerManagerByGroupID(groupID string) ([]db.GroupMember, error) { return groupMemberList, nil } -func GetGroupMemberNumByGroupID(groupID string) uint32 { +func GetGroupMemberNumByGroupID(groupID string) (uint32, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { - return 0 + return 0, utils.Wrap(err, "DefaultGormDB failed") } var number uint32 err = dbConn.Table("group_members").Where("group_id=?", groupID).Count(&number).Error if err != nil { - return 0 + return 0, utils.Wrap(err, "") } - return number + return number, nil } func GetGroupOwnerInfoByGroupID(groupID string) (*db.GroupMember, error) { diff --git a/pkg/common/utils/utils.go b/pkg/common/utils/utils.go index fc4100d7f..00eca3972 100644 --- a/pkg/common/utils/utils.go +++ b/pkg/common/utils/utils.go @@ -45,30 +45,40 @@ func GroupOpenIMCopyDB(dst *db.Group, src *open_im_sdk.GroupInfo) { utils.CopyStructFields(dst, src) } -func GroupDBCopyOpenIM(dst *open_im_sdk.GroupInfo, src *db.Group) { +func GroupDBCopyOpenIM(dst *open_im_sdk.GroupInfo, src *db.Group) error { utils.CopyStructFields(dst, src) - user, _ := imdb.GetGroupOwnerInfoByGroupID(src.GroupID) - if user != nil { - dst.OwnerUserID = user.UserID + user, err := imdb.GetGroupOwnerInfoByGroupID(src.GroupID) + if err != nil { + return utils.Wrap(err, "") + } + dst.OwnerUserID = user.UserID + + dst.MemberCount, err = imdb.GetGroupMemberNumByGroupID(src.GroupID) + if err != nil { + return utils.Wrap(err, "") } - dst.MemberCount = imdb.GetGroupMemberNumByGroupID(src.GroupID) dst.CreateTime = uint32(src.CreateTime.Unix()) + return nil } func GroupMemberOpenIMCopyDB(dst *db.GroupMember, src *open_im_sdk.GroupMemberFullInfo) { utils.CopyStructFields(dst, src) } -func GroupMemberDBCopyOpenIM(dst *open_im_sdk.GroupMemberFullInfo, src *db.GroupMember) { +func GroupMemberDBCopyOpenIM(dst *open_im_sdk.GroupMemberFullInfo, src *db.GroupMember) error { utils.CopyStructFields(dst, src) if token_verify.IsMangerUserID(src.UserID) { - u, _ := imdb.GetUserByUserID(src.UserID) - if u != nil { - utils.CopyStructFields(dst, u) + u, err := imdb.GetUserByUserID(src.UserID) + if err != nil { + return utils.Wrap(err, "") } + + utils.CopyStructFields(dst, u) + dst.AppMangerLevel = 1 } dst.JoinTime = src.JoinTime.Unix() + return nil } func GroupRequestOpenIMCopyDB(dst *db.GroupRequest, src *open_im_sdk.GroupRequest) { diff --git a/pkg/utils/strings.go b/pkg/utils/strings.go index 9eec1ab94..3265d2dc4 100644 --- a/pkg/utils/strings.go +++ b/pkg/utils/strings.go @@ -31,7 +31,6 @@ func Int32ToString(i int32) string { //judge a string whether in the string list func IsContain(target string, List []string) bool { - for _, element := range List { if target == element { @@ -39,7 +38,6 @@ func IsContain(target string, List []string) bool { } } return false - } func InterfaceArrayToStringArray(data []interface{}) (i []string) { From 7f7664eb4f50add9e58bed4187718708813bbeee Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Fri, 14 Jan 2022 13:52:09 +0800 Subject: [PATCH 274/337] Refactor code --- internal/rpc/msg/group_notification.go | 6 ++++-- pkg/common/utils/utils.go | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/internal/rpc/msg/group_notification.go b/internal/rpc/msg/group_notification.go index 1d1af7d44..729f1d808 100644 --- a/internal/rpc/msg/group_notification.go +++ b/internal/rpc/msg/group_notification.go @@ -26,13 +26,15 @@ func setOpUserInfo(opUserID, groupID string, groupMemberInfo *open_im_sdk.GroupM return utils.Wrap(err, "GetUserByUserID failed") } utils.CopyStructFields(groupMemberInfo, u) - groupMemberInfo.AppMangerLevel = 1 + groupMemberInfo.GroupID = groupID } else { u, err := imdb.GetGroupMemberInfoByGroupIDAndUserID(groupID, opUserID) if err != nil { return utils.Wrap(err, "GetGroupMemberInfoByGroupIDAndUserID failed") } - utils.CopyStructFields(groupMemberInfo, u) + if err = utils2.GroupMemberDBCopyOpenIM(groupMemberInfo, u); err != nil { + return utils.Wrap(err, "") + } } return nil } diff --git a/pkg/common/utils/utils.go b/pkg/common/utils/utils.go index 00eca3972..b181d79b0 100644 --- a/pkg/common/utils/utils.go +++ b/pkg/common/utils/utils.go @@ -113,3 +113,8 @@ func BlackDBCopyOpenIM(dst *open_im_sdk.BlackInfo, src *db.Black) { utils.CopyStructFields(dst.BlackUserInfo, user) } } + +// +//func PublicUserDBCopyOpenIM(dst *open_im_sdk.PublicUserInfo, src *db.User){ +// +//} From 4d172ec4f55fddbc8db075cc81145d22c5f86c2a Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Fri, 14 Jan 2022 16:11:23 +0800 Subject: [PATCH 275/337] Refactor code --- internal/rpc/group/group.go | 2 +- internal/rpc/msg/group_notification.go | 219 +++++++++++++------------ pkg/base_info/group_api_struct.go | 16 +- pkg/common/log/logrus.go | 26 +-- 4 files changed, 133 insertions(+), 130 deletions(-) diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 57fc3d671..b691458f3 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -141,7 +141,7 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR resp.ErrMsg = constant.ErrDB.ErrMsg return resp, nil } - chat.GroupCreatedNotification(req.OperationID, req.OpUserID, req.OwnerUserID, groupId, okUserIDList) + chat.GroupCreatedNotification(req.OperationID, req.OpUserID, groupId, okUserIDList) utils.CopyStructFields(resp.GroupInfo, group) resp.GroupInfo.MemberCount, err = imdb.GetGroupMemberNumByGroupID(groupId) if err != nil { diff --git a/internal/rpc/msg/group_notification.go b/internal/rpc/msg/group_notification.go index 729f1d808..a92d6d0c3 100644 --- a/internal/rpc/msg/group_notification.go +++ b/internal/rpc/msg/group_notification.go @@ -1,6 +1,7 @@ package msg import ( + "Open_IM/pkg/common/config" "Open_IM/pkg/common/constant" imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" "Open_IM/pkg/common/log" @@ -72,19 +73,12 @@ func setGroupMemberInfo(groupID, userID string, groupMemberInfo *open_im_sdk.Gro //} //创建群后调用 -func GroupCreatedNotification(operationID, opUserID, OwnerUserID, groupID string, initMemberList []string) { - var n NotificationMsg - n.SendID = opUserID - n.RecvID = groupID - n.ContentType = constant.GroupCreatedNotification - n.SessionType = constant.GroupChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = operationID - +func GroupCreatedNotification(operationID, opUserID, groupID string, initMemberList []string) { GroupCreatedTips := open_im_sdk.GroupCreatedTips{Group: &open_im_sdk.GroupInfo{}, Creator: &open_im_sdk.GroupMemberFullInfo{}} if err := setOpUserInfo(GroupCreatedTips.Creator.UserID, groupID, GroupCreatedTips.Creator); err != nil { log.NewError(operationID, "setOpUserInfo failed ", err.Error(), GroupCreatedTips.Creator.UserID, groupID, GroupCreatedTips.Creator) + return } err := setGroupInfo(groupID, GroupCreatedTips.Group) if err != nil { @@ -99,6 +93,13 @@ func GroupCreatedNotification(operationID, opUserID, OwnerUserID, groupID string var tips open_im_sdk.TipsComm tips.Detail, _ = json.Marshal(GroupCreatedTips) tips.DefaultTips = config.Config.Notification.GroupCreated.DefaultTips.Tips + var n NotificationMsg + n.SendID = opUserID + n.RecvID = groupID + n.ContentType = constant.GroupCreatedNotification + n.SessionType = constant.GroupChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = operationID n.Content, _ = json.Marshal(tips) log.NewInfo(operationID, "Notification ", n) Notification(&n) @@ -114,13 +115,6 @@ func GroupCreatedNotification(operationID, opUserID, OwnerUserID, groupID string // OperationID string `protobuf:"bytes,4,opt,name=OperationID" json:"OperationID,omitempty"` //申请进群后调用 func JoinApplicationNotification(req *pbGroup.JoinGroupReq) { - var n NotificationMsg - n.SendID = req.OpUserID - n.ContentType = constant.JoinApplicationNotification - n.SessionType = constant.SingleChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = req.OperationID - JoinGroupApplicationTips := open_im_sdk.JoinGroupApplicationTips{Group: &open_im_sdk.GroupInfo{}, Applicant: &open_im_sdk.PublicUserInfo{}} err := setGroupInfo(req.GroupID, JoinGroupApplicationTips.Group) if err != nil { @@ -139,6 +133,12 @@ func JoinApplicationNotification(req *pbGroup.JoinGroupReq) { var tips open_im_sdk.TipsComm tips.Detail, _ = json.Marshal(JoinGroupApplicationTips) tips.DefaultTips = "JoinGroupApplicationTips" + var n NotificationMsg + n.SendID = req.OpUserID + n.ContentType = constant.JoinApplicationNotification + n.SessionType = constant.SingleChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = req.OperationID n.Content, _ = json.Marshal(tips) managerList, err := imdb.GetOwnerManagerByGroupID(req.GroupID) if err != nil { @@ -160,6 +160,21 @@ func JoinApplicationNotification(req *pbGroup.JoinGroupReq) { //} //处理进群请求后调用 func ApplicationProcessedNotification(req *pbGroup.GroupApplicationResponseReq) { + ApplicationProcessedTips := open_im_sdk.ApplicationProcessedTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}} + if err := setGroupInfo(req.GroupID, ApplicationProcessedTips.Group); err != nil { + log.NewError(req.OperationID, "setGroupInfo failed ", err.Error(), req.GroupID, ApplicationProcessedTips.Group) + return + } + if err := setOpUserInfo(req.OpUserID, req.GroupID, ApplicationProcessedTips.OpUser); err != nil { + log.Error(req.OperationID, "setOpUserInfo failed", req.OpUserID, req.GroupID, ApplicationProcessedTips.OpUser) + return + } + ApplicationProcessedTips.Reason = req.HandledMsg + ApplicationProcessedTips.Result = req.HandleResult + + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(ApplicationProcessedTips) + tips.DefaultTips = "ApplicationProcessedNotification" var n NotificationMsg n.SendID = req.OpUserID n.ContentType = constant.ApplicationProcessedNotification @@ -167,17 +182,7 @@ func ApplicationProcessedNotification(req *pbGroup.GroupApplicationResponseReq) n.MsgFrom = constant.SysMsgType n.OperationID = req.OperationID n.RecvID = req.FromUserID - ApplicationProcessedTips := open_im_sdk.ApplicationProcessedTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}} - setGroupInfo(req.GroupID, ApplicationProcessedTips.Group) - setOpUserInfo(req.OpUserID, req.GroupID, ApplicationProcessedTips.OpUser) - ApplicationProcessedTips.Reason = req.HandledMsg - ApplicationProcessedTips.Result = req.HandleResult - - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(ApplicationProcessedTips) - tips.DefaultTips = "ApplicationProcessedNotification" n.Content, _ = json.Marshal(tips) - Notification(&n) } @@ -189,24 +194,32 @@ func ApplicationProcessedNotification(req *pbGroup.GroupApplicationResponseReq) //} //被邀请进群后调用 func MemberInvitedNotification(operationID, groupID, opUserID, reason string, invitedUserIDList []string) { + ApplicationProcessedTips := open_im_sdk.MemberInvitedTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}} + if err := setGroupInfo(groupID, ApplicationProcessedTips.Group); err != nil { + log.Error(operationID, "setGroupInfo failed ", err.Error(), groupID, ApplicationProcessedTips.Group) + return + } + if err := setOpUserInfo(opUserID, groupID, ApplicationProcessedTips.OpUser); err != nil { + log.Error(operationID, "setOpUserInfo failed ", err.Error(), opUserID, groupID, ApplicationProcessedTips.OpUser) + return + } + for _, v := range invitedUserIDList { + var groupMemberInfo open_im_sdk.GroupMemberFullInfo + if err := setGroupMemberInfo(groupID, v, &groupMemberInfo); err != nil { + log.Error(operationID, "setGroupMemberInfo faield ", err.Error(), groupID) + continue + } + ApplicationProcessedTips.InvitedUserList = append(ApplicationProcessedTips.InvitedUserList, &groupMemberInfo) + } + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(ApplicationProcessedTips) + tips.DefaultTips = "MemberInvitedNotification" var n NotificationMsg n.SendID = opUserID n.ContentType = constant.MemberInvitedNotification n.SessionType = constant.GroupChatType n.MsgFrom = constant.SysMsgType n.OperationID = operationID - - ApplicationProcessedTips := open_im_sdk.MemberInvitedTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}} - setGroupInfo(groupID, ApplicationProcessedTips.Group) - setOpUserInfo(opUserID, groupID, ApplicationProcessedTips.OpUser) - for _, v := range invitedUserIDList { - var groupMemberInfo open_im_sdk.GroupMemberFullInfo - setGroupMemberInfo(groupID, v, &groupMemberInfo) - ApplicationProcessedTips.InvitedUserList = append(ApplicationProcessedTips.InvitedUserList, &groupMemberInfo) - } - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(ApplicationProcessedTips) - tips.DefaultTips = "MemberInvitedNotification" n.Content, _ = json.Marshal(tips) n.RecvID = groupID Notification(&n) @@ -220,33 +233,42 @@ func MemberInvitedNotification(operationID, groupID, opUserID, reason string, in //} //被踢后调用 func MemberKickedNotification(req *pbGroup.KickGroupMemberReq, kickedUserIDList []string) { + MemberKickedTips := open_im_sdk.MemberKickedTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}} + if err := setGroupInfo(req.GroupID, MemberKickedTips.Group); err != nil { + log.Error(req.OperationID, "setGroupInfo failed ", err.Error(), req.GroupID, MemberKickedTips.Group) + return + } + if err := setOpUserInfo(req.OpUserID, req.GroupID, MemberKickedTips.OpUser); err != nil { + log.Error(req.OperationID, "setOpUserInfo failed ", err.Error(), req.OpUserID, req.GroupID, MemberKickedTips.OpUser) + return + } + for _, v := range kickedUserIDList { + var groupMemberInfo open_im_sdk.GroupMemberFullInfo + if err := setGroupMemberInfo(req.GroupID, v, &groupMemberInfo); err != nil { + log.Error(req.OperationID, "setGroupMemberInfo failed ", err.Error(), req.GroupID, v) + continue + } + MemberKickedTips.KickedUserList = append(MemberKickedTips.KickedUserList, &groupMemberInfo) + } + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(MemberKickedTips) + tips.DefaultTips = "MemberKickedNotification" var n NotificationMsg n.SendID = req.OpUserID n.ContentType = constant.MemberKickedNotification n.SessionType = constant.GroupChatType n.MsgFrom = constant.SysMsgType n.OperationID = req.OperationID - - MemberKickedTips := open_im_sdk.MemberKickedTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}} - setGroupInfo(req.GroupID, MemberKickedTips.Group) - setOpUserInfo(req.OpUserID, req.GroupID, MemberKickedTips.OpUser) - for _, v := range kickedUserIDList { - var groupMemberInfo open_im_sdk.GroupMemberFullInfo - setGroupMemberInfo(req.GroupID, v, &groupMemberInfo) - MemberKickedTips.KickedUserList = append(MemberKickedTips.KickedUserList, &groupMemberInfo) - } - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(MemberKickedTips) - tips.DefaultTips = "MemberKickedNotification" n.Content, _ = json.Marshal(tips) n.RecvID = req.GroupID Notification(&n) for _, v := range kickedUserIDList { - n.SessionType = constant.SingleChatType - n.RecvID = v - Notification(&n) + m := n + m.SessionType = constant.SingleChatType + m.RecvID = v + Notification(&m) } } @@ -258,50 +280,30 @@ func MemberKickedNotification(req *pbGroup.KickGroupMemberReq, kickedUserIDList //群信息改变后掉用 func GroupInfoChangedNotification(operationID, opUserID, groupID string, changedType int32) { + GroupInfoChangedTips := open_im_sdk.GroupInfoChangedTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}} + if err := setGroupInfo(groupID, GroupInfoChangedTips.Group); err != nil { + log.Error(operationID, "setGroupInfo failed ", err.Error(), groupID, GroupInfoChangedTips.Group) + return + } + if err := setOpUserInfo(opUserID, groupID, GroupInfoChangedTips.OpUser); err != nil { + log.Error(operationID, "setOpUserInfo failed ", err.Error(), opUserID, groupID, GroupInfoChangedTips.OpUser) + return + } + GroupInfoChangedTips.ChangedType = changedType + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(GroupInfoChangedTips) + tips.DefaultTips = "GroupInfoChangedNotification" var n NotificationMsg n.SendID = opUserID n.ContentType = constant.GroupInfoChangedNotification n.SessionType = constant.GroupChatType n.MsgFrom = constant.SysMsgType n.OperationID = operationID - - GroupInfoChangedTips := open_im_sdk.GroupInfoChangedTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}} - setGroupInfo(groupID, GroupInfoChangedTips.Group) - setOpUserInfo(opUserID, groupID, GroupInfoChangedTips.OpUser) - GroupInfoChangedTips.ChangedType = changedType - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(GroupInfoChangedTips) - tips.DefaultTips = "GroupInfoChangedNotification" n.Content, _ = json.Marshal(tips) n.RecvID = groupID Notification(&n) } -/* -func GroupInfoChangedNotification(operationID string, changedType int32, group *immysql.Group, opUser *immysql.GroupMember) { - var n NotificationMsg - n.SendID = opUser.UserID - n.RecvID = group.GroupID - n.ContentType = constant.ChangeGroupInfoTip - n.SessionType = constant.GroupChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = operationID - - var groupInfoChanged open_im_sdk.GroupInfoChangedTips - groupInfoChanged.Group = &open_im_sdk.GroupInfo{} - utils.CopyStructFields(groupInfoChanged.Group, group) - groupInfoChanged.OpUser = &open_im_sdk.GroupMemberFullInfo{} - utils.CopyStructFields(groupInfoChanged.OpUser, opUser) - groupInfoChanged.ChangedType = changedType - - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(groupInfoChanged) - tips.DefaultTips = config.Config.Notification.GroupInfoChanged.DefaultTips.Tips - n.Content, _ = json.Marshal(tips) - Notification(&n, false) -} -*/ - //message MemberLeaveTips{ // GroupInfo Group = 1; // GroupMemberFullInfo LeaverUser = 2; @@ -310,27 +312,33 @@ func GroupInfoChangedNotification(operationID string, changedType int32, group * //群成员退群后调用 func MemberLeaveNotification(req *pbGroup.QuitGroupReq) { + MemberLeaveTips := open_im_sdk.MemberLeaveTips{Group: &open_im_sdk.GroupInfo{}, LeaverUser: &open_im_sdk.GroupMemberFullInfo{}} + if err := setGroupInfo(req.GroupID, MemberLeaveTips.Group); err != nil { + log.Error(req.OperationID, "setGroupInfo failed ", err.Error(), req.GroupID, MemberLeaveTips.Group) + return + } + if err := setOpUserInfo(req.OpUserID, req.GroupID, MemberLeaveTips.LeaverUser); err != nil { + log.Error(req.OperationID, "setOpUserInfo failed ", err.Error(), req.OpUserID, req.GroupID, MemberLeaveTips.LeaverUser) + return + } + + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(MemberLeaveTips) + tips.DefaultTips = "MemberLeaveNotification" var n NotificationMsg n.SendID = req.OpUserID n.ContentType = constant.MemberLeaveNotification n.SessionType = constant.GroupChatType n.MsgFrom = constant.SysMsgType n.OperationID = req.OperationID - - MemberLeaveTips := open_im_sdk.MemberLeaveTips{Group: &open_im_sdk.GroupInfo{}, LeaverUser: &open_im_sdk.GroupMemberFullInfo{}} - setGroupInfo(req.GroupID, MemberLeaveTips.Group) - setOpUserInfo(req.OpUserID, req.GroupID, MemberLeaveTips.LeaverUser) - - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(MemberLeaveTips) - tips.DefaultTips = "MemberLeaveNotification" n.Content, _ = json.Marshal(tips) n.RecvID = req.GroupID Notification(&n) + m := n n.SessionType = constant.SingleChatType n.RecvID = req.OpUserID - Notification(&n) + Notification(&m) } //message MemberEnterTips{ @@ -340,22 +348,25 @@ func MemberLeaveNotification(req *pbGroup.QuitGroupReq) { //} //群成员主动申请进群,管理员同意后调用, func MemberEnterNotification(req *pbGroup.GroupApplicationResponseReq) { + MemberLeaveTips := open_im_sdk.MemberEnterTips{Group: &open_im_sdk.GroupInfo{}, EntrantUser: &open_im_sdk.GroupMemberFullInfo{}} + if err := setGroupInfo(req.GroupID, MemberLeaveTips.Group); err != nil { + log.Error(req.OperationID, "setGroupInfo failed ", err.Error(), req.GroupID, MemberLeaveTips.Group) + return + } + if err := setOpUserInfo(req.OpUserID, req.GroupID, MemberLeaveTips.EntrantUser); err != nil { + log.Error(req.OperationID, "setOpUserInfo failed ", err.Error(), req.OpUserID, req.GroupID, MemberLeaveTips.EntrantUser) + return + } + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(MemberLeaveTips) + tips.DefaultTips = "MemberEnterNotification" var n NotificationMsg n.SendID = req.OpUserID n.ContentType = constant.MemberEnterNotification n.SessionType = constant.GroupChatType n.MsgFrom = constant.SysMsgType n.OperationID = req.OperationID - - MemberLeaveTips := open_im_sdk.MemberEnterTips{Group: &open_im_sdk.GroupInfo{}, EntrantUser: &open_im_sdk.GroupMemberFullInfo{}} - setGroupInfo(req.GroupID, MemberLeaveTips.Group) - setOpUserInfo(req.OpUserID, req.GroupID, MemberLeaveTips.EntrantUser) - - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(MemberLeaveTips) - tips.DefaultTips = "MemberEnterNotification" n.Content, _ = json.Marshal(tips) n.RecvID = req.GroupID Notification(&n) - } diff --git a/pkg/base_info/group_api_struct.go b/pkg/base_info/group_api_struct.go index 71301455a..01ba3da84 100644 --- a/pkg/base_info/group_api_struct.go +++ b/pkg/base_info/group_api_struct.go @@ -54,7 +54,7 @@ type GetJoinedGroupListReq struct { } type GetJoinedGroupListResp struct { CommResp - GroupInfoList []*open_im_sdk.GroupInfo + GroupInfoList []*open_im_sdk.GroupInfo `json:"-"` Data []map[string]interface{} `json:"data"` } @@ -66,9 +66,9 @@ type GetGroupMemberListReq struct { } type GetGroupMemberListResp struct { CommResp - NextSeq int32 `json:"nextSeq"` - MemberList []*open_im_sdk.GroupMemberFullInfo - Data []map[string]interface{} `json:"data"` + NextSeq int32 `json:"nextSeq"` + MemberList []*open_im_sdk.GroupMemberFullInfo `json:"-"` + Data []map[string]interface{} `json:"data"` } type GetGroupAllMemberReq struct { @@ -90,7 +90,7 @@ type CreateGroupReq struct { } type CreateGroupResp struct { CommResp - GroupInfo open_im_sdk.GroupInfo + GroupInfo open_im_sdk.GroupInfo `jason:-` Data map[string]interface{} `json:"data"` } @@ -100,8 +100,8 @@ type GetGroupApplicationListReq struct { } type GetGroupApplicationListResp struct { CommResp - GroupRequestList []*open_im_sdk.GroupRequest - Data []map[string]interface{} `json:"data"` + GroupRequestList []*open_im_sdk.GroupRequest `json:"-"` + Data []map[string]interface{} `json:"data"` } type GetGroupInfoReq struct { @@ -110,7 +110,7 @@ type GetGroupInfoReq struct { } type GetGroupInfoResp struct { CommResp - GroupInfoList []*open_im_sdk.GroupInfo + GroupInfoList []*open_im_sdk.GroupInfo `json:"-"` Data []map[string]interface{} `json:"data"` } diff --git a/pkg/common/log/logrus.go b/pkg/common/log/logrus.go index 03b768eca..936f3e9b2 100644 --- a/pkg/common/log/logrus.go +++ b/pkg/common/log/logrus.go @@ -88,33 +88,25 @@ func initRotateLogs(rotationTime time.Duration, maxRemainNum uint, level string, } } -//Deprecated -func Info(token, OperationID, format string, args ...interface{}) { +func Info(OperationID string, args ...interface{}) { logger.WithFields(logrus.Fields{ - "PID": logger.Pid, "OperationID": OperationID, - }).Infof(format, args...) - + "PID": logger.Pid, + }).Infoln(args) } -//Deprecated -func Error(token, OperationID, format string, args ...interface{}) { - +func Error(OperationID string, args ...interface{}) { logger.WithFields(logrus.Fields{ - "PID": logger.Pid, "OperationID": OperationID, - }).Errorf(format, args...) - + "PID": logger.Pid, + }).Errorln(args) } -//Deprecated -func Debug(token, OperationID, format string, args ...interface{}) { - +func Debug(OperationID string, args ...interface{}) { logger.WithFields(logrus.Fields{ - "PID": logger.Pid, "OperationID": OperationID, - }).Debugf(format, args...) - + "PID": logger.Pid, + }).Debugln(args) } //Deprecated From 2a3cf5f0025ee0c438002bcfe4bba78681b1e62d Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Fri, 14 Jan 2022 16:48:42 +0800 Subject: [PATCH 276/337] Refactor code --- internal/rpc/msg/friend_notification.go | 223 ++++++++++++------------ 1 file changed, 115 insertions(+), 108 deletions(-) diff --git a/internal/rpc/msg/friend_notification.go b/internal/rpc/msg/friend_notification.go index df71e919f..1d130882e 100644 --- a/internal/rpc/msg/friend_notification.go +++ b/internal/rpc/msg/friend_notification.go @@ -4,6 +4,7 @@ import ( "Open_IM/pkg/common/constant" imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" "Open_IM/pkg/common/log" + utils2 "Open_IM/pkg/common/utils" pbFriend "Open_IM/pkg/proto/friend" open_im_sdk "Open_IM/pkg/proto/sdk_ws" "Open_IM/pkg/utils" @@ -27,23 +28,31 @@ import ( // PublicUserInfo OpedUser = 3; //user2 //} -func getFromToUserNickname(fromUserID, toUserID string) (string, string) { - from, err1 := imdb.GetUserByUserID(fromUserID) - to, err2 := imdb.GetUserByUserID(toUserID) - if err1 != nil || err2 != nil { - log.NewError("FindUserByUID failed ", err1, err2, fromUserID, toUserID) +func getFromToUserNickname(fromUserID, toUserID string) (string, string, error) { + from, err := imdb.GetUserByUserID(fromUserID) + if err != nil { + return "", "", utils.Wrap(err, "") } - fromNickname, toNickname := "", "" - if from != nil { - fromNickname = from.Nickname + to, err := imdb.GetUserByUserID(toUserID) + if err != nil { + return "", "", utils.Wrap(err, "") } - if to != nil { - toNickname = to.Nickname - } - return fromNickname, toNickname + return from.Nickname, to.Nickname, nil } func FriendApplicationAddedNotification(req *pbFriend.AddFriendReq) { + var FriendApplicationAddedTips open_im_sdk.FriendApplicationAddedTips + FriendApplicationAddedTips.FromToUserID.FromUserID = req.CommID.FromUserID + FriendApplicationAddedTips.FromToUserID.ToUserID = req.CommID.ToUserID + fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) + if err != nil { + log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID) + return + } + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(FriendApplicationAddedTips) + tips.DefaultTips = fromUserNickname + " FriendApplicationAddedNotification " + toUserNickname + var n NotificationMsg n.SendID = req.CommID.FromUserID n.RecvID = req.CommID.ToUserID @@ -51,19 +60,24 @@ func FriendApplicationAddedNotification(req *pbFriend.AddFriendReq) { n.SessionType = constant.SingleChatType n.MsgFrom = constant.SysMsgType n.OperationID = req.CommID.OperationID - - var FriendApplicationAddedTips open_im_sdk.FriendApplicationAddedTips - FriendApplicationAddedTips.FromToUserID.FromUserID = req.CommID.FromUserID - FriendApplicationAddedTips.FromToUserID.ToUserID = req.CommID.ToUserID - fromUserNickname, toUserNickname := getFromToUserNickname(req.CommID.OperationID, req.CommID.FromUserID, req.CommID.ToUserID) - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(FriendApplicationAddedTips) - tips.DefaultTips = fromUserNickname + " FriendApplicationAddedNotification " + toUserNickname n.Content, _ = json.Marshal(tips) - Notification(&n, true) + Notification(&n) } func FriendApplicationProcessedNotification(req *pbFriend.AddFriendResponseReq) { + var FriendApplicationProcessedTips open_im_sdk.FriendApplicationProcessedTips + FriendApplicationProcessedTips.FromToUserID.FromUserID = req.CommID.FromUserID + FriendApplicationProcessedTips.FromToUserID.ToUserID = req.CommID.ToUserID + fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) + if err != nil { + log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID) + return + } + + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(FriendApplicationProcessedTips) + tips.DefaultTips = fromUserNickname + " FriendApplicationProcessedNotification " + toUserNickname + var n NotificationMsg n.SendID = req.CommID.FromUserID n.RecvID = req.CommID.ToUserID @@ -71,19 +85,35 @@ func FriendApplicationProcessedNotification(req *pbFriend.AddFriendResponseReq) n.SessionType = constant.SingleChatType n.MsgFrom = constant.SysMsgType n.OperationID = req.CommID.OperationID - - var FriendApplicationProcessedTips open_im_sdk.FriendApplicationProcessedTips - FriendApplicationProcessedTips.FromToUserID.FromUserID = req.CommID.FromUserID - FriendApplicationProcessedTips.FromToUserID.ToUserID = req.CommID.ToUserID - fromUserNickname, toUserNickname := getFromToUserNickname(req.CommID.OperationID, req.CommID.FromUserID, req.CommID.ToUserID) - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(FriendApplicationProcessedTips) - tips.DefaultTips = fromUserNickname + " FriendApplicationProcessedNotification " + toUserNickname n.Content, _ = json.Marshal(tips) Notification(&n) } func FriendAddedNotification(operationID, opUserID, fromUserID, toUserID string) { + var FriendAddedTips open_im_sdk.FriendAddedTips + user, err := imdb.GetUserByUserID(opUserID) + if err != nil { + log.NewError(operationID, "GetUserByUserID failed ", err.Error(), opUserID) + return + } + utils.CopyStructFields(FriendAddedTips.OpUser, user) + + friend, err := imdb.GetFriendRelationshipFromFriend(fromUserID, toUserID) + if err != nil { + log.NewError(operationID, "GetFriendRelationshipFromFriend failed ", err.Error(), fromUserID, toUserID) + return + } + utils2.FriendDBCopyOpenIM(FriendAddedTips.Friend, friend) + + fromUserNickname, toUserNickname, err := getFromToUserNickname(fromUserID, toUserID) + if err != nil { + log.Error(operationID, "getFromToUserNickname failed ", err.Error(), fromUserID, toUserID) + return + } + + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(FriendAddedTips) + tips.DefaultTips = fromUserNickname + " FriendAddedNotification " + toUserNickname var n NotificationMsg n.SendID = fromUserID n.RecvID = toUserID @@ -91,44 +121,6 @@ func FriendAddedNotification(operationID, opUserID, fromUserID, toUserID string) n.SessionType = constant.SingleChatType n.MsgFrom = constant.SysMsgType n.OperationID = operationID - - var FriendAddedTips open_im_sdk.FriendAddedTips - - user, err := imdb.GetUserByUserID(opUserID) - if err != nil { - log.NewError(operationID, "FindUserByUID failed ", err.Error(), opUserID) - - } else { - utils.CopyStructFields(FriendAddedTips.OpUser, user) - } - - friend, err := imdb.GetFriendRelationshipFromFriend(fromUserID, toUserID) - if err != nil { - log.NewError(operationID, "FindUserByUID failed ", err.Error(), fromUserID, toUserID) - } else { - FriendAddedTips.Friend.Remark = friend.Remark - } - - from, err := imdb.GetUserByUserID(fromUserID) - if err != nil { - log.NewError(operationID, "FindUserByUID failed ", err.Error(), fromUserID) - - } else { - utils.CopyStructFields(FriendAddedTips.Friend, from) - } - - to, err := imdb.GetUserByUserID(toUserID) - if err != nil { - log.NewError(operationID, "FindUserByUID failed ", err.Error(), toUserID) - - } else { - utils.CopyStructFields(FriendAddedTips.Friend.FriendUser, to) - } - - fromUserNickname, toUserNickname := from.Nickname, to.Nickname - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(FriendAddedTips) - tips.DefaultTips = fromUserNickname + " FriendAddedNotification " + toUserNickname n.Content, _ = json.Marshal(tips) Notification(&n) } @@ -137,6 +129,18 @@ func FriendAddedNotification(operationID, opUserID, fromUserID, toUserID string) // FriendInfo Friend = 1; //} func FriendDeletedNotification(req *pbFriend.DeleteFriendReq) { + + var FriendDeletedTips open_im_sdk.FriendDeletedTips + FriendDeletedTips.FromToUserID.FromUserID = req.CommID.FromUserID + FriendDeletedTips.FromToUserID.ToUserID = req.CommID.ToUserID + fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) + if err != nil { + log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", req.CommID.FromUserID, req.CommID.ToUserID) + return + } + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(FriendDeletedTips) + tips.DefaultTips = fromUserNickname + " FriendDeletedNotification " + toUserNickname var n NotificationMsg n.SendID = req.CommID.FromUserID n.RecvID = req.CommID.ToUserID @@ -144,14 +148,6 @@ func FriendDeletedNotification(req *pbFriend.DeleteFriendReq) { n.SessionType = constant.SingleChatType n.MsgFrom = constant.SysMsgType n.OperationID = req.CommID.OperationID - - var FriendDeletedTips open_im_sdk.FriendDeletedTips - FriendDeletedTips.FromToUserID.FromUserID = req.CommID.FromUserID - FriendDeletedTips.FromToUserID.ToUserID = req.CommID.ToUserID - fromUserNickname, toUserNickname := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(FriendDeletedTips) - tips.DefaultTips = fromUserNickname + " FriendDeletedNotification " + toUserNickname n.Content, _ = json.Marshal(tips) Notification(&n) } @@ -162,6 +158,18 @@ func FriendDeletedNotification(req *pbFriend.DeleteFriendReq) { // uint64 OperationTime = 3; //} func FriendInfoChangedNotification(operationID, opUserID, fromUserID, toUserID string) { + + var FriendInfoChangedTips open_im_sdk.FriendInfoChangedTips + FriendInfoChangedTips.FromToUserID.FromUserID = fromUserID + FriendInfoChangedTips.FromToUserID.ToUserID = toUserID + fromUserNickname, toUserNickname, err := getFromToUserNickname(fromUserID, toUserID) + if err != nil { + log.Error(operationID, "getFromToUserNickname failed ", fromUserID, toUserID) + return + } + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(FriendInfoChangedTips) + tips.DefaultTips = fromUserNickname + " FriendDeletedNotification " + toUserNickname var n NotificationMsg n.SendID = fromUserID n.RecvID = toUserID @@ -170,18 +178,23 @@ func FriendInfoChangedNotification(operationID, opUserID, fromUserID, toUserID s n.MsgFrom = constant.SysMsgType n.OperationID = operationID - var FriendInfoChangedTips open_im_sdk.FriendInfoChangedTips - FriendInfoChangedTips.FromToUserID.FromUserID = fromUserID - FriendInfoChangedTips.FromToUserID.ToUserID = toUserID - fromUserNickname, toUserNickname := getFromToUserNickname(fromUserID, toUserID) - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(FriendInfoChangedTips) - tips.DefaultTips = fromUserNickname + " FriendDeletedNotification " + toUserNickname n.Content, _ = json.Marshal(tips) Notification(&n) } func BlackAddedNotification(req *pbFriend.AddBlacklistReq) { + + var BlackAddedTips open_im_sdk.BlackAddedTips + BlackAddedTips.FromToUserID.FromUserID = req.CommID.FromUserID + BlackAddedTips.FromToUserID.ToUserID = req.CommID.ToUserID + fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) + if err != nil { + log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", req.CommID.FromUserID, req.CommID.ToUserID) + return + } + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(BlackAddedTips) + tips.DefaultTips = fromUserNickname + " BlackAddedNotification " + toUserNickname var n NotificationMsg n.SendID = req.CommID.FromUserID n.RecvID = req.CommID.ToUserID @@ -189,14 +202,6 @@ func BlackAddedNotification(req *pbFriend.AddBlacklistReq) { n.SessionType = constant.SingleChatType n.MsgFrom = constant.SysMsgType n.OperationID = req.CommID.OperationID - - var BlackAddedTips open_im_sdk.BlackAddedTips - BlackAddedTips.FromToUserID.FromUserID = req.CommID.FromUserID - BlackAddedTips.FromToUserID.ToUserID = req.CommID.ToUserID - fromUserNickname, toUserNickname := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(BlackAddedTips) - tips.DefaultTips = fromUserNickname + " BlackAddedNotification " + toUserNickname n.Content, _ = json.Marshal(tips) Notification(&n) } @@ -205,6 +210,17 @@ func BlackAddedNotification(req *pbFriend.AddBlacklistReq) { // BlackInfo Black = 1; //} func BlackDeletedNotification(req *pbFriend.RemoveBlacklistReq) { + var BlackDeletedTips open_im_sdk.BlackDeletedTips + BlackDeletedTips.FromToUserID.FromUserID = req.CommID.FromUserID + BlackDeletedTips.FromToUserID.ToUserID = req.CommID.ToUserID + fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) + if err != nil { + log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID) + return + } + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(BlackDeletedTips) + tips.DefaultTips = fromUserNickname + " BlackDeletedNotification " + toUserNickname var n NotificationMsg n.SendID = req.CommID.FromUserID n.RecvID = req.CommID.ToUserID @@ -212,14 +228,6 @@ func BlackDeletedNotification(req *pbFriend.RemoveBlacklistReq) { n.SessionType = constant.SingleChatType n.MsgFrom = constant.SysMsgType n.OperationID = req.CommID.OperationID - - var BlackDeletedTips open_im_sdk.BlackDeletedTips - BlackDeletedTips.FromToUserID.FromUserID = req.CommID.FromUserID - BlackDeletedTips.FromToUserID.ToUserID = req.CommID.ToUserID - fromUserNickname, toUserNickname := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(BlackDeletedTips) - tips.DefaultTips = fromUserNickname + " BlackDeletedNotification " + toUserNickname n.Content, _ = json.Marshal(tips) Notification(&n) } @@ -230,6 +238,15 @@ func BlackDeletedNotification(req *pbFriend.RemoveBlacklistReq) { // uint64 OperationTime = 3; //} func SelfInfoUpdatedNotification(operationID, userID string) { + var SelfInfoUpdatedTips open_im_sdk.SelfInfoUpdatedTips + SelfInfoUpdatedTips.UserID = userID + u, err := imdb.GetUserByUserID(userID) + if err != nil { + log.NewError(operationID, "FindUserByUID failed ", err.Error(), userID) + return + } + var tips open_im_sdk.TipsComm + tips.Detail, _ = json.Marshal(SelfInfoUpdatedTips) var n NotificationMsg n.SendID = userID n.RecvID = userID @@ -238,16 +255,6 @@ func SelfInfoUpdatedNotification(operationID, userID string) { n.MsgFrom = constant.SysMsgType n.OperationID = operationID - var SelfInfoUpdatedTips open_im_sdk.SelfInfoUpdatedTips - SelfInfoUpdatedTips.UserID = userID - - var tips open_im_sdk.TipsComm - u, err := imdb.GetUserByUserID(userID) - if err != nil { - log.NewError(operationID, "FindUserByUID failed ", err.Error(), userID) - } - - tips.Detail, _ = json.Marshal(SelfInfoUpdatedTips) tips.DefaultTips = u.Nickname + " SelfInfoUpdatedNotification " n.Content, _ = json.Marshal(tips) Notification(&n) From 839123408b4ec854c030c7a4f9a298ae6f79853f Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Fri, 14 Jan 2022 18:16:50 +0800 Subject: [PATCH 277/337] Refactor code --- pkg/proto/friend/friend.proto | 2 +- pkg/proto/sdk_ws/ws.proto | 26 ++++++++++++++++---------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/pkg/proto/friend/friend.proto b/pkg/proto/friend/friend.proto index 9bb348178..96a4cb8e4 100644 --- a/pkg/proto/friend/friend.proto +++ b/pkg/proto/friend/friend.proto @@ -58,7 +58,7 @@ message GetFriendApplyListReq{ message GetFriendApplyListResp{ int32 ErrCode = 1; string ErrMsg = 2; - repeated open_im_sdk.FriendRequest FriendRequestList = 3; + repeated server_api_params.FriendRequest FriendRequestList = 3; } diff --git a/pkg/proto/sdk_ws/ws.proto b/pkg/proto/sdk_ws/ws.proto index bd3729e85..8c6c11018 100644 --- a/pkg/proto/sdk_ws/ws.proto +++ b/pkg/proto/sdk_ws/ws.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package open_im_sdk;//The package name to which the proto file belongs +package server_api_params;//The package name to which the proto file belongs //option go_package = "./sdk_ws;open_im_sdk";//The generated go pb file is in the current directory, and the package name is open_im_sdk ////////////////////////////////base/////////////////////////////// @@ -87,15 +87,21 @@ message GroupRequest{ } message FriendRequest{ - string fromUserID = 1; - string toUserID = 2; - int32 handleResult = 3; - string reqMsg = 4; - uint32 createTime = 5; - string handlerUserID = 6; - string handleMsg = 7; - uint32 handleTime = 8; - string ex = 9; + string fromUserID = 1; + string fromNickname = 2; + string fromFaceURL = 3; + string fromGender = 4; + string toUserID = 5; + string toNickname = 6; + string toFaceURL = 7; + string toGender = 8; + int32 handleResult = 9; + string reqMsg = 10; + uint32 createTime = 11; + string handlerUserID = 12; + string handleMsg = 13; + uint32 handleTime = 14; + string ex = 15; } ///////////////////////////////////base end///////////////////////////////////// From 46016336052bc1fda0393c546afe22f692d603a7 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Fri, 14 Jan 2022 18:29:09 +0800 Subject: [PATCH 278/337] Refactor code --- internal/rpc/friend/firend.go | 9 + pkg/common/db/model_struct.go | 2 +- pkg/proto/friend/friend.pb.go | 188 +++++++------- pkg/proto/friend/friend.proto | 8 +- pkg/proto/sdk_ws/ws.pb.go | 471 +++++++++++++++++++--------------- pkg/proto/sdk_ws/ws.proto | 4 +- 6 files changed, 372 insertions(+), 310 deletions(-) diff --git a/internal/rpc/friend/firend.go b/internal/rpc/friend/firend.go index 14de9bb20..4d54787e9 100644 --- a/internal/rpc/friend/firend.go +++ b/internal/rpc/friend/firend.go @@ -442,8 +442,17 @@ func (s *friendServer) GetFriendApplyList(ctx context.Context, req *pbFriend.Get for _, applyUserInfo := range ApplyUsersInfo { var userInfo sdkws.FriendRequest utils.CopyStructFields(&userInfo, applyUserInfo) + u, err := imdb.GetUserByUserID(userInfo.FromUserID) + if err != nil { + log.Error(req.CommID.OperationID, "GetUserByUserID", userInfo.FromUserID) + continue + } + userInfo.FromNickname = u.Nickname + userInfo.FromFaceURL = u.FaceURL + userInfo.FromGender = u.Gend appleUserList = append(appleUserList, &userInfo) } + log.NewInfo(req.CommID.OperationID, "rpc GetFriendApplyList ok", pbFriend.GetFriendApplyListResp{FriendRequestList: appleUserList}) return &pbFriend.GetFriendApplyListResp{FriendRequestList: appleUserList}, nil } diff --git a/pkg/common/db/model_struct.go b/pkg/common/db/model_struct.go index 65a57b96a..0af3a6919 100644 --- a/pkg/common/db/model_struct.go +++ b/pkg/common/db/model_struct.go @@ -138,7 +138,7 @@ type GroupRequest struct { type User struct { UserID string `gorm:"column:user_id;primary_key;size:64"` Nickname string `gorm:"column:name;size:255"` - FaceUrl string `gorm:"column:face_url;size:255"` + FaceURL string `gorm:"column:face_url;size:255"` Gender int32 `gorm:"column:gender"` PhoneNumber string `gorm:"column:phone_number;size:32"` Birth time.Time `gorm:"column:birth"` diff --git a/pkg/proto/friend/friend.pb.go b/pkg/proto/friend/friend.pb.go index 1c46e62ec..0f13634a6 100644 --- a/pkg/proto/friend/friend.pb.go +++ b/pkg/proto/friend/friend.pb.go @@ -36,7 +36,7 @@ func (m *CommonResp) Reset() { *m = CommonResp{} } func (m *CommonResp) String() string { return proto.CompactTextString(m) } func (*CommonResp) ProtoMessage() {} func (*CommonResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_74665a4d507faa8c, []int{0} + return fileDescriptor_friend_33f7e79cb4454131, []int{0} } func (m *CommonResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CommonResp.Unmarshal(m, b) @@ -84,7 +84,7 @@ func (m *CommID) Reset() { *m = CommID{} } func (m *CommID) String() string { return proto.CompactTextString(m) } func (*CommID) ProtoMessage() {} func (*CommID) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_74665a4d507faa8c, []int{1} + return fileDescriptor_friend_33f7e79cb4454131, []int{1} } func (m *CommID) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CommID.Unmarshal(m, b) @@ -143,7 +143,7 @@ func (m *GetFriendsInfoReq) Reset() { *m = GetFriendsInfoReq{} } func (m *GetFriendsInfoReq) String() string { return proto.CompactTextString(m) } func (*GetFriendsInfoReq) ProtoMessage() {} func (*GetFriendsInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_74665a4d507faa8c, []int{2} + return fileDescriptor_friend_33f7e79cb4454131, []int{2} } func (m *GetFriendsInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendsInfoReq.Unmarshal(m, b) @@ -183,7 +183,7 @@ func (m *GetFriendInfoResp) Reset() { *m = GetFriendInfoResp{} } func (m *GetFriendInfoResp) String() string { return proto.CompactTextString(m) } func (*GetFriendInfoResp) ProtoMessage() {} func (*GetFriendInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_74665a4d507faa8c, []int{3} + return fileDescriptor_friend_33f7e79cb4454131, []int{3} } func (m *GetFriendInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendInfoResp.Unmarshal(m, b) @@ -236,7 +236,7 @@ func (m *AddFriendReq) Reset() { *m = AddFriendReq{} } func (m *AddFriendReq) String() string { return proto.CompactTextString(m) } func (*AddFriendReq) ProtoMessage() {} func (*AddFriendReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_74665a4d507faa8c, []int{4} + return fileDescriptor_friend_33f7e79cb4454131, []int{4} } func (m *AddFriendReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddFriendReq.Unmarshal(m, b) @@ -281,7 +281,7 @@ func (m *AddFriendResp) Reset() { *m = AddFriendResp{} } func (m *AddFriendResp) String() string { return proto.CompactTextString(m) } func (*AddFriendResp) ProtoMessage() {} func (*AddFriendResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_74665a4d507faa8c, []int{5} + return fileDescriptor_friend_33f7e79cb4454131, []int{5} } func (m *AddFriendResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddFriendResp.Unmarshal(m, b) @@ -322,7 +322,7 @@ func (m *ImportFriendReq) Reset() { *m = ImportFriendReq{} } func (m *ImportFriendReq) String() string { return proto.CompactTextString(m) } func (*ImportFriendReq) ProtoMessage() {} func (*ImportFriendReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_74665a4d507faa8c, []int{6} + return fileDescriptor_friend_33f7e79cb4454131, []int{6} } func (m *ImportFriendReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ImportFriendReq.Unmarshal(m, b) @@ -382,7 +382,7 @@ func (m *UserIDResult) Reset() { *m = UserIDResult{} } func (m *UserIDResult) String() string { return proto.CompactTextString(m) } func (*UserIDResult) ProtoMessage() {} func (*UserIDResult) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_74665a4d507faa8c, []int{7} + return fileDescriptor_friend_33f7e79cb4454131, []int{7} } func (m *UserIDResult) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserIDResult.Unmarshal(m, b) @@ -428,7 +428,7 @@ func (m *ImportFriendResp) Reset() { *m = ImportFriendResp{} } func (m *ImportFriendResp) String() string { return proto.CompactTextString(m) } func (*ImportFriendResp) ProtoMessage() {} func (*ImportFriendResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_74665a4d507faa8c, []int{8} + return fileDescriptor_friend_33f7e79cb4454131, []int{8} } func (m *ImportFriendResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ImportFriendResp.Unmarshal(m, b) @@ -473,7 +473,7 @@ func (m *GetFriendApplyListReq) Reset() { *m = GetFriendApplyListReq{} } func (m *GetFriendApplyListReq) String() string { return proto.CompactTextString(m) } func (*GetFriendApplyListReq) ProtoMessage() {} func (*GetFriendApplyListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_74665a4d507faa8c, []int{9} + return fileDescriptor_friend_33f7e79cb4454131, []int{9} } func (m *GetFriendApplyListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendApplyListReq.Unmarshal(m, b) @@ -513,7 +513,7 @@ func (m *GetFriendApplyListResp) Reset() { *m = GetFriendApplyListResp{} func (m *GetFriendApplyListResp) String() string { return proto.CompactTextString(m) } func (*GetFriendApplyListResp) ProtoMessage() {} func (*GetFriendApplyListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_74665a4d507faa8c, []int{10} + return fileDescriptor_friend_33f7e79cb4454131, []int{10} } func (m *GetFriendApplyListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendApplyListResp.Unmarshal(m, b) @@ -565,7 +565,7 @@ func (m *GetFriendListReq) Reset() { *m = GetFriendListReq{} } func (m *GetFriendListReq) String() string { return proto.CompactTextString(m) } func (*GetFriendListReq) ProtoMessage() {} func (*GetFriendListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_74665a4d507faa8c, []int{11} + return fileDescriptor_friend_33f7e79cb4454131, []int{11} } func (m *GetFriendListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendListReq.Unmarshal(m, b) @@ -605,7 +605,7 @@ func (m *GetFriendListResp) Reset() { *m = GetFriendListResp{} } func (m *GetFriendListResp) String() string { return proto.CompactTextString(m) } func (*GetFriendListResp) ProtoMessage() {} func (*GetFriendListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_74665a4d507faa8c, []int{12} + return fileDescriptor_friend_33f7e79cb4454131, []int{12} } func (m *GetFriendListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendListResp.Unmarshal(m, b) @@ -657,7 +657,7 @@ func (m *AddBlacklistReq) Reset() { *m = AddBlacklistReq{} } func (m *AddBlacklistReq) String() string { return proto.CompactTextString(m) } func (*AddBlacklistReq) ProtoMessage() {} func (*AddBlacklistReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_74665a4d507faa8c, []int{13} + return fileDescriptor_friend_33f7e79cb4454131, []int{13} } func (m *AddBlacklistReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddBlacklistReq.Unmarshal(m, b) @@ -695,7 +695,7 @@ func (m *AddBlacklistResp) Reset() { *m = AddBlacklistResp{} } func (m *AddBlacklistResp) String() string { return proto.CompactTextString(m) } func (*AddBlacklistResp) ProtoMessage() {} func (*AddBlacklistResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_74665a4d507faa8c, []int{14} + return fileDescriptor_friend_33f7e79cb4454131, []int{14} } func (m *AddBlacklistResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddBlacklistResp.Unmarshal(m, b) @@ -733,7 +733,7 @@ func (m *RemoveBlacklistReq) Reset() { *m = RemoveBlacklistReq{} } func (m *RemoveBlacklistReq) String() string { return proto.CompactTextString(m) } func (*RemoveBlacklistReq) ProtoMessage() {} func (*RemoveBlacklistReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_74665a4d507faa8c, []int{15} + return fileDescriptor_friend_33f7e79cb4454131, []int{15} } func (m *RemoveBlacklistReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RemoveBlacklistReq.Unmarshal(m, b) @@ -771,7 +771,7 @@ func (m *RemoveBlacklistResp) Reset() { *m = RemoveBlacklistResp{} } func (m *RemoveBlacklistResp) String() string { return proto.CompactTextString(m) } func (*RemoveBlacklistResp) ProtoMessage() {} func (*RemoveBlacklistResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_74665a4d507faa8c, []int{16} + return fileDescriptor_friend_33f7e79cb4454131, []int{16} } func (m *RemoveBlacklistResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RemoveBlacklistResp.Unmarshal(m, b) @@ -809,7 +809,7 @@ func (m *GetBlacklistReq) Reset() { *m = GetBlacklistReq{} } func (m *GetBlacklistReq) String() string { return proto.CompactTextString(m) } func (*GetBlacklistReq) ProtoMessage() {} func (*GetBlacklistReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_74665a4d507faa8c, []int{17} + return fileDescriptor_friend_33f7e79cb4454131, []int{17} } func (m *GetBlacklistReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetBlacklistReq.Unmarshal(m, b) @@ -849,7 +849,7 @@ func (m *GetBlacklistResp) Reset() { *m = GetBlacklistResp{} } func (m *GetBlacklistResp) String() string { return proto.CompactTextString(m) } func (*GetBlacklistResp) ProtoMessage() {} func (*GetBlacklistResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_74665a4d507faa8c, []int{18} + return fileDescriptor_friend_33f7e79cb4454131, []int{18} } func (m *GetBlacklistResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetBlacklistResp.Unmarshal(m, b) @@ -901,7 +901,7 @@ func (m *IsFriendReq) Reset() { *m = IsFriendReq{} } func (m *IsFriendReq) String() string { return proto.CompactTextString(m) } func (*IsFriendReq) ProtoMessage() {} func (*IsFriendReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_74665a4d507faa8c, []int{19} + return fileDescriptor_friend_33f7e79cb4454131, []int{19} } func (m *IsFriendReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IsFriendReq.Unmarshal(m, b) @@ -941,7 +941,7 @@ func (m *IsFriendResp) Reset() { *m = IsFriendResp{} } func (m *IsFriendResp) String() string { return proto.CompactTextString(m) } func (*IsFriendResp) ProtoMessage() {} func (*IsFriendResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_74665a4d507faa8c, []int{20} + return fileDescriptor_friend_33f7e79cb4454131, []int{20} } func (m *IsFriendResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IsFriendResp.Unmarshal(m, b) @@ -993,7 +993,7 @@ func (m *IsInBlackListReq) Reset() { *m = IsInBlackListReq{} } func (m *IsInBlackListReq) String() string { return proto.CompactTextString(m) } func (*IsInBlackListReq) ProtoMessage() {} func (*IsInBlackListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_74665a4d507faa8c, []int{21} + return fileDescriptor_friend_33f7e79cb4454131, []int{21} } func (m *IsInBlackListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IsInBlackListReq.Unmarshal(m, b) @@ -1033,7 +1033,7 @@ func (m *IsInBlackListResp) Reset() { *m = IsInBlackListResp{} } func (m *IsInBlackListResp) String() string { return proto.CompactTextString(m) } func (*IsInBlackListResp) ProtoMessage() {} func (*IsInBlackListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_74665a4d507faa8c, []int{22} + return fileDescriptor_friend_33f7e79cb4454131, []int{22} } func (m *IsInBlackListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IsInBlackListResp.Unmarshal(m, b) @@ -1085,7 +1085,7 @@ func (m *DeleteFriendReq) Reset() { *m = DeleteFriendReq{} } func (m *DeleteFriendReq) String() string { return proto.CompactTextString(m) } func (*DeleteFriendReq) ProtoMessage() {} func (*DeleteFriendReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_74665a4d507faa8c, []int{23} + return fileDescriptor_friend_33f7e79cb4454131, []int{23} } func (m *DeleteFriendReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteFriendReq.Unmarshal(m, b) @@ -1123,7 +1123,7 @@ func (m *DeleteFriendResp) Reset() { *m = DeleteFriendResp{} } func (m *DeleteFriendResp) String() string { return proto.CompactTextString(m) } func (*DeleteFriendResp) ProtoMessage() {} func (*DeleteFriendResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_74665a4d507faa8c, []int{24} + return fileDescriptor_friend_33f7e79cb4454131, []int{24} } func (m *DeleteFriendResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteFriendResp.Unmarshal(m, b) @@ -1164,7 +1164,7 @@ func (m *AddFriendResponseReq) Reset() { *m = AddFriendResponseReq{} } func (m *AddFriendResponseReq) String() string { return proto.CompactTextString(m) } func (*AddFriendResponseReq) ProtoMessage() {} func (*AddFriendResponseReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_74665a4d507faa8c, []int{25} + return fileDescriptor_friend_33f7e79cb4454131, []int{25} } func (m *AddFriendResponseReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddFriendResponseReq.Unmarshal(m, b) @@ -1216,7 +1216,7 @@ func (m *AddFriendResponseResp) Reset() { *m = AddFriendResponseResp{} } func (m *AddFriendResponseResp) String() string { return proto.CompactTextString(m) } func (*AddFriendResponseResp) ProtoMessage() {} func (*AddFriendResponseResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_74665a4d507faa8c, []int{26} + return fileDescriptor_friend_33f7e79cb4454131, []int{26} } func (m *AddFriendResponseResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddFriendResponseResp.Unmarshal(m, b) @@ -1255,7 +1255,7 @@ func (m *SetFriendRemarkReq) Reset() { *m = SetFriendRemarkReq{} } func (m *SetFriendRemarkReq) String() string { return proto.CompactTextString(m) } func (*SetFriendRemarkReq) ProtoMessage() {} func (*SetFriendRemarkReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_74665a4d507faa8c, []int{27} + return fileDescriptor_friend_33f7e79cb4454131, []int{27} } func (m *SetFriendRemarkReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetFriendRemarkReq.Unmarshal(m, b) @@ -1300,7 +1300,7 @@ func (m *SetFriendRemarkResp) Reset() { *m = SetFriendRemarkResp{} } func (m *SetFriendRemarkResp) String() string { return proto.CompactTextString(m) } func (*SetFriendRemarkResp) ProtoMessage() {} func (*SetFriendRemarkResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_74665a4d507faa8c, []int{28} + return fileDescriptor_friend_33f7e79cb4454131, []int{28} } func (m *SetFriendRemarkResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetFriendRemarkResp.Unmarshal(m, b) @@ -1338,7 +1338,7 @@ func (m *GetSelfApplyListReq) Reset() { *m = GetSelfApplyListReq{} } func (m *GetSelfApplyListReq) String() string { return proto.CompactTextString(m) } func (*GetSelfApplyListReq) ProtoMessage() {} func (*GetSelfApplyListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_74665a4d507faa8c, []int{29} + return fileDescriptor_friend_33f7e79cb4454131, []int{29} } func (m *GetSelfApplyListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetSelfApplyListReq.Unmarshal(m, b) @@ -1378,7 +1378,7 @@ func (m *GetSelfApplyListResp) Reset() { *m = GetSelfApplyListResp{} } func (m *GetSelfApplyListResp) String() string { return proto.CompactTextString(m) } func (*GetSelfApplyListResp) ProtoMessage() {} func (*GetSelfApplyListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_74665a4d507faa8c, []int{30} + return fileDescriptor_friend_33f7e79cb4454131, []int{30} } func (m *GetSelfApplyListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetSelfApplyListResp.Unmarshal(m, b) @@ -1923,68 +1923,68 @@ var _Friend_serviceDesc = grpc.ServiceDesc{ Metadata: "friend/friend.proto", } -func init() { proto.RegisterFile("friend/friend.proto", fileDescriptor_friend_74665a4d507faa8c) } +func init() { proto.RegisterFile("friend/friend.proto", fileDescriptor_friend_33f7e79cb4454131) } -var fileDescriptor_friend_74665a4d507faa8c = []byte{ - // 945 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x57, 0xcf, 0x8f, 0xdb, 0x44, - 0x14, 0x96, 0x9b, 0xdd, 0x34, 0x79, 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 0xf2, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xdf, 0x16, 0xf8, 0xb5, 0xe7, 0x0e, 0x00, - 0x00, +var fileDescriptor_friend_33f7e79cb4454131 = []byte{ + // 949 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xcd, 0x8f, 0xdb, 0x44, + 0x14, 0x97, 0x9b, 0xdd, 0x34, 0x79, 0x49, 0x9b, 0x64, 0x92, 0x2d, 0xc1, 0xdd, 0xad, 0x52, 0x1f, + 0x50, 0xc4, 0x21, 0x91, 0x82, 0x2a, 0xb1, 0x14, 0x0a, 0xe9, 0x26, 0x59, 0x19, 0xd8, 0xa6, 0x9a, + 0x2d, 0x17, 0x84, 0x14, 0xb9, 0xf5, 0x24, 0x58, 0x71, 0xec, 0xa9, 0xc7, 0xdb, 0x8a, 0x2b, 0x27, + 0x0e, 0x5c, 0x91, 0x10, 0x1c, 0xf8, 0x57, 0x91, 0x67, 0xec, 0x78, 0xfc, 0x91, 0x0a, 0x9b, 0x1e, + 0x7a, 0xb2, 0xdf, 0xc7, 0xef, 0xf9, 0x7d, 0xcd, 0x7b, 0x63, 0xe8, 0xae, 0x3d, 0x8b, 0x38, 0xe6, + 0x58, 0x3c, 0x46, 0xd4, 0x73, 0x7d, 0x17, 0x55, 0x05, 0xa5, 0x3e, 0x5c, 0x52, 0xe2, 0xac, 0xf4, + 0xab, 0x31, 0xdd, 0x6e, 0xc6, 0x5c, 0x34, 0x66, 0xe6, 0x76, 0xf5, 0x96, 0x8d, 0xdf, 0x32, 0xa1, + 0xaa, 0x3d, 0x01, 0xb8, 0x70, 0x77, 0x3b, 0xd7, 0xc1, 0x84, 0x51, 0xd4, 0x87, 0xdb, 0xc4, 0xf3, + 0x2e, 0x5c, 0x93, 0xf4, 0x95, 0x81, 0x32, 0x3c, 0xc6, 0x11, 0x89, 0xee, 0x41, 0x95, 0x78, 0xde, + 0x15, 0xdb, 0xf4, 0x6f, 0x0d, 0x94, 0x61, 0x1d, 0x87, 0x94, 0xf6, 0xab, 0x02, 0xd5, 0xc0, 0x80, + 0x3e, 0x43, 0x2a, 0xd4, 0x96, 0xf4, 0x07, 0x46, 0x3c, 0x7d, 0xc6, 0xd1, 0x75, 0xbc, 0xa7, 0xd1, + 0x00, 0x1a, 0x4b, 0x4a, 0x3c, 0xc3, 0xb7, 0x5c, 0x47, 0x9f, 0x85, 0x36, 0x64, 0x56, 0x80, 0x7e, + 0xe1, 0x86, 0xe8, 0x23, 0x81, 0x8e, 0x68, 0xf4, 0x00, 0x60, 0xe1, 0xb9, 0xbb, 0x50, 0x7a, 0xcc, + 0xa5, 0x12, 0x47, 0x7b, 0x0c, 0x9d, 0x4b, 0xe2, 0x2f, 0x78, 0xd0, 0x4c, 0x77, 0xd6, 0x2e, 0x26, + 0xaf, 0xd1, 0x27, 0x91, 0x63, 0xdc, 0x99, 0xc6, 0xe4, 0xee, 0x28, 0xcc, 0x91, 0xe0, 0xe2, 0x50, + 0xaa, 0xfd, 0xae, 0x48, 0x68, 0x01, 0x16, 0x99, 0x98, 0x27, 0x33, 0x31, 0x8f, 0x33, 0x31, 0x4f, + 0x64, 0x42, 0x50, 0x68, 0x0e, 0x77, 0x63, 0x1b, 0xdf, 0x5b, 0xcc, 0xef, 0x57, 0x06, 0x95, 0x61, + 0x63, 0x72, 0x36, 0x62, 0xc4, 0x7b, 0x43, 0xbc, 0x95, 0x41, 0xad, 0x15, 0x35, 0x3c, 0x63, 0xc7, + 0x46, 0xd2, 0xc7, 0x52, 0x20, 0xed, 0x19, 0x34, 0xa7, 0xa6, 0x29, 0x98, 0x05, 0xc2, 0x08, 0xdc, + 0xc2, 0xe4, 0xb5, 0xe4, 0x96, 0xa0, 0xb4, 0x0b, 0xb8, 0x23, 0xd9, 0x63, 0x14, 0x4d, 0xe4, 0x8a, + 0x87, 0x46, 0x91, 0x6c, 0x54, 0x48, 0xb0, 0xa4, 0xa5, 0xfd, 0xad, 0x40, 0x4b, 0xdf, 0x51, 0xd7, + 0xf3, 0x63, 0xc7, 0x3e, 0x85, 0xb6, 0x20, 0x44, 0x11, 0x78, 0xc4, 0xca, 0xa0, 0x32, 0xac, 0xe3, + 0x0c, 0xff, 0x3f, 0x94, 0x3f, 0x59, 0xe2, 0x4a, 0xba, 0xc4, 0x89, 0xe6, 0x3a, 0x4a, 0x36, 0x97, + 0xf6, 0x04, 0x9a, 0xe2, 0x0d, 0x13, 0x76, 0x63, 0xfb, 0x41, 0x2a, 0x12, 0x6d, 0x18, 0x52, 0x22, + 0x45, 0x81, 0x06, 0x77, 0xe0, 0x18, 0x87, 0x94, 0xf6, 0x9b, 0x02, 0xed, 0x64, 0x74, 0xe5, 0xd2, + 0x84, 0xbe, 0x81, 0xb6, 0xec, 0x08, 0x4f, 0xc9, 0x2d, 0xde, 0x04, 0xbd, 0x08, 0x29, 0xcb, 0x71, + 0x46, 0x5b, 0xfb, 0x1a, 0x4e, 0xf6, 0xbd, 0x38, 0xa5, 0xd4, 0xfe, 0x25, 0xe0, 0x16, 0xe9, 0xe6, + 0xbf, 0x14, 0xb8, 0x97, 0x67, 0xa1, 0x54, 0x4b, 0x3f, 0x83, 0xce, 0xbe, 0xde, 0x37, 0x84, 0xf9, + 0x52, 0x57, 0x0f, 0x0e, 0x76, 0x75, 0xa8, 0x8b, 0xb3, 0x50, 0xed, 0x0b, 0x68, 0xef, 0x7d, 0x2b, + 0x1a, 0x58, 0xe2, 0x98, 0xfe, 0x8f, 0x98, 0xde, 0xd3, 0x31, 0x3d, 0x87, 0xd6, 0xd4, 0x34, 0x9f, + 0xda, 0xc6, 0xab, 0xad, 0x5d, 0x30, 0x92, 0x05, 0xb4, 0x93, 0xd0, 0x92, 0x87, 0xf2, 0x4b, 0x40, + 0x98, 0xec, 0xdc, 0x37, 0xa4, 0x94, 0x17, 0x3a, 0x74, 0x33, 0xe8, 0x92, 0x8e, 0x9c, 0x43, 0xeb, + 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c, 0x1b, 0x71, 0x81, + 0xb2, 0x63, 0x2a, 0x2e, 0x50, 0xde, 0xb0, 0x99, 0x42, 0xd3, 0x92, 0x6e, 0xd8, 0x71, 0x80, 0xa9, + 0xbf, 0x8a, 0x38, 0xc0, 0xf4, 0x85, 0xfc, 0x69, 0xe7, 0xc7, 0xd6, 0x28, 0xfc, 0xcd, 0x7d, 0x2c, + 0x1e, 0x2f, 0xab, 0xfc, 0x1f, 0xf6, 0xb3, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x20, 0x88, 0xcd, + 0xd3, 0x05, 0x0f, 0x00, 0x00, } diff --git a/pkg/proto/friend/friend.proto b/pkg/proto/friend/friend.proto index 96a4cb8e4..1baf29c10 100644 --- a/pkg/proto/friend/friend.proto +++ b/pkg/proto/friend/friend.proto @@ -22,7 +22,7 @@ message GetFriendsInfoReq{ message GetFriendInfoResp{ int32 ErrCode = 1; string ErrMsg = 2; - repeated open_im_sdk.FriendInfo FriendInfoList = 3; + repeated server_api_params.FriendInfo FriendInfoList = 3; // int32 IsBlack = 4; } @@ -68,7 +68,7 @@ message GetFriendListReq{ message GetFriendListResp{ int32 ErrCode = 1; string ErrMsg = 2; - repeated open_im_sdk.FriendInfo FriendInfoList = 3; + repeated server_api_params.FriendInfo FriendInfoList = 3; } @@ -93,7 +93,7 @@ message GetBlacklistReq{ message GetBlacklistResp{ int32 ErrCode = 1; string ErrMsg = 2; - repeated open_im_sdk.PublicUserInfo BlackUserInfoList = 3; + repeated server_api_params.PublicUserInfo BlackUserInfoList = 3; } @@ -148,7 +148,7 @@ message GetSelfApplyListReq{ message GetSelfApplyListResp{ int32 ErrCode = 1; string ErrMsg = 2; - repeated open_im_sdk.FriendRequest FriendRequestList = 3; + repeated server_api_params.FriendRequest FriendRequestList = 3; } service friend{ diff --git a/pkg/proto/sdk_ws/ws.pb.go b/pkg/proto/sdk_ws/ws.pb.go index 31bcf268d..9ebfd30df 100644 --- a/pkg/proto/sdk_ws/ws.pb.go +++ b/pkg/proto/sdk_ws/ws.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: sdk_ws/ws.proto -package open_im_sdk +package server_api_params import proto "github.com/golang/protobuf/proto" import fmt "fmt" @@ -40,7 +40,7 @@ func (m *GroupInfo) Reset() { *m = GroupInfo{} } func (m *GroupInfo) String() string { return proto.CompactTextString(m) } func (*GroupInfo) ProtoMessage() {} func (*GroupInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f46b8824c5dbc584, []int{0} + return fileDescriptor_ws_f24e0416269be717, []int{0} } func (m *GroupInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfo.Unmarshal(m, b) @@ -164,7 +164,7 @@ func (m *GroupMemberFullInfo) Reset() { *m = GroupMemberFullInfo{} } func (m *GroupMemberFullInfo) String() string { return proto.CompactTextString(m) } func (*GroupMemberFullInfo) ProtoMessage() {} func (*GroupMemberFullInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f46b8824c5dbc584, []int{1} + return fileDescriptor_ws_f24e0416269be717, []int{1} } func (m *GroupMemberFullInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupMemberFullInfo.Unmarshal(m, b) @@ -269,7 +269,7 @@ func (m *PublicUserInfo) Reset() { *m = PublicUserInfo{} } func (m *PublicUserInfo) String() string { return proto.CompactTextString(m) } func (*PublicUserInfo) ProtoMessage() {} func (*PublicUserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f46b8824c5dbc584, []int{2} + return fileDescriptor_ws_f24e0416269be717, []int{2} } func (m *PublicUserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PublicUserInfo.Unmarshal(m, b) @@ -344,7 +344,7 @@ func (m *UserInfo) Reset() { *m = UserInfo{} } func (m *UserInfo) String() string { return proto.CompactTextString(m) } func (*UserInfo) ProtoMessage() {} func (*UserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f46b8824c5dbc584, []int{3} + return fileDescriptor_ws_f24e0416269be717, []int{3} } func (m *UserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserInfo.Unmarshal(m, b) @@ -451,7 +451,7 @@ func (m *FriendInfo) Reset() { *m = FriendInfo{} } func (m *FriendInfo) String() string { return proto.CompactTextString(m) } func (*FriendInfo) ProtoMessage() {} func (*FriendInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f46b8824c5dbc584, []int{4} + return fileDescriptor_ws_f24e0416269be717, []int{4} } func (m *FriendInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfo.Unmarshal(m, b) @@ -536,7 +536,7 @@ func (m *BlackInfo) Reset() { *m = BlackInfo{} } func (m *BlackInfo) String() string { return proto.CompactTextString(m) } func (*BlackInfo) ProtoMessage() {} func (*BlackInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f46b8824c5dbc584, []int{5} + return fileDescriptor_ws_f24e0416269be717, []int{5} } func (m *BlackInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackInfo.Unmarshal(m, b) @@ -617,7 +617,7 @@ func (m *GroupRequest) Reset() { *m = GroupRequest{} } func (m *GroupRequest) String() string { return proto.CompactTextString(m) } func (*GroupRequest) ProtoMessage() {} func (*GroupRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f46b8824c5dbc584, []int{6} + return fileDescriptor_ws_f24e0416269be717, []int{6} } func (m *GroupRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupRequest.Unmarshal(m, b) @@ -702,14 +702,20 @@ func (m *GroupRequest) GetEx() string { type FriendRequest struct { FromUserID string `protobuf:"bytes,1,opt,name=fromUserID" json:"fromUserID,omitempty"` - ToUserID string `protobuf:"bytes,2,opt,name=toUserID" json:"toUserID,omitempty"` - HandleResult int32 `protobuf:"varint,3,opt,name=handleResult" json:"handleResult,omitempty"` - ReqMsg string `protobuf:"bytes,4,opt,name=reqMsg" json:"reqMsg,omitempty"` - CreateTime uint32 `protobuf:"varint,5,opt,name=createTime" json:"createTime,omitempty"` - HandlerUserID string `protobuf:"bytes,6,opt,name=handlerUserID" json:"handlerUserID,omitempty"` - HandleMsg string `protobuf:"bytes,7,opt,name=handleMsg" json:"handleMsg,omitempty"` - HandleTime uint32 `protobuf:"varint,8,opt,name=handleTime" json:"handleTime,omitempty"` - Ex string `protobuf:"bytes,9,opt,name=ex" json:"ex,omitempty"` + FromNickname string `protobuf:"bytes,2,opt,name=fromNickname" json:"fromNickname,omitempty"` + FromFaceURL string `protobuf:"bytes,3,opt,name=fromFaceURL" json:"fromFaceURL,omitempty"` + FromGender string `protobuf:"bytes,4,opt,name=fromGender" json:"fromGender,omitempty"` + ToUserID string `protobuf:"bytes,5,opt,name=toUserID" json:"toUserID,omitempty"` + ToNickname string `protobuf:"bytes,6,opt,name=toNickname" json:"toNickname,omitempty"` + ToFaceURL string `protobuf:"bytes,7,opt,name=toFaceURL" json:"toFaceURL,omitempty"` + ToGender string `protobuf:"bytes,8,opt,name=toGender" json:"toGender,omitempty"` + HandleResult int32 `protobuf:"varint,9,opt,name=handleResult" json:"handleResult,omitempty"` + ReqMsg string `protobuf:"bytes,10,opt,name=reqMsg" json:"reqMsg,omitempty"` + CreateTime uint32 `protobuf:"varint,11,opt,name=createTime" json:"createTime,omitempty"` + HandlerUserID string `protobuf:"bytes,12,opt,name=handlerUserID" json:"handlerUserID,omitempty"` + HandleMsg string `protobuf:"bytes,13,opt,name=handleMsg" json:"handleMsg,omitempty"` + HandleTime uint32 `protobuf:"varint,14,opt,name=handleTime" json:"handleTime,omitempty"` + Ex string `protobuf:"bytes,15,opt,name=ex" json:"ex,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -719,7 +725,7 @@ func (m *FriendRequest) Reset() { *m = FriendRequest{} } func (m *FriendRequest) String() string { return proto.CompactTextString(m) } func (*FriendRequest) ProtoMessage() {} func (*FriendRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f46b8824c5dbc584, []int{7} + return fileDescriptor_ws_f24e0416269be717, []int{7} } func (m *FriendRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendRequest.Unmarshal(m, b) @@ -746,6 +752,27 @@ func (m *FriendRequest) GetFromUserID() string { return "" } +func (m *FriendRequest) GetFromNickname() string { + if m != nil { + return m.FromNickname + } + return "" +} + +func (m *FriendRequest) GetFromFaceURL() string { + if m != nil { + return m.FromFaceURL + } + return "" +} + +func (m *FriendRequest) GetFromGender() string { + if m != nil { + return m.FromGender + } + return "" +} + func (m *FriendRequest) GetToUserID() string { if m != nil { return m.ToUserID @@ -753,6 +780,27 @@ func (m *FriendRequest) GetToUserID() string { return "" } +func (m *FriendRequest) GetToNickname() string { + if m != nil { + return m.ToNickname + } + return "" +} + +func (m *FriendRequest) GetToFaceURL() string { + if m != nil { + return m.ToFaceURL + } + return "" +} + +func (m *FriendRequest) GetToGender() string { + if m != nil { + return m.ToGender + } + return "" +} + func (m *FriendRequest) GetHandleResult() int32 { if m != nil { return m.HandleResult @@ -818,7 +866,7 @@ func (m *PullMessageBySeqListResp) Reset() { *m = PullMessageBySeqListRe func (m *PullMessageBySeqListResp) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListResp) ProtoMessage() {} func (*PullMessageBySeqListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f46b8824c5dbc584, []int{8} + return fileDescriptor_ws_f24e0416269be717, []int{8} } func (m *PullMessageBySeqListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListResp.Unmarshal(m, b) @@ -893,7 +941,7 @@ func (m *PullMessageBySeqListReq) Reset() { *m = PullMessageBySeqListReq func (m *PullMessageBySeqListReq) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListReq) ProtoMessage() {} func (*PullMessageBySeqListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f46b8824c5dbc584, []int{9} + return fileDescriptor_ws_f24e0416269be717, []int{9} } func (m *PullMessageBySeqListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListReq.Unmarshal(m, b) @@ -948,7 +996,7 @@ func (m *PullMessageReq) Reset() { *m = PullMessageReq{} } func (m *PullMessageReq) String() string { return proto.CompactTextString(m) } func (*PullMessageReq) ProtoMessage() {} func (*PullMessageReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f46b8824c5dbc584, []int{10} + return fileDescriptor_ws_f24e0416269be717, []int{10} } func (m *PullMessageReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageReq.Unmarshal(m, b) @@ -1012,7 +1060,7 @@ func (m *PullMessageResp) Reset() { *m = PullMessageResp{} } func (m *PullMessageResp) String() string { return proto.CompactTextString(m) } func (*PullMessageResp) ProtoMessage() {} func (*PullMessageResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f46b8824c5dbc584, []int{11} + return fileDescriptor_ws_f24e0416269be717, []int{11} } func (m *PullMessageResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageResp.Unmarshal(m, b) @@ -1084,7 +1132,7 @@ func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} } func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqReq) ProtoMessage() {} func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f46b8824c5dbc584, []int{12} + return fileDescriptor_ws_f24e0416269be717, []int{12} } func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) @@ -1116,7 +1164,7 @@ func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} } func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqResp) ProtoMessage() {} func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f46b8824c5dbc584, []int{13} + return fileDescriptor_ws_f24e0416269be717, []int{13} } func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) @@ -1164,7 +1212,7 @@ func (m *GatherFormat) Reset() { *m = GatherFormat{} } func (m *GatherFormat) String() string { return proto.CompactTextString(m) } func (*GatherFormat) ProtoMessage() {} func (*GatherFormat) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f46b8824c5dbc584, []int{14} + return fileDescriptor_ws_f24e0416269be717, []int{14} } func (m *GatherFormat) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GatherFormat.Unmarshal(m, b) @@ -1211,7 +1259,7 @@ func (m *UserSendMsgResp) Reset() { *m = UserSendMsgResp{} } func (m *UserSendMsgResp) String() string { return proto.CompactTextString(m) } func (*UserSendMsgResp) ProtoMessage() {} func (*UserSendMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f46b8824c5dbc584, []int{15} + return fileDescriptor_ws_f24e0416269be717, []int{15} } func (m *UserSendMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserSendMsgResp.Unmarshal(m, b) @@ -1280,7 +1328,7 @@ func (m *MsgData) Reset() { *m = MsgData{} } func (m *MsgData) String() string { return proto.CompactTextString(m) } func (*MsgData) ProtoMessage() {} func (*MsgData) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f46b8824c5dbc584, []int{16} + return fileDescriptor_ws_f24e0416269be717, []int{16} } func (m *MsgData) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgData.Unmarshal(m, b) @@ -1441,7 +1489,7 @@ func (m *OfflinePushInfo) Reset() { *m = OfflinePushInfo{} } func (m *OfflinePushInfo) String() string { return proto.CompactTextString(m) } func (*OfflinePushInfo) ProtoMessage() {} func (*OfflinePushInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f46b8824c5dbc584, []int{17} + return fileDescriptor_ws_f24e0416269be717, []int{17} } func (m *OfflinePushInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OfflinePushInfo.Unmarshal(m, b) @@ -1508,7 +1556,7 @@ func (m *TipsComm) Reset() { *m = TipsComm{} } func (m *TipsComm) String() string { return proto.CompactTextString(m) } func (*TipsComm) ProtoMessage() {} func (*TipsComm) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f46b8824c5dbc584, []int{18} + return fileDescriptor_ws_f24e0416269be717, []int{18} } func (m *TipsComm) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TipsComm.Unmarshal(m, b) @@ -1557,7 +1605,7 @@ func (m *MemberEnterTips) Reset() { *m = MemberEnterTips{} } func (m *MemberEnterTips) String() string { return proto.CompactTextString(m) } func (*MemberEnterTips) ProtoMessage() {} func (*MemberEnterTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f46b8824c5dbc584, []int{19} + return fileDescriptor_ws_f24e0416269be717, []int{19} } func (m *MemberEnterTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberEnterTips.Unmarshal(m, b) @@ -1612,7 +1660,7 @@ func (m *MemberLeaveTips) Reset() { *m = MemberLeaveTips{} } func (m *MemberLeaveTips) String() string { return proto.CompactTextString(m) } func (*MemberLeaveTips) ProtoMessage() {} func (*MemberLeaveTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f46b8824c5dbc584, []int{20} + return fileDescriptor_ws_f24e0416269be717, []int{20} } func (m *MemberLeaveTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberLeaveTips.Unmarshal(m, b) @@ -1667,7 +1715,7 @@ func (m *MemberInvitedTips) Reset() { *m = MemberInvitedTips{} } func (m *MemberInvitedTips) String() string { return proto.CompactTextString(m) } func (*MemberInvitedTips) ProtoMessage() {} func (*MemberInvitedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f46b8824c5dbc584, []int{21} + return fileDescriptor_ws_f24e0416269be717, []int{21} } func (m *MemberInvitedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInvitedTips.Unmarshal(m, b) @@ -1729,7 +1777,7 @@ func (m *MemberKickedTips) Reset() { *m = MemberKickedTips{} } func (m *MemberKickedTips) String() string { return proto.CompactTextString(m) } func (*MemberKickedTips) ProtoMessage() {} func (*MemberKickedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f46b8824c5dbc584, []int{22} + return fileDescriptor_ws_f24e0416269be717, []int{22} } func (m *MemberKickedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberKickedTips.Unmarshal(m, b) @@ -1792,7 +1840,7 @@ func (m *MemberInfoChangedTips) Reset() { *m = MemberInfoChangedTips{} } func (m *MemberInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*MemberInfoChangedTips) ProtoMessage() {} func (*MemberInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f46b8824c5dbc584, []int{23} + return fileDescriptor_ws_f24e0416269be717, []int{23} } func (m *MemberInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInfoChangedTips.Unmarshal(m, b) @@ -1861,7 +1909,7 @@ func (m *GroupCreatedTips) Reset() { *m = GroupCreatedTips{} } func (m *GroupCreatedTips) String() string { return proto.CompactTextString(m) } func (*GroupCreatedTips) ProtoMessage() {} func (*GroupCreatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f46b8824c5dbc584, []int{24} + return fileDescriptor_ws_f24e0416269be717, []int{24} } func (m *GroupCreatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupCreatedTips.Unmarshal(m, b) @@ -1922,7 +1970,7 @@ func (m *GroupInfoChangedTips) Reset() { *m = GroupInfoChangedTips{} } func (m *GroupInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*GroupInfoChangedTips) ProtoMessage() {} func (*GroupInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f46b8824c5dbc584, []int{25} + return fileDescriptor_ws_f24e0416269be717, []int{25} } func (m *GroupInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfoChangedTips.Unmarshal(m, b) @@ -1976,7 +2024,7 @@ func (m *JoinGroupApplicationTips) Reset() { *m = JoinGroupApplicationTi func (m *JoinGroupApplicationTips) String() string { return proto.CompactTextString(m) } func (*JoinGroupApplicationTips) ProtoMessage() {} func (*JoinGroupApplicationTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f46b8824c5dbc584, []int{26} + return fileDescriptor_ws_f24e0416269be717, []int{26} } func (m *JoinGroupApplicationTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JoinGroupApplicationTips.Unmarshal(m, b) @@ -2031,7 +2079,7 @@ func (m *ApplicationProcessedTips) Reset() { *m = ApplicationProcessedTi func (m *ApplicationProcessedTips) String() string { return proto.CompactTextString(m) } func (*ApplicationProcessedTips) ProtoMessage() {} func (*ApplicationProcessedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f46b8824c5dbc584, []int{27} + return fileDescriptor_ws_f24e0416269be717, []int{27} } func (m *ApplicationProcessedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ApplicationProcessedTips.Unmarshal(m, b) @@ -2092,7 +2140,7 @@ func (m *FriendApplication) Reset() { *m = FriendApplication{} } func (m *FriendApplication) String() string { return proto.CompactTextString(m) } func (*FriendApplication) ProtoMessage() {} func (*FriendApplication) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f46b8824c5dbc584, []int{28} + return fileDescriptor_ws_f24e0416269be717, []int{28} } func (m *FriendApplication) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplication.Unmarshal(m, b) @@ -2145,7 +2193,7 @@ func (m *FromToUserID) Reset() { *m = FromToUserID{} } func (m *FromToUserID) String() string { return proto.CompactTextString(m) } func (*FromToUserID) ProtoMessage() {} func (*FromToUserID) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f46b8824c5dbc584, []int{29} + return fileDescriptor_ws_f24e0416269be717, []int{29} } func (m *FromToUserID) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FromToUserID.Unmarshal(m, b) @@ -2191,7 +2239,7 @@ func (m *FriendApplicationAddedTips) Reset() { *m = FriendApplicationAdd func (m *FriendApplicationAddedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationAddedTips) ProtoMessage() {} func (*FriendApplicationAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f46b8824c5dbc584, []int{30} + return fileDescriptor_ws_f24e0416269be717, []int{30} } func (m *FriendApplicationAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationAddedTips.Unmarshal(m, b) @@ -2230,7 +2278,7 @@ func (m *FriendApplicationProcessedTips) Reset() { *m = FriendApplicatio func (m *FriendApplicationProcessedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationProcessedTips) ProtoMessage() {} func (*FriendApplicationProcessedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f46b8824c5dbc584, []int{31} + return fileDescriptor_ws_f24e0416269be717, []int{31} } func (m *FriendApplicationProcessedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationProcessedTips.Unmarshal(m, b) @@ -2271,7 +2319,7 @@ func (m *FriendAddedTips) Reset() { *m = FriendAddedTips{} } func (m *FriendAddedTips) String() string { return proto.CompactTextString(m) } func (*FriendAddedTips) ProtoMessage() {} func (*FriendAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f46b8824c5dbc584, []int{32} + return fileDescriptor_ws_f24e0416269be717, []int{32} } func (m *FriendAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendAddedTips.Unmarshal(m, b) @@ -2324,7 +2372,7 @@ func (m *FriendDeletedTips) Reset() { *m = FriendDeletedTips{} } func (m *FriendDeletedTips) String() string { return proto.CompactTextString(m) } func (*FriendDeletedTips) ProtoMessage() {} func (*FriendDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f46b8824c5dbc584, []int{33} + return fileDescriptor_ws_f24e0416269be717, []int{33} } func (m *FriendDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendDeletedTips.Unmarshal(m, b) @@ -2362,7 +2410,7 @@ func (m *BlackAddedTips) Reset() { *m = BlackAddedTips{} } func (m *BlackAddedTips) String() string { return proto.CompactTextString(m) } func (*BlackAddedTips) ProtoMessage() {} func (*BlackAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f46b8824c5dbc584, []int{34} + return fileDescriptor_ws_f24e0416269be717, []int{34} } func (m *BlackAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackAddedTips.Unmarshal(m, b) @@ -2400,7 +2448,7 @@ func (m *BlackDeletedTips) Reset() { *m = BlackDeletedTips{} } func (m *BlackDeletedTips) String() string { return proto.CompactTextString(m) } func (*BlackDeletedTips) ProtoMessage() {} func (*BlackDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f46b8824c5dbc584, []int{35} + return fileDescriptor_ws_f24e0416269be717, []int{35} } func (m *BlackDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackDeletedTips.Unmarshal(m, b) @@ -2438,7 +2486,7 @@ func (m *FriendInfoChangedTips) Reset() { *m = FriendInfoChangedTips{} } func (m *FriendInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*FriendInfoChangedTips) ProtoMessage() {} func (*FriendInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f46b8824c5dbc584, []int{36} + return fileDescriptor_ws_f24e0416269be717, []int{36} } func (m *FriendInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfoChangedTips.Unmarshal(m, b) @@ -2477,7 +2525,7 @@ func (m *SelfInfoUpdatedTips) Reset() { *m = SelfInfoUpdatedTips{} } func (m *SelfInfoUpdatedTips) String() string { return proto.CompactTextString(m) } func (*SelfInfoUpdatedTips) ProtoMessage() {} func (*SelfInfoUpdatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f46b8824c5dbc584, []int{37} + return fileDescriptor_ws_f24e0416269be717, []int{37} } func (m *SelfInfoUpdatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SelfInfoUpdatedTips.Unmarshal(m, b) @@ -2505,169 +2553,174 @@ func (m *SelfInfoUpdatedTips) GetUserID() string { } func init() { - proto.RegisterType((*GroupInfo)(nil), "open_im_sdk.GroupInfo") - proto.RegisterType((*GroupMemberFullInfo)(nil), "open_im_sdk.GroupMemberFullInfo") - proto.RegisterType((*PublicUserInfo)(nil), "open_im_sdk.PublicUserInfo") - proto.RegisterType((*UserInfo)(nil), "open_im_sdk.UserInfo") - proto.RegisterType((*FriendInfo)(nil), "open_im_sdk.FriendInfo") - proto.RegisterType((*BlackInfo)(nil), "open_im_sdk.BlackInfo") - proto.RegisterType((*GroupRequest)(nil), "open_im_sdk.GroupRequest") - proto.RegisterType((*FriendRequest)(nil), "open_im_sdk.FriendRequest") - proto.RegisterType((*PullMessageBySeqListResp)(nil), "open_im_sdk.PullMessageBySeqListResp") - proto.RegisterType((*PullMessageBySeqListReq)(nil), "open_im_sdk.PullMessageBySeqListReq") - proto.RegisterType((*PullMessageReq)(nil), "open_im_sdk.PullMessageReq") - proto.RegisterType((*PullMessageResp)(nil), "open_im_sdk.PullMessageResp") - proto.RegisterType((*GetMaxAndMinSeqReq)(nil), "open_im_sdk.GetMaxAndMinSeqReq") - proto.RegisterType((*GetMaxAndMinSeqResp)(nil), "open_im_sdk.GetMaxAndMinSeqResp") - proto.RegisterType((*GatherFormat)(nil), "open_im_sdk.GatherFormat") - proto.RegisterType((*UserSendMsgResp)(nil), "open_im_sdk.UserSendMsgResp") - proto.RegisterType((*MsgData)(nil), "open_im_sdk.MsgData") - proto.RegisterMapType((map[string]bool)(nil), "open_im_sdk.MsgData.OptionsEntry") - proto.RegisterType((*OfflinePushInfo)(nil), "open_im_sdk.OfflinePushInfo") - proto.RegisterType((*TipsComm)(nil), "open_im_sdk.TipsComm") - proto.RegisterType((*MemberEnterTips)(nil), "open_im_sdk.MemberEnterTips") - proto.RegisterType((*MemberLeaveTips)(nil), "open_im_sdk.MemberLeaveTips") - proto.RegisterType((*MemberInvitedTips)(nil), "open_im_sdk.MemberInvitedTips") - proto.RegisterType((*MemberKickedTips)(nil), "open_im_sdk.MemberKickedTips") - proto.RegisterType((*MemberInfoChangedTips)(nil), "open_im_sdk.MemberInfoChangedTips") - proto.RegisterType((*GroupCreatedTips)(nil), "open_im_sdk.GroupCreatedTips") - proto.RegisterType((*GroupInfoChangedTips)(nil), "open_im_sdk.GroupInfoChangedTips") - proto.RegisterType((*JoinGroupApplicationTips)(nil), "open_im_sdk.JoinGroupApplicationTips") - proto.RegisterType((*ApplicationProcessedTips)(nil), "open_im_sdk.ApplicationProcessedTips") - proto.RegisterType((*FriendApplication)(nil), "open_im_sdk.FriendApplication") - proto.RegisterType((*FromToUserID)(nil), "open_im_sdk.FromToUserID") - proto.RegisterType((*FriendApplicationAddedTips)(nil), "open_im_sdk.FriendApplicationAddedTips") - proto.RegisterType((*FriendApplicationProcessedTips)(nil), "open_im_sdk.FriendApplicationProcessedTips") - proto.RegisterType((*FriendAddedTips)(nil), "open_im_sdk.FriendAddedTips") - proto.RegisterType((*FriendDeletedTips)(nil), "open_im_sdk.FriendDeletedTips") - proto.RegisterType((*BlackAddedTips)(nil), "open_im_sdk.BlackAddedTips") - proto.RegisterType((*BlackDeletedTips)(nil), "open_im_sdk.BlackDeletedTips") - proto.RegisterType((*FriendInfoChangedTips)(nil), "open_im_sdk.FriendInfoChangedTips") - proto.RegisterType((*SelfInfoUpdatedTips)(nil), "open_im_sdk.SelfInfoUpdatedTips") + proto.RegisterType((*GroupInfo)(nil), "server_api_params.GroupInfo") + proto.RegisterType((*GroupMemberFullInfo)(nil), "server_api_params.GroupMemberFullInfo") + proto.RegisterType((*PublicUserInfo)(nil), "server_api_params.PublicUserInfo") + proto.RegisterType((*UserInfo)(nil), "server_api_params.UserInfo") + proto.RegisterType((*FriendInfo)(nil), "server_api_params.FriendInfo") + proto.RegisterType((*BlackInfo)(nil), "server_api_params.BlackInfo") + proto.RegisterType((*GroupRequest)(nil), "server_api_params.GroupRequest") + proto.RegisterType((*FriendRequest)(nil), "server_api_params.FriendRequest") + proto.RegisterType((*PullMessageBySeqListResp)(nil), "server_api_params.PullMessageBySeqListResp") + proto.RegisterType((*PullMessageBySeqListReq)(nil), "server_api_params.PullMessageBySeqListReq") + proto.RegisterType((*PullMessageReq)(nil), "server_api_params.PullMessageReq") + proto.RegisterType((*PullMessageResp)(nil), "server_api_params.PullMessageResp") + proto.RegisterType((*GetMaxAndMinSeqReq)(nil), "server_api_params.GetMaxAndMinSeqReq") + proto.RegisterType((*GetMaxAndMinSeqResp)(nil), "server_api_params.GetMaxAndMinSeqResp") + proto.RegisterType((*GatherFormat)(nil), "server_api_params.GatherFormat") + proto.RegisterType((*UserSendMsgResp)(nil), "server_api_params.UserSendMsgResp") + proto.RegisterType((*MsgData)(nil), "server_api_params.MsgData") + proto.RegisterMapType((map[string]bool)(nil), "server_api_params.MsgData.OptionsEntry") + proto.RegisterType((*OfflinePushInfo)(nil), "server_api_params.OfflinePushInfo") + proto.RegisterType((*TipsComm)(nil), "server_api_params.TipsComm") + proto.RegisterType((*MemberEnterTips)(nil), "server_api_params.MemberEnterTips") + proto.RegisterType((*MemberLeaveTips)(nil), "server_api_params.MemberLeaveTips") + proto.RegisterType((*MemberInvitedTips)(nil), "server_api_params.MemberInvitedTips") + proto.RegisterType((*MemberKickedTips)(nil), "server_api_params.MemberKickedTips") + proto.RegisterType((*MemberInfoChangedTips)(nil), "server_api_params.MemberInfoChangedTips") + proto.RegisterType((*GroupCreatedTips)(nil), "server_api_params.GroupCreatedTips") + proto.RegisterType((*GroupInfoChangedTips)(nil), "server_api_params.GroupInfoChangedTips") + proto.RegisterType((*JoinGroupApplicationTips)(nil), "server_api_params.JoinGroupApplicationTips") + proto.RegisterType((*ApplicationProcessedTips)(nil), "server_api_params.ApplicationProcessedTips") + proto.RegisterType((*FriendApplication)(nil), "server_api_params.FriendApplication") + proto.RegisterType((*FromToUserID)(nil), "server_api_params.FromToUserID") + proto.RegisterType((*FriendApplicationAddedTips)(nil), "server_api_params.FriendApplicationAddedTips") + proto.RegisterType((*FriendApplicationProcessedTips)(nil), "server_api_params.FriendApplicationProcessedTips") + proto.RegisterType((*FriendAddedTips)(nil), "server_api_params.FriendAddedTips") + proto.RegisterType((*FriendDeletedTips)(nil), "server_api_params.FriendDeletedTips") + proto.RegisterType((*BlackAddedTips)(nil), "server_api_params.BlackAddedTips") + proto.RegisterType((*BlackDeletedTips)(nil), "server_api_params.BlackDeletedTips") + proto.RegisterType((*FriendInfoChangedTips)(nil), "server_api_params.FriendInfoChangedTips") + proto.RegisterType((*SelfInfoUpdatedTips)(nil), "server_api_params.SelfInfoUpdatedTips") } -func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_f46b8824c5dbc584) } +func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_f24e0416269be717) } -var fileDescriptor_ws_f46b8824c5dbc584 = []byte{ - // 1917 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x59, 0x4f, 0x6f, 0x1c, 0x49, - 0x15, 0x57, 0xf7, 0x4c, 0xcf, 0x78, 0xde, 0x8c, 0x3d, 0x4e, 0xe7, 0xcf, 0x36, 0x61, 0x15, 0x0d, - 0xad, 0x15, 0xb2, 0x10, 0x64, 0xa5, 0xac, 0x90, 0x96, 0xa0, 0x05, 0x62, 0x3b, 0xce, 0x26, 0xc4, - 0xb1, 0x69, 0x27, 0x70, 0xe0, 0x10, 0xb5, 0xa7, 0x6b, 0xc6, 0xcd, 0x74, 0x57, 0xcd, 0x74, 0x75, - 0x3b, 0xc9, 0x85, 0x33, 0x5f, 0x00, 0x2e, 0x2b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b, 0x68, 0x9f, 0xed, 0x60, 0xcb, 0x74, 0xf0, 0x16, 0x74, - 0xa6, 0x84, 0x46, 0x24, 0xc3, 0x80, 0x39, 0x81, 0xa2, 0x56, 0x38, 0xee, 0xac, 0x72, 0xdc, 0xff, - 0x9d, 0x0d, 0x6b, 0x1f, 0xd8, 0xb4, 0x11, 0xf4, 0xe7, 0x27, 0x8c, 0x92, 0x67, 0x85, 0x28, 0x26, - 0x95, 0x4c, 0x1d, 0x72, 0x6f, 0x80, 0x73, 0x1c, 0x67, 0xf9, 0x09, 0x66, 0x73, 0x3d, 0x90, 0x84, - 0x40, 0x49, 0x1a, 0xc6, 0x32, 0x85, 0xbd, 0x40, 0x12, 0x2a, 0xe2, 0x6b, 0xd5, 0x3e, 0x30, 0x77, - 0x56, 0x6f, 0x69, 0x67, 0x2d, 0x07, 0x06, 0x56, 0x06, 0xe6, 0xdf, 0x16, 0xc0, 0x5e, 0x16, 0x13, - 0x1a, 0x61, 0x68, 0x1a, 0x5b, 0xda, 0x5a, 0xde, 0xd2, 0xb7, 0xa0, 0x93, 0x91, 0x34, 0xcc, 0x66, - 0x65, 0xc9, 0x4b, 0xaa, 0x61, 0x50, 0x6b, 0xc9, 0xa0, 0xef, 0x03, 0x4c, 0x50, 0x8f, 0x90, 0x83, - 0xa1, 0xea, 0xdf, 0xbb, 0x79, 0x57, 0x6b, 0x7b, 0x77, 0xcb, 0xfc, 0x04, 0x1a, 0xa3, 0xd8, 0x49, - 0x61, 0x14, 0xa9, 0x82, 0x95, 0xb9, 0xad, 0x81, 0x15, 0xf5, 0xda, 0x39, 0xa7, 0x5e, 0xbb, 0x55, - 0xbd, 0xfe, 0xc3, 0x82, 0xde, 0x76, 0x12, 0x8e, 0x67, 0x17, 0x74, 0xda, 0x74, 0xce, 0x5e, 0x72, - 0xee, 0x01, 0xac, 0x1f, 0x0b, 0x71, 0xa5, 0x0b, 0xe8, 0x7f, 0xff, 0xde, 0x37, 0x0d, 0xff, 0xcc, - 0x0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 0xf6, 0xff, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x5a, 0xf7, 0xb0, 0x0f, 0xd3, 0x1a, 0x00, 0x00, +var fileDescriptor_ws_f24e0416269be717 = []byte{ + // 1991 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x59, 0xcd, 0x6f, 0x23, 0x49, + 0x15, 0x57, 0xb7, 0x3f, 0x12, 0x3f, 0xdb, 0x71, 0xa6, 0x67, 0x76, 0xb0, 0xc2, 0x32, 0x84, 0xd6, + 0x6a, 0x89, 0x90, 0x08, 0x52, 0x10, 0x12, 0x2c, 0x12, 0x30, 0x93, 0x2f, 0x66, 0x89, 0x33, 0x51, + 0x67, 0x46, 0xcb, 0x01, 0x69, 0x54, 0x71, 0x97, 0x9d, 0x26, 0xed, 0x2a, 0xbb, 0xba, 0x9c, 0x99, + 0xb9, 0x70, 0xe6, 0xc2, 0x11, 0x8e, 0x5c, 0x11, 0x12, 0x37, 0x84, 0xb8, 0x71, 0xe0, 0xdf, 0xe0, + 0x5f, 0xe0, 0x0a, 0x12, 0x12, 0xd2, 0xa2, 0x7a, 0x55, 0xdd, 0x5d, 0xe5, 0x8f, 0xac, 0x31, 0x11, + 0x7b, 0xd8, 0x9b, 0xdf, 0xaf, 0xeb, 0x7d, 0xbf, 0x7a, 0x55, 0xf5, 0x0c, 0x9d, 0x2c, 0xbe, 0x79, + 0xfd, 0x26, 0xfb, 0xd6, 0x9b, 0x6c, 0x7f, 0x2c, 0xb8, 0xe4, 0xc1, 0x83, 0x8c, 0x8a, 0x5b, 0x2a, + 0x5e, 0x93, 0x71, 0xf2, 0x7a, 0x4c, 0x04, 0x19, 0x65, 0xe1, 0x3f, 0x7c, 0x68, 0x9c, 0x0a, 0x3e, + 0x1d, 0x3f, 0x67, 0x03, 0x1e, 0x74, 0x61, 0x63, 0x88, 0xc4, 0x51, 0xd7, 0xdb, 0xf5, 0xf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00, 0x00, 0xff, 0xff, 0x05, + 0xba, 0x65, 0x5f, 0x83, 0x1c, 0x00, 0x00, } diff --git a/pkg/proto/sdk_ws/ws.proto b/pkg/proto/sdk_ws/ws.proto index 8c6c11018..919596ddb 100644 --- a/pkg/proto/sdk_ws/ws.proto +++ b/pkg/proto/sdk_ws/ws.proto @@ -90,11 +90,11 @@ message FriendRequest{ string fromUserID = 1; string fromNickname = 2; string fromFaceURL = 3; - string fromGender = 4; + int32 fromGender = 4; string toUserID = 5; string toNickname = 6; string toFaceURL = 7; - string toGender = 8; + int32 toGender = 8; int32 handleResult = 9; string reqMsg = 10; uint32 createTime = 11; From e4b6b18712ecec51069441cbf2c3c98a452bd411 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Fri, 14 Jan 2022 18:33:06 +0800 Subject: [PATCH 279/337] Refactor code --- internal/rpc/friend/firend.go | 29 +++- pkg/proto/sdk_ws/ws.pb.go | 250 +++++++++++++++++----------------- 2 files changed, 153 insertions(+), 126 deletions(-) diff --git a/internal/rpc/friend/firend.go b/internal/rpc/friend/firend.go index 4d54787e9..e7f2cf217 100644 --- a/internal/rpc/friend/firend.go +++ b/internal/rpc/friend/firend.go @@ -449,7 +449,16 @@ func (s *friendServer) GetFriendApplyList(ctx context.Context, req *pbFriend.Get } userInfo.FromNickname = u.Nickname userInfo.FromFaceURL = u.FaceURL - userInfo.FromGender = u.Gend + userInfo.FromGender = u.Gender + + u, err = imdb.GetUserByUserID(userInfo.ToUserID) + if err != nil { + log.Error(req.CommID.OperationID, "GetUserByUserID", userInfo.ToUserID) + continue + } + userInfo.ToNickname = u.Nickname + userInfo.ToFaceURL = u.FaceURL + userInfo.ToGender = u.Gender appleUserList = append(appleUserList, &userInfo) } @@ -475,6 +484,24 @@ func (s *friendServer) GetSelfApplyList(ctx context.Context, req *pbFriend.GetSe for _, selfApplyOtherUserInfo := range usersInfo { var userInfo sdkws.FriendRequest // pbFriend.ApplyUserInfo cp.FriendRequestDBCopyOpenIM(&userInfo, &selfApplyOtherUserInfo) + u, err := imdb.GetUserByUserID(userInfo.FromUserID) + if err != nil { + log.Error(req.CommID.OperationID, "GetUserByUserID", userInfo.FromUserID) + continue + } + userInfo.FromNickname = u.Nickname + userInfo.FromFaceURL = u.FaceURL + userInfo.FromGender = u.Gender + + u, err = imdb.GetUserByUserID(userInfo.ToUserID) + if err != nil { + log.Error(req.CommID.OperationID, "GetUserByUserID", userInfo.ToUserID) + continue + } + userInfo.ToNickname = u.Nickname + userInfo.ToFaceURL = u.FaceURL + userInfo.ToGender = u.Gender + selfApplyOtherUserList = append(selfApplyOtherUserList, &userInfo) } log.NewInfo(req.CommID.OperationID, "rpc GetSelfApplyList ok", pbFriend.GetSelfApplyListResp{FriendRequestList: selfApplyOtherUserList}) diff --git a/pkg/proto/sdk_ws/ws.pb.go b/pkg/proto/sdk_ws/ws.pb.go index 9ebfd30df..a785dab20 100644 --- a/pkg/proto/sdk_ws/ws.pb.go +++ b/pkg/proto/sdk_ws/ws.pb.go @@ -40,7 +40,7 @@ func (m *GroupInfo) Reset() { *m = GroupInfo{} } func (m *GroupInfo) String() string { return proto.CompactTextString(m) } func (*GroupInfo) ProtoMessage() {} func (*GroupInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f24e0416269be717, []int{0} + return fileDescriptor_ws_1bc577ef51df0a70, []int{0} } func (m *GroupInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfo.Unmarshal(m, b) @@ -164,7 +164,7 @@ func (m *GroupMemberFullInfo) Reset() { *m = GroupMemberFullInfo{} } func (m *GroupMemberFullInfo) String() string { return proto.CompactTextString(m) } func (*GroupMemberFullInfo) ProtoMessage() {} func (*GroupMemberFullInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f24e0416269be717, []int{1} + return fileDescriptor_ws_1bc577ef51df0a70, []int{1} } func (m *GroupMemberFullInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupMemberFullInfo.Unmarshal(m, b) @@ -269,7 +269,7 @@ func (m *PublicUserInfo) Reset() { *m = PublicUserInfo{} } func (m *PublicUserInfo) String() string { return proto.CompactTextString(m) } func (*PublicUserInfo) ProtoMessage() {} func (*PublicUserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f24e0416269be717, []int{2} + return fileDescriptor_ws_1bc577ef51df0a70, []int{2} } func (m *PublicUserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PublicUserInfo.Unmarshal(m, b) @@ -344,7 +344,7 @@ func (m *UserInfo) Reset() { *m = UserInfo{} } func (m *UserInfo) String() string { return proto.CompactTextString(m) } func (*UserInfo) ProtoMessage() {} func (*UserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f24e0416269be717, []int{3} + return fileDescriptor_ws_1bc577ef51df0a70, []int{3} } func (m *UserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserInfo.Unmarshal(m, b) @@ -451,7 +451,7 @@ func (m *FriendInfo) Reset() { *m = FriendInfo{} } func (m *FriendInfo) String() string { return proto.CompactTextString(m) } func (*FriendInfo) ProtoMessage() {} func (*FriendInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f24e0416269be717, []int{4} + return fileDescriptor_ws_1bc577ef51df0a70, []int{4} } func (m *FriendInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfo.Unmarshal(m, b) @@ -536,7 +536,7 @@ func (m *BlackInfo) Reset() { *m = BlackInfo{} } func (m *BlackInfo) String() string { return proto.CompactTextString(m) } func (*BlackInfo) ProtoMessage() {} func (*BlackInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f24e0416269be717, []int{5} + return fileDescriptor_ws_1bc577ef51df0a70, []int{5} } func (m *BlackInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackInfo.Unmarshal(m, b) @@ -617,7 +617,7 @@ func (m *GroupRequest) Reset() { *m = GroupRequest{} } func (m *GroupRequest) String() string { return proto.CompactTextString(m) } func (*GroupRequest) ProtoMessage() {} func (*GroupRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f24e0416269be717, []int{6} + return fileDescriptor_ws_1bc577ef51df0a70, []int{6} } func (m *GroupRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupRequest.Unmarshal(m, b) @@ -704,11 +704,11 @@ type FriendRequest struct { FromUserID string `protobuf:"bytes,1,opt,name=fromUserID" json:"fromUserID,omitempty"` FromNickname string `protobuf:"bytes,2,opt,name=fromNickname" json:"fromNickname,omitempty"` FromFaceURL string `protobuf:"bytes,3,opt,name=fromFaceURL" json:"fromFaceURL,omitempty"` - FromGender string `protobuf:"bytes,4,opt,name=fromGender" json:"fromGender,omitempty"` + FromGender int32 `protobuf:"varint,4,opt,name=fromGender" json:"fromGender,omitempty"` ToUserID string `protobuf:"bytes,5,opt,name=toUserID" json:"toUserID,omitempty"` ToNickname string `protobuf:"bytes,6,opt,name=toNickname" json:"toNickname,omitempty"` ToFaceURL string `protobuf:"bytes,7,opt,name=toFaceURL" json:"toFaceURL,omitempty"` - ToGender string `protobuf:"bytes,8,opt,name=toGender" json:"toGender,omitempty"` + ToGender int32 `protobuf:"varint,8,opt,name=toGender" json:"toGender,omitempty"` HandleResult int32 `protobuf:"varint,9,opt,name=handleResult" json:"handleResult,omitempty"` ReqMsg string `protobuf:"bytes,10,opt,name=reqMsg" json:"reqMsg,omitempty"` CreateTime uint32 `protobuf:"varint,11,opt,name=createTime" json:"createTime,omitempty"` @@ -725,7 +725,7 @@ func (m *FriendRequest) Reset() { *m = FriendRequest{} } func (m *FriendRequest) String() string { return proto.CompactTextString(m) } func (*FriendRequest) ProtoMessage() {} func (*FriendRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f24e0416269be717, []int{7} + return fileDescriptor_ws_1bc577ef51df0a70, []int{7} } func (m *FriendRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendRequest.Unmarshal(m, b) @@ -766,11 +766,11 @@ func (m *FriendRequest) GetFromFaceURL() string { return "" } -func (m *FriendRequest) GetFromGender() string { +func (m *FriendRequest) GetFromGender() int32 { if m != nil { return m.FromGender } - return "" + return 0 } func (m *FriendRequest) GetToUserID() string { @@ -794,11 +794,11 @@ func (m *FriendRequest) GetToFaceURL() string { return "" } -func (m *FriendRequest) GetToGender() string { +func (m *FriendRequest) GetToGender() int32 { if m != nil { return m.ToGender } - return "" + return 0 } func (m *FriendRequest) GetHandleResult() int32 { @@ -866,7 +866,7 @@ func (m *PullMessageBySeqListResp) Reset() { *m = PullMessageBySeqListRe func (m *PullMessageBySeqListResp) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListResp) ProtoMessage() {} func (*PullMessageBySeqListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f24e0416269be717, []int{8} + return fileDescriptor_ws_1bc577ef51df0a70, []int{8} } func (m *PullMessageBySeqListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListResp.Unmarshal(m, b) @@ -941,7 +941,7 @@ func (m *PullMessageBySeqListReq) Reset() { *m = PullMessageBySeqListReq func (m *PullMessageBySeqListReq) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListReq) ProtoMessage() {} func (*PullMessageBySeqListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f24e0416269be717, []int{9} + return fileDescriptor_ws_1bc577ef51df0a70, []int{9} } func (m *PullMessageBySeqListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListReq.Unmarshal(m, b) @@ -996,7 +996,7 @@ func (m *PullMessageReq) Reset() { *m = PullMessageReq{} } func (m *PullMessageReq) String() string { return proto.CompactTextString(m) } func (*PullMessageReq) ProtoMessage() {} func (*PullMessageReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f24e0416269be717, []int{10} + return fileDescriptor_ws_1bc577ef51df0a70, []int{10} } func (m *PullMessageReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageReq.Unmarshal(m, b) @@ -1060,7 +1060,7 @@ func (m *PullMessageResp) Reset() { *m = PullMessageResp{} } func (m *PullMessageResp) String() string { return proto.CompactTextString(m) } func (*PullMessageResp) ProtoMessage() {} func (*PullMessageResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f24e0416269be717, []int{11} + return fileDescriptor_ws_1bc577ef51df0a70, []int{11} } func (m *PullMessageResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageResp.Unmarshal(m, b) @@ -1132,7 +1132,7 @@ func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} } func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqReq) ProtoMessage() {} func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f24e0416269be717, []int{12} + return fileDescriptor_ws_1bc577ef51df0a70, []int{12} } func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) @@ -1164,7 +1164,7 @@ func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} } func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqResp) ProtoMessage() {} func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f24e0416269be717, []int{13} + return fileDescriptor_ws_1bc577ef51df0a70, []int{13} } func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) @@ -1212,7 +1212,7 @@ func (m *GatherFormat) Reset() { *m = GatherFormat{} } func (m *GatherFormat) String() string { return proto.CompactTextString(m) } func (*GatherFormat) ProtoMessage() {} func (*GatherFormat) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f24e0416269be717, []int{14} + return fileDescriptor_ws_1bc577ef51df0a70, []int{14} } func (m *GatherFormat) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GatherFormat.Unmarshal(m, b) @@ -1259,7 +1259,7 @@ func (m *UserSendMsgResp) Reset() { *m = UserSendMsgResp{} } func (m *UserSendMsgResp) String() string { return proto.CompactTextString(m) } func (*UserSendMsgResp) ProtoMessage() {} func (*UserSendMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f24e0416269be717, []int{15} + return fileDescriptor_ws_1bc577ef51df0a70, []int{15} } func (m *UserSendMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserSendMsgResp.Unmarshal(m, b) @@ -1328,7 +1328,7 @@ func (m *MsgData) Reset() { *m = MsgData{} } func (m *MsgData) String() string { return proto.CompactTextString(m) } func (*MsgData) ProtoMessage() {} func (*MsgData) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f24e0416269be717, []int{16} + return fileDescriptor_ws_1bc577ef51df0a70, []int{16} } func (m *MsgData) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgData.Unmarshal(m, b) @@ -1489,7 +1489,7 @@ func (m *OfflinePushInfo) Reset() { *m = OfflinePushInfo{} } func (m *OfflinePushInfo) String() string { return proto.CompactTextString(m) } func (*OfflinePushInfo) ProtoMessage() {} func (*OfflinePushInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f24e0416269be717, []int{17} + return fileDescriptor_ws_1bc577ef51df0a70, []int{17} } func (m *OfflinePushInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OfflinePushInfo.Unmarshal(m, b) @@ -1556,7 +1556,7 @@ func (m *TipsComm) Reset() { *m = TipsComm{} } func (m *TipsComm) String() string { return proto.CompactTextString(m) } func (*TipsComm) ProtoMessage() {} func (*TipsComm) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f24e0416269be717, []int{18} + return fileDescriptor_ws_1bc577ef51df0a70, []int{18} } func (m *TipsComm) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TipsComm.Unmarshal(m, b) @@ -1605,7 +1605,7 @@ func (m *MemberEnterTips) Reset() { *m = MemberEnterTips{} } func (m *MemberEnterTips) String() string { return proto.CompactTextString(m) } func (*MemberEnterTips) ProtoMessage() {} func (*MemberEnterTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f24e0416269be717, []int{19} + return fileDescriptor_ws_1bc577ef51df0a70, []int{19} } func (m *MemberEnterTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberEnterTips.Unmarshal(m, b) @@ -1660,7 +1660,7 @@ func (m *MemberLeaveTips) Reset() { *m = MemberLeaveTips{} } func (m *MemberLeaveTips) String() string { return proto.CompactTextString(m) } func (*MemberLeaveTips) ProtoMessage() {} func (*MemberLeaveTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f24e0416269be717, []int{20} + return fileDescriptor_ws_1bc577ef51df0a70, []int{20} } func (m *MemberLeaveTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberLeaveTips.Unmarshal(m, b) @@ -1715,7 +1715,7 @@ func (m *MemberInvitedTips) Reset() { *m = MemberInvitedTips{} } func (m *MemberInvitedTips) String() string { return proto.CompactTextString(m) } func (*MemberInvitedTips) ProtoMessage() {} func (*MemberInvitedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f24e0416269be717, []int{21} + return fileDescriptor_ws_1bc577ef51df0a70, []int{21} } func (m *MemberInvitedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInvitedTips.Unmarshal(m, b) @@ -1777,7 +1777,7 @@ func (m *MemberKickedTips) Reset() { *m = MemberKickedTips{} } func (m *MemberKickedTips) String() string { return proto.CompactTextString(m) } func (*MemberKickedTips) ProtoMessage() {} func (*MemberKickedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f24e0416269be717, []int{22} + return fileDescriptor_ws_1bc577ef51df0a70, []int{22} } func (m *MemberKickedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberKickedTips.Unmarshal(m, b) @@ -1840,7 +1840,7 @@ func (m *MemberInfoChangedTips) Reset() { *m = MemberInfoChangedTips{} } func (m *MemberInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*MemberInfoChangedTips) ProtoMessage() {} func (*MemberInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f24e0416269be717, []int{23} + return fileDescriptor_ws_1bc577ef51df0a70, []int{23} } func (m *MemberInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInfoChangedTips.Unmarshal(m, b) @@ -1909,7 +1909,7 @@ func (m *GroupCreatedTips) Reset() { *m = GroupCreatedTips{} } func (m *GroupCreatedTips) String() string { return proto.CompactTextString(m) } func (*GroupCreatedTips) ProtoMessage() {} func (*GroupCreatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f24e0416269be717, []int{24} + return fileDescriptor_ws_1bc577ef51df0a70, []int{24} } func (m *GroupCreatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupCreatedTips.Unmarshal(m, b) @@ -1970,7 +1970,7 @@ func (m *GroupInfoChangedTips) Reset() { *m = GroupInfoChangedTips{} } func (m *GroupInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*GroupInfoChangedTips) ProtoMessage() {} func (*GroupInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f24e0416269be717, []int{25} + return fileDescriptor_ws_1bc577ef51df0a70, []int{25} } func (m *GroupInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfoChangedTips.Unmarshal(m, b) @@ -2024,7 +2024,7 @@ func (m *JoinGroupApplicationTips) Reset() { *m = JoinGroupApplicationTi func (m *JoinGroupApplicationTips) String() string { return proto.CompactTextString(m) } func (*JoinGroupApplicationTips) ProtoMessage() {} func (*JoinGroupApplicationTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f24e0416269be717, []int{26} + return fileDescriptor_ws_1bc577ef51df0a70, []int{26} } func (m *JoinGroupApplicationTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JoinGroupApplicationTips.Unmarshal(m, b) @@ -2079,7 +2079,7 @@ func (m *ApplicationProcessedTips) Reset() { *m = ApplicationProcessedTi func (m *ApplicationProcessedTips) String() string { return proto.CompactTextString(m) } func (*ApplicationProcessedTips) ProtoMessage() {} func (*ApplicationProcessedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f24e0416269be717, []int{27} + return fileDescriptor_ws_1bc577ef51df0a70, []int{27} } func (m *ApplicationProcessedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ApplicationProcessedTips.Unmarshal(m, b) @@ -2140,7 +2140,7 @@ func (m *FriendApplication) Reset() { *m = FriendApplication{} } func (m *FriendApplication) String() string { return proto.CompactTextString(m) } func (*FriendApplication) ProtoMessage() {} func (*FriendApplication) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f24e0416269be717, []int{28} + return fileDescriptor_ws_1bc577ef51df0a70, []int{28} } func (m *FriendApplication) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplication.Unmarshal(m, b) @@ -2193,7 +2193,7 @@ func (m *FromToUserID) Reset() { *m = FromToUserID{} } func (m *FromToUserID) String() string { return proto.CompactTextString(m) } func (*FromToUserID) ProtoMessage() {} func (*FromToUserID) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f24e0416269be717, []int{29} + return fileDescriptor_ws_1bc577ef51df0a70, []int{29} } func (m *FromToUserID) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FromToUserID.Unmarshal(m, b) @@ -2239,7 +2239,7 @@ func (m *FriendApplicationAddedTips) Reset() { *m = FriendApplicationAdd func (m *FriendApplicationAddedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationAddedTips) ProtoMessage() {} func (*FriendApplicationAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f24e0416269be717, []int{30} + return fileDescriptor_ws_1bc577ef51df0a70, []int{30} } func (m *FriendApplicationAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationAddedTips.Unmarshal(m, b) @@ -2278,7 +2278,7 @@ func (m *FriendApplicationProcessedTips) Reset() { *m = FriendApplicatio func (m *FriendApplicationProcessedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationProcessedTips) ProtoMessage() {} func (*FriendApplicationProcessedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f24e0416269be717, []int{31} + return fileDescriptor_ws_1bc577ef51df0a70, []int{31} } func (m *FriendApplicationProcessedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationProcessedTips.Unmarshal(m, b) @@ -2319,7 +2319,7 @@ func (m *FriendAddedTips) Reset() { *m = FriendAddedTips{} } func (m *FriendAddedTips) String() string { return proto.CompactTextString(m) } func (*FriendAddedTips) ProtoMessage() {} func (*FriendAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f24e0416269be717, []int{32} + return fileDescriptor_ws_1bc577ef51df0a70, []int{32} } func (m *FriendAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendAddedTips.Unmarshal(m, b) @@ -2372,7 +2372,7 @@ func (m *FriendDeletedTips) Reset() { *m = FriendDeletedTips{} } func (m *FriendDeletedTips) String() string { return proto.CompactTextString(m) } func (*FriendDeletedTips) ProtoMessage() {} func (*FriendDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f24e0416269be717, []int{33} + return fileDescriptor_ws_1bc577ef51df0a70, []int{33} } func (m *FriendDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendDeletedTips.Unmarshal(m, b) @@ -2410,7 +2410,7 @@ func (m *BlackAddedTips) Reset() { *m = BlackAddedTips{} } func (m *BlackAddedTips) String() string { return proto.CompactTextString(m) } func (*BlackAddedTips) ProtoMessage() {} func (*BlackAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f24e0416269be717, []int{34} + return fileDescriptor_ws_1bc577ef51df0a70, []int{34} } func (m *BlackAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackAddedTips.Unmarshal(m, b) @@ -2448,7 +2448,7 @@ func (m *BlackDeletedTips) Reset() { *m = BlackDeletedTips{} } func (m *BlackDeletedTips) String() string { return proto.CompactTextString(m) } func (*BlackDeletedTips) ProtoMessage() {} func (*BlackDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f24e0416269be717, []int{35} + return fileDescriptor_ws_1bc577ef51df0a70, []int{35} } func (m *BlackDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackDeletedTips.Unmarshal(m, b) @@ -2486,7 +2486,7 @@ func (m *FriendInfoChangedTips) Reset() { *m = FriendInfoChangedTips{} } func (m *FriendInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*FriendInfoChangedTips) ProtoMessage() {} func (*FriendInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f24e0416269be717, []int{36} + return fileDescriptor_ws_1bc577ef51df0a70, []int{36} } func (m *FriendInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfoChangedTips.Unmarshal(m, b) @@ -2525,7 +2525,7 @@ func (m *SelfInfoUpdatedTips) Reset() { *m = SelfInfoUpdatedTips{} } func (m *SelfInfoUpdatedTips) String() string { return proto.CompactTextString(m) } func (*SelfInfoUpdatedTips) ProtoMessage() {} func (*SelfInfoUpdatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_f24e0416269be717, []int{37} + return fileDescriptor_ws_1bc577ef51df0a70, []int{37} } func (m *SelfInfoUpdatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SelfInfoUpdatedTips.Unmarshal(m, b) @@ -2594,10 +2594,10 @@ func init() { proto.RegisterType((*SelfInfoUpdatedTips)(nil), "server_api_params.SelfInfoUpdatedTips") } -func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_f24e0416269be717) } +func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_1bc577ef51df0a70) } -var fileDescriptor_ws_f24e0416269be717 = []byte{ - // 1991 bytes of a gzipped FileDescriptorProto +var fileDescriptor_ws_1bc577ef51df0a70 = []byte{ + // 1989 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x59, 0xcd, 0x6f, 0x23, 0x49, 0x15, 0x57, 0xb7, 0x3f, 0x12, 0x3f, 0xdb, 0x71, 0xa6, 0x67, 0x76, 0xb0, 0xc2, 0x32, 0x84, 0xd6, 0x6a, 0x89, 0x90, 0x08, 0x52, 0x10, 0x12, 0x2c, 0x12, 0x30, 0x93, 0x2f, 0x66, 0x89, 0x33, 0x51, @@ -2645,82 +2645,82 @@ var fileDescriptor_ws_f24e0416269be717 = []byte{ 0xf5, 0x6e, 0xc8, 0xc9, 0x52, 0xa7, 0x71, 0x76, 0xc3, 0xd6, 0x59, 0x66, 0x46, 0xd3, 0x28, 0x40, 0x1f, 0x23, 0x16, 0x32, 0x7b, 0x8a, 0x84, 0x7f, 0xab, 0x40, 0x5b, 0x57, 0x7d, 0x1e, 0x8b, 0x27, 0xaa, 0x3c, 0xf9, 0xc8, 0x49, 0xbe, 0x85, 0x28, 0x2b, 0x14, 0x75, 0xee, 0xf6, 0x07, 0x07, 0x53, - 0x15, 0xa4, 0xe8, 0x13, 0xa7, 0x4f, 0xd8, 0x50, 0xae, 0xe5, 0xb4, 0xec, 0x17, 0x46, 0x8b, 0x46, - 0x54, 0x07, 0x92, 0xdc, 0x49, 0x6a, 0x41, 0x2b, 0x5e, 0xc9, 0x0b, 0xfd, 0x3a, 0xad, 0x16, 0xa2, - 0xe2, 0x2b, 0x79, 0xae, 0x5b, 0x07, 0xa9, 0x04, 0xb4, 0x64, 0xa3, 0x77, 0x33, 0x97, 0x6c, 0xb4, - 0xce, 0x66, 0xb5, 0x81, 0x15, 0xb7, 0x2c, 0xab, 0xe0, 0x64, 0xd5, 0xdd, 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0x8c, 0x0c, + 0xe9, 0xb3, 0x77, 0x97, 0x74, 0x72, 0x96, 0x64, 0x32, 0xa2, 0xd9, 0x58, 0x15, 0x1a, 0x15, 0xe2, + 0x90, 0xc7, 0x14, 0xb3, 0x5c, 0x8b, 0x72, 0x52, 0xb9, 0x48, 0x85, 0x50, 0x16, 0x98, 0xce, 0xa6, + 0x29, 0x85, 0x8f, 0xc8, 0xdb, 0x4b, 0x3a, 0xc1, 0x8c, 0x56, 0x22, 0x43, 0x21, 0x9e, 0x30, 0x85, + 0x57, 0x0d, 0x8e, 0x54, 0x70, 0x0c, 0xed, 0x2c, 0x61, 0x43, 0x5d, 0x9c, 0xba, 0xd8, 0x2b, 0x7b, + 0xcd, 0x83, 0xaf, 0x2e, 0x68, 0x03, 0xa7, 0x44, 0x5e, 0x53, 0x71, 0xc2, 0xc5, 0x88, 0xc8, 0xc8, + 0xe5, 0x0a, 0x0e, 0xa1, 0x85, 0xdb, 0x2e, 0x97, 0x52, 0x5f, 0x4d, 0x8a, 0xc3, 0x14, 0x8e, 0xe0, + 0x4b, 0x8b, 0x23, 0x31, 0x59, 0xba, 0xfb, 0x55, 0x1f, 0xc4, 0x46, 0x92, 0x70, 0x56, 0x74, 0x00, + 0x1b, 0x52, 0x21, 0xcc, 0xb4, 0x9c, 0x6e, 0x65, 0xb7, 0xb2, 0x57, 0x89, 0x72, 0x32, 0xfc, 0x85, + 0xba, 0x06, 0x14, 0xea, 0xee, 0xd2, 0xb2, 0x03, 0x9b, 0x19, 0x9d, 0x3c, 0xa3, 0xc3, 0x84, 0xa1, + 0x8a, 0x4a, 0x54, 0xd0, 0x78, 0xc7, 0xa3, 0x93, 0x63, 0x16, 0xe7, 0x01, 0xd7, 0xd4, 0xac, 0x65, + 0xd5, 0x39, 0xcb, 0xc2, 0x4f, 0x3d, 0xe8, 0x38, 0x06, 0x7c, 0xe1, 0x12, 0xfe, 0x08, 0x82, 0x53, + 0x2a, 0x7b, 0xe4, 0xed, 0x53, 0x16,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 0xbb, 0xbd, 0x3f, 0x83, 0xf7, 0xca, 0x04, 0xd8, 0x2d, 0xf5, 0x5e, 0xa4, + 0x7f, 0x13, 0x1e, 0x5e, 0xd2, 0x74, 0xa0, 0x64, 0xbf, 0x1a, 0xc7, 0xc5, 0x59, 0xb5, 0x64, 0xe4, + 0x72, 0x55, 0xc7, 0x3f, 0x1c, 0xbf, 0xfd, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3d, 0x60, 0xab, + 0x3f, 0x83, 0x1c, 0x00, 0x00, } From b2c2c1247b0ee36fa98402a3ffef9db6a6222609 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Sat, 15 Jan 2022 11:14:29 +0800 Subject: [PATCH 280/337] Refactor code --- internal/rpc/msg/friend_notification.go | 12 +++++++++++- internal/rpc/msg/send_msg.go | 2 +- pkg/common/constant/constant.go | 1 + pkg/proto/sdk_ws/ws.proto | 5 +++-- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/internal/rpc/msg/friend_notification.go b/internal/rpc/msg/friend_notification.go index 1d130882e..8b472e894 100644 --- a/internal/rpc/msg/friend_notification.go +++ b/internal/rpc/msg/friend_notification.go @@ -9,6 +9,7 @@ import ( open_im_sdk "Open_IM/pkg/proto/sdk_ws" "Open_IM/pkg/utils" "encoding/json" + "github.com/golang/protobuf/proto" ) //message MemberInfoChangedTips{ @@ -75,7 +76,11 @@ func FriendApplicationProcessedNotification(req *pbFriend.AddFriendResponseReq) } var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(FriendApplicationProcessedTips) + tips.Detail, err = proto.Marshal(&FriendApplicationProcessedTips) + if err != nil { + log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), FriendApplicationProcessedTips) + return + } tips.DefaultTips = fromUserNickname + " FriendApplicationProcessedNotification " + toUserNickname var n NotificationMsg @@ -86,6 +91,11 @@ func FriendApplicationProcessedNotification(req *pbFriend.AddFriendResponseReq) n.MsgFrom = constant.SysMsgType n.OperationID = req.CommID.OperationID n.Content, _ = json.Marshal(tips) + n.Content, err = proto.Marshal(&tips) + if err != nil { + log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips) + return + } Notification(&n) } diff --git a/internal/rpc/msg/send_msg.go b/internal/rpc/msg/send_msg.go index 481dee2dc..83f439120 100644 --- a/internal/rpc/msg/send_msg.go +++ b/internal/rpc/msg/send_msg.go @@ -232,7 +232,7 @@ func modifyMessageByUserMessageReceiveOpt(userID, sourceID string, sessionType i type NotificationMsg struct { SendID string RecvID string - Content []byte + Content []byte // open_im_sdk.TipsComm MsgFrom int32 ContentType int32 SessionType int32 diff --git a/pkg/common/constant/constant.go b/pkg/common/constant/constant.go index d0bfec2e0..cd35036fb 100644 --- a/pkg/common/constant/constant.go +++ b/pkg/common/constant/constant.go @@ -45,6 +45,7 @@ const ( GroupMsg = 201 //SysRelated + FriendApplicationProcessedNotification = 1201 //AcceptFriendApplicationTip = 201 FriendApplicationAddedNotification = 1202 //AddFriendTip = 202 FriendAddedNotification = 1203 diff --git a/pkg/proto/sdk_ws/ws.proto b/pkg/proto/sdk_ws/ws.proto index 919596ddb..5b235f5d8 100644 --- a/pkg/proto/sdk_ws/ws.proto +++ b/pkg/proto/sdk_ws/ws.proto @@ -75,8 +75,8 @@ message BlackInfo{ } message GroupRequest{ - string userID = 1; - string groupID = 2; + PublicUserInfo userInfo = 1; + GroupInfo groupInfo = 2; string handleResult = 3; string reqMsg = 4; string handleMsg = 5; @@ -312,6 +312,7 @@ message FriendApplicationAddedTips{ //FromUserID accept or reject ToUserID message FriendApplicationProcessedTips{ FromToUserID fromToUserID = 1; + int32 handleResult = 2; } // FromUserID Added a friend ToUserID From 17b96dd7c1d192687a72cacada00ea3bdf003a09 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Sat, 15 Jan 2022 15:25:12 +0800 Subject: [PATCH 281/337] Refactor code --- cmd/open_im_api/main.go | 16 +- internal/api/friend/friend.go | 4 +- internal/rpc/group/group.go | 15 +- .../mysql_model/im_mysql_model/group_model.go | 3 +- pkg/common/utils/utils.go | 4 + pkg/proto/group/group.pb.go | 224 +++++------ pkg/proto/group/group.proto | 18 +- pkg/proto/sdk_ws/ws.pb.go | 378 +++++++++--------- 8 files changed, 346 insertions(+), 316 deletions(-) diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index fccba41c1..8580de2cc 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -26,7 +26,7 @@ func main() { userRouterGroup := r.Group("/user") { userRouterGroup.POST("/update_user_info", user.UpdateUserInfo) //1 - userRouterGroup.POST("/get_user_info", user.GetUsersInfo) //1 + userRouterGroup.POST("/get_users_info", user.GetUsersInfo) //1 userRouterGroup.POST("/get_self_user_info", user.GetSelfUserInfo) //1 } //friend routing group @@ -34,17 +34,19 @@ func main() { { // friendRouterGroup.POST("/get_friends_info", friend.GetFriendsInfo) friendRouterGroup.POST("/add_friend", friend.AddFriend) //1 + friendRouterGroup.POST("/delete_friend", friend.DeleteFriend) //1 friendRouterGroup.POST("/get_friend_apply_list", friend.GetFriendApplyList) //1 friendRouterGroup.POST("/get_self_apply_list", friend.GetSelfApplyList) //1 friendRouterGroup.POST("/get_friend_list", friend.GetFriendList) //1 - friendRouterGroup.POST("/add_blacklist", friend.AddBlacklist) //1 - friendRouterGroup.POST("/get_blacklist", friend.GetBlacklist) //1 - friendRouterGroup.POST("/remove_blacklist", friend.RemoveBlacklist) //1 - friendRouterGroup.POST("/delete_friend", friend.DeleteFriend) //1 friendRouterGroup.POST("/add_friend_response", friend.AddFriendResponse) //1 friendRouterGroup.POST("/set_friend_remark", friend.SetFriendRemark) //1 - friendRouterGroup.POST("/is_friend", friend.IsFriend) //1 - friendRouterGroup.POST("/import_friend", friend.ImportFriend) //1 + + friendRouterGroup.POST("/add_black", friend.AddBlack) //1 + friendRouterGroup.POST("/get_black_list", friend.GetBlacklist) //1 + friendRouterGroup.POST("/remove_black", friend.RemoveBlack) //1 + + friendRouterGroup.POST("/import_friend", friend.ImportFriend) //1 + friendRouterGroup.POST("/is_friend", friend.IsFriend) //1 } //group related routing group groupRouterGroup := r.Group("/group") diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go index 3cd14ff73..42f4ba86a 100644 --- a/internal/api/friend/friend.go +++ b/internal/api/friend/friend.go @@ -16,7 +16,7 @@ import ( "strings" ) -func AddBlacklist(c *gin.Context) { +func AddBlack(c *gin.Context) { params := api.AddBlacklistReq{} if err := c.BindJSON(¶ms); err != nil { log.NewError("0", "BindJSON failed ", err.Error()) @@ -257,7 +257,7 @@ func SetFriendRemark(c *gin.Context) { c.JSON(http.StatusOK, resp) } -func RemoveBlacklist(c *gin.Context) { +func RemoveBlack(c *gin.Context) { params := api.RemoveBlackListReq{} if err := c.BindJSON(¶ms); err != nil { log.NewError("0", "BindJSON failed ", err.Error()) diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index b691458f3..767adba27 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -407,8 +407,21 @@ func (s *groupServer) GetGroupApplicationList(_ context.Context, req *pbGroup.Ge log.NewDebug(req.OperationID, "GetGroupApplicationList reply ", reply) resp := pbGroup.GetGroupApplicationListResp{} for _, v := range reply { - var node open_im_sdk.GroupRequest + node := open_im_sdk.GroupRequest{UserInfo: &open_im_sdk.PublicUserInfo{}, GroupInfo: &open_im_sdk.GroupInfo{}} + group, err := imdb.GetGroupInfoByGroupID(v.GroupID) + if err != nil { + log.Error(req.OperationID, "GetGroupInfoByGroupID failed ", err.Error(), v.GroupID) + continue + } + user, err := imdb.GetUserByUserID(v.UserID) + if err != nil { + log.Error(req.OperationID, "GetUserByUserID failed ", err.Error(), v.UserID) + continue + } + cp.GroupRequestDBCopyOpenIM(&node, &v) + cp.UserDBCopyOpenIMPublic(node.UserInfo, user) + cp.GroupDBCopyOpenIM(node.GroupInfo, group) log.NewDebug(req.OperationID, "node ", node, "v ", v) resp.GroupRequestList = append(resp.GroupRequestList, &node) } diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_model.go index 21e9d5156..60b470685 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_model.go @@ -2,6 +2,7 @@ package im_mysql_model import ( "Open_IM/pkg/common/db" + "Open_IM/pkg/utils" "time" ) @@ -37,7 +38,7 @@ func InsertIntoGroup(groupInfo db.Group) error { func GetGroupInfoByGroupID(groupId string) (*db.Group, error) { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { - return nil, err + return nil, utils.Wrap(err, "") } var groupInfo db.Group err = dbConn.Table("groups").Where("group_id=?", groupId).Find(&groupInfo).Error diff --git a/pkg/common/utils/utils.go b/pkg/common/utils/utils.go index b181d79b0..ed061a509 100644 --- a/pkg/common/utils/utils.go +++ b/pkg/common/utils/utils.go @@ -114,6 +114,10 @@ func BlackDBCopyOpenIM(dst *open_im_sdk.BlackInfo, src *db.Black) { } } +func UserDBCopyOpenIMPublic(dst *open_im_sdk.PublicUserInfo, src *db.User) { + utils.CopyStructFields(dst, src) +} + // //func PublicUserDBCopyOpenIM(dst *open_im_sdk.PublicUserInfo, src *db.User){ // diff --git a/pkg/proto/group/group.pb.go b/pkg/proto/group/group.pb.go index ea305a14b..15741944a 100644 --- a/pkg/proto/group/group.pb.go +++ b/pkg/proto/group/group.pb.go @@ -36,7 +36,7 @@ func (m *CommonResp) Reset() { *m = CommonResp{} } func (m *CommonResp) String() string { return proto.CompactTextString(m) } func (*CommonResp) ProtoMessage() {} func (*CommonResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_5b7911b898fdd5c5, []int{0} + return fileDescriptor_group_a130b5186d308ee6, []int{0} } func (m *CommonResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CommonResp.Unmarshal(m, b) @@ -82,7 +82,7 @@ func (m *GroupAddMemberInfo) Reset() { *m = GroupAddMemberInfo{} } func (m *GroupAddMemberInfo) String() string { return proto.CompactTextString(m) } func (*GroupAddMemberInfo) ProtoMessage() {} func (*GroupAddMemberInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_group_5b7911b898fdd5c5, []int{1} + return fileDescriptor_group_a130b5186d308ee6, []int{1} } func (m *GroupAddMemberInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupAddMemberInfo.Unmarshal(m, b) @@ -131,7 +131,7 @@ func (m *CreateGroupReq) Reset() { *m = CreateGroupReq{} } func (m *CreateGroupReq) String() string { return proto.CompactTextString(m) } func (*CreateGroupReq) ProtoMessage() {} func (*CreateGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_5b7911b898fdd5c5, []int{2} + return fileDescriptor_group_a130b5186d308ee6, []int{2} } func (m *CreateGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreateGroupReq.Unmarshal(m, b) @@ -199,7 +199,7 @@ func (m *CreateGroupResp) Reset() { *m = CreateGroupResp{} } func (m *CreateGroupResp) String() string { return proto.CompactTextString(m) } func (*CreateGroupResp) ProtoMessage() {} func (*CreateGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_5b7911b898fdd5c5, []int{3} + return fileDescriptor_group_a130b5186d308ee6, []int{3} } func (m *CreateGroupResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreateGroupResp.Unmarshal(m, b) @@ -253,7 +253,7 @@ func (m *GetGroupsInfoReq) Reset() { *m = GetGroupsInfoReq{} } func (m *GetGroupsInfoReq) String() string { return proto.CompactTextString(m) } func (*GetGroupsInfoReq) ProtoMessage() {} func (*GetGroupsInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_5b7911b898fdd5c5, []int{4} + return fileDescriptor_group_a130b5186d308ee6, []int{4} } func (m *GetGroupsInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupsInfoReq.Unmarshal(m, b) @@ -307,7 +307,7 @@ func (m *GetGroupsInfoResp) Reset() { *m = GetGroupsInfoResp{} } func (m *GetGroupsInfoResp) String() string { return proto.CompactTextString(m) } func (*GetGroupsInfoResp) ProtoMessage() {} func (*GetGroupsInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_5b7911b898fdd5c5, []int{5} + return fileDescriptor_group_a130b5186d308ee6, []int{5} } func (m *GetGroupsInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupsInfoResp.Unmarshal(m, b) @@ -361,7 +361,7 @@ func (m *SetGroupInfoReq) Reset() { *m = SetGroupInfoReq{} } func (m *SetGroupInfoReq) String() string { return proto.CompactTextString(m) } func (*SetGroupInfoReq) ProtoMessage() {} func (*SetGroupInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_5b7911b898fdd5c5, []int{6} + return fileDescriptor_group_a130b5186d308ee6, []int{6} } func (m *SetGroupInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetGroupInfoReq.Unmarshal(m, b) @@ -413,7 +413,7 @@ func (m *SetGroupInfoResp) Reset() { *m = SetGroupInfoResp{} } func (m *SetGroupInfoResp) String() string { return proto.CompactTextString(m) } func (*SetGroupInfoResp) ProtoMessage() {} func (*SetGroupInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_5b7911b898fdd5c5, []int{7} + return fileDescriptor_group_a130b5186d308ee6, []int{7} } func (m *SetGroupInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetGroupInfoResp.Unmarshal(m, b) @@ -453,7 +453,7 @@ func (m *GetGroupApplicationListReq) Reset() { *m = GetGroupApplicationL func (m *GetGroupApplicationListReq) String() string { return proto.CompactTextString(m) } func (*GetGroupApplicationListReq) ProtoMessage() {} func (*GetGroupApplicationListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_5b7911b898fdd5c5, []int{8} + return fileDescriptor_group_a130b5186d308ee6, []int{8} } func (m *GetGroupApplicationListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupApplicationListReq.Unmarshal(m, b) @@ -507,7 +507,7 @@ func (m *GetGroupApplicationListResp) Reset() { *m = GetGroupApplication func (m *GetGroupApplicationListResp) String() string { return proto.CompactTextString(m) } func (*GetGroupApplicationListResp) ProtoMessage() {} func (*GetGroupApplicationListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_5b7911b898fdd5c5, []int{9} + return fileDescriptor_group_a130b5186d308ee6, []int{9} } func (m *GetGroupApplicationListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupApplicationListResp.Unmarshal(m, b) @@ -563,7 +563,7 @@ func (m *TransferGroupOwnerReq) Reset() { *m = TransferGroupOwnerReq{} } func (m *TransferGroupOwnerReq) String() string { return proto.CompactTextString(m) } func (*TransferGroupOwnerReq) ProtoMessage() {} func (*TransferGroupOwnerReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_5b7911b898fdd5c5, []int{10} + return fileDescriptor_group_a130b5186d308ee6, []int{10} } func (m *TransferGroupOwnerReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TransferGroupOwnerReq.Unmarshal(m, b) @@ -629,7 +629,7 @@ func (m *TransferGroupOwnerResp) Reset() { *m = TransferGroupOwnerResp{} func (m *TransferGroupOwnerResp) String() string { return proto.CompactTextString(m) } func (*TransferGroupOwnerResp) ProtoMessage() {} func (*TransferGroupOwnerResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_5b7911b898fdd5c5, []int{11} + return fileDescriptor_group_a130b5186d308ee6, []int{11} } func (m *TransferGroupOwnerResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TransferGroupOwnerResp.Unmarshal(m, b) @@ -670,7 +670,7 @@ func (m *JoinGroupReq) Reset() { *m = JoinGroupReq{} } func (m *JoinGroupReq) String() string { return proto.CompactTextString(m) } func (*JoinGroupReq) ProtoMessage() {} func (*JoinGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_5b7911b898fdd5c5, []int{12} + return fileDescriptor_group_a130b5186d308ee6, []int{12} } func (m *JoinGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JoinGroupReq.Unmarshal(m, b) @@ -729,7 +729,7 @@ func (m *JoinGroupResp) Reset() { *m = JoinGroupResp{} } func (m *JoinGroupResp) String() string { return proto.CompactTextString(m) } func (*JoinGroupResp) ProtoMessage() {} func (*JoinGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_5b7911b898fdd5c5, []int{13} + return fileDescriptor_group_a130b5186d308ee6, []int{13} } func (m *JoinGroupResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JoinGroupResp.Unmarshal(m, b) @@ -772,7 +772,7 @@ func (m *GroupApplicationResponseReq) Reset() { *m = GroupApplicationRes func (m *GroupApplicationResponseReq) String() string { return proto.CompactTextString(m) } func (*GroupApplicationResponseReq) ProtoMessage() {} func (*GroupApplicationResponseReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_5b7911b898fdd5c5, []int{14} + return fileDescriptor_group_a130b5186d308ee6, []int{14} } func (m *GroupApplicationResponseReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupApplicationResponseReq.Unmarshal(m, b) @@ -845,7 +845,7 @@ func (m *GroupApplicationResponseResp) Reset() { *m = GroupApplicationRe func (m *GroupApplicationResponseResp) String() string { return proto.CompactTextString(m) } func (*GroupApplicationResponseResp) ProtoMessage() {} func (*GroupApplicationResponseResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_5b7911b898fdd5c5, []int{15} + return fileDescriptor_group_a130b5186d308ee6, []int{15} } func (m *GroupApplicationResponseResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupApplicationResponseResp.Unmarshal(m, b) @@ -885,7 +885,7 @@ func (m *QuitGroupReq) Reset() { *m = QuitGroupReq{} } func (m *QuitGroupReq) String() string { return proto.CompactTextString(m) } func (*QuitGroupReq) ProtoMessage() {} func (*QuitGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_5b7911b898fdd5c5, []int{16} + return fileDescriptor_group_a130b5186d308ee6, []int{16} } func (m *QuitGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_QuitGroupReq.Unmarshal(m, b) @@ -937,7 +937,7 @@ func (m *QuitGroupResp) Reset() { *m = QuitGroupResp{} } func (m *QuitGroupResp) String() string { return proto.CompactTextString(m) } func (*QuitGroupResp) ProtoMessage() {} func (*QuitGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_5b7911b898fdd5c5, []int{17} + return fileDescriptor_group_a130b5186d308ee6, []int{17} } func (m *QuitGroupResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_QuitGroupResp.Unmarshal(m, b) @@ -979,7 +979,7 @@ func (m *GetGroupMemberListReq) Reset() { *m = GetGroupMemberListReq{} } func (m *GetGroupMemberListReq) String() string { return proto.CompactTextString(m) } func (*GetGroupMemberListReq) ProtoMessage() {} func (*GetGroupMemberListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_5b7911b898fdd5c5, []int{18} + return fileDescriptor_group_a130b5186d308ee6, []int{18} } func (m *GetGroupMemberListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMemberListReq.Unmarshal(m, b) @@ -1048,7 +1048,7 @@ func (m *GetGroupMemberListResp) Reset() { *m = GetGroupMemberListResp{} func (m *GetGroupMemberListResp) String() string { return proto.CompactTextString(m) } func (*GetGroupMemberListResp) ProtoMessage() {} func (*GetGroupMemberListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_5b7911b898fdd5c5, []int{19} + return fileDescriptor_group_a130b5186d308ee6, []int{19} } func (m *GetGroupMemberListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMemberListResp.Unmarshal(m, b) @@ -1110,7 +1110,7 @@ func (m *GetGroupMembersInfoReq) Reset() { *m = GetGroupMembersInfoReq{} func (m *GetGroupMembersInfoReq) String() string { return proto.CompactTextString(m) } func (*GetGroupMembersInfoReq) ProtoMessage() {} func (*GetGroupMembersInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_5b7911b898fdd5c5, []int{20} + return fileDescriptor_group_a130b5186d308ee6, []int{20} } func (m *GetGroupMembersInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMembersInfoReq.Unmarshal(m, b) @@ -1171,7 +1171,7 @@ func (m *GetGroupMembersInfoResp) Reset() { *m = GetGroupMembersInfoResp func (m *GetGroupMembersInfoResp) String() string { return proto.CompactTextString(m) } func (*GetGroupMembersInfoResp) ProtoMessage() {} func (*GetGroupMembersInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_5b7911b898fdd5c5, []int{21} + return fileDescriptor_group_a130b5186d308ee6, []int{21} } func (m *GetGroupMembersInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupMembersInfoResp.Unmarshal(m, b) @@ -1227,7 +1227,7 @@ func (m *KickGroupMemberReq) Reset() { *m = KickGroupMemberReq{} } func (m *KickGroupMemberReq) String() string { return proto.CompactTextString(m) } func (*KickGroupMemberReq) ProtoMessage() {} func (*KickGroupMemberReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_5b7911b898fdd5c5, []int{22} + return fileDescriptor_group_a130b5186d308ee6, []int{22} } func (m *KickGroupMemberReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_KickGroupMemberReq.Unmarshal(m, b) @@ -1294,7 +1294,7 @@ func (m *Id2Result) Reset() { *m = Id2Result{} } func (m *Id2Result) String() string { return proto.CompactTextString(m) } func (*Id2Result) ProtoMessage() {} func (*Id2Result) Descriptor() ([]byte, []int) { - return fileDescriptor_group_5b7911b898fdd5c5, []int{23} + return fileDescriptor_group_a130b5186d308ee6, []int{23} } func (m *Id2Result) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Id2Result.Unmarshal(m, b) @@ -1341,7 +1341,7 @@ func (m *KickGroupMemberResp) Reset() { *m = KickGroupMemberResp{} } func (m *KickGroupMemberResp) String() string { return proto.CompactTextString(m) } func (*KickGroupMemberResp) ProtoMessage() {} func (*KickGroupMemberResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_5b7911b898fdd5c5, []int{24} + return fileDescriptor_group_a130b5186d308ee6, []int{24} } func (m *KickGroupMemberResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_KickGroupMemberResp.Unmarshal(m, b) @@ -1395,7 +1395,7 @@ func (m *GetJoinedGroupListReq) Reset() { *m = GetJoinedGroupListReq{} } func (m *GetJoinedGroupListReq) String() string { return proto.CompactTextString(m) } func (*GetJoinedGroupListReq) ProtoMessage() {} func (*GetJoinedGroupListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_5b7911b898fdd5c5, []int{25} + return fileDescriptor_group_a130b5186d308ee6, []int{25} } func (m *GetJoinedGroupListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetJoinedGroupListReq.Unmarshal(m, b) @@ -1449,7 +1449,7 @@ func (m *GetJoinedGroupListResp) Reset() { *m = GetJoinedGroupListResp{} func (m *GetJoinedGroupListResp) String() string { return proto.CompactTextString(m) } func (*GetJoinedGroupListResp) ProtoMessage() {} func (*GetJoinedGroupListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_5b7911b898fdd5c5, []int{26} + return fileDescriptor_group_a130b5186d308ee6, []int{26} } func (m *GetJoinedGroupListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetJoinedGroupListResp.Unmarshal(m, b) @@ -1505,7 +1505,7 @@ func (m *InviteUserToGroupReq) Reset() { *m = InviteUserToGroupReq{} } func (m *InviteUserToGroupReq) String() string { return proto.CompactTextString(m) } func (*InviteUserToGroupReq) ProtoMessage() {} func (*InviteUserToGroupReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_5b7911b898fdd5c5, []int{27} + return fileDescriptor_group_a130b5186d308ee6, []int{27} } func (m *InviteUserToGroupReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_InviteUserToGroupReq.Unmarshal(m, b) @@ -1573,7 +1573,7 @@ func (m *InviteUserToGroupResp) Reset() { *m = InviteUserToGroupResp{} } func (m *InviteUserToGroupResp) String() string { return proto.CompactTextString(m) } func (*InviteUserToGroupResp) ProtoMessage() {} func (*InviteUserToGroupResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_5b7911b898fdd5c5, []int{28} + return fileDescriptor_group_a130b5186d308ee6, []int{28} } func (m *InviteUserToGroupResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_InviteUserToGroupResp.Unmarshal(m, b) @@ -1627,7 +1627,7 @@ func (m *GetGroupAllMemberReq) Reset() { *m = GetGroupAllMemberReq{} } func (m *GetGroupAllMemberReq) String() string { return proto.CompactTextString(m) } func (*GetGroupAllMemberReq) ProtoMessage() {} func (*GetGroupAllMemberReq) Descriptor() ([]byte, []int) { - return fileDescriptor_group_5b7911b898fdd5c5, []int{29} + return fileDescriptor_group_a130b5186d308ee6, []int{29} } func (m *GetGroupAllMemberReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupAllMemberReq.Unmarshal(m, b) @@ -1681,7 +1681,7 @@ func (m *GetGroupAllMemberResp) Reset() { *m = GetGroupAllMemberResp{} } func (m *GetGroupAllMemberResp) String() string { return proto.CompactTextString(m) } func (*GetGroupAllMemberResp) ProtoMessage() {} func (*GetGroupAllMemberResp) Descriptor() ([]byte, []int) { - return fileDescriptor_group_5b7911b898fdd5c5, []int{30} + return fileDescriptor_group_a130b5186d308ee6, []int{30} } func (m *GetGroupAllMemberResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetGroupAllMemberResp.Unmarshal(m, b) @@ -2257,86 +2257,86 @@ var _Group_serviceDesc = grpc.ServiceDesc{ Metadata: "group/group.proto", } -func init() { proto.RegisterFile("group/group.proto", fileDescriptor_group_5b7911b898fdd5c5) } +func init() { proto.RegisterFile("group/group.proto", fileDescriptor_group_a130b5186d308ee6) } -var fileDescriptor_group_5b7911b898fdd5c5 = []byte{ - // 1235 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0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, 0xca, 0x02, 0x7c, 0x01, 0x2d, 0xbb, 0x64, 0x09, 0xc4, 0x24, 0xf5, - 0x97, 0x47, 0xe1, 0x02, 0x6c, 0xbc, 0x7d, 0xab, 0x8e, 0xf4, 0xdb, 0xce, 0x6d, 0x31, 0x89, 0xdf, - 0x85, 0x4b, 0x58, 0xe2, 0x77, 0xc9, 0xfa, 0x73, 0x06, 0x8b, 0x76, 0x7e, 0xb8, 0xe3, 0xe2, 0x53, - 0xc9, 0xed, 0xaf, 0x57, 0x89, 0x59, 0x80, 0x9f, 0xc2, 0xdc, 0x55, 0x7a, 0x66, 0xe1, 0xf8, 0x7f, - 0x9f, 0xfc, 0xe8, 0x36, 0x8c, 0x32, 0x51, 0x12, 0x72, 0x66, 0x08, 0xe8, 0x21, 0xe7, 0xe7, 0x92, - 0x1e, 0x72, 0xd1, 0xf4, 0x38, 0x86, 0x05, 0x27, 0xdb, 0x1d, 0xf1, 0xfd, 0xb8, 0xa1, 0x15, 0xb4, - 0x7b, 0x63, 0xad, 0x5c, 0x28, 0xbf, 0x67, 0x67, 0x3b, 0x4f, 0xf2, 0xbd, 0xa2, 0x26, 0x68, 0xac, - 0x95, 0x0b, 0x59, 0xb0, 0x3b, 0xf7, 0x59, 0x73, 0x53, 0xfe, 0x27, 0xf8, 0x48, 0xfc, 0xbe, 0x9a, - 0x12, 0x7f, 0xf8, 0x7d, 0xf0, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xac, 0x58, 0xf3, 0xe0, 0x2f, - 0x14, 0x00, 0x00, +var fileDescriptor_group_a130b5186d308ee6 = []byte{ + // 1246 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0x4b, 0x6f, 0x23, 0xc5, + 0x13, 0x57, 0xc7, 0x71, 0x76, 0x5d, 0x89, 0xf3, 0xe8, 0xbc, 0xfc, 0x9f, 0xf5, 0x3f, 0x64, 0x1b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c, 0x2d, + 0x8e, 0xc2, 0x06, 0x80, 0x4e, 0x07, 0x47, 0x94, 0xb1, 0x9e, 0x49, 0x65, 0x04, 0x14, 0x4a, 0x59, + 0xc7, 0xdf, 0xee, 0x31, 0xe9, 0x40, 0x5d, 0xb1, 0x63, 0x3c, 0x67, 0xfe, 0x0e, 0x4b, 0x2f, 0x55, + 0x77, 0x21, 0xc3, 0x75, 0x18, 0x95, 0xb8, 0xa6, 0x5a, 0x81, 0xca, 0xe3, 0x9e, 0xee, 0x5e, 0x25, + 0x32, 0x95, 0x4c, 0x64, 0x94, 0x96, 0x98, 0x4e, 0xb7, 0x44, 0xc8, 0x7f, 0xd6, 0x73, 0x0c, 0x9b, + 0x1a, 0x61, 0x71, 0x8b, 0x7c, 0x2a, 0x14, 0x4c, 0x60, 0x4e, 0x9c, 0x74, 0xca, 0x86, 0x76, 0xd0, + 0x98, 0xe1, 0x7d, 0x91, 0xa0, 0x91, 0x53, 0x68, 0x16, 0xbb, 0x36, 0x5e, 0xb8, 0x2e, 0x61, 0xee, + 0x74, 0x68, 0x05, 0x77, 0x48, 0xfd, 0x64, 0x70, 0xdf, 0x81, 0xba, 0xa2, 0x67, 0x3c, 0x5b, 0x7f, + 0x45, 0xb0, 0x1a, 0xa1, 0xca, 0x68, 0xb4, 0x97, 0x5b, 0x3d, 0x11, 0x14, 0x87, 0x68, 0x74, 0x60, + 0xd9, 0x01, 0xf5, 0x79, 0x42, 0xab, 0xba, 0x3c, 0x85, 0xfa, 0x8e, 0xe9, 0x37, 0xc1, 0x4b, 0x3a, + 0xe0, 0x99, 0xac, 0xea, 0xd1, 0x91, 0xfc, 0x86, 0x60, 0x2d, 0xcf, 0xc6, 0xb1, 0x40, 0xef, 0x00, + 0xa0, 0x3f, 0xda, 0x79, 0x04, 0xdc, 0x3d, 0x2a, 0x82, 0x3b, 0xa1, 0xed, 0x60, 0x68, 0xdb, 0x7c, + 0x6a, 0x28, 0x37, 0x43, 0xcd, 0x8e, 0x34, 0x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0xfd, 0x5b, 0x65, 0x84, 0xdd, 0x66, 0x66, 0xbb, 0x89, 0xed, 0xce, 0x5d, 0xce, 0x62, + 0xbb, 0x0b, 0xd6, 0xa2, 0x33, 0x58, 0x36, 0xb3, 0xe3, 0x1e, 0xe7, 0xdf, 0x8a, 0xb3, 0xbf, 0x51, + 0xc6, 0x66, 0x1e, 0x7e, 0x06, 0x0b, 0x57, 0xc9, 0xf9, 0x85, 0xa3, 0x7f, 0x8b, 0xb2, 0x63, 0x5c, + 0xd3, 0x8a, 0x58, 0xb1, 0xcb, 0xa9, 0x81, 0xa0, 0xba, 0x9c, 0x9d, 0x51, 0xaa, 0xcb, 0x79, 0x93, + 0xe4, 0x18, 0x96, 0xac, 0x34, 0x46, 0xe2, 0x07, 0x11, 0xac, 0xe5, 0x80, 0xbe, 0xd6, 0x2c, 0x66, + 0x8a, 0xef, 0x99, 0x69, 0xfc, 0x89, 0xbf, 0x97, 0x07, 0x85, 0x5a, 0xb3, 0x98, 0xc9, 0xbc, 0xce, + 0xc2, 0x97, 0xf5, 0x96, 0xf8, 0x27, 0xf1, 0x09, 0xff, 0x7d, 0x35, 0xc3, 0xff, 0x26, 0xfc, 0xf8, + 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf6, 0x24, 0x19, 0x44, 0x65, 0x14, 0x00, 0x00, } diff --git a/pkg/proto/group/group.proto b/pkg/proto/group/group.proto index c10ae01f9..6ba7c52ba 100644 --- a/pkg/proto/group/group.proto +++ b/pkg/proto/group/group.proto @@ -16,7 +16,7 @@ message GroupAddMemberInfo{ message CreateGroupReq{ repeated GroupAddMemberInfo InitMemberList = 1; - open_im_sdk.GroupInfo GroupInfo = 2; + server_api_params.GroupInfo GroupInfo = 2; string OperationID = 3; string OpUserID = 4; //app manager or group owner string OwnerUserID = 5; //owner @@ -24,7 +24,7 @@ message CreateGroupReq{ message CreateGroupResp{ int32 ErrCode = 1; string ErrMsg = 2; - open_im_sdk.GroupInfo GroupInfo = 3; + server_api_params.GroupInfo GroupInfo = 3; } @@ -36,12 +36,12 @@ message GetGroupsInfoReq{ message GetGroupsInfoResp{ int32 ErrCode = 1; string ErrMsg = 2; - repeated open_im_sdk.GroupInfo GroupInfoList = 3; + repeated server_api_params.GroupInfo GroupInfoList = 3; } message SetGroupInfoReq{ - open_im_sdk.GroupInfo GroupInfo = 1; + server_api_params.GroupInfo GroupInfo = 1; string OpUserID = 2; //app manager or group owner string OperationID = 3; } @@ -58,7 +58,7 @@ message GetGroupApplicationListReq { message GetGroupApplicationListResp { int32 ErrCode = 1; string ErrMsg = 2; - repeated open_im_sdk.GroupRequest GroupRequestList = 3; + repeated server_api_params.GroupRequest GroupRequestList = 3; } @@ -120,7 +120,7 @@ message GetGroupMemberListReq { message GetGroupMemberListResp { int32 ErrCode = 1; string ErrMsg = 2; - repeated open_im_sdk.GroupMemberFullInfo memberList = 3; + repeated server_api_params.GroupMemberFullInfo memberList = 3; int32 nextSeq = 4; } @@ -135,7 +135,7 @@ message GetGroupMembersInfoReq { message GetGroupMembersInfoResp { int32 ErrCode = 1; string ErrMsg = 2; - repeated open_im_sdk.GroupMemberFullInfo memberList = 3; + repeated server_api_params.GroupMemberFullInfo memberList = 3; } message KickGroupMemberReq { @@ -166,7 +166,7 @@ message GetJoinedGroupListReq { message GetJoinedGroupListResp{ int32 ErrCode = 1; string ErrMsg = 2; - repeated open_im_sdk.GroupInfo GroupList = 3; + repeated server_api_params.GroupInfo GroupList = 3; } @@ -192,7 +192,7 @@ message GetGroupAllMemberReq { message GetGroupAllMemberResp { int32 ErrCode = 1; string ErrMsg = 2; - repeated open_im_sdk.GroupMemberFullInfo memberList = 3; + repeated server_api_params.GroupMemberFullInfo memberList = 3; } diff --git a/pkg/proto/sdk_ws/ws.pb.go b/pkg/proto/sdk_ws/ws.pb.go index a785dab20..935b15cee 100644 --- a/pkg/proto/sdk_ws/ws.pb.go +++ b/pkg/proto/sdk_ws/ws.pb.go @@ -40,7 +40,7 @@ func (m *GroupInfo) Reset() { *m = GroupInfo{} } func (m *GroupInfo) String() string { return proto.CompactTextString(m) } func (*GroupInfo) ProtoMessage() {} func (*GroupInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1bc577ef51df0a70, []int{0} + return fileDescriptor_ws_1c8466de999dbc0c, []int{0} } func (m *GroupInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfo.Unmarshal(m, b) @@ -164,7 +164,7 @@ func (m *GroupMemberFullInfo) Reset() { *m = GroupMemberFullInfo{} } func (m *GroupMemberFullInfo) String() string { return proto.CompactTextString(m) } func (*GroupMemberFullInfo) ProtoMessage() {} func (*GroupMemberFullInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1bc577ef51df0a70, []int{1} + return fileDescriptor_ws_1c8466de999dbc0c, []int{1} } func (m *GroupMemberFullInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupMemberFullInfo.Unmarshal(m, b) @@ -269,7 +269,7 @@ func (m *PublicUserInfo) Reset() { *m = PublicUserInfo{} } func (m *PublicUserInfo) String() string { return proto.CompactTextString(m) } func (*PublicUserInfo) ProtoMessage() {} func (*PublicUserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1bc577ef51df0a70, []int{2} + return fileDescriptor_ws_1c8466de999dbc0c, []int{2} } func (m *PublicUserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PublicUserInfo.Unmarshal(m, b) @@ -344,7 +344,7 @@ func (m *UserInfo) Reset() { *m = UserInfo{} } func (m *UserInfo) String() string { return proto.CompactTextString(m) } func (*UserInfo) ProtoMessage() {} func (*UserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1bc577ef51df0a70, []int{3} + return fileDescriptor_ws_1c8466de999dbc0c, []int{3} } func (m *UserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserInfo.Unmarshal(m, b) @@ -451,7 +451,7 @@ func (m *FriendInfo) Reset() { *m = FriendInfo{} } func (m *FriendInfo) String() string { return proto.CompactTextString(m) } func (*FriendInfo) ProtoMessage() {} func (*FriendInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1bc577ef51df0a70, []int{4} + return fileDescriptor_ws_1c8466de999dbc0c, []int{4} } func (m *FriendInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfo.Unmarshal(m, b) @@ -536,7 +536,7 @@ func (m *BlackInfo) Reset() { *m = BlackInfo{} } func (m *BlackInfo) String() string { return proto.CompactTextString(m) } func (*BlackInfo) ProtoMessage() {} func (*BlackInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1bc577ef51df0a70, []int{5} + return fileDescriptor_ws_1c8466de999dbc0c, []int{5} } func (m *BlackInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackInfo.Unmarshal(m, b) @@ -599,25 +599,25 @@ func (m *BlackInfo) GetEx() string { } type GroupRequest struct { - UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` - GroupID string `protobuf:"bytes,2,opt,name=groupID" json:"groupID,omitempty"` - HandleResult string `protobuf:"bytes,3,opt,name=handleResult" json:"handleResult,omitempty"` - ReqMsg string `protobuf:"bytes,4,opt,name=reqMsg" json:"reqMsg,omitempty"` - HandleMsg string `protobuf:"bytes,5,opt,name=handleMsg" json:"handleMsg,omitempty"` - ReqTime uint32 `protobuf:"varint,6,opt,name=reqTime" json:"reqTime,omitempty"` - HandleUserID string `protobuf:"bytes,7,opt,name=handleUserID" json:"handleUserID,omitempty"` - HandleTime uint32 `protobuf:"varint,8,opt,name=handleTime" json:"handleTime,omitempty"` - Ex string `protobuf:"bytes,9,opt,name=ex" json:"ex,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + UserInfo *PublicUserInfo `protobuf:"bytes,1,opt,name=userInfo" json:"userInfo,omitempty"` + GroupInfo *GroupInfo `protobuf:"bytes,2,opt,name=groupInfo" json:"groupInfo,omitempty"` + HandleResult string `protobuf:"bytes,3,opt,name=handleResult" json:"handleResult,omitempty"` + ReqMsg string `protobuf:"bytes,4,opt,name=reqMsg" json:"reqMsg,omitempty"` + HandleMsg string `protobuf:"bytes,5,opt,name=handleMsg" json:"handleMsg,omitempty"` + ReqTime uint32 `protobuf:"varint,6,opt,name=reqTime" json:"reqTime,omitempty"` + HandleUserID string `protobuf:"bytes,7,opt,name=handleUserID" json:"handleUserID,omitempty"` + HandleTime uint32 `protobuf:"varint,8,opt,name=handleTime" json:"handleTime,omitempty"` + Ex string `protobuf:"bytes,9,opt,name=ex" json:"ex,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GroupRequest) Reset() { *m = GroupRequest{} } func (m *GroupRequest) String() string { return proto.CompactTextString(m) } func (*GroupRequest) ProtoMessage() {} func (*GroupRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1bc577ef51df0a70, []int{6} + return fileDescriptor_ws_1c8466de999dbc0c, []int{6} } func (m *GroupRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupRequest.Unmarshal(m, b) @@ -637,18 +637,18 @@ func (m *GroupRequest) XXX_DiscardUnknown() { var xxx_messageInfo_GroupRequest proto.InternalMessageInfo -func (m *GroupRequest) GetUserID() string { +func (m *GroupRequest) GetUserInfo() *PublicUserInfo { if m != nil { - return m.UserID + return m.UserInfo } - return "" + return nil } -func (m *GroupRequest) GetGroupID() string { +func (m *GroupRequest) GetGroupInfo() *GroupInfo { if m != nil { - return m.GroupID + return m.GroupInfo } - return "" + return nil } func (m *GroupRequest) GetHandleResult() string { @@ -725,7 +725,7 @@ func (m *FriendRequest) Reset() { *m = FriendRequest{} } func (m *FriendRequest) String() string { return proto.CompactTextString(m) } func (*FriendRequest) ProtoMessage() {} func (*FriendRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1bc577ef51df0a70, []int{7} + return fileDescriptor_ws_1c8466de999dbc0c, []int{7} } func (m *FriendRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendRequest.Unmarshal(m, b) @@ -866,7 +866,7 @@ func (m *PullMessageBySeqListResp) Reset() { *m = PullMessageBySeqListRe func (m *PullMessageBySeqListResp) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListResp) ProtoMessage() {} func (*PullMessageBySeqListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1bc577ef51df0a70, []int{8} + return fileDescriptor_ws_1c8466de999dbc0c, []int{8} } func (m *PullMessageBySeqListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListResp.Unmarshal(m, b) @@ -941,7 +941,7 @@ func (m *PullMessageBySeqListReq) Reset() { *m = PullMessageBySeqListReq func (m *PullMessageBySeqListReq) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListReq) ProtoMessage() {} func (*PullMessageBySeqListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1bc577ef51df0a70, []int{9} + return fileDescriptor_ws_1c8466de999dbc0c, []int{9} } func (m *PullMessageBySeqListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListReq.Unmarshal(m, b) @@ -996,7 +996,7 @@ func (m *PullMessageReq) Reset() { *m = PullMessageReq{} } func (m *PullMessageReq) String() string { return proto.CompactTextString(m) } func (*PullMessageReq) ProtoMessage() {} func (*PullMessageReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1bc577ef51df0a70, []int{10} + return fileDescriptor_ws_1c8466de999dbc0c, []int{10} } func (m *PullMessageReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageReq.Unmarshal(m, b) @@ -1060,7 +1060,7 @@ func (m *PullMessageResp) Reset() { *m = PullMessageResp{} } func (m *PullMessageResp) String() string { return proto.CompactTextString(m) } func (*PullMessageResp) ProtoMessage() {} func (*PullMessageResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1bc577ef51df0a70, []int{11} + return fileDescriptor_ws_1c8466de999dbc0c, []int{11} } func (m *PullMessageResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageResp.Unmarshal(m, b) @@ -1132,7 +1132,7 @@ func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} } func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqReq) ProtoMessage() {} func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1bc577ef51df0a70, []int{12} + return fileDescriptor_ws_1c8466de999dbc0c, []int{12} } func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) @@ -1164,7 +1164,7 @@ func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} } func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqResp) ProtoMessage() {} func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1bc577ef51df0a70, []int{13} + return fileDescriptor_ws_1c8466de999dbc0c, []int{13} } func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) @@ -1212,7 +1212,7 @@ func (m *GatherFormat) Reset() { *m = GatherFormat{} } func (m *GatherFormat) String() string { return proto.CompactTextString(m) } func (*GatherFormat) ProtoMessage() {} func (*GatherFormat) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1bc577ef51df0a70, []int{14} + return fileDescriptor_ws_1c8466de999dbc0c, []int{14} } func (m *GatherFormat) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GatherFormat.Unmarshal(m, b) @@ -1259,7 +1259,7 @@ func (m *UserSendMsgResp) Reset() { *m = UserSendMsgResp{} } func (m *UserSendMsgResp) String() string { return proto.CompactTextString(m) } func (*UserSendMsgResp) ProtoMessage() {} func (*UserSendMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1bc577ef51df0a70, []int{15} + return fileDescriptor_ws_1c8466de999dbc0c, []int{15} } func (m *UserSendMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserSendMsgResp.Unmarshal(m, b) @@ -1328,7 +1328,7 @@ func (m *MsgData) Reset() { *m = MsgData{} } func (m *MsgData) String() string { return proto.CompactTextString(m) } func (*MsgData) ProtoMessage() {} func (*MsgData) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1bc577ef51df0a70, []int{16} + return fileDescriptor_ws_1c8466de999dbc0c, []int{16} } func (m *MsgData) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgData.Unmarshal(m, b) @@ -1489,7 +1489,7 @@ func (m *OfflinePushInfo) Reset() { *m = OfflinePushInfo{} } func (m *OfflinePushInfo) String() string { return proto.CompactTextString(m) } func (*OfflinePushInfo) ProtoMessage() {} func (*OfflinePushInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1bc577ef51df0a70, []int{17} + return fileDescriptor_ws_1c8466de999dbc0c, []int{17} } func (m *OfflinePushInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OfflinePushInfo.Unmarshal(m, b) @@ -1556,7 +1556,7 @@ func (m *TipsComm) Reset() { *m = TipsComm{} } func (m *TipsComm) String() string { return proto.CompactTextString(m) } func (*TipsComm) ProtoMessage() {} func (*TipsComm) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1bc577ef51df0a70, []int{18} + return fileDescriptor_ws_1c8466de999dbc0c, []int{18} } func (m *TipsComm) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TipsComm.Unmarshal(m, b) @@ -1605,7 +1605,7 @@ func (m *MemberEnterTips) Reset() { *m = MemberEnterTips{} } func (m *MemberEnterTips) String() string { return proto.CompactTextString(m) } func (*MemberEnterTips) ProtoMessage() {} func (*MemberEnterTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1bc577ef51df0a70, []int{19} + return fileDescriptor_ws_1c8466de999dbc0c, []int{19} } func (m *MemberEnterTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberEnterTips.Unmarshal(m, b) @@ -1660,7 +1660,7 @@ func (m *MemberLeaveTips) Reset() { *m = MemberLeaveTips{} } func (m *MemberLeaveTips) String() string { return proto.CompactTextString(m) } func (*MemberLeaveTips) ProtoMessage() {} func (*MemberLeaveTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1bc577ef51df0a70, []int{20} + return fileDescriptor_ws_1c8466de999dbc0c, []int{20} } func (m *MemberLeaveTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberLeaveTips.Unmarshal(m, b) @@ -1715,7 +1715,7 @@ func (m *MemberInvitedTips) Reset() { *m = MemberInvitedTips{} } func (m *MemberInvitedTips) String() string { return proto.CompactTextString(m) } func (*MemberInvitedTips) ProtoMessage() {} func (*MemberInvitedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1bc577ef51df0a70, []int{21} + return fileDescriptor_ws_1c8466de999dbc0c, []int{21} } func (m *MemberInvitedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInvitedTips.Unmarshal(m, b) @@ -1777,7 +1777,7 @@ func (m *MemberKickedTips) Reset() { *m = MemberKickedTips{} } func (m *MemberKickedTips) String() string { return proto.CompactTextString(m) } func (*MemberKickedTips) ProtoMessage() {} func (*MemberKickedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1bc577ef51df0a70, []int{22} + return fileDescriptor_ws_1c8466de999dbc0c, []int{22} } func (m *MemberKickedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberKickedTips.Unmarshal(m, b) @@ -1840,7 +1840,7 @@ func (m *MemberInfoChangedTips) Reset() { *m = MemberInfoChangedTips{} } func (m *MemberInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*MemberInfoChangedTips) ProtoMessage() {} func (*MemberInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1bc577ef51df0a70, []int{23} + return fileDescriptor_ws_1c8466de999dbc0c, []int{23} } func (m *MemberInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInfoChangedTips.Unmarshal(m, b) @@ -1909,7 +1909,7 @@ func (m *GroupCreatedTips) Reset() { *m = GroupCreatedTips{} } func (m *GroupCreatedTips) String() string { return proto.CompactTextString(m) } func (*GroupCreatedTips) ProtoMessage() {} func (*GroupCreatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1bc577ef51df0a70, []int{24} + return fileDescriptor_ws_1c8466de999dbc0c, []int{24} } func (m *GroupCreatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupCreatedTips.Unmarshal(m, b) @@ -1970,7 +1970,7 @@ func (m *GroupInfoChangedTips) Reset() { *m = GroupInfoChangedTips{} } func (m *GroupInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*GroupInfoChangedTips) ProtoMessage() {} func (*GroupInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1bc577ef51df0a70, []int{25} + return fileDescriptor_ws_1c8466de999dbc0c, []int{25} } func (m *GroupInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfoChangedTips.Unmarshal(m, b) @@ -2024,7 +2024,7 @@ func (m *JoinGroupApplicationTips) Reset() { *m = JoinGroupApplicationTi func (m *JoinGroupApplicationTips) String() string { return proto.CompactTextString(m) } func (*JoinGroupApplicationTips) ProtoMessage() {} func (*JoinGroupApplicationTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1bc577ef51df0a70, []int{26} + return fileDescriptor_ws_1c8466de999dbc0c, []int{26} } func (m *JoinGroupApplicationTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JoinGroupApplicationTips.Unmarshal(m, b) @@ -2079,7 +2079,7 @@ func (m *ApplicationProcessedTips) Reset() { *m = ApplicationProcessedTi func (m *ApplicationProcessedTips) String() string { return proto.CompactTextString(m) } func (*ApplicationProcessedTips) ProtoMessage() {} func (*ApplicationProcessedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1bc577ef51df0a70, []int{27} + return fileDescriptor_ws_1c8466de999dbc0c, []int{27} } func (m *ApplicationProcessedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ApplicationProcessedTips.Unmarshal(m, b) @@ -2140,7 +2140,7 @@ func (m *FriendApplication) Reset() { *m = FriendApplication{} } func (m *FriendApplication) String() string { return proto.CompactTextString(m) } func (*FriendApplication) ProtoMessage() {} func (*FriendApplication) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1bc577ef51df0a70, []int{28} + return fileDescriptor_ws_1c8466de999dbc0c, []int{28} } func (m *FriendApplication) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplication.Unmarshal(m, b) @@ -2193,7 +2193,7 @@ func (m *FromToUserID) Reset() { *m = FromToUserID{} } func (m *FromToUserID) String() string { return proto.CompactTextString(m) } func (*FromToUserID) ProtoMessage() {} func (*FromToUserID) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1bc577ef51df0a70, []int{29} + return fileDescriptor_ws_1c8466de999dbc0c, []int{29} } func (m *FromToUserID) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FromToUserID.Unmarshal(m, b) @@ -2239,7 +2239,7 @@ func (m *FriendApplicationAddedTips) Reset() { *m = FriendApplicationAdd func (m *FriendApplicationAddedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationAddedTips) ProtoMessage() {} func (*FriendApplicationAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1bc577ef51df0a70, []int{30} + return fileDescriptor_ws_1c8466de999dbc0c, []int{30} } func (m *FriendApplicationAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationAddedTips.Unmarshal(m, b) @@ -2269,6 +2269,7 @@ func (m *FriendApplicationAddedTips) GetFromToUserID() *FromToUserID { // FromUserID accept or reject ToUserID type FriendApplicationProcessedTips struct { FromToUserID *FromToUserID `protobuf:"bytes,1,opt,name=fromToUserID" json:"fromToUserID,omitempty"` + HandleResult int32 `protobuf:"varint,2,opt,name=handleResult" json:"handleResult,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -2278,7 +2279,7 @@ func (m *FriendApplicationProcessedTips) Reset() { *m = FriendApplicatio func (m *FriendApplicationProcessedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationProcessedTips) ProtoMessage() {} func (*FriendApplicationProcessedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1bc577ef51df0a70, []int{31} + return fileDescriptor_ws_1c8466de999dbc0c, []int{31} } func (m *FriendApplicationProcessedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationProcessedTips.Unmarshal(m, b) @@ -2305,6 +2306,13 @@ func (m *FriendApplicationProcessedTips) GetFromToUserID() *FromToUserID { return nil } +func (m *FriendApplicationProcessedTips) GetHandleResult() int32 { + if m != nil { + return m.HandleResult + } + return 0 +} + // FromUserID Added a friend ToUserID type FriendAddedTips struct { Friend *FriendInfo `protobuf:"bytes,1,opt,name=friend" json:"friend,omitempty"` @@ -2319,7 +2327,7 @@ func (m *FriendAddedTips) Reset() { *m = FriendAddedTips{} } func (m *FriendAddedTips) String() string { return proto.CompactTextString(m) } func (*FriendAddedTips) ProtoMessage() {} func (*FriendAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1bc577ef51df0a70, []int{32} + return fileDescriptor_ws_1c8466de999dbc0c, []int{32} } func (m *FriendAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendAddedTips.Unmarshal(m, b) @@ -2372,7 +2380,7 @@ func (m *FriendDeletedTips) Reset() { *m = FriendDeletedTips{} } func (m *FriendDeletedTips) String() string { return proto.CompactTextString(m) } func (*FriendDeletedTips) ProtoMessage() {} func (*FriendDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1bc577ef51df0a70, []int{33} + return fileDescriptor_ws_1c8466de999dbc0c, []int{33} } func (m *FriendDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendDeletedTips.Unmarshal(m, b) @@ -2410,7 +2418,7 @@ func (m *BlackAddedTips) Reset() { *m = BlackAddedTips{} } func (m *BlackAddedTips) String() string { return proto.CompactTextString(m) } func (*BlackAddedTips) ProtoMessage() {} func (*BlackAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1bc577ef51df0a70, []int{34} + return fileDescriptor_ws_1c8466de999dbc0c, []int{34} } func (m *BlackAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackAddedTips.Unmarshal(m, b) @@ -2448,7 +2456,7 @@ func (m *BlackDeletedTips) Reset() { *m = BlackDeletedTips{} } func (m *BlackDeletedTips) String() string { return proto.CompactTextString(m) } func (*BlackDeletedTips) ProtoMessage() {} func (*BlackDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1bc577ef51df0a70, []int{35} + return fileDescriptor_ws_1c8466de999dbc0c, []int{35} } func (m *BlackDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackDeletedTips.Unmarshal(m, b) @@ -2486,7 +2494,7 @@ func (m *FriendInfoChangedTips) Reset() { *m = FriendInfoChangedTips{} } func (m *FriendInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*FriendInfoChangedTips) ProtoMessage() {} func (*FriendInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1bc577ef51df0a70, []int{36} + return fileDescriptor_ws_1c8466de999dbc0c, []int{36} } func (m *FriendInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfoChangedTips.Unmarshal(m, b) @@ -2525,7 +2533,7 @@ func (m *SelfInfoUpdatedTips) Reset() { *m = SelfInfoUpdatedTips{} } func (m *SelfInfoUpdatedTips) String() string { return proto.CompactTextString(m) } func (*SelfInfoUpdatedTips) ProtoMessage() {} func (*SelfInfoUpdatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1bc577ef51df0a70, []int{37} + return fileDescriptor_ws_1c8466de999dbc0c, []int{37} } func (m *SelfInfoUpdatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SelfInfoUpdatedTips.Unmarshal(m, b) @@ -2594,133 +2602,135 @@ func init() { proto.RegisterType((*SelfInfoUpdatedTips)(nil), "server_api_params.SelfInfoUpdatedTips") } -func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_1bc577ef51df0a70) } +func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_1c8466de999dbc0c) } -var fileDescriptor_ws_1bc577ef51df0a70 = []byte{ - // 1989 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x59, 0xcd, 0x6f, 0x23, 0x49, - 0x15, 0x57, 0xb7, 0x3f, 0x12, 0x3f, 0xdb, 0x71, 0xa6, 0x67, 0x76, 0xb0, 0xc2, 0x32, 0x84, 0xd6, - 0x6a, 0x89, 0x90, 0x08, 0x52, 0x10, 0x12, 0x2c, 0x12, 0x30, 0x93, 0x2f, 0x66, 0x89, 0x33, 0x51, - 0x67, 0x46, 0xcb, 0x01, 0x69, 0x54, 0x71, 0x97, 0x9d, 0x26, 0xed, 0x2a, 0xbb, 0xba, 0x9c, 0x99, - 0xb9, 0x70, 0xe6, 0xc2, 0x11, 0x8e, 0x5c, 0x11, 0x12, 0x37, 0x84, 0xb8, 0x71, 0xe0, 0xdf, 0xe0, - 0x5f, 0xe0, 0x0a, 0x12, 0x12, 0xd2, 0xa2, 0x7a, 0x55, 0xdd, 0x5d, 0xe5, 0x8f, 0xac, 0x31, 0x11, - 0x7b, 0xd8, 0x9b, 0xdf, 0xaf, 0xeb, 0x7d, 0xbf, 0x7a, 0x55, 0xf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0b, 0x07, 0xb6, 0xf7, 0x9c, 0xc3, 0x4f, - 0x60, 0x1b, 0xc5, 0xde, 0xbb, 0xbd, 0x3f, 0x83, 0xf7, 0xca, 0x04, 0xd8, 0x2d, 0xf5, 0x5e, 0xa4, - 0x7f, 0x13, 0x1e, 0x5e, 0xd2, 0x74, 0xa0, 0x64, 0xbf, 0x1a, 0xc7, 0xc5, 0x59, 0xb5, 0x64, 0xe4, - 0x72, 0x55, 0xc7, 0x3f, 0x1c, 0xbf, 0xfd, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3d, 0x60, 0xab, - 0x3f, 0x83, 0x1c, 0x00, 0x00, +var fileDescriptor_ws_1c8466de999dbc0c = []byte{ + // 2018 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x59, 0xcd, 0x6f, 0x1c, 0x49, + 0x15, 0x57, 0xf7, 0x7c, 0xd8, 0xf3, 0x66, 0xc6, 0xe3, 0x74, 0xb2, 0x61, 0x14, 0x96, 0x60, 0x5a, + 0xab, 0xc5, 0x42, 0xc2, 0x48, 0x41, 0x48, 0x10, 0xc4, 0x47, 0xe2, 0x8f, 0x90, 0xc5, 0xe3, 0x58, + 0xed, 0x44, 0xcb, 0x01, 0x29, 0x2a, 0x4f, 0xd7, 0x8c, 0x1b, 0xf7, 0x54, 0xf5, 0x54, 0x77, 0x3b, + 0xc9, 0x85, 0x33, 0x1c, 0x38, 0xc2, 0x91, 0x2b, 0x42, 0xe2, 0x86, 0x10, 0x37, 0x0e, 0xfc, 0x07, + 0x9c, 0xf9, 0x17, 0xb8, 0x82, 0x84, 0x84, 0xb4, 0xa8, 0x5e, 0x55, 0x77, 0x57, 0x4d, 0x8f, 0xbd, + 0xc3, 0x60, 0xb1, 0x07, 0x6e, 0xf3, 0x7e, 0x5d, 0xef, 0xfb, 0xd5, 0xab, 0xaa, 0x37, 0x30, 0x48, + 0xc3, 0x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x03, 0xe8, 0xa3, 0x5c, 0x5e, 0x58, 0xd3, 0x45, + 0x16, 0x1b, 0x2c, 0x23, 0xf6, 0xf2, 0x5d, 0x42, 0x87, 0x3d, 0x14, 0x50, 0x01, 0xfe, 0x1f, 0x5d, + 0xb8, 0x8b, 0x71, 0x1f, 0xa1, 0x01, 0x47, 0x79, 0x1c, 0x7f, 0x4a, 0x06, 0xee, 0x43, 0x3b, 0x57, + 0xea, 0x54, 0xf8, 0x35, 0x25, 0xf5, 0x08, 0x1e, 0xd3, 0x63, 0x7a, 0x45, 0x63, 0x0c, 0x7c, 0x2b, + 0xa8, 0x00, 0xef, 0x01, 0x6c, 0xfe, 0x84, 0x47, 0x0c, 0x63, 0x22, 0x23, 0xde, 0x08, 0x4a, 0x5a, + 0x7e, 0x63, 0xd1, 0xf8, 0x92, 0xc9, 0x94, 0xaa, 0x70, 0x97, 0xb4, 0x99, 0x89, 0xb6, 0x9d, 0x89, + 0x0f, 0x61, 0x8b, 0x24, 0xc9, 0x88, 0xb0, 0x29, 0x15, 0x4a, 0xe9, 0x06, 0x2a, 0x5d, 0x40, 0x65, + 0x3e, 0xa4, 0xa6, 0x33, 0x9e, 0x8b, 0x31, 0xc5, 0x70, 0xb7, 0x02, 0x03, 0x91, 0x72, 0x78, 0x42, + 0x85, 0x11, 0x46, 0x15, 0xf9, 0x05, 0x54, 0x67, 0x05, 0x8a, 0xac, 0xf8, 0xbf, 0x76, 0x60, 0xeb, + 0x34, 0x3f, 0x8f, 0xa3, 0x31, 0x2e, 0x90, 0x41, 0xab, 0x42, 0xe3, 0x58, 0xa1, 0x31, 0x1d, 0x74, + 0xaf, 0x77, 0xb0, 0x61, 0x3b, 0x78, 0x1f, 0xda, 0x53, 0xca, 0x42, 0x2a, 0x30, 0x60, 0xad, 0x40, + 0x53, 0x4b, 0x1c, 0x6f, 0x2d, 0x73, 0xdc, 0xff, 0x95, 0x0b, 0x9b, 0xff, 0x63, 0xd3, 0x76, 0xa0, + 0x9b, 0x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61, 0x0f, 0xaf, 0xb0, 0x5f, 0x8a, 0xed, 0xfb, 0xa3, 0xa2, 0xa6, 0x0e, 0x68, + 0x4c, 0xb3, 0xdb, 0xcc, 0xc8, 0x2b, 0xd8, 0xc2, 0xf1, 0xf0, 0x2d, 0x27, 0xfa, 0x63, 0xd8, 0x46, + 0xb1, 0xb7, 0x6e, 0xef, 0x8f, 0xe1, 0xbd, 0x2a, 0x01, 0x66, 0xdf, 0xbd, 0x15, 0xe9, 0x5f, 0x85, + 0xbb, 0x67, 0x34, 0x9e, 0x48, 0xd9, 0xaf, 0x92, 0xb0, 0x3c, 0xd0, 0xae, 0x99, 0xcb, 0x9c, 0xb7, + 0xf1, 0xef, 0xcd, 0xaf, 0xff, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x44, 0xad, 0x58, 0x38, 0xf1, 0x1c, + 0x00, 0x00, } From a2440a2e80499adf515d93da9114c843da2df9a7 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Sat, 15 Jan 2022 15:30:48 +0800 Subject: [PATCH 282/337] Refactor code --- cmd/open_im_api/main.go | 14 +++++++------- internal/api/friend/friend.go | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index 8580de2cc..07b4d5479 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -33,13 +33,13 @@ func main() { friendRouterGroup := r.Group("/friend") { // friendRouterGroup.POST("/get_friends_info", friend.GetFriendsInfo) - friendRouterGroup.POST("/add_friend", friend.AddFriend) //1 - friendRouterGroup.POST("/delete_friend", friend.DeleteFriend) //1 - friendRouterGroup.POST("/get_friend_apply_list", friend.GetFriendApplyList) //1 - friendRouterGroup.POST("/get_self_apply_list", friend.GetSelfApplyList) //1 - friendRouterGroup.POST("/get_friend_list", friend.GetFriendList) //1 - friendRouterGroup.POST("/add_friend_response", friend.AddFriendResponse) //1 - friendRouterGroup.POST("/set_friend_remark", friend.SetFriendRemark) //1 + friendRouterGroup.POST("/add_friend", friend.AddFriend) //1 + friendRouterGroup.POST("/delete_friend", friend.DeleteFriend) //1 + friendRouterGroup.POST("/get_friend_apply_list", friend.GetFriendApplyList) //1 + friendRouterGroup.POST("/get_self_friend_apply_list", friend.GetSelfFriendApplyList) //1 + friendRouterGroup.POST("/get_friend_list", friend.GetFriendList) //1 + friendRouterGroup.POST("/add_friend_response", friend.AddFriendResponse) //1 + friendRouterGroup.POST("/set_friend_remark", friend.SetFriendRemark) //1 friendRouterGroup.POST("/add_black", friend.AddBlack) //1 friendRouterGroup.POST("/get_black_list", friend.GetBlacklist) //1 diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go index 42f4ba86a..b63591748 100644 --- a/internal/api/friend/friend.go +++ b/internal/api/friend/friend.go @@ -423,7 +423,7 @@ func GetFriendApplyList(c *gin.Context) { c.JSON(http.StatusOK, resp) } -func GetSelfApplyList(c *gin.Context) { +func GetSelfFriendApplyList(c *gin.Context) { params := api.GetSelfApplyListReq{} if err := c.BindJSON(¶ms); err != nil { log.NewError("0", "BindJSON failed ", err.Error()) From 7e13cc84c85dba08c671d8c026ed4f9b10ca023d Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Sat, 15 Jan 2022 18:36:40 +0800 Subject: [PATCH 283/337] Refactor code --- internal/rpc/msg/friend_notification.go | 145 ++++++++++++++++-------- pkg/common/db/model_struct.go | 2 +- pkg/common/utils/utils.go | 67 +++++++---- pkg/utils/utils.go | 13 +++ 4 files changed, 158 insertions(+), 69 deletions(-) diff --git a/internal/rpc/msg/friend_notification.go b/internal/rpc/msg/friend_notification.go index 8b472e894..ef05211c2 100644 --- a/internal/rpc/msg/friend_notification.go +++ b/internal/rpc/msg/friend_notification.go @@ -8,7 +8,6 @@ import ( pbFriend "Open_IM/pkg/proto/friend" open_im_sdk "Open_IM/pkg/proto/sdk_ws" "Open_IM/pkg/utils" - "encoding/json" "github.com/golang/protobuf/proto" ) @@ -42,16 +41,21 @@ func getFromToUserNickname(fromUserID, toUserID string) (string, string, error) } func FriendApplicationAddedNotification(req *pbFriend.AddFriendReq) { - var FriendApplicationAddedTips open_im_sdk.FriendApplicationAddedTips - FriendApplicationAddedTips.FromToUserID.FromUserID = req.CommID.FromUserID - FriendApplicationAddedTips.FromToUserID.ToUserID = req.CommID.ToUserID + log.Info(req.CommID.OperationID, utils.GetSelfFuncName(), "args: ", req.String()) + var friendApplicationAddedTips open_im_sdk.FriendApplicationAddedTips + friendApplicationAddedTips.FromToUserID.FromUserID = req.CommID.FromUserID + friendApplicationAddedTips.FromToUserID.ToUserID = req.CommID.ToUserID fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) if err != nil { log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID) return } var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(FriendApplicationAddedTips) + tips.Detail, err = proto.Marshal(&friendApplicationAddedTips) + if err != nil { + log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), friendApplicationAddedTips.String()) + return + } tips.DefaultTips = fromUserNickname + " FriendApplicationAddedNotification " + toUserNickname var n NotificationMsg @@ -61,14 +65,18 @@ func FriendApplicationAddedNotification(req *pbFriend.AddFriendReq) { n.SessionType = constant.SingleChatType n.MsgFrom = constant.SysMsgType n.OperationID = req.CommID.OperationID - n.Content, _ = json.Marshal(tips) + n.Content, err = proto.Marshal(&tips) + if err != nil { + log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String()) + return + } Notification(&n) } func FriendApplicationProcessedNotification(req *pbFriend.AddFriendResponseReq) { - var FriendApplicationProcessedTips open_im_sdk.FriendApplicationProcessedTips - FriendApplicationProcessedTips.FromToUserID.FromUserID = req.CommID.FromUserID - FriendApplicationProcessedTips.FromToUserID.ToUserID = req.CommID.ToUserID + var friendApplicationProcessedTips open_im_sdk.FriendApplicationProcessedTips + friendApplicationProcessedTips.FromToUserID.FromUserID = req.CommID.FromUserID + friendApplicationProcessedTips.FromToUserID.ToUserID = req.CommID.ToUserID fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) if err != nil { log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID) @@ -76,9 +84,9 @@ func FriendApplicationProcessedNotification(req *pbFriend.AddFriendResponseReq) } var tips open_im_sdk.TipsComm - tips.Detail, err = proto.Marshal(&FriendApplicationProcessedTips) + tips.Detail, err = proto.Marshal(&friendApplicationProcessedTips) if err != nil { - log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), FriendApplicationProcessedTips) + log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), friendApplicationProcessedTips.String()) return } tips.DefaultTips = fromUserNickname + " FriendApplicationProcessedNotification " + toUserNickname @@ -90,39 +98,39 @@ func FriendApplicationProcessedNotification(req *pbFriend.AddFriendResponseReq) n.SessionType = constant.SingleChatType n.MsgFrom = constant.SysMsgType n.OperationID = req.CommID.OperationID - n.Content, _ = json.Marshal(tips) n.Content, err = proto.Marshal(&tips) if err != nil { - log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips) + log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String()) return } Notification(&n) } func FriendAddedNotification(operationID, opUserID, fromUserID, toUserID string) { - var FriendAddedTips open_im_sdk.FriendAddedTips + var friendAddedTips open_im_sdk.FriendAddedTips user, err := imdb.GetUserByUserID(opUserID) if err != nil { log.NewError(operationID, "GetUserByUserID failed ", err.Error(), opUserID) return } - utils.CopyStructFields(FriendAddedTips.OpUser, user) - + utils2.UserDBCopyOpenIMPublicUser(friendAddedTips.OpUser, user) friend, err := imdb.GetFriendRelationshipFromFriend(fromUserID, toUserID) if err != nil { log.NewError(operationID, "GetFriendRelationshipFromFriend failed ", err.Error(), fromUserID, toUserID) return } - utils2.FriendDBCopyOpenIM(FriendAddedTips.Friend, friend) - + utils2.FriendDBCopyOpenIM(friendAddedTips.Friend, friend) fromUserNickname, toUserNickname, err := getFromToUserNickname(fromUserID, toUserID) if err != nil { log.Error(operationID, "getFromToUserNickname failed ", err.Error(), fromUserID, toUserID) return } - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(FriendAddedTips) + tips.Detail, err = proto.Marshal(&friendAddedTips) + if err != nil { + log.Error(operationID, "Marshal failed ", err.Error(), friendAddedTips) + return + } tips.DefaultTips = fromUserNickname + " FriendAddedNotification " + toUserNickname var n NotificationMsg n.SendID = fromUserID @@ -131,7 +139,11 @@ func FriendAddedNotification(operationID, opUserID, fromUserID, toUserID string) n.SessionType = constant.SingleChatType n.MsgFrom = constant.SysMsgType n.OperationID = operationID - n.Content, _ = json.Marshal(tips) + n.Content, _ = proto.Marshal(&tips) + if err != nil { + log.Error(operationID, "Marshal failed ", err.Error(), tips.String()) + return + } Notification(&n) } @@ -139,17 +151,20 @@ func FriendAddedNotification(operationID, opUserID, fromUserID, toUserID string) // FriendInfo Friend = 1; //} func FriendDeletedNotification(req *pbFriend.DeleteFriendReq) { - - var FriendDeletedTips open_im_sdk.FriendDeletedTips - FriendDeletedTips.FromToUserID.FromUserID = req.CommID.FromUserID - FriendDeletedTips.FromToUserID.ToUserID = req.CommID.ToUserID + var friendDeletedTips open_im_sdk.FriendDeletedTips + friendDeletedTips.FromToUserID.FromUserID = req.CommID.FromUserID + friendDeletedTips.FromToUserID.ToUserID = req.CommID.ToUserID fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) if err != nil { log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", req.CommID.FromUserID, req.CommID.ToUserID) return } var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(FriendDeletedTips) + tips.Detail, err = proto.Marshal(&friendDeletedTips) + if err != nil { + log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), friendDeletedTips.String()) + return + } tips.DefaultTips = fromUserNickname + " FriendDeletedNotification " + toUserNickname var n NotificationMsg n.SendID = req.CommID.FromUserID @@ -158,7 +173,11 @@ func FriendDeletedNotification(req *pbFriend.DeleteFriendReq) { n.SessionType = constant.SingleChatType n.MsgFrom = constant.SysMsgType n.OperationID = req.CommID.OperationID - n.Content, _ = json.Marshal(tips) + n.Content, err = proto.Marshal(&tips) + if err != nil { + log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String()) + return + } Notification(&n) } @@ -168,17 +187,20 @@ func FriendDeletedNotification(req *pbFriend.DeleteFriendReq) { // uint64 OperationTime = 3; //} func FriendInfoChangedNotification(operationID, opUserID, fromUserID, toUserID string) { - - var FriendInfoChangedTips open_im_sdk.FriendInfoChangedTips - FriendInfoChangedTips.FromToUserID.FromUserID = fromUserID - FriendInfoChangedTips.FromToUserID.ToUserID = toUserID + var friendInfoChangedTips open_im_sdk.FriendInfoChangedTips + friendInfoChangedTips.FromToUserID.FromUserID = fromUserID + friendInfoChangedTips.FromToUserID.ToUserID = toUserID fromUserNickname, toUserNickname, err := getFromToUserNickname(fromUserID, toUserID) if err != nil { log.Error(operationID, "getFromToUserNickname failed ", fromUserID, toUserID) return } var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(FriendInfoChangedTips) + tips.Detail, err = proto.Marshal(&friendInfoChangedTips) + if err != nil { + log.Error(operationID, "Marshal failed ", err.Error(), friendInfoChangedTips.String()) + return + } tips.DefaultTips = fromUserNickname + " FriendDeletedNotification " + toUserNickname var n NotificationMsg n.SendID = fromUserID @@ -188,22 +210,29 @@ func FriendInfoChangedNotification(operationID, opUserID, fromUserID, toUserID s n.MsgFrom = constant.SysMsgType n.OperationID = operationID - n.Content, _ = json.Marshal(tips) + n.Content, err = proto.Marshal(&tips) + if err != nil { + log.Error(operationID, "Marshal failed ", err.Error(), tips.String()) + return + } Notification(&n) } func BlackAddedNotification(req *pbFriend.AddBlacklistReq) { - - var BlackAddedTips open_im_sdk.BlackAddedTips - BlackAddedTips.FromToUserID.FromUserID = req.CommID.FromUserID - BlackAddedTips.FromToUserID.ToUserID = req.CommID.ToUserID + var blackAddedTips open_im_sdk.BlackAddedTips + blackAddedTips.FromToUserID.FromUserID = req.CommID.FromUserID + blackAddedTips.FromToUserID.ToUserID = req.CommID.ToUserID fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) if err != nil { log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", req.CommID.FromUserID, req.CommID.ToUserID) return } var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(BlackAddedTips) + tips.Detail, err = proto.Marshal(&blackAddedTips) + if err != nil { + log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), blackAddedTips.String()) + return + } tips.DefaultTips = fromUserNickname + " BlackAddedNotification " + toUserNickname var n NotificationMsg n.SendID = req.CommID.FromUserID @@ -212,7 +241,11 @@ func BlackAddedNotification(req *pbFriend.AddBlacklistReq) { n.SessionType = constant.SingleChatType n.MsgFrom = constant.SysMsgType n.OperationID = req.CommID.OperationID - n.Content, _ = json.Marshal(tips) + n.Content, err = proto.Marshal(&tips) + if err != nil { + log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String()) + return + } Notification(&n) } @@ -220,16 +253,20 @@ func BlackAddedNotification(req *pbFriend.AddBlacklistReq) { // BlackInfo Black = 1; //} func BlackDeletedNotification(req *pbFriend.RemoveBlacklistReq) { - var BlackDeletedTips open_im_sdk.BlackDeletedTips - BlackDeletedTips.FromToUserID.FromUserID = req.CommID.FromUserID - BlackDeletedTips.FromToUserID.ToUserID = req.CommID.ToUserID + var blackDeletedTips open_im_sdk.BlackDeletedTips + blackDeletedTips.FromToUserID.FromUserID = req.CommID.FromUserID + blackDeletedTips.FromToUserID.ToUserID = req.CommID.ToUserID fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) if err != nil { log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID) return } var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(BlackDeletedTips) + tips.Detail, err = proto.Marshal(&blackDeletedTips) + if err != nil { + log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), blackDeletedTips.String()) + return + } tips.DefaultTips = fromUserNickname + " BlackDeletedNotification " + toUserNickname var n NotificationMsg n.SendID = req.CommID.FromUserID @@ -238,7 +275,11 @@ func BlackDeletedNotification(req *pbFriend.RemoveBlacklistReq) { n.SessionType = constant.SingleChatType n.MsgFrom = constant.SysMsgType n.OperationID = req.CommID.OperationID - n.Content, _ = json.Marshal(tips) + n.Content, err = proto.Marshal(&tips) + if err != nil { + log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String()) + return + } Notification(&n) } @@ -248,15 +289,19 @@ func BlackDeletedNotification(req *pbFriend.RemoveBlacklistReq) { // uint64 OperationTime = 3; //} func SelfInfoUpdatedNotification(operationID, userID string) { - var SelfInfoUpdatedTips open_im_sdk.SelfInfoUpdatedTips - SelfInfoUpdatedTips.UserID = userID + var selfInfoUpdatedTips open_im_sdk.SelfInfoUpdatedTips + selfInfoUpdatedTips.UserID = userID u, err := imdb.GetUserByUserID(userID) if err != nil { log.NewError(operationID, "FindUserByUID failed ", err.Error(), userID) return } var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(SelfInfoUpdatedTips) + tips.Detail, err = proto.Marshal(&selfInfoUpdatedTips) + if err != nil { + log.Error(operationID, "Marshal failed ", err.Error(), selfInfoUpdatedTips.String()) + return + } var n NotificationMsg n.SendID = userID n.RecvID = userID @@ -266,6 +311,10 @@ func SelfInfoUpdatedNotification(operationID, userID string) { n.OperationID = operationID tips.DefaultTips = u.Nickname + " SelfInfoUpdatedNotification " - n.Content, _ = json.Marshal(tips) + n.Content, err = proto.Marshal(&tips) + if err != nil { + log.Error(operationID, "Marshal failed ", err.Error(), tips.String()) + return + } Notification(&n) } diff --git a/pkg/common/db/model_struct.go b/pkg/common/db/model_struct.go index 0af3a6919..7cb768cd4 100644 --- a/pkg/common/db/model_struct.go +++ b/pkg/common/db/model_struct.go @@ -34,7 +34,7 @@ type Friend struct { //int64 HandleTime = 8; //string Ex = 9; //} -//open_im_sdk.FriendRequest == imdb.FriendRequest +//open_im_sdk.FriendRequest(nickname, farce url ...) != imdb.FriendRequest type FriendRequest struct { FromUserID string `gorm:"column:from_user_id;primary_key;size:64"` ToUserID string `gorm:"column:to_user_id;primary_key;size:64"` diff --git a/pkg/common/utils/utils.go b/pkg/common/utils/utils.go index ed061a509..e299fefc2 100644 --- a/pkg/common/utils/utils.go +++ b/pkg/common/utils/utils.go @@ -3,6 +3,7 @@ package utils import ( db "Open_IM/pkg/common/db" imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" + "Open_IM/pkg/common/log" "Open_IM/pkg/common/token_verify" open_im_sdk "Open_IM/pkg/proto/sdk_ws" "Open_IM/pkg/utils" @@ -18,27 +19,64 @@ func OperationIDGenerator() string { func FriendOpenIMCopyDB(dst *db.Friend, src *open_im_sdk.FriendInfo) { utils.CopyStructFields(dst, src) dst.FriendUserID = src.FriendUser.UserID + dst.CreateTime = utils.UnixSecondToTime(int64(src.CreateTime)) } -func FriendDBCopyOpenIM(dst *open_im_sdk.FriendInfo, src *db.Friend) { +func FriendDBCopyOpenIM(dst *open_im_sdk.FriendInfo, src *db.Friend) error { utils.CopyStructFields(dst, src) - user, _ := imdb.GetUserByUserID(src.FriendUserID) - if user != nil { - utils.CopyStructFields(dst.FriendUser, user) + user, err := imdb.GetUserByUserID(src.FriendUserID) + if err != nil { + return utils.Wrap(err, "") } + utils.CopyStructFields(dst.FriendUser, user) dst.CreateTime = uint32(src.CreateTime.Unix()) dst.FriendUser.CreateTime = uint32(user.CreateTime.Unix()) + return nil } // func FriendRequestOpenIMCopyDB(dst *db.FriendRequest, src *open_im_sdk.FriendRequest) { utils.CopyStructFields(dst, src) + dst.CreateTime = utils.UnixSecondToTime(int64(src.CreateTime)) + dst.HandleTime = utils.UnixSecondToTime(int64(src.HandleTime)) } -func FriendRequestDBCopyOpenIM(dst *open_im_sdk.FriendRequest, src *db.FriendRequest) { +func FriendRequestDBCopyOpenIM(dst *open_im_sdk.FriendRequest, src *db.FriendRequest) error { utils.CopyStructFields(dst, src) + user, err := imdb.GetUserByUserID(src.FromUserID) + if err != nil { + return utils.Wrap(err, "") + } + dst.FromNickname = user.Nickname + dst.FromFaceURL = user.FaceURL + dst.FromGender = user.Gender + user, err = imdb.GetUserByUserID(src.ToUserID) + if err != nil { + return utils.Wrap(err, "") + } + dst.ToNickname = user.Nickname + dst.ToFaceURL = user.FaceURL + dst.ToGender = user.Gender dst.CreateTime = uint32(src.CreateTime.Unix()) dst.HandleTime = uint32(src.HandleTime.Unix()) + return nil +} + +func BlackOpenIMCopyDB(dst *db.Black, src *open_im_sdk.BlackInfo) { + utils.CopyStructFields(dst, src) + dst.BlockUserID = src.BlackUserInfo.UserID + dst.CreateTime = utils.UnixSecondToTime(int64(src.CreateTime)) +} + +func BlackDBCopyOpenIM(dst *open_im_sdk.BlackInfo, src *db.Black) error { + utils.CopyStructFields(dst, src) + dst.CreateTime = uint32(src.CreateTime.Unix()) + user, err := imdb.GetUserByUserID(src.BlockUserID) + if err != nil { + return utils.Wrap(err, "") + } + utils.CopyStructFields(dst.BlackUserInfo, user) + return nil } func GroupOpenIMCopyDB(dst *db.Group, src *open_im_sdk.GroupInfo) { @@ -93,28 +131,17 @@ func GroupRequestDBCopyOpenIM(dst *open_im_sdk.GroupRequest, src *db.GroupReques func UserOpenIMCopyDB(dst *db.User, src *open_im_sdk.UserInfo) { utils.CopyStructFields(dst, src) + dst.Birth = utils.UnixSecondToTime(int64(src.Birth)) + dst.CreateTime = utils.UnixSecondToTime(int64(src.CreateTime)) } func UserDBCopyOpenIM(dst *open_im_sdk.UserInfo, src *db.User) { utils.CopyStructFields(dst, src) dst.CreateTime = uint32(src.CreateTime.Unix()) + dst.Birth = uint32(src.Birth.Unix()) } -func BlackOpenIMCopyDB(dst *db.Black, src *open_im_sdk.BlackInfo) { - utils.CopyStructFields(dst, src) - dst.BlockUserID = src.BlackUserInfo.UserID -} - -func BlackDBCopyOpenIM(dst *open_im_sdk.BlackInfo, src *db.Black) { - utils.CopyStructFields(dst, src) - dst.CreateTime = uint32(src.CreateTime.Unix()) - user, _ := imdb.GetUserByUserID(src.BlockUserID) - if user != nil { - utils.CopyStructFields(dst.BlackUserInfo, user) - } -} - -func UserDBCopyOpenIMPublic(dst *open_im_sdk.PublicUserInfo, src *db.User) { +func UserDBCopyOpenIMPublicUser(dst *open_im_sdk.PublicUserInfo, src *db.User) { utils.CopyStructFields(dst, src) } diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index 2e8274207..f175255ab 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -5,6 +5,7 @@ import ( "github.com/pkg/errors" "runtime" "strconv" + "strings" ) // copy a by b b->a @@ -24,3 +25,15 @@ func printCallerNameAndLine() string { pc, _, line, _ := runtime.Caller(2) return runtime.FuncForPC(pc).Name() + "()@" + strconv.Itoa(line) + ": " } + +func GetSelfFuncName() string { + pc, _, _, _ := runtime.Caller(1) + return cleanUpFuncName(runtime.FuncForPC(pc).Name()) +} +func cleanUpFuncName(funcName string) string { + end := strings.LastIndex(funcName, ".") + if end == -1 { + return "" + } + return funcName[end+1:] +} From 87f14be30c50faa5e2b30e12ea2cd1ce8a1e8a82 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Sun, 16 Jan 2022 12:25:41 +0800 Subject: [PATCH 284/337] Refactor code --- config/config.yaml | 115 +++++- internal/rpc/msg/friend_notification.go | 483 ++++++++++++++---------- internal/rpc/user/user.go | 2 +- pkg/common/config/config.go | 49 ++- pkg/common/constant/constant.go | 41 +- pkg/proto/friend/friend.pb.go | 194 +++++----- pkg/proto/friend/friend.proto | 2 +- pkg/proto/sdk_ws/ws.proto | 105 ++++-- 8 files changed, 637 insertions(+), 354 deletions(-) diff --git a/config/config.yaml b/config/config.yaml index 8658ecfd5..b8ab770c2 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -178,7 +178,7 @@ iOSPush: notification: groupCreated: conversation: - type: 1 + reliabilityLevel: 1 unreadCount: true offlinePush: switch: true @@ -191,7 +191,7 @@ notification: groupInfoChanged: conversation: - type: 1 + reliabilityLevel: 1 unreadCount: false offlinePush: switch: false @@ -203,6 +203,117 @@ notification: + FriendApplicationAdded: + conversation: + reliabilityLevel: 2 + unreadCount: false + offlinePush: + switch: true + title: "Somebody applies to add you as a friend" + desc: "Somebody applies to add you as a friend" + ext: "Somebody applies to add you as a friend" + defaultTips: + tips: "I applies to add you as a friend" # + + FriendApplicationApproved: + conversation: + reliabilityLevel: 2 + unreadCount: false + offlinePush: + switch: true + title: "Someone applies to add your friend application" + desc: "Someone applies to add your friend application" + ext: "Someone applies to add your friend application" + defaultTips: + tips: "I applies to add your friend application" # + + + FriendApplicationRejected: + conversation: + reliabilityLevel: 2 + unreadCount: false + offlinePush: + switch: true + title: "Someone rejected your friend application" + desc: "Someone rejected your friend application" + ext: "Someone rejected your friend application" + defaultTips: + tips: "I rejected your friend application" # + + + + + + FriendAdded: + conversation: + reliabilityLevel: 3 + unreadCount: true + offlinePush: + switch: true + title: "We have become friends" + desc: "We have become friends" + ext: "We have become friends" + defaultTips: + tips: "We have become friends" # + + + + FriendDeleted: + conversation: + reliabilityLevel: 2 + unreadCount: false + offlinePush: + switch: true + title: "Deleted a friend" + desc: "Deleted a friend" + ext: "Deleted a friend" + defaultTips: + tips: "Deleted a friend" # + + + FriendInfoChanged: + conversation: + reliabilityLevel: 2 + unreadCount: false + offlinePush: + switch: true + title: "Your friend's profile has been changed" + desc: "Your friend's profile has been changed" + ext: "Your friend's profile has been changed" + defaultTips: + tips: "Your friend's profile has been changed" # + + + + BlackAdded: + conversation: + reliabilityLevel: 2 + unreadCount: false + offlinePush: + switch: true + title: "Blocked a user" + desc: "Blocked a user" + ext: "Blocked a user" + defaultTips: + tips: "Blocked a user" # + + + BlackDeleted: + conversation: + reliabilityLevel: 2 + unreadCount: false + offlinePush: + switch: true + title: "Remove a blocked user" + desc: "Remove a blocked user" + ext: "Remove a blocked user" + defaultTips: + tips: "Remove a blocked user" + +" # xx applied to add you as a friend + + + #---------------demo configuration---------------------# #The following configuration items are applied to openIM Demo configuration demoswitch: true diff --git a/internal/rpc/msg/friend_notification.go b/internal/rpc/msg/friend_notification.go index ef05211c2..5e9017568 100644 --- a/internal/rpc/msg/friend_notification.go +++ b/internal/rpc/msg/friend_notification.go @@ -1,6 +1,7 @@ package msg import ( + "Open_IM/pkg/common/config" "Open_IM/pkg/common/constant" imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" "Open_IM/pkg/common/log" @@ -40,70 +41,133 @@ func getFromToUserNickname(fromUserID, toUserID string) (string, string, error) return from.Nickname, to.Nickname, nil } +func friendNotification(commID *pbFriend.CommID, contentType int32, m proto.Message) { + log.Info(commID.OperationID, utils.GetSelfFuncName(), "args: ", commID, contentType) + var err error + var tips open_im_sdk.TipsComm + tips.Detail, err = proto.Marshal(m) + if err != nil { + log.Error(commID.OperationID, "Marshal failed ", err.Error(), m.String()) + return + } + + fromUserNickname, toUserNickname, err := getFromToUserNickname(commID.FromUserID, commID.ToUserID) + if err != nil { + log.Error(commID.OperationID, "getFromToUserNickname failed ", err.Error(), commID.FromUserID, commID.ToUserID) + return + } + cn := config.Config.Notification + switch contentType { + case constant.FriendApplicationAddedNotification: + + tips.DefaultTips = fromUserNickname + cn.FriendApplicationAdded.DefaultTips.Tips + case constant.FriendApplicationApprovedNotification: + tips.DefaultTips = fromUserNickname + cn.FriendApplicationApproved.DefaultTips.Tips + case constant.FriendApplicationRejectedNotification: + tips.DefaultTips = fromUserNickname + cn.FriendApplicationRejected.DefaultTips.Tips + case constant.FriendAddedNotification: + tips.DefaultTips = cn.FriendAdded.DefaultTips.Tips + case constant.FriendDeletedNotification: + tips.DefaultTips = cn.FriendDeleted.DefaultTips.Tips + toUserNickname + case constant.FriendInfoChangedNotification: + tips.DefaultTips = fromUserNickname + cn.FriendInfoChanged.DefaultTips.Tips + case constant.BlackAddedNotification: + tips.DefaultTips = cn.BlackAdded.DefaultTips.Tips + toUserNickname + case constant.BlackDeletedNotification: + tips.DefaultTips = cn.BlackDeleted.DefaultTips.Tips + toUserNickname + default: + log.Error(commID.OperationID, "contentType failed ", contentType) + return + } + + var n NotificationMsg + n.SendID = commID.FromUserID + n.RecvID = commID.ToUserID + n.ContentType = contentType + n.SessionType = constant.SingleChatType + n.MsgFrom = constant.SysMsgType + n.OperationID = commID.OperationID + n.Content, err = proto.Marshal(&tips) + if err != nil { + log.Error(commID.OperationID, "Marshal failed ", err.Error(), tips.String()) + return + } + Notification(&n) +} + func FriendApplicationAddedNotification(req *pbFriend.AddFriendReq) { log.Info(req.CommID.OperationID, utils.GetSelfFuncName(), "args: ", req.String()) var friendApplicationAddedTips open_im_sdk.FriendApplicationAddedTips friendApplicationAddedTips.FromToUserID.FromUserID = req.CommID.FromUserID friendApplicationAddedTips.FromToUserID.ToUserID = req.CommID.ToUserID - fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) - if err != nil { - log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID) - return - } - var tips open_im_sdk.TipsComm - tips.Detail, err = proto.Marshal(&friendApplicationAddedTips) - if err != nil { - log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), friendApplicationAddedTips.String()) - return - } - tips.DefaultTips = fromUserNickname + " FriendApplicationAddedNotification " + toUserNickname - - var n NotificationMsg - n.SendID = req.CommID.FromUserID - n.RecvID = req.CommID.ToUserID - n.ContentType = constant.FriendApplicationAddedNotification - n.SessionType = constant.SingleChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = req.CommID.OperationID - n.Content, err = proto.Marshal(&tips) - if err != nil { - log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String()) - return - } - Notification(&n) + friendNotification(req.CommID, constant.FriendApplicationAddedNotification, &friendApplicationAddedTips) + //fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) + //if err != nil { + // log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID) + // return + //} + //var tips open_im_sdk.TipsComm + //tips.Detail, err = proto.Marshal(&friendApplicationAddedTips) + //if err != nil { + // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), friendApplicationAddedTips.String()) + // return + //} + //tips.DefaultTips = fromUserNickname + " FriendApplicationAddedNotification " + toUserNickname + // + //var n NotificationMsg + //n.SendID = req.CommID.FromUserID + //n.RecvID = req.CommID.ToUserID + //n.ContentType = constant.FriendApplicationAddedNotification + //n.SessionType = constant.SingleChatType + //n.MsgFrom = constant.SysMsgType + //n.OperationID = req.CommID.OperationID + //n.Content, err = proto.Marshal(&tips) + //if err != nil { + // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String()) + // return + //} + //Notification(&n) } func FriendApplicationProcessedNotification(req *pbFriend.AddFriendResponseReq) { var friendApplicationProcessedTips open_im_sdk.FriendApplicationProcessedTips friendApplicationProcessedTips.FromToUserID.FromUserID = req.CommID.FromUserID friendApplicationProcessedTips.FromToUserID.ToUserID = req.CommID.ToUserID - fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) - if err != nil { - log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID) - return + friendApplicationProcessedTips.HandleResult = req.HandleResult + //fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) + //if err != nil { + // log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID) + // return + //} + if friendApplicationProcessedTips.HandleResult == 1 { + friendNotification(req.CommID, constant.FriendApplicationApprovedNotification, &friendApplicationProcessedTips) + } else if friendApplicationProcessedTips.HandleResult == -1 { + friendNotification(req.CommID, constant.FriendApplicationRejectedNotification, &friendApplicationProcessedTips) + } else { + log.Error(req.CommID.OperationID, "HandleResult failed ", friendApplicationProcessedTips.HandleResult) } - var tips open_im_sdk.TipsComm - tips.Detail, err = proto.Marshal(&friendApplicationProcessedTips) - if err != nil { - log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), friendApplicationProcessedTips.String()) - return - } - tips.DefaultTips = fromUserNickname + " FriendApplicationProcessedNotification " + toUserNickname - - var n NotificationMsg - n.SendID = req.CommID.FromUserID - n.RecvID = req.CommID.ToUserID - n.ContentType = constant.FriendApplicationProcessedNotification - n.SessionType = constant.SingleChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = req.CommID.OperationID - n.Content, err = proto.Marshal(&tips) - if err != nil { - log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String()) - return - } - Notification(&n) + //var tips open_im_sdk.TipsComm + //tips.DefaultTips = fromUserNickname + " FriendApplicationProcessedNotification " + toUserNickname + //tips.Detail, err = proto.Marshal(&friendApplicationProcessedTips) + //if err != nil { + // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), friendApplicationProcessedTips.String()) + // return + //} + // + //var n NotificationMsg + //n.SendID = req.CommID.FromUserID + //n.RecvID = req.CommID.ToUserID + //n.ContentType = constant.FriendApplicationProcessedNotification + //n.SessionType = constant.SingleChatType + //n.MsgFrom = constant.SysMsgType + //n.OperationID = req.CommID.OperationID + //n.Content, err = proto.Marshal(&tips) + //if err != nil { + // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String()) + // return + //} + //Notification(&n) } func FriendAddedNotification(operationID, opUserID, fromUserID, toUserID string) { @@ -120,31 +184,34 @@ func FriendAddedNotification(operationID, opUserID, fromUserID, toUserID string) return } utils2.FriendDBCopyOpenIM(friendAddedTips.Friend, friend) - fromUserNickname, toUserNickname, err := getFromToUserNickname(fromUserID, toUserID) - if err != nil { - log.Error(operationID, "getFromToUserNickname failed ", err.Error(), fromUserID, toUserID) - return - } - var tips open_im_sdk.TipsComm - tips.Detail, err = proto.Marshal(&friendAddedTips) - if err != nil { - log.Error(operationID, "Marshal failed ", err.Error(), friendAddedTips) - return - } - tips.DefaultTips = fromUserNickname + " FriendAddedNotification " + toUserNickname - var n NotificationMsg - n.SendID = fromUserID - n.RecvID = toUserID - n.ContentType = constant.FriendAddedNotification - n.SessionType = constant.SingleChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = operationID - n.Content, _ = proto.Marshal(&tips) - if err != nil { - log.Error(operationID, "Marshal failed ", err.Error(), tips.String()) - return - } - Notification(&n) + commID := pbFriend.CommID{FromUserID: fromUserID, ToUserID: toUserID, OpUserID: opUserID, OperationID: operationID} + friendNotification(&commID, constant.FriendAddedNotification, &friendAddedTips) + //fromUserNickname, toUserNickname, err := getFromToUserNickname(fromUserID, toUserID) + //if err != nil { + // log.Error(operationID, "getFromToUserNickname failed ", err.Error(), fromUserID, toUserID) + // return + //} + //var tips open_im_sdk.TipsComm + //tips.DefaultTips = fromUserNickname + " FriendAddedNotification " + toUserNickname + //tips.Detail, err = proto.Marshal(&friendAddedTips) + //if err != nil { + // log.Error(operationID, "Marshal failed ", err.Error(), friendAddedTips) + // return + //} + // + //var n NotificationMsg + //n.SendID = fromUserID + //n.RecvID = toUserID + //n.ContentType = constant.FriendAddedNotification + //n.SessionType = constant.SingleChatType + //n.MsgFrom = constant.SysMsgType + //n.OperationID = operationID + //n.Content, err = proto.Marshal(&tips) + //if err != nil { + // log.Error(operationID, "Marshal failed ", err.Error(), tips.String()) + // return + //} + //Notification(&n) } //message FriendDeletedTips{ @@ -154,31 +221,33 @@ func FriendDeletedNotification(req *pbFriend.DeleteFriendReq) { var friendDeletedTips open_im_sdk.FriendDeletedTips friendDeletedTips.FromToUserID.FromUserID = req.CommID.FromUserID friendDeletedTips.FromToUserID.ToUserID = req.CommID.ToUserID - fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) - if err != nil { - log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", req.CommID.FromUserID, req.CommID.ToUserID) - return - } - var tips open_im_sdk.TipsComm - tips.Detail, err = proto.Marshal(&friendDeletedTips) - if err != nil { - log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), friendDeletedTips.String()) - return - } - tips.DefaultTips = fromUserNickname + " FriendDeletedNotification " + toUserNickname - var n NotificationMsg - n.SendID = req.CommID.FromUserID - n.RecvID = req.CommID.ToUserID - n.ContentType = constant.FriendDeletedNotification - n.SessionType = constant.SingleChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = req.CommID.OperationID - n.Content, err = proto.Marshal(&tips) - if err != nil { - log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String()) - return - } - Notification(&n) + //fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) + //if err != nil { + // log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", req.CommID.FromUserID, req.CommID.ToUserID) + // return + //} + friendNotification(req.CommID, constant.FriendDeletedNotification, &friendDeletedTips) + //var tips open_im_sdk.TipsComm + //tips.DefaultTips = fromUserNickname + " FriendDeletedNotification " + toUserNickname + //tips.Detail, err = proto.Marshal(&friendDeletedTips) + //if err != nil { + // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), friendDeletedTips.String()) + // return + //} + // + //var n NotificationMsg + //n.SendID = req.CommID.FromUserID + //n.RecvID = req.CommID.ToUserID + //n.ContentType = constant.FriendDeletedNotification + //n.SessionType = constant.SingleChatType + //n.MsgFrom = constant.SysMsgType + //n.OperationID = req.CommID.OperationID + //n.Content, err = proto.Marshal(&tips) + //if err != nil { + // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String()) + // return + //} + //Notification(&n) } //message FriendInfoChangedTips{ @@ -190,63 +259,66 @@ func FriendInfoChangedNotification(operationID, opUserID, fromUserID, toUserID s var friendInfoChangedTips open_im_sdk.FriendInfoChangedTips friendInfoChangedTips.FromToUserID.FromUserID = fromUserID friendInfoChangedTips.FromToUserID.ToUserID = toUserID - fromUserNickname, toUserNickname, err := getFromToUserNickname(fromUserID, toUserID) - if err != nil { - log.Error(operationID, "getFromToUserNickname failed ", fromUserID, toUserID) - return - } - var tips open_im_sdk.TipsComm - tips.Detail, err = proto.Marshal(&friendInfoChangedTips) - if err != nil { - log.Error(operationID, "Marshal failed ", err.Error(), friendInfoChangedTips.String()) - return - } - tips.DefaultTips = fromUserNickname + " FriendDeletedNotification " + toUserNickname - var n NotificationMsg - n.SendID = fromUserID - n.RecvID = toUserID - n.ContentType = constant.FriendInfoChangedNotification - n.SessionType = constant.SingleChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = operationID - - n.Content, err = proto.Marshal(&tips) - if err != nil { - log.Error(operationID, "Marshal failed ", err.Error(), tips.String()) - return - } - Notification(&n) + //fromUserNickname, toUserNickname, err := getFromToUserNickname(fromUserID, toUserID) + //if err != nil { + // log.Error(operationID, "getFromToUserNickname failed ", fromUserID, toUserID) + // return + //} + commID := pbFriend.CommID{FromUserID: fromUserID, ToUserID: toUserID, OpUserID: opUserID, OperationID: operationID} + friendNotification(&commID, constant.FriendInfoChangedNotification, &friendInfoChangedTips) + //var tips open_im_sdk.TipsComm + //tips.DefaultTips = fromUserNickname + " FriendDeletedNotification " + toUserNickname + //tips.Detail, err = proto.Marshal(&friendInfoChangedTips) + //if err != nil { + // log.Error(operationID, "Marshal failed ", err.Error(), friendInfoChangedTips.String()) + // return + //} + // + //var n NotificationMsg + //n.SendID = fromUserID + //n.RecvID = toUserID + //n.ContentType = constant.FriendInfoChangedNotification + //n.SessionType = constant.SingleChatType + //n.MsgFrom = constant.SysMsgType + //n.OperationID = operationID + //n.Content, err = proto.Marshal(&tips) + //if err != nil { + // log.Error(operationID, "Marshal failed ", err.Error(), tips.String()) + // return + //} + //Notification(&n) } func BlackAddedNotification(req *pbFriend.AddBlacklistReq) { var blackAddedTips open_im_sdk.BlackAddedTips blackAddedTips.FromToUserID.FromUserID = req.CommID.FromUserID blackAddedTips.FromToUserID.ToUserID = req.CommID.ToUserID - fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) - if err != nil { - log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", req.CommID.FromUserID, req.CommID.ToUserID) - return - } - var tips open_im_sdk.TipsComm - tips.Detail, err = proto.Marshal(&blackAddedTips) - if err != nil { - log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), blackAddedTips.String()) - return - } - tips.DefaultTips = fromUserNickname + " BlackAddedNotification " + toUserNickname - var n NotificationMsg - n.SendID = req.CommID.FromUserID - n.RecvID = req.CommID.ToUserID - n.ContentType = constant.BlackAddedNotification - n.SessionType = constant.SingleChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = req.CommID.OperationID - n.Content, err = proto.Marshal(&tips) - if err != nil { - log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String()) - return - } - Notification(&n) + //fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) + //if err != nil { + // log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", req.CommID.FromUserID, req.CommID.ToUserID) + // return + //} + //var tips open_im_sdk.TipsComm + //tips.DefaultTips = fromUserNickname + " BlackAddedNotification " + toUserNickname + //tips.Detail, err = proto.Marshal(&blackAddedTips) + //if err != nil { + // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), blackAddedTips.String()) + // return + //} + friendNotification(req.CommID, constant.BlackAddedNotification, &blackAddedTips) + //var n NotificationMsg + //n.SendID = req.CommID.FromUserID + //n.RecvID = req.CommID.ToUserID + //n.ContentType = constant.BlackAddedNotification + //n.SessionType = constant.SingleChatType + //n.MsgFrom = constant.SysMsgType + //n.OperationID = req.CommID.OperationID + //n.Content, err = proto.Marshal(&tips) + //if err != nil { + // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String()) + // return + //} + //Notification(&n) } //message BlackDeletedTips{ @@ -256,31 +328,32 @@ func BlackDeletedNotification(req *pbFriend.RemoveBlacklistReq) { var blackDeletedTips open_im_sdk.BlackDeletedTips blackDeletedTips.FromToUserID.FromUserID = req.CommID.FromUserID blackDeletedTips.FromToUserID.ToUserID = req.CommID.ToUserID - fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) - if err != nil { - log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID) - return - } - var tips open_im_sdk.TipsComm - tips.Detail, err = proto.Marshal(&blackDeletedTips) - if err != nil { - log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), blackDeletedTips.String()) - return - } - tips.DefaultTips = fromUserNickname + " BlackDeletedNotification " + toUserNickname - var n NotificationMsg - n.SendID = req.CommID.FromUserID - n.RecvID = req.CommID.ToUserID - n.ContentType = constant.BlackDeletedNotification - n.SessionType = constant.SingleChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = req.CommID.OperationID - n.Content, err = proto.Marshal(&tips) - if err != nil { - log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String()) - return - } - Notification(&n) + //fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) + //if err != nil { + // log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID) + // return + //} + //var tips open_im_sdk.TipsComm + //tips.Detail, err = proto.Marshal(&blackDeletedTips) + //if err != nil { + // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), blackDeletedTips.String()) + // return + //} + friendNotification(req.CommID, constant.BlackDeletedNotification, &blackDeletedTips) + //tips.DefaultTips = fromUserNickname + " BlackDeletedNotification " + toUserNickname + //var n NotificationMsg + //n.SendID = req.CommID.FromUserID + //n.RecvID = req.CommID.ToUserID + //n.ContentType = constant.BlackDeletedNotification + //n.SessionType = constant.SingleChatType + //n.MsgFrom = constant.SysMsgType + //n.OperationID = req.CommID.OperationID + //n.Content, err = proto.Marshal(&tips) + //if err != nil { + // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String()) + // return + //} + //Notification(&n) } //message SelfInfoUpdatedTips{ @@ -288,33 +361,35 @@ func BlackDeletedNotification(req *pbFriend.RemoveBlacklistReq) { // PublicUserInfo OpUser = 2; // uint64 OperationTime = 3; //} -func SelfInfoUpdatedNotification(operationID, userID string) { +func SelfInfoUpdatedNotification(operationID, userID string, opUserID string) { var selfInfoUpdatedTips open_im_sdk.SelfInfoUpdatedTips selfInfoUpdatedTips.UserID = userID - u, err := imdb.GetUserByUserID(userID) - if err != nil { - log.NewError(operationID, "FindUserByUID failed ", err.Error(), userID) - return - } - var tips open_im_sdk.TipsComm - tips.Detail, err = proto.Marshal(&selfInfoUpdatedTips) - if err != nil { - log.Error(operationID, "Marshal failed ", err.Error(), selfInfoUpdatedTips.String()) - return - } - var n NotificationMsg - n.SendID = userID - n.RecvID = userID - n.ContentType = constant.SelfInfoUpdatedNotification - n.SessionType = constant.SingleChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = operationID - - tips.DefaultTips = u.Nickname + " SelfInfoUpdatedNotification " - n.Content, err = proto.Marshal(&tips) - if err != nil { - log.Error(operationID, "Marshal failed ", err.Error(), tips.String()) - return - } - Notification(&n) + commID := pbFriend.CommID{FromUserID: userID, ToUserID: userID, OpUserID: opUserID, OperationID: operationID} + friendNotification(&commID, constant.SelfInfoUpdatedNotification, &selfInfoUpdatedTips) + //u, err := imdb.GetUserByUserID(userID) + //if err != nil { + // log.NewError(operationID, "FindUserByUID failed ", err.Error(), userID) + // return + //} + //var tips open_im_sdk.TipsComm + //tips.Detail, err = proto.Marshal(&selfInfoUpdatedTips) + //if err != nil { + // log.Error(operationID, "Marshal failed ", err.Error(), selfInfoUpdatedTips.String()) + // return + //} + //var n NotificationMsg + //n.SendID = userID + //n.RecvID = userID + //n.ContentType = constant.SelfInfoUpdatedNotification + //n.SessionType = constant.SingleChatType + //n.MsgFrom = constant.SysMsgType + //n.OperationID = operationID + // + //tips.DefaultTips = u.Nickname + " SelfInfoUpdatedNotification " + //n.Content, err = proto.Marshal(&tips) + //if err != nil { + // log.Error(operationID, "Marshal failed ", err.Error(), tips.String()) + // return + //} + //Notification(&n) } diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index 0cf426051..e4366d6b6 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -237,6 +237,6 @@ func (s *userServer) UpdateUserInfo(ctx context.Context, req *pbUser.UpdateUserI for _, v := range RpcResp.FriendInfoList { chat.FriendInfoChangedNotification(req.OperationID, req.OpUserID, req.UserInfo.UserID, v.FriendUser.UserID) } - chat.SelfInfoUpdatedNotification(req.OperationID, req.UserInfo.UserID) + chat.SelfInfoUpdatedNotification(req.OperationID, req.UserInfo.UserID, req.OpUserID) return &pbUser.UpdateUserInfoResp{CommonResp: &pbUser.CommonResp{}}, nil } diff --git a/pkg/common/config/config.go b/pkg/common/config/config.go index b2679bf9b..bf175b3b6 100644 --- a/pkg/common/config/config.go +++ b/pkg/common/config/config.go @@ -181,6 +181,51 @@ type config struct { OfflinePush POfflinePush `yaml:"offlinePush"` DefaultTips PDefaultTips `yaml:"defaultTips"` } + //////////////////////friend/////////////////////// + FriendApplicationAdded struct { + Conversation PConversation `yaml:"conversation"` + OfflinePush POfflinePush `yaml:"offlinePush"` + DefaultTips PDefaultTips `yaml:"defaultTips"` + } + + FriendApplicationApproved struct { + Conversation PConversation `yaml:"conversation"` + OfflinePush POfflinePush `yaml:"offlinePush"` + DefaultTips PDefaultTips `yaml:"defaultTips"` + } + + FriendApplicationRejected struct { + Conversation PConversation `yaml:"conversation"` + OfflinePush POfflinePush `yaml:"offlinePush"` + DefaultTips PDefaultTips `yaml:"defaultTips"` + } + + FriendAdded struct { + Conversation PConversation `yaml:"conversation"` + OfflinePush POfflinePush `yaml:"offlinePush"` + DefaultTips PDefaultTips `yaml:"defaultTips"` + } + + FriendDeleted struct { + Conversation PConversation `yaml:"conversation"` + OfflinePush POfflinePush `yaml:"offlinePush"` + DefaultTips PDefaultTips `yaml:"defaultTips"` + } + FriendInfoChanged struct { + Conversation PConversation `yaml:"conversation"` + OfflinePush POfflinePush `yaml:"offlinePush"` + DefaultTips PDefaultTips `yaml:"defaultTips"` + } + BlackAdded struct { + Conversation PConversation `yaml:"conversation"` + OfflinePush POfflinePush `yaml:"offlinePush"` + DefaultTips PDefaultTips `yaml:"defaultTips"` + } + BlackDeleted struct { + Conversation PConversation `yaml:"conversation"` + OfflinePush POfflinePush `yaml:"offlinePush"` + DefaultTips PDefaultTips `yaml:"defaultTips"` + } } Demo struct { Port []int `yaml:"openImDemoPort"` @@ -201,8 +246,8 @@ type config struct { } } type PConversation struct { - ConversationChanged bool `yaml:"conversationChanged"` - UnreadCount bool `yaml:"unreadCount"` + ReliabilityLevel int `yaml:"reliabilityLevel"` + UnreadCount bool `yaml:"unreadCount"` } type POfflinePush struct { diff --git a/pkg/common/constant/constant.go b/pkg/common/constant/constant.go index cd35036fb..d8c3ba66d 100644 --- a/pkg/common/constant/constant.go +++ b/pkg/common/constant/constant.go @@ -46,24 +46,35 @@ const ( //SysRelated - FriendApplicationProcessedNotification = 1201 //AcceptFriendApplicationTip = 201 - FriendApplicationAddedNotification = 1202 //AddFriendTip = 202 - FriendAddedNotification = 1203 - FriendDeletedNotification = 1204 - FriendInfoChangedNotification = 1205 - BlackAddedNotification = 1206 - BlackDeletedNotification = 1207 + FriendApplicationApprovedNotification = 1201 + FriendApplicationRejectedNotification = 1202 + FriendApplicationAddedNotification = 1203 //AddFriendTip = 202 + FriendAddedNotification = 1204 + FriendDeletedNotification = 1205 + FriendInfoChangedNotification = 1206 + BlackAddedNotification = 1207 + BlackDeletedNotification = 1208 SelfInfoUpdatedNotification = 1303 //SetSelfInfoTip = 204 - GroupCreatedNotification = 1501 //CreateGroupTip = 502 - JoinApplicationNotification = 1502 //JoinGroupTip = 504 - ApplicationProcessedNotification = 1503 //AcceptGroupApplicationTip = 507 RefuseGroupApplicationTip = 508 - MemberInvitedNotification = 1504 //InviteUserToGroupTip = 510 - MemberKickedNotification = 1505 //KickGroupMemberTip = 509 - GroupInfoChangedNotification = 1506 //SetGroupInfoTip = 506 TransferGroupOwnerTip = 501 - MemberLeaveNotification = 1507 //QuitGroupTip = 505 - MemberEnterNotification = 1508 + GroupCreatedNotification = 1501 + MemberInfoSetNotification = 1501 + JoinGroupApplicationNotification = 1501 + MemberQuitNotification = 1501 + GroupApplicationAcceptedNotification = 1501 + GroupApplicationRejectedNotification = 1501 + GroupOwnerTransferredNotification = 1501 + MemberKickedNotification = 1501 + MemberInvitedNotification = 1501 + + //GroupCreatedNotification = 1501 + //JoinApplicationNotification = 1502 + //ApplicationProcessedNotification = 1503 + //MemberInvitedNotification = 1504 + //MemberKickedNotification = 1505 + //GroupInfoChangedNotification = 1506 + //MemberLeaveNotification = 1507 + //MemberEnterNotification = 1508 //MsgFrom UserMsgType = 100 diff --git a/pkg/proto/friend/friend.pb.go b/pkg/proto/friend/friend.pb.go index 0f13634a6..88e92e2f5 100644 --- a/pkg/proto/friend/friend.pb.go +++ b/pkg/proto/friend/friend.pb.go @@ -36,7 +36,7 @@ func (m *CommonResp) Reset() { *m = CommonResp{} } func (m *CommonResp) String() string { return proto.CompactTextString(m) } func (*CommonResp) ProtoMessage() {} func (*CommonResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{0} + return fileDescriptor_friend_74b4824fb8c5de90, []int{0} } func (m *CommonResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CommonResp.Unmarshal(m, b) @@ -84,7 +84,7 @@ func (m *CommID) Reset() { *m = CommID{} } func (m *CommID) String() string { return proto.CompactTextString(m) } func (*CommID) ProtoMessage() {} func (*CommID) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{1} + return fileDescriptor_friend_74b4824fb8c5de90, []int{1} } func (m *CommID) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CommID.Unmarshal(m, b) @@ -143,7 +143,7 @@ func (m *GetFriendsInfoReq) Reset() { *m = GetFriendsInfoReq{} } func (m *GetFriendsInfoReq) String() string { return proto.CompactTextString(m) } func (*GetFriendsInfoReq) ProtoMessage() {} func (*GetFriendsInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{2} + return fileDescriptor_friend_74b4824fb8c5de90, []int{2} } func (m *GetFriendsInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendsInfoReq.Unmarshal(m, b) @@ -183,7 +183,7 @@ func (m *GetFriendInfoResp) Reset() { *m = GetFriendInfoResp{} } func (m *GetFriendInfoResp) String() string { return proto.CompactTextString(m) } func (*GetFriendInfoResp) ProtoMessage() {} func (*GetFriendInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{3} + return fileDescriptor_friend_74b4824fb8c5de90, []int{3} } func (m *GetFriendInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendInfoResp.Unmarshal(m, b) @@ -236,7 +236,7 @@ func (m *AddFriendReq) Reset() { *m = AddFriendReq{} } func (m *AddFriendReq) String() string { return proto.CompactTextString(m) } func (*AddFriendReq) ProtoMessage() {} func (*AddFriendReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{4} + return fileDescriptor_friend_74b4824fb8c5de90, []int{4} } func (m *AddFriendReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddFriendReq.Unmarshal(m, b) @@ -281,7 +281,7 @@ func (m *AddFriendResp) Reset() { *m = AddFriendResp{} } func (m *AddFriendResp) String() string { return proto.CompactTextString(m) } func (*AddFriendResp) ProtoMessage() {} func (*AddFriendResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{5} + return fileDescriptor_friend_74b4824fb8c5de90, []int{5} } func (m *AddFriendResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddFriendResp.Unmarshal(m, b) @@ -322,7 +322,7 @@ func (m *ImportFriendReq) Reset() { *m = ImportFriendReq{} } func (m *ImportFriendReq) String() string { return proto.CompactTextString(m) } func (*ImportFriendReq) ProtoMessage() {} func (*ImportFriendReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{6} + return fileDescriptor_friend_74b4824fb8c5de90, []int{6} } func (m *ImportFriendReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ImportFriendReq.Unmarshal(m, b) @@ -382,7 +382,7 @@ func (m *UserIDResult) Reset() { *m = UserIDResult{} } func (m *UserIDResult) String() string { return proto.CompactTextString(m) } func (*UserIDResult) ProtoMessage() {} func (*UserIDResult) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{7} + return fileDescriptor_friend_74b4824fb8c5de90, []int{7} } func (m *UserIDResult) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserIDResult.Unmarshal(m, b) @@ -428,7 +428,7 @@ func (m *ImportFriendResp) Reset() { *m = ImportFriendResp{} } func (m *ImportFriendResp) String() string { return proto.CompactTextString(m) } func (*ImportFriendResp) ProtoMessage() {} func (*ImportFriendResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{8} + return fileDescriptor_friend_74b4824fb8c5de90, []int{8} } func (m *ImportFriendResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ImportFriendResp.Unmarshal(m, b) @@ -473,7 +473,7 @@ func (m *GetFriendApplyListReq) Reset() { *m = GetFriendApplyListReq{} } func (m *GetFriendApplyListReq) String() string { return proto.CompactTextString(m) } func (*GetFriendApplyListReq) ProtoMessage() {} func (*GetFriendApplyListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{9} + return fileDescriptor_friend_74b4824fb8c5de90, []int{9} } func (m *GetFriendApplyListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendApplyListReq.Unmarshal(m, b) @@ -513,7 +513,7 @@ func (m *GetFriendApplyListResp) Reset() { *m = GetFriendApplyListResp{} func (m *GetFriendApplyListResp) String() string { return proto.CompactTextString(m) } func (*GetFriendApplyListResp) ProtoMessage() {} func (*GetFriendApplyListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{10} + return fileDescriptor_friend_74b4824fb8c5de90, []int{10} } func (m *GetFriendApplyListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendApplyListResp.Unmarshal(m, b) @@ -565,7 +565,7 @@ func (m *GetFriendListReq) Reset() { *m = GetFriendListReq{} } func (m *GetFriendListReq) String() string { return proto.CompactTextString(m) } func (*GetFriendListReq) ProtoMessage() {} func (*GetFriendListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{11} + return fileDescriptor_friend_74b4824fb8c5de90, []int{11} } func (m *GetFriendListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendListReq.Unmarshal(m, b) @@ -605,7 +605,7 @@ func (m *GetFriendListResp) Reset() { *m = GetFriendListResp{} } func (m *GetFriendListResp) String() string { return proto.CompactTextString(m) } func (*GetFriendListResp) ProtoMessage() {} func (*GetFriendListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{12} + return fileDescriptor_friend_74b4824fb8c5de90, []int{12} } func (m *GetFriendListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendListResp.Unmarshal(m, b) @@ -657,7 +657,7 @@ func (m *AddBlacklistReq) Reset() { *m = AddBlacklistReq{} } func (m *AddBlacklistReq) String() string { return proto.CompactTextString(m) } func (*AddBlacklistReq) ProtoMessage() {} func (*AddBlacklistReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{13} + return fileDescriptor_friend_74b4824fb8c5de90, []int{13} } func (m *AddBlacklistReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddBlacklistReq.Unmarshal(m, b) @@ -695,7 +695,7 @@ func (m *AddBlacklistResp) Reset() { *m = AddBlacklistResp{} } func (m *AddBlacklistResp) String() string { return proto.CompactTextString(m) } func (*AddBlacklistResp) ProtoMessage() {} func (*AddBlacklistResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{14} + return fileDescriptor_friend_74b4824fb8c5de90, []int{14} } func (m *AddBlacklistResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddBlacklistResp.Unmarshal(m, b) @@ -733,7 +733,7 @@ func (m *RemoveBlacklistReq) Reset() { *m = RemoveBlacklistReq{} } func (m *RemoveBlacklistReq) String() string { return proto.CompactTextString(m) } func (*RemoveBlacklistReq) ProtoMessage() {} func (*RemoveBlacklistReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{15} + return fileDescriptor_friend_74b4824fb8c5de90, []int{15} } func (m *RemoveBlacklistReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RemoveBlacklistReq.Unmarshal(m, b) @@ -771,7 +771,7 @@ func (m *RemoveBlacklistResp) Reset() { *m = RemoveBlacklistResp{} } func (m *RemoveBlacklistResp) String() string { return proto.CompactTextString(m) } func (*RemoveBlacklistResp) ProtoMessage() {} func (*RemoveBlacklistResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{16} + return fileDescriptor_friend_74b4824fb8c5de90, []int{16} } func (m *RemoveBlacklistResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RemoveBlacklistResp.Unmarshal(m, b) @@ -809,7 +809,7 @@ func (m *GetBlacklistReq) Reset() { *m = GetBlacklistReq{} } func (m *GetBlacklistReq) String() string { return proto.CompactTextString(m) } func (*GetBlacklistReq) ProtoMessage() {} func (*GetBlacklistReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{17} + return fileDescriptor_friend_74b4824fb8c5de90, []int{17} } func (m *GetBlacklistReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetBlacklistReq.Unmarshal(m, b) @@ -849,7 +849,7 @@ func (m *GetBlacklistResp) Reset() { *m = GetBlacklistResp{} } func (m *GetBlacklistResp) String() string { return proto.CompactTextString(m) } func (*GetBlacklistResp) ProtoMessage() {} func (*GetBlacklistResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{18} + return fileDescriptor_friend_74b4824fb8c5de90, []int{18} } func (m *GetBlacklistResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetBlacklistResp.Unmarshal(m, b) @@ -901,7 +901,7 @@ func (m *IsFriendReq) Reset() { *m = IsFriendReq{} } func (m *IsFriendReq) String() string { return proto.CompactTextString(m) } func (*IsFriendReq) ProtoMessage() {} func (*IsFriendReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{19} + return fileDescriptor_friend_74b4824fb8c5de90, []int{19} } func (m *IsFriendReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IsFriendReq.Unmarshal(m, b) @@ -941,7 +941,7 @@ func (m *IsFriendResp) Reset() { *m = IsFriendResp{} } func (m *IsFriendResp) String() string { return proto.CompactTextString(m) } func (*IsFriendResp) ProtoMessage() {} func (*IsFriendResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{20} + return fileDescriptor_friend_74b4824fb8c5de90, []int{20} } func (m *IsFriendResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IsFriendResp.Unmarshal(m, b) @@ -993,7 +993,7 @@ func (m *IsInBlackListReq) Reset() { *m = IsInBlackListReq{} } func (m *IsInBlackListReq) String() string { return proto.CompactTextString(m) } func (*IsInBlackListReq) ProtoMessage() {} func (*IsInBlackListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{21} + return fileDescriptor_friend_74b4824fb8c5de90, []int{21} } func (m *IsInBlackListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IsInBlackListReq.Unmarshal(m, b) @@ -1033,7 +1033,7 @@ func (m *IsInBlackListResp) Reset() { *m = IsInBlackListResp{} } func (m *IsInBlackListResp) String() string { return proto.CompactTextString(m) } func (*IsInBlackListResp) ProtoMessage() {} func (*IsInBlackListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{22} + return fileDescriptor_friend_74b4824fb8c5de90, []int{22} } func (m *IsInBlackListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IsInBlackListResp.Unmarshal(m, b) @@ -1085,7 +1085,7 @@ func (m *DeleteFriendReq) Reset() { *m = DeleteFriendReq{} } func (m *DeleteFriendReq) String() string { return proto.CompactTextString(m) } func (*DeleteFriendReq) ProtoMessage() {} func (*DeleteFriendReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{23} + return fileDescriptor_friend_74b4824fb8c5de90, []int{23} } func (m *DeleteFriendReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteFriendReq.Unmarshal(m, b) @@ -1123,7 +1123,7 @@ func (m *DeleteFriendResp) Reset() { *m = DeleteFriendResp{} } func (m *DeleteFriendResp) String() string { return proto.CompactTextString(m) } func (*DeleteFriendResp) ProtoMessage() {} func (*DeleteFriendResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{24} + return fileDescriptor_friend_74b4824fb8c5de90, []int{24} } func (m *DeleteFriendResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteFriendResp.Unmarshal(m, b) @@ -1153,7 +1153,7 @@ func (m *DeleteFriendResp) GetCommonResp() *CommonResp { // process type AddFriendResponseReq struct { CommID *CommID `protobuf:"bytes,1,opt,name=CommID" json:"CommID,omitempty"` - Flag int32 `protobuf:"varint,2,opt,name=flag" json:"flag,omitempty"` + HandleResult int32 `protobuf:"varint,2,opt,name=handleResult" json:"handleResult,omitempty"` HandleMsg string `protobuf:"bytes,3,opt,name=handleMsg" json:"handleMsg,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1164,7 +1164,7 @@ func (m *AddFriendResponseReq) Reset() { *m = AddFriendResponseReq{} } func (m *AddFriendResponseReq) String() string { return proto.CompactTextString(m) } func (*AddFriendResponseReq) ProtoMessage() {} func (*AddFriendResponseReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{25} + return fileDescriptor_friend_74b4824fb8c5de90, []int{25} } func (m *AddFriendResponseReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddFriendResponseReq.Unmarshal(m, b) @@ -1191,9 +1191,9 @@ func (m *AddFriendResponseReq) GetCommID() *CommID { return nil } -func (m *AddFriendResponseReq) GetFlag() int32 { +func (m *AddFriendResponseReq) GetHandleResult() int32 { if m != nil { - return m.Flag + return m.HandleResult } return 0 } @@ -1216,7 +1216,7 @@ func (m *AddFriendResponseResp) Reset() { *m = AddFriendResponseResp{} } func (m *AddFriendResponseResp) String() string { return proto.CompactTextString(m) } func (*AddFriendResponseResp) ProtoMessage() {} func (*AddFriendResponseResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{26} + return fileDescriptor_friend_74b4824fb8c5de90, []int{26} } func (m *AddFriendResponseResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddFriendResponseResp.Unmarshal(m, b) @@ -1255,7 +1255,7 @@ func (m *SetFriendRemarkReq) Reset() { *m = SetFriendRemarkReq{} } func (m *SetFriendRemarkReq) String() string { return proto.CompactTextString(m) } func (*SetFriendRemarkReq) ProtoMessage() {} func (*SetFriendRemarkReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{27} + return fileDescriptor_friend_74b4824fb8c5de90, []int{27} } func (m *SetFriendRemarkReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetFriendRemarkReq.Unmarshal(m, b) @@ -1300,7 +1300,7 @@ func (m *SetFriendRemarkResp) Reset() { *m = SetFriendRemarkResp{} } func (m *SetFriendRemarkResp) String() string { return proto.CompactTextString(m) } func (*SetFriendRemarkResp) ProtoMessage() {} func (*SetFriendRemarkResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{28} + return fileDescriptor_friend_74b4824fb8c5de90, []int{28} } func (m *SetFriendRemarkResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetFriendRemarkResp.Unmarshal(m, b) @@ -1338,7 +1338,7 @@ func (m *GetSelfApplyListReq) Reset() { *m = GetSelfApplyListReq{} } func (m *GetSelfApplyListReq) String() string { return proto.CompactTextString(m) } func (*GetSelfApplyListReq) ProtoMessage() {} func (*GetSelfApplyListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{29} + return fileDescriptor_friend_74b4824fb8c5de90, []int{29} } func (m *GetSelfApplyListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetSelfApplyListReq.Unmarshal(m, b) @@ -1378,7 +1378,7 @@ func (m *GetSelfApplyListResp) Reset() { *m = GetSelfApplyListResp{} } func (m *GetSelfApplyListResp) String() string { return proto.CompactTextString(m) } func (*GetSelfApplyListResp) ProtoMessage() {} func (*GetSelfApplyListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{30} + return fileDescriptor_friend_74b4824fb8c5de90, []int{30} } func (m *GetSelfApplyListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetSelfApplyListResp.Unmarshal(m, b) @@ -1923,68 +1923,68 @@ var _Friend_serviceDesc = grpc.ServiceDesc{ Metadata: "friend/friend.proto", } -func init() { proto.RegisterFile("friend/friend.proto", fileDescriptor_friend_33f7e79cb4454131) } +func init() { proto.RegisterFile("friend/friend.proto", fileDescriptor_friend_74b4824fb8c5de90) } -var fileDescriptor_friend_33f7e79cb4454131 = []byte{ - // 949 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xcd, 0x8f, 0xdb, 0x44, - 0x14, 0x97, 0x9b, 0xdd, 0x34, 0x79, 0x49, 0x9b, 0x64, 0x92, 0x2d, 0xc1, 0xdd, 0xad, 0x52, 0x1f, - 0x50, 0xc4, 0x21, 0x91, 0x82, 0x2a, 0xb1, 0x14, 0x0a, 0xe9, 0x26, 0x59, 0x19, 0xd8, 0xa6, 0x9a, - 0x2d, 0x17, 0x84, 0x14, 0xb9, 0xf5, 0x24, 0x58, 0x71, 0xec, 0xa9, 0xc7, 0xdb, 0x8a, 0x2b, 0x27, - 0x0e, 0x5c, 0x91, 0x10, 0x1c, 0xf8, 0x57, 0x91, 0x67, 0xec, 0x78, 0xfc, 0x91, 0x0a, 0x9b, 0x1e, - 0x7a, 0xb2, 0xdf, 0xc7, 0xef, 0xf9, 0x7d, 0xcd, 0x7b, 0x63, 0xe8, 0xae, 0x3d, 0x8b, 0x38, 0xe6, - 0x58, 0x3c, 0x46, 0xd4, 0x73, 0x7d, 0x17, 0x55, 0x05, 0xa5, 0x3e, 0x5c, 0x52, 0xe2, 0xac, 0xf4, - 0xab, 0x31, 0xdd, 0x6e, 0xc6, 0x5c, 0x34, 0x66, 0xe6, 0x76, 0xf5, 0x96, 0x8d, 0xdf, 0x32, 0xa1, - 0xaa, 0x3d, 0x01, 0xb8, 0x70, 0x77, 0x3b, 0xd7, 0xc1, 0x84, 0x51, 0xd4, 0x87, 0xdb, 0xc4, 0xf3, - 0x2e, 0x5c, 0x93, 0xf4, 0x95, 0x81, 0x32, 0x3c, 0xc6, 0x11, 0x89, 0xee, 0x41, 0x95, 0x78, 0xde, - 0x15, 0xdb, 0xf4, 0x6f, 0x0d, 0x94, 0x61, 0x1d, 0x87, 0x94, 0xf6, 0xab, 0x02, 0xd5, 0xc0, 0x80, - 0x3e, 0x43, 0x2a, 0xd4, 0x96, 0xf4, 0x07, 0x46, 0x3c, 0x7d, 0xc6, 0xd1, 0x75, 0xbc, 0xa7, 0xd1, - 0x00, 0x1a, 0x4b, 0x4a, 0x3c, 0xc3, 0xb7, 0x5c, 0x47, 0x9f, 0x85, 0x36, 0x64, 0x56, 0x80, 0x7e, - 0xe1, 0x86, 0xe8, 0x23, 0x81, 0x8e, 0x68, 0xf4, 0x00, 0x60, 0xe1, 0xb9, 0xbb, 0x50, 0x7a, 0xcc, - 0xa5, 0x12, 0x47, 0x7b, 0x0c, 0x9d, 0x4b, 0xe2, 0x2f, 0x78, 0xd0, 0x4c, 0x77, 0xd6, 0x2e, 0x26, - 0xaf, 0xd1, 0x27, 0x91, 0x63, 0xdc, 0x99, 0xc6, 0xe4, 0xee, 0x28, 0xcc, 0x91, 0xe0, 0xe2, 0x50, - 0xaa, 0xfd, 0xae, 0x48, 0x68, 0x01, 0x16, 0x99, 0x98, 0x27, 0x33, 0x31, 0x8f, 0x33, 0x31, 0x4f, - 0x64, 0x42, 0x50, 0x68, 0x0e, 0x77, 0x63, 0x1b, 0xdf, 0x5b, 0xcc, 0xef, 0x57, 0x06, 0x95, 0x61, - 0x63, 0x72, 0x36, 0x62, 0xc4, 0x7b, 0x43, 0xbc, 0x95, 0x41, 0xad, 0x15, 0x35, 0x3c, 0x63, 0xc7, - 0x46, 0xd2, 0xc7, 0x52, 0x20, 0xed, 0x19, 0x34, 0xa7, 0xa6, 0x29, 0x98, 0x05, 0xc2, 0x08, 0xdc, - 0xc2, 0xe4, 0xb5, 0xe4, 0x96, 0xa0, 0xb4, 0x0b, 0xb8, 0x23, 0xd9, 0x63, 0x14, 0x4d, 0xe4, 0x8a, - 0x87, 0x46, 0x91, 0x6c, 0x54, 0x48, 0xb0, 0xa4, 0xa5, 0xfd, 0xad, 0x40, 0x4b, 0xdf, 0x51, 0xd7, - 0xf3, 0x63, 0xc7, 0x3e, 0x85, 0xb6, 0x20, 0x44, 0x11, 0x78, 0xc4, 0xca, 0xa0, 0x32, 0xac, 0xe3, - 0x0c, 0xff, 0x3f, 0x94, 0x3f, 0x59, 0xe2, 0x4a, 0xba, 0xc4, 0x89, 0xe6, 0x3a, 0x4a, 0x36, 0x97, - 0xf6, 0x04, 0x9a, 0xe2, 0x0d, 0x13, 0x76, 0x63, 0xfb, 0x41, 0x2a, 0x12, 0x6d, 0x18, 0x52, 0x22, - 0x45, 0x81, 0x06, 0x77, 0xe0, 0x18, 0x87, 0x94, 0xf6, 0x9b, 0x02, 0xed, 0x64, 0x74, 0xe5, 0xd2, - 0x84, 0xbe, 0x81, 0xb6, 0xec, 0x08, 0x4f, 0xc9, 0x2d, 0xde, 0x04, 0xbd, 0x08, 0x29, 0xcb, 0x71, - 0x46, 0x5b, 0xfb, 0x1a, 0x4e, 0xf6, 0xbd, 0x38, 0xa5, 0xd4, 0xfe, 0x25, 0xe0, 0x16, 0xe9, 0xe6, - 0xbf, 0x14, 0xb8, 0x97, 0x67, 0xa1, 0x54, 0x4b, 0x3f, 0x83, 0xce, 0xbe, 0xde, 0x37, 0x84, 0xf9, - 0x52, 0x57, 0x0f, 0x0e, 0x76, 0x75, 0xa8, 0x8b, 0xb3, 0x50, 0xed, 0x0b, 0x68, 0xef, 0x7d, 0x2b, - 0x1a, 0x58, 0xe2, 0x98, 0xfe, 0x8f, 0x98, 0xde, 0xd3, 0x31, 0x3d, 0x87, 0xd6, 0xd4, 0x34, 0x9f, - 0xda, 0xc6, 0xab, 0xad, 0x5d, 0x30, 0x92, 0x05, 0xb4, 0x93, 0xd0, 0x92, 0x87, 0xf2, 0x4b, 0x40, - 0x98, 0xec, 0xdc, 0x37, 0xa4, 0x94, 0x17, 0x3a, 0x74, 0x33, 0xe8, 0x92, 0x8e, 0x9c, 0x43, 0xeb, - 0x92, 0xf8, 0xa5, 0xbc, 0xf8, 0x43, 0xe1, 0x2d, 0x91, 0xf4, 0xa1, 0x78, 0x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xd3, 0x92, 0x6e, 0xd8, 0x71, 0x80, 0xa9, - 0xbf, 0x8a, 0x38, 0xc0, 0xf4, 0x85, 0xfc, 0x69, 0xe7, 0xc7, 0xd6, 0x28, 0xfc, 0xcd, 0x7d, 0x2c, - 0x1e, 0x2f, 0xab, 0xfc, 0x1f, 0xf6, 0xb3, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x20, 0x88, 0xcd, - 0xd3, 0x05, 0x0f, 0x00, 0x00, +var fileDescriptor_friend_74b4824fb8c5de90 = []byte{ + // 950 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xcf, 0x8f, 0xdb, 0x44, + 0x14, 0x96, 0x9b, 0x6e, 0x9a, 0xbc, 0xa4, 0x4d, 0x32, 0xc9, 0x96, 0xe0, 0xee, 0x56, 0xa9, 0x0f, + 0x28, 0xe2, 0x90, 0x48, 0x41, 0x95, 0x58, 0x0a, 0x85, 0x74, 0x93, 0xac, 0x0c, 0x6c, 0x53, 0xcd, + 0x96, 0x0b, 0x42, 0x8a, 0xdc, 0x7a, 0x36, 0x58, 0x71, 0xec, 0xa9, 0xc7, 0xdb, 0x15, 0x37, 0xc4, + 0x89, 0x03, 0x57, 0x24, 0x04, 0x07, 0xfe, 0x55, 0x64, 0x8f, 0x1d, 0xcf, 0xd8, 0xce, 0x0a, 0x9b, + 0x3d, 0x70, 0xda, 0x7d, 0xef, 0xcd, 0xf7, 0xf2, 0x7e, 0xcd, 0xfb, 0xc6, 0xd0, 0xbd, 0xf4, 0x2c, + 0xe2, 0x98, 0x63, 0xfe, 0x67, 0x44, 0x3d, 0xd7, 0x77, 0x51, 0x95, 0x4b, 0xea, 0x93, 0x25, 0x25, + 0xce, 0x4a, 0x3f, 0x1f, 0xd3, 0xcd, 0x7a, 0x1c, 0x9a, 0xc6, 0xcc, 0xdc, 0xac, 0xae, 0xd9, 0xf8, + 0x9a, 0xf1, 0xa3, 0xda, 0x73, 0x80, 0x53, 0x77, 0xbb, 0x75, 0x1d, 0x4c, 0x18, 0x45, 0x7d, 0xb8, + 0x47, 0x3c, 0xef, 0xd4, 0x35, 0x49, 0x5f, 0x19, 0x28, 0xc3, 0x03, 0x1c, 0x8b, 0xe8, 0x21, 0x54, + 0x89, 0xe7, 0x9d, 0xb3, 0x75, 0xff, 0xce, 0x40, 0x19, 0xd6, 0x71, 0x24, 0x69, 0xbf, 0x28, 0x50, + 0x0d, 0x1c, 0xe8, 0x33, 0xa4, 0x42, 0x6d, 0x49, 0xbf, 0x63, 0xc4, 0xd3, 0x67, 0x21, 0xba, 0x8e, + 0x77, 0x32, 0x1a, 0x40, 0x63, 0x49, 0x89, 0x67, 0xf8, 0x96, 0xeb, 0xe8, 0xb3, 0xc8, 0x87, 0xa8, + 0x0a, 0xd0, 0xaf, 0xdd, 0x08, 0x7d, 0x97, 0xa3, 0x63, 0x19, 0x3d, 0x06, 0x58, 0x78, 0xee, 0x36, + 0xb2, 0x1e, 0x84, 0x56, 0x41, 0xa3, 0x3d, 0x83, 0xce, 0x19, 0xf1, 0x17, 0x61, 0xd2, 0x4c, 0x77, + 0x2e, 0x5d, 0x4c, 0xde, 0xa1, 0x8f, 0xe2, 0xc0, 0xc2, 0x60, 0x1a, 0x93, 0x07, 0xa3, 0xa8, 0x46, + 0x5c, 0x8b, 0x23, 0xab, 0xf6, 0x9b, 0x22, 0xa0, 0x39, 0x98, 0x57, 0x62, 0x2e, 0x57, 0x62, 0x9e, + 0x54, 0x62, 0x2e, 0x55, 0x82, 0x4b, 0x68, 0x0e, 0x0f, 0x12, 0x1f, 0xdf, 0x5a, 0xcc, 0xef, 0x57, + 0x06, 0x95, 0x61, 0x63, 0x72, 0x3c, 0x62, 0xc4, 0x7b, 0x4f, 0xbc, 0x95, 0x41, 0xad, 0x15, 0x35, + 0x3c, 0x63, 0xcb, 0x46, 0xc2, 0x8f, 0xa5, 0x40, 0xda, 0x4b, 0x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0x4c, 0x61, + 0x21, 0x26, 0x2e, 0x52, 0x1b, 0x36, 0x71, 0x91, 0xd9, 0x9f, 0xaf, 0xa0, 0x63, 0xa4, 0x17, 0x11, + 0x3a, 0xca, 0x9d, 0xd3, 0x68, 0x4b, 0xaa, 0xc7, 0x37, 0x58, 0x79, 0x83, 0x98, 0xbc, 0x37, 0x92, + 0x06, 0x65, 0xd7, 0x54, 0xd2, 0xa0, 0xbc, 0x65, 0x33, 0x85, 0xa6, 0x25, 0x3c, 0xb9, 0x93, 0x04, + 0x53, 0x9f, 0x19, 0x49, 0x82, 0xe9, 0x17, 0xfa, 0x8b, 0xce, 0xf7, 0xad, 0x51, 0xf4, 0xdd, 0xfb, + 0x8c, 0xff, 0x79, 0x53, 0x0d, 0x3f, 0x6a, 0x3f, 0xf9, 0x27, 0x00, 0x00, 0xff, 0xff, 0x26, 0xd5, + 0xdf, 0x90, 0x16, 0x0f, 0x00, 0x00, } diff --git a/pkg/proto/friend/friend.proto b/pkg/proto/friend/friend.proto index 1baf29c10..0050582d1 100644 --- a/pkg/proto/friend/friend.proto +++ b/pkg/proto/friend/friend.proto @@ -127,7 +127,7 @@ message DeleteFriendResp{ //process message AddFriendResponseReq{ CommID CommID = 1; - int32 flag = 2; + int32 handleResult = 2; string handleMsg = 3; } message AddFriendResponseResp{ diff --git a/pkg/proto/sdk_ws/ws.proto b/pkg/proto/sdk_ws/ws.proto index 5b235f5d8..ed7d7b739 100644 --- a/pkg/proto/sdk_ws/ws.proto +++ b/pkg/proto/sdk_ws/ws.proto @@ -223,27 +223,63 @@ message TipsComm{ } //////////////////////group///////////////////// -//Actively join the group -message MemberEnterTips{ - GroupInfo group = 1; - GroupMemberFullInfo entrantUser = 2; - int64 operationTime = 3; -} -//Actively leave the group -message MemberLeaveTips{ - GroupInfo group = 1; - GroupMemberFullInfo leaverUser = 2; - int64 operationTime = 3; -} -message MemberInvitedTips{ +// OnGroupCreated() +message GroupCreatedTips{ GroupInfo group = 1; - GroupMemberFullInfo opUser = 2; - repeated GroupMemberFullInfo invitedUserList = 3; + GroupMemberFullInfo creator = 2; + repeated GroupMemberFullInfo memberList = 3; int64 operationTime = 4; } +// OnGroupInfoSet() +message MemberInfoSetTips{ + GroupMemberFullInfo opUser = 1; //who do this + int64 muteTime = 2; + GroupInfo group = 3; +} + +// OnJoinGroupApplication() +message JoinGroupApplicationTips{ + GroupInfo group = 1; + PublicUserInfo applicant = 2; + string reason = 3; +} + +// OnQuitGroup() +//Actively leave the group +message MemberQuitTips{ + GroupInfo group = 1; + GroupMemberFullInfo quitUser = 2; + int64 operationTime = 3; +} + + +// OnApplicationGroupAccepted() +message GroupApplicationAcceptedTips{ + GroupInfo group = 1; + GroupMemberFullInfo opUser = 2; + string handleMsg = 4; +} + +// OnApplicationGroupRejected() +message GroupApplicationRejectedTips{ + GroupInfo group = 1; + GroupMemberFullInfo opUser = 2; + string handleMsg = 4; +} + +// OnTransferGroupOwner() +message GroupOwnerTransferredTips{ + GroupInfo group = 1; + GroupMemberFullInfo opUser = 2; + GroupMemberFullInfo newGroupOwner = 3; + int64 operationTime = 4; +} + + +// OnMemberKicked() message MemberKickedTips{ GroupInfo group = 1; GroupMemberFullInfo opUser = 2; @@ -251,21 +287,28 @@ message MemberKickedTips{ int64 operationTime = 4; } -message MemberInfoChangedTips{ - int32 changeType = 1; ///bitwise operators 0001:member info changed; 0010:mute ; - GroupMemberFullInfo opUser = 2; //who do this - GroupMemberFullInfo finalInfo = 3; // - int64 muteTime = 4; - GroupInfo group = 5; -} - -message GroupCreatedTips{ +// OnMemberInvited() +message MemberInvitedTips{ GroupInfo group = 1; - GroupMemberFullInfo creator = 2; - repeated GroupMemberFullInfo memberList = 3; + GroupMemberFullInfo opUser = 2; + repeated GroupMemberFullInfo invitedUserList = 3; int64 operationTime = 4; } +//Actively join the group +//message MemberEnterTips{ +// GroupInfo group = 1; +// GroupMemberFullInfo entrantUser = 2; +// int64 operationTime = 3; +//} + + + + + + + + message GroupInfoChangedTips{ int32 changedType = 1; //bitwise operators: 0001:groupName; 0010:Notification 0100:Introduction; 1000:FaceUrl GroupInfo group = 2; @@ -278,12 +321,10 @@ message JoinGroupApplicationTips{ string reason = 3; } -message ApplicationProcessedTips{ - GroupInfo group = 1; - GroupMemberFullInfo opUser = 2; - int32 result = 3; - string reason = 4; -} + + + + //////////////////////friend///////////////////// //message FriendInfo{ From a583a3122035f4b32598212f03507e85794c2b2d Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Sun, 16 Jan 2022 16:31:28 +0800 Subject: [PATCH 285/337] Refactor code --- internal/rpc/friend/firend.go | 101 +- internal/rpc/group/group.go | 63 +- internal/rpc/msg/friend_notification.go | 83 +- internal/rpc/msg/group_notification.go | 380 ++++--- pkg/common/constant/constant.go | 43 +- pkg/proto/sdk_ws/ws.pb.go | 1219 ++++++++++++----------- pkg/proto/sdk_ws/ws.proto | 48 +- 7 files changed, 1039 insertions(+), 898 deletions(-) diff --git a/internal/rpc/friend/firend.go b/internal/rpc/friend/firend.go index e7f2cf217..578118dfc 100644 --- a/internal/rpc/friend/firend.go +++ b/internal/rpc/friend/firend.go @@ -68,48 +68,6 @@ func (s *friendServer) Run() { } } -//// -//func (s *friendServer) GetFriendsInfo(ctx context.Context, req *pbFriend.GetFriendsInfoReq) (*pbFriend.GetFriendInfoResp, error) { -// return nil, nil -//// log.NewInfo(req.CommID.OperationID, "GetFriendsInfo args ", req.String()) -//// var ( -//// isInBlackList int32 -//// // isFriend int32 -//// comment string -//// ) -//// -//// friendShip, err := imdb.FindFriendRelationshipFromFriend(req.CommID.FromUserID, req.CommID.ToUserID) -//// if err != nil { -//// log.NewError(req.CommID.OperationID, "FindFriendRelationshipFromFriend failed ", err.Error()) -//// return &pbFriend.GetFriendInfoResp{ErrCode: constant.ErrSearchUserInfo.ErrCode, ErrMsg: constant.ErrSearchUserInfo.ErrMsg}, nil -//// // isFriend = constant.FriendFlag -//// } -//// comment = friendShip.Remark -//// -//// friendUserInfo, err := imdb.FindUserByUID(req.CommID.ToUserID) -//// if err != nil { -//// log.NewError(req.CommID.OperationID, "FindUserByUID failed ", err.Error()) -//// return &pbFriend.GetFriendInfoResp{ErrCode: constant.ErrSearchUserInfo.ErrCode, ErrMsg: constant.ErrSearchUserInfo.ErrMsg}, nil -//// } -//// -//// err = imdb.FindRelationshipFromBlackList(req.CommID.FromUserID, req.CommID.ToUserID) -//// if err == nil { -//// isInBlackList = constant.BlackListFlag -//// } -//// -//// resp := pbFriend.GetFriendInfoResp{ErrCode: 0, ErrMsg: "",} -//// -//// utils.CopyStructFields(resp.FriendInfoList, friendUserInfo) -//// resp.Data.IsBlack = isInBlackList -//// resp.Data.OwnerUserID = req.CommID.FromUserID -//// resp.Data.Remark = comment -//// resp.Data.CreateTime = friendUserInfo.CreateTime -//// -//// log.NewInfo(req.CommID.OperationID, "GetFriendsInfo ok ", resp) -//// return &resp, nil -//// -//} - func (s *friendServer) AddBlacklist(ctx context.Context, req *pbFriend.AddBlacklistReq) (*pbFriend.AddBlacklistResp, error) { log.NewInfo(req.CommID.OperationID, "AddBlacklist args ", req.String()) ok := token_verify.CheckAccess(req.CommID.OpUserID, req.CommID.FromUserID) @@ -153,7 +111,7 @@ func (s *friendServer) AddFriend(ctx context.Context, req *pbFriend.AddFriendReq return &pbFriend.AddFriendResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } - chat.FriendApplicationAddedNotification(req) + chat.FriendApplicationNotification(req) return &pbFriend.AddFriendResp{CommonResp: &pbFriend.CommonResp{}}, nil } @@ -235,7 +193,7 @@ func (s *friendServer) AddFriendResponse(ctx context.Context, req *pbFriend.AddF log.NewError(req.CommID.OperationID, "GetFriendApplicationByBothUserID failed ", err.Error(), req.CommID.ToUserID, req.CommID.FromUserID) return &pbFriend.AddFriendResponseResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } - friendRequest.HandleResult = req.Flag + friendRequest.HandleResult = req.HandleResult friendRequest.HandleTime = time.Now() //friendRequest.HandleTime.Unix() friendRequest.HandleMsg = req.HandleMsg @@ -247,7 +205,7 @@ func (s *friendServer) AddFriendResponse(ctx context.Context, req *pbFriend.AddF } //Change the status of the friend request form - if req.Flag == constant.FriendFlag { + if req.HandleResult == constant.FriendFlag { //Establish friendship after find friend relationship not exists _, err := imdb.GetFriendRelationshipFromFriend(req.CommID.FromUserID, req.CommID.ToUserID) if err == nil { @@ -275,8 +233,13 @@ 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) + if req.HandleResult == constant.FriendResponseAgree { + chat.FriendApplicationApprovedNotification(req) + } else if req.HandleResult == constant.FriendResponseRefuse { + chat.FriendApplicationRejectedNotification(req) + } else { + log.Error(req.CommID.OperationID, "HandleResult failed ", req.HandleResult) + } log.NewInfo(req.CommID.OperationID, "rpc AddFriendResponse ok") return &pbFriend.AddFriendResponseResp{CommonResp: &pbFriend.CommonResp{}}, nil } @@ -345,7 +308,7 @@ func (s *friendServer) SetFriendRemark(ctx context.Context, req *pbFriend.SetFri return &pbFriend.SetFriendRemarkResp{CommonResp: &pbFriend.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } log.NewInfo(req.CommID.OperationID, "rpc SetFriendComment ok") - chat.FriendInfoChangedNotification(req.CommID.OperationID, req.CommID.OpUserID, req.CommID.FromUserID, req.CommID.ToUserID) + chat.FriendRemarkSetNotification(req.CommID.OperationID, req.CommID.OpUserID, req.CommID.FromUserID, req.CommID.ToUserID) return &pbFriend.SetFriendRemarkResp{CommonResp: &pbFriend.CommonResp{}}, nil } @@ -507,3 +470,45 @@ func (s *friendServer) GetSelfApplyList(ctx context.Context, req *pbFriend.GetSe log.NewInfo(req.CommID.OperationID, "rpc GetSelfApplyList ok", pbFriend.GetSelfApplyListResp{FriendRequestList: selfApplyOtherUserList}) return &pbFriend.GetSelfApplyListResp{FriendRequestList: selfApplyOtherUserList}, nil } + +//// +//func (s *friendServer) GetFriendsInfo(ctx context.Context, req *pbFriend.GetFriendsInfoReq) (*pbFriend.GetFriendInfoResp, error) { +// return nil, nil +//// log.NewInfo(req.CommID.OperationID, "GetFriendsInfo args ", req.String()) +//// var ( +//// isInBlackList int32 +//// // isFriend int32 +//// comment string +//// ) +//// +//// friendShip, err := imdb.FindFriendRelationshipFromFriend(req.CommID.FromUserID, req.CommID.ToUserID) +//// if err != nil { +//// log.NewError(req.CommID.OperationID, "FindFriendRelationshipFromFriend failed ", err.Error()) +//// return &pbFriend.GetFriendInfoResp{ErrCode: constant.ErrSearchUserInfo.ErrCode, ErrMsg: constant.ErrSearchUserInfo.ErrMsg}, nil +//// // isFriend = constant.FriendFlag +//// } +//// comment = friendShip.Remark +//// +//// friendUserInfo, err := imdb.FindUserByUID(req.CommID.ToUserID) +//// if err != nil { +//// log.NewError(req.CommID.OperationID, "FindUserByUID failed ", err.Error()) +//// return &pbFriend.GetFriendInfoResp{ErrCode: constant.ErrSearchUserInfo.ErrCode, ErrMsg: constant.ErrSearchUserInfo.ErrMsg}, nil +//// } +//// +//// err = imdb.FindRelationshipFromBlackList(req.CommID.FromUserID, req.CommID.ToUserID) +//// if err == nil { +//// isInBlackList = constant.BlackListFlag +//// } +//// +//// resp := pbFriend.GetFriendInfoResp{ErrCode: 0, ErrMsg: "",} +//// +//// utils.CopyStructFields(resp.FriendInfoList, friendUserInfo) +//// resp.Data.IsBlack = isInBlackList +//// resp.Data.OwnerUserID = req.CommID.FromUserID +//// resp.Data.Remark = comment +//// resp.Data.CreateTime = friendUserInfo.CreateTime +//// +//// log.NewInfo(req.CommID.OperationID, "GetFriendsInfo ok ", resp) +//// return &resp, nil +//// +//} diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 767adba27..26de2bbd9 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -141,7 +141,6 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR resp.ErrMsg = constant.ErrDB.ErrMsg return resp, nil } - chat.GroupCreatedNotification(req.OperationID, req.OpUserID, groupId, okUserIDList) utils.CopyStructFields(resp.GroupInfo, group) resp.GroupInfo.MemberCount, err = imdb.GetGroupMemberNumByGroupID(groupId) if err != nil { @@ -153,6 +152,7 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR resp.GroupInfo.OwnerUserID = req.OwnerUserID log.NewInfo(req.OperationID, "rpc CreateGroup return ", resp.String()) + chat.GroupCreatedNotification(req.OperationID, req.OpUserID, groupId, okUserIDList) return resp, nil } @@ -420,7 +420,7 @@ func (s *groupServer) GetGroupApplicationList(_ context.Context, req *pbGroup.Ge } cp.GroupRequestDBCopyOpenIM(&node, &v) - cp.UserDBCopyOpenIMPublic(node.UserInfo, user) + cp.UserDBCopyOpenIMPublicUser(node.UserInfo, user) cp.GroupDBCopyOpenIM(node.GroupInfo, group) log.NewDebug(req.OperationID, "node ", node, "v ", v) resp.GroupRequestList = append(resp.GroupRequestList, &node) @@ -466,30 +466,33 @@ func (s *groupServer) GroupApplicationResponse(_ context.Context, req *pbGroup.G log.NewError(req.OperationID, "GroupApplicationResponse failed ", err.Error(), groupRequest) return &pbGroup.GroupApplicationResponseResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } - chat.ApplicationProcessedNotification(req) + if req.HandleResult == constant.GroupResponseAgree { - - if req.HandleResult == constant.GroupResponseAgree { - user, err := imdb.GetUserByUserID(req.FromUserID) - if err != nil { - log.NewError(req.OperationID, "GroupApplicationResponse failed ", err.Error(), req.FromUserID) - return &pbGroup.GroupApplicationResponseResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil - } - member := db.GroupMember{} - member.GroupID = req.GroupID - member.UserID = req.FromUserID - member.RoleLevel = constant.GroupOrdinaryUsers - member.OperatorUserID = req.OpUserID - member.FaceUrl = user.FaceUrl - member.Nickname = user.Nickname - - err = imdb.InsertIntoGroupMember(member) - if err != nil { - log.NewError(req.OperationID, "GroupApplicationResponse failed ", err.Error(), member) - return &pbGroup.GroupApplicationResponseResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil - } + user, err := imdb.GetUserByUserID(req.FromUserID) + if err != nil { + log.NewError(req.OperationID, "GroupApplicationResponse failed ", err.Error(), req.FromUserID) + return &pbGroup.GroupApplicationResponseResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } + member := db.GroupMember{} + member.GroupID = req.GroupID + member.UserID = req.FromUserID + member.RoleLevel = constant.GroupOrdinaryUsers + member.OperatorUserID = req.OpUserID + member.FaceUrl = user.FaceURL + member.Nickname = user.Nickname + + err = imdb.InsertIntoGroupMember(member) + if err != nil { + log.NewError(req.OperationID, "GroupApplicationResponse failed ", err.Error(), member) + return &pbGroup.GroupApplicationResponseResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil + } + chat.GroupApplicationAcceptedNotification(req) chat.MemberEnterNotification(req) + } else if req.HandleResult == constant.GroupResponseRefuse { + chat.GroupApplicationRejectedNotification(req) + } else { + log.Error(req.OperationID, "HandleResult failed ", req.HandleResult) + return &pbGroup.GroupApplicationResponseResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrArgs.ErrCode, ErrMsg: constant.ErrArgs.ErrMsg}}, nil } log.NewInfo(req.OperationID, "rpc GroupApplicationResponse return ", pbGroup.GroupApplicationResponseResp{CommonResp: &pbGroup.CommonResp{}}) @@ -521,7 +524,7 @@ func (s *groupServer) JoinGroup(ctx context.Context, req *pbGroup.JoinGroupReq) return &pbGroup.JoinGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""}}, nil } - chat.JoinApplicationNotification(req) + chat.JoinGroupApplicationNotification(req) log.NewInfo(req.OperationID, "ReceiveJoinApplicationNotification rpc return ") return &pbGroup.JoinGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""}}, nil @@ -547,7 +550,7 @@ func (s *groupServer) QuitGroup(ctx context.Context, req *pbGroup.QuitGroupReq) // return &pbGroup.CommonResp{ErrorCode: constant.ErrQuitGroup.ErrCode, ErrorMsg: constant.ErrQuitGroup.ErrMsg}, nil } - chat.MemberLeaveNotification(req) + chat.MemberQuitNotification(req) log.NewInfo(req.OperationID, "rpc QuitGroup return ", pbGroup.QuitGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""}}) return &pbGroup.QuitGroupResp{CommonResp: &pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""}}, nil } @@ -603,11 +606,10 @@ func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInf log.NewError(req.OperationID, "SetGroupInfo failed ", err.Error(), groupInfo) return &pbGroup.SetGroupInfoResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } - - if changedType != 0 { - chat.GroupInfoChangedNotification(req.OperationID, req.OpUserID, req.GroupInfo.GroupID, changedType) - } log.NewInfo(req.OperationID, "SetGroupInfo rpc return ", pbGroup.SetGroupInfoResp{CommonResp: &pbGroup.CommonResp{}}) + if changedType != 0 { + chat.GroupInfoSetNotification(req.OperationID, req.OpUserID, req.GroupInfo.GroupID) + } return &pbGroup.SetGroupInfoResp{CommonResp: &pbGroup.CommonResp{}}, nil } @@ -630,8 +632,7 @@ func (s *groupServer) TransferGroupOwner(_ context.Context, req *pbGroup.Transfe log.NewError(req.OperationID, "UpdateGroupMemberInfo failed ", groupMemberInfo) return &pbGroup.TransferGroupOwnerResp{CommonResp: &pbGroup.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}}, nil } - changedType := int32(1) << 4 - chat.GroupInfoChangedNotification(req.OperationID, req.OpUserID, req.GroupID, changedType) + chat.GroupOwnerTransferredNotification(req) return &pbGroup.TransferGroupOwnerResp{CommonResp: &pbGroup.CommonResp{ErrCode: 0, ErrMsg: ""}}, nil diff --git a/internal/rpc/msg/friend_notification.go b/internal/rpc/msg/friend_notification.go index 5e9017568..e1a6fd3ef 100644 --- a/internal/rpc/msg/friend_notification.go +++ b/internal/rpc/msg/friend_notification.go @@ -58,7 +58,7 @@ func friendNotification(commID *pbFriend.CommID, contentType int32, m proto.Mess } cn := config.Config.Notification switch contentType { - case constant.FriendApplicationAddedNotification: + case constant.FriendApplicationNotification: tips.DefaultTips = fromUserNickname + cn.FriendApplicationAdded.DefaultTips.Tips case constant.FriendApplicationApprovedNotification: @@ -69,7 +69,7 @@ func friendNotification(commID *pbFriend.CommID, contentType int32, m proto.Mess tips.DefaultTips = cn.FriendAdded.DefaultTips.Tips case constant.FriendDeletedNotification: tips.DefaultTips = cn.FriendDeleted.DefaultTips.Tips + toUserNickname - case constant.FriendInfoChangedNotification: + case constant.FriendRemarkSetNotification: tips.DefaultTips = fromUserNickname + cn.FriendInfoChanged.DefaultTips.Tips case constant.BlackAddedNotification: tips.DefaultTips = cn.BlackAdded.DefaultTips.Tips + toUserNickname @@ -95,12 +95,12 @@ func friendNotification(commID *pbFriend.CommID, contentType int32, m proto.Mess Notification(&n) } -func FriendApplicationAddedNotification(req *pbFriend.AddFriendReq) { +func FriendApplicationNotification(req *pbFriend.AddFriendReq) { log.Info(req.CommID.OperationID, utils.GetSelfFuncName(), "args: ", req.String()) var friendApplicationAddedTips open_im_sdk.FriendApplicationAddedTips friendApplicationAddedTips.FromToUserID.FromUserID = req.CommID.FromUserID friendApplicationAddedTips.FromToUserID.ToUserID = req.CommID.ToUserID - friendNotification(req.CommID, constant.FriendApplicationAddedNotification, &friendApplicationAddedTips) + friendNotification(req.CommID, constant.FriendApplicationNotification, &friendApplicationAddedTips) //fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) //if err != nil { // log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID) @@ -129,23 +129,18 @@ func FriendApplicationAddedNotification(req *pbFriend.AddFriendReq) { //Notification(&n) } -func FriendApplicationProcessedNotification(req *pbFriend.AddFriendResponseReq) { - var friendApplicationProcessedTips open_im_sdk.FriendApplicationProcessedTips - friendApplicationProcessedTips.FromToUserID.FromUserID = req.CommID.FromUserID - friendApplicationProcessedTips.FromToUserID.ToUserID = req.CommID.ToUserID - friendApplicationProcessedTips.HandleResult = req.HandleResult +func FriendApplicationApprovedNotification(req *pbFriend.AddFriendResponseReq) { + FriendApplicationApprovedTips := open_im_sdk.FriendApplicationApprovedTips{FromToUserID: &open_im_sdk.FromToUserID{}} + FriendApplicationApprovedTips.FromToUserID.FromUserID = req.CommID.FromUserID + FriendApplicationApprovedTips.FromToUserID.ToUserID = req.CommID.ToUserID + FriendApplicationApprovedTips.HandleMsg = req.HandleMsg //fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) //if err != nil { // log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID) // return //} - if friendApplicationProcessedTips.HandleResult == 1 { - friendNotification(req.CommID, constant.FriendApplicationApprovedNotification, &friendApplicationProcessedTips) - } else if friendApplicationProcessedTips.HandleResult == -1 { - friendNotification(req.CommID, constant.FriendApplicationRejectedNotification, &friendApplicationProcessedTips) - } else { - log.Error(req.CommID.OperationID, "HandleResult failed ", friendApplicationProcessedTips.HandleResult) - } + + friendNotification(req.CommID, constant.FriendApplicationApprovedNotification, &FriendApplicationApprovedTips) //var tips open_im_sdk.TipsComm //tips.DefaultTips = fromUserNickname + " FriendApplicationProcessedNotification " + toUserNickname @@ -170,6 +165,58 @@ func FriendApplicationProcessedNotification(req *pbFriend.AddFriendResponseReq) //Notification(&n) } +func FriendApplicationRejectedNotification(req *pbFriend.AddFriendResponseReq) { + FriendApplicationApprovedTips := open_im_sdk.FriendApplicationApprovedTips{FromToUserID: &open_im_sdk.FromToUserID{}} + FriendApplicationApprovedTips.FromToUserID.FromUserID = req.CommID.FromUserID + FriendApplicationApprovedTips.FromToUserID.ToUserID = req.CommID.ToUserID + FriendApplicationApprovedTips.HandleMsg = req.HandleMsg + + friendNotification(req.CommID, constant.FriendApplicationRejectedNotification, &FriendApplicationApprovedTips) +} + +// +// +//func FriendApplicationProcessedNotification(req *pbFriend.AddFriendResponseReq) { +// var friendApplicationProcessedTips open_im_sdk.FriendApplicationProcessedTips +// friendApplicationProcessedTips.FromToUserID.FromUserID = req.CommID.FromUserID +// friendApplicationProcessedTips.FromToUserID.ToUserID = req.CommID.ToUserID +// friendApplicationProcessedTips.HandleResult = req.HandleResult +// //fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) +// //if err != nil { +// // log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID) +// // return +// //} +// if friendApplicationProcessedTips.HandleResult == 1 { +// friendNotification(req.CommID, constant.FriendApplicationApprovedNotification, &friendApplicationProcessedTips) +// } else if friendApplicationProcessedTips.HandleResult == -1 { +// friendNotification(req.CommID, constant.FriendApplicationRejectedNotification, &friendApplicationProcessedTips) +// } else { +// log.Error(req.CommID.OperationID, "HandleResult failed ", friendApplicationProcessedTips.HandleResult) +// } +// +// //var tips open_im_sdk.TipsComm +// //tips.DefaultTips = fromUserNickname + " FriendApplicationProcessedNotification " + toUserNickname +// //tips.Detail, err = proto.Marshal(&friendApplicationProcessedTips) +// //if err != nil { +// // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), friendApplicationProcessedTips.String()) +// // return +// //} +// // +// //var n NotificationMsg +// //n.SendID = req.CommID.FromUserID +// //n.RecvID = req.CommID.ToUserID +// //n.ContentType = constant.FriendApplicationProcessedNotification +// //n.SessionType = constant.SingleChatType +// //n.MsgFrom = constant.SysMsgType +// //n.OperationID = req.CommID.OperationID +// //n.Content, err = proto.Marshal(&tips) +// //if err != nil { +// // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String()) +// // return +// //} +// //Notification(&n) +//} + func FriendAddedNotification(operationID, opUserID, fromUserID, toUserID string) { var friendAddedTips open_im_sdk.FriendAddedTips user, err := imdb.GetUserByUserID(opUserID) @@ -255,7 +302,7 @@ func FriendDeletedNotification(req *pbFriend.DeleteFriendReq) { // PublicUserInfo OpUser = 2; // uint64 OperationTime = 3; //} -func FriendInfoChangedNotification(operationID, opUserID, fromUserID, toUserID string) { +func FriendRemarkSetNotification(operationID, opUserID, fromUserID, toUserID string) { var friendInfoChangedTips open_im_sdk.FriendInfoChangedTips friendInfoChangedTips.FromToUserID.FromUserID = fromUserID friendInfoChangedTips.FromToUserID.ToUserID = toUserID @@ -265,7 +312,7 @@ func FriendInfoChangedNotification(operationID, opUserID, fromUserID, toUserID s // return //} commID := pbFriend.CommID{FromUserID: fromUserID, ToUserID: toUserID, OpUserID: opUserID, OperationID: operationID} - friendNotification(&commID, constant.FriendInfoChangedNotification, &friendInfoChangedTips) + friendNotification(&commID, constant.FriendRemarkSetNotification, &friendInfoChangedTips) //var tips open_im_sdk.TipsComm //tips.DefaultTips = fromUserNickname + " FriendDeletedNotification " + toUserNickname //tips.Detail, err = proto.Marshal(&friendInfoChangedTips) diff --git a/internal/rpc/msg/group_notification.go b/internal/rpc/msg/group_notification.go index a92d6d0c3..5893a9781 100644 --- a/internal/rpc/msg/group_notification.go +++ b/internal/rpc/msg/group_notification.go @@ -10,7 +10,7 @@ import ( pbGroup "Open_IM/pkg/proto/group" open_im_sdk "Open_IM/pkg/proto/sdk_ws" "Open_IM/pkg/utils" - "encoding/json" + "github.com/golang/protobuf/proto" ) //message GroupCreatedTips{ @@ -63,46 +63,114 @@ func setGroupMemberInfo(groupID, userID string, groupMemberInfo *open_im_sdk.Gro return nil } -//func setGroupPublicUserInfo(operationID, groupID, userID string, publicUserInfo *open_im_sdk.PublicUserInfo) { -// group, err := imdb.GetGroupMemberInfoByGroupIDAndUserID(groupID, userID) -// if err != nil { -// log.NewError(operationID, "FindGroupMemberInfoByGroupIdAndUserId failed ", err.Error(), groupID, userID) -// return -// } -// utils.CopyStructFields(publicUserInfo, group) -//} +func setGroupOwnerInfo(groupID string, groupMemberInfo *open_im_sdk.GroupMemberFullInfo) error { + groupMember, err := imdb.GetGroupOwnerInfoByGroupID(groupID) + if err != nil { + return utils.Wrap(err, "") + } + if err = utils2.GroupMemberDBCopyOpenIM(groupMemberInfo, groupMember); err != nil { + return utils.Wrap(err, "") + } + return nil +} + +func setPublicUserInfo(userID string, publicUserInfo *open_im_sdk.PublicUserInfo) error { + user, err := imdb.GetUserByUserID(userID) + if err != nil { + return utils.Wrap(err, "") + } + utils2.UserDBCopyOpenIMPublicUser(publicUserInfo, user) + return nil +} + +func groupNotification(contentType int32, m proto.Message, sendID, groupID, recvUserID, operationID string) { + log.Info(operationID, utils.GetSelfFuncName(), "args: ", contentType) + + var err error + var tips open_im_sdk.TipsComm + tips.Detail, err = proto.Marshal(m) + if err != nil { + log.Error(operationID, "Marshal failed ", err.Error(), m.String()) + return + } + + cn := config.Config.Notification + switch contentType { + case constant.GroupCreatedNotification: + tips.DefaultTips = cn.GroupCreated.DefaultTips.Tips + case constant.GroupInfoSetNotification: + case constant.JoinGroupApplicationNotification: + case constant.MemberQuitNotification: + case constant.GroupApplicationAcceptedNotification: + case constant.GroupApplicationRejectedNotification: + case constant.GroupOwnerTransferredNotification: + case constant.MemberKickedNotification: + case constant.MemberInvitedNotification: + default: + log.Error(operationID, "contentType failed ", contentType) + return + } + + var n NotificationMsg + n.SendID = sendID + if groupID != "" { + n.RecvID = groupID + n.SessionType = constant.GroupChatType + } else { + n.RecvID = recvUserID + n.SessionType = constant.SingleChatType + } + n.ContentType = contentType + n.OperationID = operationID + n.Content, err = proto.Marshal(&tips) + if err != nil { + log.Error(operationID, "Marshal failed ", err.Error(), tips.String()) + return + } + Notification(&n) +} //创建群后调用 func GroupCreatedNotification(operationID, opUserID, groupID string, initMemberList []string) { GroupCreatedTips := open_im_sdk.GroupCreatedTips{Group: &open_im_sdk.GroupInfo{}, - Creator: &open_im_sdk.GroupMemberFullInfo{}} - if err := setOpUserInfo(GroupCreatedTips.Creator.UserID, groupID, GroupCreatedTips.Creator); err != nil { - log.NewError(operationID, "setOpUserInfo failed ", err.Error(), GroupCreatedTips.Creator.UserID, groupID, GroupCreatedTips.Creator) + OpUser: &open_im_sdk.GroupMemberFullInfo{}, GroupOwnerUser: &open_im_sdk.GroupMemberFullInfo{}} + if err := setOpUserInfo(opUserID, groupID, GroupCreatedTips.OpUser); err != nil { + log.NewError(operationID, "setOpUserInfo failed ", err.Error(), opUserID, groupID, GroupCreatedTips.OpUser) return } err := setGroupInfo(groupID, GroupCreatedTips.Group) if err != nil { - log.NewError(operationID, "setGroupInfo failed ", groupID, GroupCreatedTips.Group) + log.Error(operationID, "setGroupInfo failed ", groupID, GroupCreatedTips.Group) + return + } + imdb.GetGroupOwnerInfoByGroupID(groupID) + if err := setGroupOwnerInfo(groupID, GroupCreatedTips.GroupOwnerUser); err != nil { + log.Error(operationID, "setGroupOwnerInfo failed", err.Error(), groupID) return } for _, v := range initMemberList { var groupMemberInfo open_im_sdk.GroupMemberFullInfo - setGroupMemberInfo(groupID, v, &groupMemberInfo) + if err := setGroupMemberInfo(groupID, v, &groupMemberInfo); err != nil { + log.Error(operationID, "setGroupMemberInfo failed ", err.Error(), groupID, v) + continue + } GroupCreatedTips.MemberList = append(GroupCreatedTips.MemberList, &groupMemberInfo) } - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(GroupCreatedTips) - tips.DefaultTips = config.Config.Notification.GroupCreated.DefaultTips.Tips - var n NotificationMsg - n.SendID = opUserID - n.RecvID = groupID - n.ContentType = constant.GroupCreatedNotification - n.SessionType = constant.GroupChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = operationID - n.Content, _ = json.Marshal(tips) - log.NewInfo(operationID, "Notification ", n) - Notification(&n) + groupNotification(constant.GroupCreatedNotification, &GroupCreatedTips, opUserID, groupID, "", operationID) +} + +//群信息改变后掉用 +func GroupInfoSetNotification(operationID, opUserID, groupID string) { + GroupInfoChangedTips := open_im_sdk.GroupInfoSetTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}} + if err := setGroupInfo(groupID, GroupInfoChangedTips.Group); err != nil { + log.Error(operationID, "setGroupInfo failed ", err.Error(), groupID) + return + } + if err := setOpUserInfo(opUserID, groupID, GroupInfoChangedTips.OpUser); err != nil { + log.Error(operationID, "setOpUserInfo failed ", err.Error(), opUserID, groupID) + return + } + groupNotification(constant.GroupInfoSetNotification, &GroupInfoChangedTips, opUserID, groupID, "", operationID) } //message ReceiveJoinApplicationTips{ @@ -114,44 +182,46 @@ func GroupCreatedNotification(operationID, opUserID, groupID string, initMemberL // OpUserID string `protobuf:"bytes,3,opt,name=OpUserID" json:"OpUserID,omitempty"` // OperationID string `protobuf:"bytes,4,opt,name=OperationID" json:"OperationID,omitempty"` //申请进群后调用 -func JoinApplicationNotification(req *pbGroup.JoinGroupReq) { +func JoinGroupApplicationNotification(req *pbGroup.JoinGroupReq) { JoinGroupApplicationTips := open_im_sdk.JoinGroupApplicationTips{Group: &open_im_sdk.GroupInfo{}, Applicant: &open_im_sdk.PublicUserInfo{}} err := setGroupInfo(req.GroupID, JoinGroupApplicationTips.Group) if err != nil { - log.NewError(req.OperationID, "setGroupInfo failed ", err.Error(), req.GroupID, JoinGroupApplicationTips.Group) + log.Error(req.OperationID, "setGroupInfo failed ", err.Error(), req.GroupID) return } - - apply, err := imdb.GetUserByUserID(req.OpUserID) - if err != nil { - log.NewError(req.OperationID, "FindUserByUID failed ", err.Error(), req.OpUserID) + if err = setPublicUserInfo(req.OpUserID, JoinGroupApplicationTips.Applicant); err != nil { + log.Error(req.OperationID, "setPublicUserInfo failed ", err.Error(), req.OpUserID) return } - utils.CopyStructFields(JoinGroupApplicationTips.Applicant, apply) - JoinGroupApplicationTips.Reason = req.ReqMessage + JoinGroupApplicationTips.ReqMsg = req.ReqMessage - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(JoinGroupApplicationTips) - tips.DefaultTips = "JoinGroupApplicationTips" - var n NotificationMsg - n.SendID = req.OpUserID - n.ContentType = constant.JoinApplicationNotification - n.SessionType = constant.SingleChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = req.OperationID - n.Content, _ = json.Marshal(tips) managerList, err := imdb.GetOwnerManagerByGroupID(req.GroupID) if err != nil { log.NewError(req.OperationID, "GetOwnerManagerByGroupId failed ", err.Error(), req.GroupID) return } for _, v := range managerList { - n.RecvID = v.UserID - log.NewInfo(req.OperationID, "Notification ", n) - Notification(&n) + groupNotification(constant.JoinGroupApplicationNotification, &JoinGroupApplicationTips, req.OpUserID, "", v.UserID, req.OperationID) + log.NewInfo(req.OperationID, "Notification ", v) } } +func MemberQuitNotification(req *pbGroup.QuitGroupReq) { + MemberQuitTips := open_im_sdk.MemberQuitTips{Group: &open_im_sdk.GroupInfo{}, QuitUser: &open_im_sdk.GroupMemberFullInfo{}} + if err := setGroupInfo(req.GroupID, MemberQuitTips.Group); err != nil { + log.Error(req.OperationID, "setGroupInfo failed ", err.Error(), req.GroupID) + return + } + if err := setOpUserInfo(req.OpUserID, req.GroupID, MemberQuitTips.QuitUser); err != nil { + log.Error(req.OperationID, "setOpUserInfo failed ", err.Error(), req.OpUserID, req.GroupID) + return + } + + groupNotification(constant.MemberQuitNotification, &MemberQuitTips, req.OpUserID, req.GroupID, "", req.OperationID) + groupNotification(constant.MemberQuitNotification, &MemberQuitTips, req.OpUserID, "", req.OpUserID, req.OperationID) + +} + //message ApplicationProcessedTips{ // GroupInfo Group = 1; // GroupMemberFullInfo OpUser = 2; @@ -159,70 +229,47 @@ func JoinApplicationNotification(req *pbGroup.JoinGroupReq) { // string Reason = 4; //} //处理进群请求后调用 -func ApplicationProcessedNotification(req *pbGroup.GroupApplicationResponseReq) { - ApplicationProcessedTips := open_im_sdk.ApplicationProcessedTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}} - if err := setGroupInfo(req.GroupID, ApplicationProcessedTips.Group); err != nil { - log.NewError(req.OperationID, "setGroupInfo failed ", err.Error(), req.GroupID, ApplicationProcessedTips.Group) +func GroupApplicationAcceptedNotification(req *pbGroup.GroupApplicationResponseReq) { + GroupApplicationAcceptedTips := open_im_sdk.GroupApplicationAcceptedTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}, HandleMsg: req.HandledMsg} + if err := setGroupInfo(req.GroupID, GroupApplicationAcceptedTips.Group); err != nil { + log.NewError(req.OperationID, "setGroupInfo failed ", err.Error(), req.GroupID, GroupApplicationAcceptedTips.Group) return } - if err := setOpUserInfo(req.OpUserID, req.GroupID, ApplicationProcessedTips.OpUser); err != nil { - log.Error(req.OperationID, "setOpUserInfo failed", req.OpUserID, req.GroupID, ApplicationProcessedTips.OpUser) + if err := setOpUserInfo(req.OpUserID, req.GroupID, GroupApplicationAcceptedTips.OpUser); err != nil { + log.Error(req.OperationID, "setOpUserInfo failed", req.OpUserID, req.GroupID, GroupApplicationAcceptedTips.OpUser) return } - ApplicationProcessedTips.Reason = req.HandledMsg - ApplicationProcessedTips.Result = req.HandleResult - - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(ApplicationProcessedTips) - tips.DefaultTips = "ApplicationProcessedNotification" - var n NotificationMsg - n.SendID = req.OpUserID - n.ContentType = constant.ApplicationProcessedNotification - n.SessionType = constant.SingleChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = req.OperationID - n.RecvID = req.FromUserID - n.Content, _ = json.Marshal(tips) - Notification(&n) + groupNotification(constant.GroupApplicationAcceptedNotification, &GroupApplicationAcceptedTips, req.OpUserID, "", req.FromUserID, req.OperationID) } -//message MemberInvitedTips{ -// GroupInfo Group = 1; -// GroupMemberFullInfo OpUser = 2; -// GroupMemberFullInfo InvitedUser = 3; -// uint64 OperationTime = 4; -//} -//被邀请进群后调用 -func MemberInvitedNotification(operationID, groupID, opUserID, reason string, invitedUserIDList []string) { - ApplicationProcessedTips := open_im_sdk.MemberInvitedTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}} - if err := setGroupInfo(groupID, ApplicationProcessedTips.Group); err != nil { - log.Error(operationID, "setGroupInfo failed ", err.Error(), groupID, ApplicationProcessedTips.Group) +func GroupApplicationRejectedNotification(req *pbGroup.GroupApplicationResponseReq) { + GroupApplicationRejectedTips := open_im_sdk.GroupApplicationRejectedTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}, HandleMsg: req.HandledMsg} + if err := setGroupInfo(req.GroupID, GroupApplicationRejectedTips.Group); err != nil { + log.NewError(req.OperationID, "setGroupInfo failed ", err.Error(), req.GroupID, GroupApplicationRejectedTips.Group) return } - if err := setOpUserInfo(opUserID, groupID, ApplicationProcessedTips.OpUser); err != nil { - log.Error(operationID, "setOpUserInfo failed ", err.Error(), opUserID, groupID, ApplicationProcessedTips.OpUser) + if err := setOpUserInfo(req.OpUserID, req.GroupID, GroupApplicationRejectedTips.OpUser); err != nil { + log.Error(req.OperationID, "setOpUserInfo failed", req.OpUserID, req.GroupID, GroupApplicationRejectedTips.OpUser) return } - for _, v := range invitedUserIDList { - var groupMemberInfo open_im_sdk.GroupMemberFullInfo - if err := setGroupMemberInfo(groupID, v, &groupMemberInfo); err != nil { - log.Error(operationID, "setGroupMemberInfo faield ", err.Error(), groupID) - continue - } - ApplicationProcessedTips.InvitedUserList = append(ApplicationProcessedTips.InvitedUserList, &groupMemberInfo) + groupNotification(constant.GroupApplicationRejectedNotification, &GroupApplicationRejectedTips, req.OpUserID, "", req.FromUserID, req.OperationID) +} + +func GroupOwnerTransferredNotification(req *pbGroup.TransferGroupOwnerReq) { + GroupOwnerTransferredTips := open_im_sdk.GroupOwnerTransferredTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}, NewGroupOwner: &open_im_sdk.GroupMemberFullInfo{}} + if err := setGroupInfo(req.GroupID, GroupOwnerTransferredTips.Group); err != nil { + log.NewError(req.OperationID, "setGroupInfo failed ", err.Error(), req.GroupID) + return } - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(ApplicationProcessedTips) - tips.DefaultTips = "MemberInvitedNotification" - var n NotificationMsg - n.SendID = opUserID - n.ContentType = constant.MemberInvitedNotification - n.SessionType = constant.GroupChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = operationID - n.Content, _ = json.Marshal(tips) - n.RecvID = groupID - Notification(&n) + if err := setOpUserInfo(req.OpUserID, req.GroupID, GroupOwnerTransferredTips.OpUser); err != nil { + log.Error(req.OperationID, "setOpUserInfo failed", req.OpUserID, req.GroupID) + return + } + if err := setGroupMemberInfo(req.GroupID, req.NewOwnerUserID, GroupOwnerTransferredTips.NewGroupOwner); err != nil { + log.Error(req.OperationID, "setGroupMemberInfo failed", req.GroupID, req.NewOwnerUserID) + return + } + groupNotification(constant.GroupOwnerTransferredNotification, &GroupOwnerTransferredTips, req.OpUserID, "", req.NewOwnerUserID, req.OperationID) } //message MemberKickedTips{ @@ -235,11 +282,11 @@ func MemberInvitedNotification(operationID, groupID, opUserID, reason string, in func MemberKickedNotification(req *pbGroup.KickGroupMemberReq, kickedUserIDList []string) { MemberKickedTips := open_im_sdk.MemberKickedTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}} if err := setGroupInfo(req.GroupID, MemberKickedTips.Group); err != nil { - log.Error(req.OperationID, "setGroupInfo failed ", err.Error(), req.GroupID, MemberKickedTips.Group) + log.Error(req.OperationID, "setGroupInfo failed ", err.Error(), req.GroupID) return } if err := setOpUserInfo(req.OpUserID, req.GroupID, MemberKickedTips.OpUser); err != nil { - log.Error(req.OperationID, "setOpUserInfo failed ", err.Error(), req.OpUserID, req.GroupID, MemberKickedTips.OpUser) + log.Error(req.OperationID, "setOpUserInfo failed ", err.Error(), req.OpUserID) return } for _, v := range kickedUserIDList { @@ -250,60 +297,48 @@ func MemberKickedNotification(req *pbGroup.KickGroupMemberReq, kickedUserIDList } MemberKickedTips.KickedUserList = append(MemberKickedTips.KickedUserList, &groupMemberInfo) } - - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(MemberKickedTips) - tips.DefaultTips = "MemberKickedNotification" - var n NotificationMsg - n.SendID = req.OpUserID - n.ContentType = constant.MemberKickedNotification - n.SessionType = constant.GroupChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = req.OperationID - n.Content, _ = json.Marshal(tips) - n.RecvID = req.GroupID - Notification(&n) + groupNotification(constant.MemberKickedNotification, &MemberKickedTips, req.OpUserID, req.GroupID, "", req.OperationID) for _, v := range kickedUserIDList { - m := n - m.SessionType = constant.SingleChatType - m.RecvID = v - Notification(&m) + groupNotification(constant.MemberKickedNotification, &MemberKickedTips, req.OpUserID, "", v, req.OperationID) } } +//message MemberInvitedTips{ +// GroupInfo Group = 1; +// GroupMemberFullInfo OpUser = 2; +// GroupMemberFullInfo InvitedUser = 3; +// uint64 OperationTime = 4; +//} +//被邀请进群后调用 +func MemberInvitedNotification(operationID, groupID, opUserID, reason string, invitedUserIDList []string) { + MemberInvitedTips := open_im_sdk.MemberInvitedTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}} + if err := setGroupInfo(groupID, MemberInvitedTips.Group); err != nil { + log.Error(operationID, "setGroupInfo failed ", err.Error(), groupID) + return + } + if err := setOpUserInfo(opUserID, groupID, MemberInvitedTips.OpUser); err != nil { + log.Error(operationID, "setOpUserInfo failed ", err.Error(), opUserID, groupID) + return + } + for _, v := range invitedUserIDList { + var groupMemberInfo open_im_sdk.GroupMemberFullInfo + if err := setGroupMemberInfo(groupID, v, &groupMemberInfo); err != nil { + log.Error(operationID, "setGroupMemberInfo failed ", err.Error(), groupID) + continue + } + MemberInvitedTips.InvitedUserList = append(MemberInvitedTips.InvitedUserList, &groupMemberInfo) + } + + groupNotification(constant.MemberInvitedNotification, &MemberInvitedTips, opUserID, groupID, "", operationID) +} + //message GroupInfoChangedTips{ // int32 ChangedType = 1; //bitwise operators: 1:groupName; 10:Notification 100:Introduction; 1000:FaceUrl // GroupInfo Group = 2; // GroupMemberFullInfo OpUser = 3; //} -//群信息改变后掉用 -func GroupInfoChangedNotification(operationID, opUserID, groupID string, changedType int32) { - GroupInfoChangedTips := open_im_sdk.GroupInfoChangedTips{Group: &open_im_sdk.GroupInfo{}, OpUser: &open_im_sdk.GroupMemberFullInfo{}} - if err := setGroupInfo(groupID, GroupInfoChangedTips.Group); err != nil { - log.Error(operationID, "setGroupInfo failed ", err.Error(), groupID, GroupInfoChangedTips.Group) - return - } - if err := setOpUserInfo(opUserID, groupID, GroupInfoChangedTips.OpUser); err != nil { - log.Error(operationID, "setOpUserInfo failed ", err.Error(), opUserID, groupID, GroupInfoChangedTips.OpUser) - return - } - GroupInfoChangedTips.ChangedType = changedType - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(GroupInfoChangedTips) - tips.DefaultTips = "GroupInfoChangedNotification" - var n NotificationMsg - n.SendID = opUserID - n.ContentType = constant.GroupInfoChangedNotification - n.SessionType = constant.GroupChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = operationID - n.Content, _ = json.Marshal(tips) - n.RecvID = groupID - Notification(&n) -} - //message MemberLeaveTips{ // GroupInfo Group = 1; // GroupMemberFullInfo LeaverUser = 2; @@ -311,35 +346,6 @@ func GroupInfoChangedNotification(operationID, opUserID, groupID string, changed //} //群成员退群后调用 -func MemberLeaveNotification(req *pbGroup.QuitGroupReq) { - MemberLeaveTips := open_im_sdk.MemberLeaveTips{Group: &open_im_sdk.GroupInfo{}, LeaverUser: &open_im_sdk.GroupMemberFullInfo{}} - if err := setGroupInfo(req.GroupID, MemberLeaveTips.Group); err != nil { - log.Error(req.OperationID, "setGroupInfo failed ", err.Error(), req.GroupID, MemberLeaveTips.Group) - return - } - if err := setOpUserInfo(req.OpUserID, req.GroupID, MemberLeaveTips.LeaverUser); err != nil { - log.Error(req.OperationID, "setOpUserInfo failed ", err.Error(), req.OpUserID, req.GroupID, MemberLeaveTips.LeaverUser) - return - } - - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(MemberLeaveTips) - tips.DefaultTips = "MemberLeaveNotification" - var n NotificationMsg - n.SendID = req.OpUserID - n.ContentType = constant.MemberLeaveNotification - n.SessionType = constant.GroupChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = req.OperationID - n.Content, _ = json.Marshal(tips) - n.RecvID = req.GroupID - Notification(&n) - - m := n - n.SessionType = constant.SingleChatType - n.RecvID = req.OpUserID - Notification(&m) -} //message MemberEnterTips{ // GroupInfo Group = 1; @@ -348,25 +354,15 @@ func MemberLeaveNotification(req *pbGroup.QuitGroupReq) { //} //群成员主动申请进群,管理员同意后调用, func MemberEnterNotification(req *pbGroup.GroupApplicationResponseReq) { - MemberLeaveTips := open_im_sdk.MemberEnterTips{Group: &open_im_sdk.GroupInfo{}, EntrantUser: &open_im_sdk.GroupMemberFullInfo{}} - if err := setGroupInfo(req.GroupID, MemberLeaveTips.Group); err != nil { - log.Error(req.OperationID, "setGroupInfo failed ", err.Error(), req.GroupID, MemberLeaveTips.Group) + MemberEnterTips := open_im_sdk.MemberEnterTips{Group: &open_im_sdk.GroupInfo{}, EntrantUser: &open_im_sdk.GroupMemberFullInfo{}} + if err := setGroupInfo(req.GroupID, MemberEnterTips.Group); err != nil { + log.Error(req.OperationID, "setGroupInfo failed ", err.Error(), req.GroupID, MemberEnterTips.Group) return } - if err := setOpUserInfo(req.OpUserID, req.GroupID, MemberLeaveTips.EntrantUser); err != nil { - log.Error(req.OperationID, "setOpUserInfo failed ", err.Error(), req.OpUserID, req.GroupID, MemberLeaveTips.EntrantUser) + if err := setOpUserInfo(req.OpUserID, req.GroupID, MemberEnterTips.EntrantUser); err != nil { + log.Error(req.OperationID, "setOpUserInfo failed ", err.Error(), req.OpUserID, req.GroupID, MemberEnterTips.EntrantUser) return } - var tips open_im_sdk.TipsComm - tips.Detail, _ = json.Marshal(MemberLeaveTips) - tips.DefaultTips = "MemberEnterNotification" - var n NotificationMsg - n.SendID = req.OpUserID - n.ContentType = constant.MemberEnterNotification - n.SessionType = constant.GroupChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = req.OperationID - n.Content, _ = json.Marshal(tips) - n.RecvID = req.GroupID - Notification(&n) + groupNotification(constant.MemberEnterNotification, &MemberEnterTips, req.OpUserID, req.GroupID, "", req.OperationID) + } diff --git a/pkg/common/constant/constant.go b/pkg/common/constant/constant.go index d8c3ba66d..532aef20f 100644 --- a/pkg/common/constant/constant.go +++ b/pkg/common/constant/constant.go @@ -46,35 +46,27 @@ const ( //SysRelated - FriendApplicationApprovedNotification = 1201 - FriendApplicationRejectedNotification = 1202 - FriendApplicationAddedNotification = 1203 //AddFriendTip = 202 + FriendApplicationApprovedNotification = 1201 //add_friend_response + FriendApplicationRejectedNotification = 1202 //add_friend_response + FriendApplicationNotification = 1203 //add_friend FriendAddedNotification = 1204 - FriendDeletedNotification = 1205 - FriendInfoChangedNotification = 1206 - BlackAddedNotification = 1207 - BlackDeletedNotification = 1208 + FriendDeletedNotification = 1205 //delete_friend + FriendRemarkSetNotification = 1206 //set_friend_remark? + BlackAddedNotification = 1207 //add_black + BlackDeletedNotification = 1208 //remove_black SelfInfoUpdatedNotification = 1303 //SetSelfInfoTip = 204 GroupCreatedNotification = 1501 - MemberInfoSetNotification = 1501 - JoinGroupApplicationNotification = 1501 - MemberQuitNotification = 1501 - GroupApplicationAcceptedNotification = 1501 - GroupApplicationRejectedNotification = 1501 - GroupOwnerTransferredNotification = 1501 - MemberKickedNotification = 1501 - MemberInvitedNotification = 1501 - - //GroupCreatedNotification = 1501 - //JoinApplicationNotification = 1502 - //ApplicationProcessedNotification = 1503 - //MemberInvitedNotification = 1504 - //MemberKickedNotification = 1505 - //GroupInfoChangedNotification = 1506 - //MemberLeaveNotification = 1507 - //MemberEnterNotification = 1508 + GroupInfoSetNotification = 1502 + JoinGroupApplicationNotification = 1503 + MemberQuitNotification = 1504 + GroupApplicationAcceptedNotification = 1505 + GroupApplicationRejectedNotification = 1506 + GroupOwnerTransferredNotification = 1507 + MemberKickedNotification = 1508 + MemberInvitedNotification = 1509 + MemberEnterNotification = 1510 //MsgFrom UserMsgType = 100 @@ -140,6 +132,9 @@ const ( GroupResponseAgree = 1 GroupResponseRefuse = -1 + FriendResponseAgree = 1 + FriendResponseRefuse = -1 + Male = 1 Female = 2 ) diff --git a/pkg/proto/sdk_ws/ws.pb.go b/pkg/proto/sdk_ws/ws.pb.go index 935b15cee..5fa6688bd 100644 --- a/pkg/proto/sdk_ws/ws.pb.go +++ b/pkg/proto/sdk_ws/ws.pb.go @@ -40,7 +40,7 @@ func (m *GroupInfo) Reset() { *m = GroupInfo{} } func (m *GroupInfo) String() string { return proto.CompactTextString(m) } func (*GroupInfo) ProtoMessage() {} func (*GroupInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1c8466de999dbc0c, []int{0} + return fileDescriptor_ws_4239643aeea36936, []int{0} } func (m *GroupInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfo.Unmarshal(m, b) @@ -164,7 +164,7 @@ func (m *GroupMemberFullInfo) Reset() { *m = GroupMemberFullInfo{} } func (m *GroupMemberFullInfo) String() string { return proto.CompactTextString(m) } func (*GroupMemberFullInfo) ProtoMessage() {} func (*GroupMemberFullInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1c8466de999dbc0c, []int{1} + return fileDescriptor_ws_4239643aeea36936, []int{1} } func (m *GroupMemberFullInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupMemberFullInfo.Unmarshal(m, b) @@ -269,7 +269,7 @@ func (m *PublicUserInfo) Reset() { *m = PublicUserInfo{} } func (m *PublicUserInfo) String() string { return proto.CompactTextString(m) } func (*PublicUserInfo) ProtoMessage() {} func (*PublicUserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1c8466de999dbc0c, []int{2} + return fileDescriptor_ws_4239643aeea36936, []int{2} } func (m *PublicUserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PublicUserInfo.Unmarshal(m, b) @@ -344,7 +344,7 @@ func (m *UserInfo) Reset() { *m = UserInfo{} } func (m *UserInfo) String() string { return proto.CompactTextString(m) } func (*UserInfo) ProtoMessage() {} func (*UserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1c8466de999dbc0c, []int{3} + return fileDescriptor_ws_4239643aeea36936, []int{3} } func (m *UserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserInfo.Unmarshal(m, b) @@ -451,7 +451,7 @@ func (m *FriendInfo) Reset() { *m = FriendInfo{} } func (m *FriendInfo) String() string { return proto.CompactTextString(m) } func (*FriendInfo) ProtoMessage() {} func (*FriendInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1c8466de999dbc0c, []int{4} + return fileDescriptor_ws_4239643aeea36936, []int{4} } func (m *FriendInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfo.Unmarshal(m, b) @@ -536,7 +536,7 @@ func (m *BlackInfo) Reset() { *m = BlackInfo{} } func (m *BlackInfo) String() string { return proto.CompactTextString(m) } func (*BlackInfo) ProtoMessage() {} func (*BlackInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1c8466de999dbc0c, []int{5} + return fileDescriptor_ws_4239643aeea36936, []int{5} } func (m *BlackInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackInfo.Unmarshal(m, b) @@ -617,7 +617,7 @@ func (m *GroupRequest) Reset() { *m = GroupRequest{} } func (m *GroupRequest) String() string { return proto.CompactTextString(m) } func (*GroupRequest) ProtoMessage() {} func (*GroupRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1c8466de999dbc0c, []int{6} + return fileDescriptor_ws_4239643aeea36936, []int{6} } func (m *GroupRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupRequest.Unmarshal(m, b) @@ -725,7 +725,7 @@ func (m *FriendRequest) Reset() { *m = FriendRequest{} } func (m *FriendRequest) String() string { return proto.CompactTextString(m) } func (*FriendRequest) ProtoMessage() {} func (*FriendRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1c8466de999dbc0c, []int{7} + return fileDescriptor_ws_4239643aeea36936, []int{7} } func (m *FriendRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendRequest.Unmarshal(m, b) @@ -866,7 +866,7 @@ func (m *PullMessageBySeqListResp) Reset() { *m = PullMessageBySeqListRe func (m *PullMessageBySeqListResp) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListResp) ProtoMessage() {} func (*PullMessageBySeqListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1c8466de999dbc0c, []int{8} + return fileDescriptor_ws_4239643aeea36936, []int{8} } func (m *PullMessageBySeqListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListResp.Unmarshal(m, b) @@ -941,7 +941,7 @@ func (m *PullMessageBySeqListReq) Reset() { *m = PullMessageBySeqListReq func (m *PullMessageBySeqListReq) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListReq) ProtoMessage() {} func (*PullMessageBySeqListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1c8466de999dbc0c, []int{9} + return fileDescriptor_ws_4239643aeea36936, []int{9} } func (m *PullMessageBySeqListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListReq.Unmarshal(m, b) @@ -996,7 +996,7 @@ func (m *PullMessageReq) Reset() { *m = PullMessageReq{} } func (m *PullMessageReq) String() string { return proto.CompactTextString(m) } func (*PullMessageReq) ProtoMessage() {} func (*PullMessageReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1c8466de999dbc0c, []int{10} + return fileDescriptor_ws_4239643aeea36936, []int{10} } func (m *PullMessageReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageReq.Unmarshal(m, b) @@ -1060,7 +1060,7 @@ func (m *PullMessageResp) Reset() { *m = PullMessageResp{} } func (m *PullMessageResp) String() string { return proto.CompactTextString(m) } func (*PullMessageResp) ProtoMessage() {} func (*PullMessageResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1c8466de999dbc0c, []int{11} + return fileDescriptor_ws_4239643aeea36936, []int{11} } func (m *PullMessageResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageResp.Unmarshal(m, b) @@ -1132,7 +1132,7 @@ func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} } func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqReq) ProtoMessage() {} func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1c8466de999dbc0c, []int{12} + return fileDescriptor_ws_4239643aeea36936, []int{12} } func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) @@ -1164,7 +1164,7 @@ func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} } func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqResp) ProtoMessage() {} func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1c8466de999dbc0c, []int{13} + return fileDescriptor_ws_4239643aeea36936, []int{13} } func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) @@ -1212,7 +1212,7 @@ func (m *GatherFormat) Reset() { *m = GatherFormat{} } func (m *GatherFormat) String() string { return proto.CompactTextString(m) } func (*GatherFormat) ProtoMessage() {} func (*GatherFormat) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1c8466de999dbc0c, []int{14} + return fileDescriptor_ws_4239643aeea36936, []int{14} } func (m *GatherFormat) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GatherFormat.Unmarshal(m, b) @@ -1259,7 +1259,7 @@ func (m *UserSendMsgResp) Reset() { *m = UserSendMsgResp{} } func (m *UserSendMsgResp) String() string { return proto.CompactTextString(m) } func (*UserSendMsgResp) ProtoMessage() {} func (*UserSendMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1c8466de999dbc0c, []int{15} + return fileDescriptor_ws_4239643aeea36936, []int{15} } func (m *UserSendMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserSendMsgResp.Unmarshal(m, b) @@ -1328,7 +1328,7 @@ func (m *MsgData) Reset() { *m = MsgData{} } func (m *MsgData) String() string { return proto.CompactTextString(m) } func (*MsgData) ProtoMessage() {} func (*MsgData) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1c8466de999dbc0c, []int{16} + return fileDescriptor_ws_4239643aeea36936, []int{16} } func (m *MsgData) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgData.Unmarshal(m, b) @@ -1489,7 +1489,7 @@ func (m *OfflinePushInfo) Reset() { *m = OfflinePushInfo{} } func (m *OfflinePushInfo) String() string { return proto.CompactTextString(m) } func (*OfflinePushInfo) ProtoMessage() {} func (*OfflinePushInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1c8466de999dbc0c, []int{17} + return fileDescriptor_ws_4239643aeea36936, []int{17} } func (m *OfflinePushInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OfflinePushInfo.Unmarshal(m, b) @@ -1556,7 +1556,7 @@ func (m *TipsComm) Reset() { *m = TipsComm{} } func (m *TipsComm) String() string { return proto.CompactTextString(m) } func (*TipsComm) ProtoMessage() {} func (*TipsComm) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1c8466de999dbc0c, []int{18} + return fileDescriptor_ws_4239643aeea36936, []int{18} } func (m *TipsComm) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TipsComm.Unmarshal(m, b) @@ -1590,179 +1590,417 @@ func (m *TipsComm) GetDefaultTips() string { return "" } -// ////////////////////group///////////////////// -// Actively join the group -type MemberEnterTips struct { - Group *GroupInfo `protobuf:"bytes,1,opt,name=group" json:"group,omitempty"` - EntrantUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=entrantUser" json:"entrantUser,omitempty"` - OperationTime int64 `protobuf:"varint,3,opt,name=operationTime" json:"operationTime,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MemberEnterTips) Reset() { *m = MemberEnterTips{} } -func (m *MemberEnterTips) String() string { return proto.CompactTextString(m) } -func (*MemberEnterTips) ProtoMessage() {} -func (*MemberEnterTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1c8466de999dbc0c, []int{19} -} -func (m *MemberEnterTips) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_MemberEnterTips.Unmarshal(m, b) -} -func (m *MemberEnterTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_MemberEnterTips.Marshal(b, m, deterministic) -} -func (dst *MemberEnterTips) XXX_Merge(src proto.Message) { - xxx_messageInfo_MemberEnterTips.Merge(dst, src) -} -func (m *MemberEnterTips) XXX_Size() int { - return xxx_messageInfo_MemberEnterTips.Size(m) -} -func (m *MemberEnterTips) XXX_DiscardUnknown() { - xxx_messageInfo_MemberEnterTips.DiscardUnknown(m) -} - -var xxx_messageInfo_MemberEnterTips proto.InternalMessageInfo - -func (m *MemberEnterTips) GetGroup() *GroupInfo { - if m != nil { - return m.Group - } - return nil -} - -func (m *MemberEnterTips) GetEntrantUser() *GroupMemberFullInfo { - if m != nil { - return m.EntrantUser - } - return nil -} - -func (m *MemberEnterTips) GetOperationTime() int64 { - if m != nil { - return m.OperationTime - } - return 0 -} - -// Actively leave the group -type MemberLeaveTips struct { - Group *GroupInfo `protobuf:"bytes,1,opt,name=group" json:"group,omitempty"` - LeaverUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=leaverUser" json:"leaverUser,omitempty"` - OperationTime int64 `protobuf:"varint,3,opt,name=operationTime" json:"operationTime,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MemberLeaveTips) Reset() { *m = MemberLeaveTips{} } -func (m *MemberLeaveTips) String() string { return proto.CompactTextString(m) } -func (*MemberLeaveTips) ProtoMessage() {} -func (*MemberLeaveTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1c8466de999dbc0c, []int{20} -} -func (m *MemberLeaveTips) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_MemberLeaveTips.Unmarshal(m, b) -} -func (m *MemberLeaveTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_MemberLeaveTips.Marshal(b, m, deterministic) -} -func (dst *MemberLeaveTips) XXX_Merge(src proto.Message) { - xxx_messageInfo_MemberLeaveTips.Merge(dst, src) -} -func (m *MemberLeaveTips) XXX_Size() int { - return xxx_messageInfo_MemberLeaveTips.Size(m) -} -func (m *MemberLeaveTips) XXX_DiscardUnknown() { - xxx_messageInfo_MemberLeaveTips.DiscardUnknown(m) -} - -var xxx_messageInfo_MemberLeaveTips proto.InternalMessageInfo - -func (m *MemberLeaveTips) GetGroup() *GroupInfo { - if m != nil { - return m.Group - } - return nil -} - -func (m *MemberLeaveTips) GetLeaverUser() *GroupMemberFullInfo { - if m != nil { - return m.LeaverUser - } - return nil -} - -func (m *MemberLeaveTips) GetOperationTime() int64 { - if m != nil { - return m.OperationTime - } - return 0 -} - -type MemberInvitedTips struct { +// OnGroupCreated() +type GroupCreatedTips struct { Group *GroupInfo `protobuf:"bytes,1,opt,name=group" json:"group,omitempty"` OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser" json:"opUser,omitempty"` - InvitedUserList []*GroupMemberFullInfo `protobuf:"bytes,3,rep,name=invitedUserList" json:"invitedUserList,omitempty"` + MemberList []*GroupMemberFullInfo `protobuf:"bytes,3,rep,name=memberList" json:"memberList,omitempty"` OperationTime int64 `protobuf:"varint,4,opt,name=operationTime" json:"operationTime,omitempty"` + GroupOwnerUser *GroupMemberFullInfo `protobuf:"bytes,5,opt,name=groupOwnerUser" json:"groupOwnerUser,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *MemberInvitedTips) Reset() { *m = MemberInvitedTips{} } -func (m *MemberInvitedTips) String() string { return proto.CompactTextString(m) } -func (*MemberInvitedTips) ProtoMessage() {} -func (*MemberInvitedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1c8466de999dbc0c, []int{21} +func (m *GroupCreatedTips) Reset() { *m = GroupCreatedTips{} } +func (m *GroupCreatedTips) String() string { return proto.CompactTextString(m) } +func (*GroupCreatedTips) ProtoMessage() {} +func (*GroupCreatedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_4239643aeea36936, []int{19} } -func (m *MemberInvitedTips) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_MemberInvitedTips.Unmarshal(m, b) +func (m *GroupCreatedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupCreatedTips.Unmarshal(m, b) } -func (m *MemberInvitedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_MemberInvitedTips.Marshal(b, m, deterministic) +func (m *GroupCreatedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupCreatedTips.Marshal(b, m, deterministic) } -func (dst *MemberInvitedTips) XXX_Merge(src proto.Message) { - xxx_messageInfo_MemberInvitedTips.Merge(dst, src) +func (dst *GroupCreatedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupCreatedTips.Merge(dst, src) } -func (m *MemberInvitedTips) XXX_Size() int { - return xxx_messageInfo_MemberInvitedTips.Size(m) +func (m *GroupCreatedTips) XXX_Size() int { + return xxx_messageInfo_GroupCreatedTips.Size(m) } -func (m *MemberInvitedTips) XXX_DiscardUnknown() { - xxx_messageInfo_MemberInvitedTips.DiscardUnknown(m) +func (m *GroupCreatedTips) XXX_DiscardUnknown() { + xxx_messageInfo_GroupCreatedTips.DiscardUnknown(m) } -var xxx_messageInfo_MemberInvitedTips proto.InternalMessageInfo +var xxx_messageInfo_GroupCreatedTips proto.InternalMessageInfo -func (m *MemberInvitedTips) GetGroup() *GroupInfo { +func (m *GroupCreatedTips) GetGroup() *GroupInfo { if m != nil { return m.Group } return nil } -func (m *MemberInvitedTips) GetOpUser() *GroupMemberFullInfo { +func (m *GroupCreatedTips) GetOpUser() *GroupMemberFullInfo { if m != nil { return m.OpUser } return nil } -func (m *MemberInvitedTips) GetInvitedUserList() []*GroupMemberFullInfo { +func (m *GroupCreatedTips) GetMemberList() []*GroupMemberFullInfo { if m != nil { - return m.InvitedUserList + return m.MemberList } return nil } -func (m *MemberInvitedTips) GetOperationTime() int64 { +func (m *GroupCreatedTips) GetOperationTime() int64 { if m != nil { return m.OperationTime } return 0 } +func (m *GroupCreatedTips) GetGroupOwnerUser() *GroupMemberFullInfo { + if m != nil { + return m.GroupOwnerUser + } + return nil +} + +// OnGroupInfoSet() +type GroupInfoSetTips struct { + OpUser *GroupMemberFullInfo `protobuf:"bytes,1,opt,name=opUser" json:"opUser,omitempty"` + MuteTime int64 `protobuf:"varint,2,opt,name=muteTime" json:"muteTime,omitempty"` + Group *GroupInfo `protobuf:"bytes,3,opt,name=group" json:"group,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GroupInfoSetTips) Reset() { *m = GroupInfoSetTips{} } +func (m *GroupInfoSetTips) String() string { return proto.CompactTextString(m) } +func (*GroupInfoSetTips) ProtoMessage() {} +func (*GroupInfoSetTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_4239643aeea36936, []int{20} +} +func (m *GroupInfoSetTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupInfoSetTips.Unmarshal(m, b) +} +func (m *GroupInfoSetTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupInfoSetTips.Marshal(b, m, deterministic) +} +func (dst *GroupInfoSetTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupInfoSetTips.Merge(dst, src) +} +func (m *GroupInfoSetTips) XXX_Size() int { + return xxx_messageInfo_GroupInfoSetTips.Size(m) +} +func (m *GroupInfoSetTips) XXX_DiscardUnknown() { + xxx_messageInfo_GroupInfoSetTips.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupInfoSetTips proto.InternalMessageInfo + +func (m *GroupInfoSetTips) GetOpUser() *GroupMemberFullInfo { + if m != nil { + return m.OpUser + } + return nil +} + +func (m *GroupInfoSetTips) GetMuteTime() int64 { + if m != nil { + return m.MuteTime + } + return 0 +} + +func (m *GroupInfoSetTips) GetGroup() *GroupInfo { + if m != nil { + return m.Group + } + return nil +} + +// OnJoinGroupApplication() +type JoinGroupApplicationTips struct { + Group *GroupInfo `protobuf:"bytes,1,opt,name=group" json:"group,omitempty"` + Applicant *PublicUserInfo `protobuf:"bytes,2,opt,name=applicant" json:"applicant,omitempty"` + ReqMsg string `protobuf:"bytes,3,opt,name=reqMsg" json:"reqMsg,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *JoinGroupApplicationTips) Reset() { *m = JoinGroupApplicationTips{} } +func (m *JoinGroupApplicationTips) String() string { return proto.CompactTextString(m) } +func (*JoinGroupApplicationTips) ProtoMessage() {} +func (*JoinGroupApplicationTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_4239643aeea36936, []int{21} +} +func (m *JoinGroupApplicationTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_JoinGroupApplicationTips.Unmarshal(m, b) +} +func (m *JoinGroupApplicationTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_JoinGroupApplicationTips.Marshal(b, m, deterministic) +} +func (dst *JoinGroupApplicationTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_JoinGroupApplicationTips.Merge(dst, src) +} +func (m *JoinGroupApplicationTips) XXX_Size() int { + return xxx_messageInfo_JoinGroupApplicationTips.Size(m) +} +func (m *JoinGroupApplicationTips) XXX_DiscardUnknown() { + xxx_messageInfo_JoinGroupApplicationTips.DiscardUnknown(m) +} + +var xxx_messageInfo_JoinGroupApplicationTips proto.InternalMessageInfo + +func (m *JoinGroupApplicationTips) GetGroup() *GroupInfo { + if m != nil { + return m.Group + } + return nil +} + +func (m *JoinGroupApplicationTips) GetApplicant() *PublicUserInfo { + if m != nil { + return m.Applicant + } + return nil +} + +func (m *JoinGroupApplicationTips) GetReqMsg() string { + if m != nil { + return m.ReqMsg + } + return "" +} + +// OnQuitGroup() +// Actively leave the group +type MemberQuitTips struct { + Group *GroupInfo `protobuf:"bytes,1,opt,name=group" json:"group,omitempty"` + QuitUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=quitUser" json:"quitUser,omitempty"` + OperationTime int64 `protobuf:"varint,3,opt,name=operationTime" json:"operationTime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MemberQuitTips) Reset() { *m = MemberQuitTips{} } +func (m *MemberQuitTips) String() string { return proto.CompactTextString(m) } +func (*MemberQuitTips) ProtoMessage() {} +func (*MemberQuitTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_4239643aeea36936, []int{22} +} +func (m *MemberQuitTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MemberQuitTips.Unmarshal(m, b) +} +func (m *MemberQuitTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MemberQuitTips.Marshal(b, m, deterministic) +} +func (dst *MemberQuitTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_MemberQuitTips.Merge(dst, src) +} +func (m *MemberQuitTips) XXX_Size() int { + return xxx_messageInfo_MemberQuitTips.Size(m) +} +func (m *MemberQuitTips) XXX_DiscardUnknown() { + xxx_messageInfo_MemberQuitTips.DiscardUnknown(m) +} + +var xxx_messageInfo_MemberQuitTips proto.InternalMessageInfo + +func (m *MemberQuitTips) GetGroup() *GroupInfo { + if m != nil { + return m.Group + } + return nil +} + +func (m *MemberQuitTips) GetQuitUser() *GroupMemberFullInfo { + if m != nil { + return m.QuitUser + } + return nil +} + +func (m *MemberQuitTips) GetOperationTime() int64 { + if m != nil { + return m.OperationTime + } + return 0 +} + +// OnApplicationGroupAccepted() +type GroupApplicationAcceptedTips struct { + Group *GroupInfo `protobuf:"bytes,1,opt,name=group" json:"group,omitempty"` + OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser" json:"opUser,omitempty"` + HandleMsg string `protobuf:"bytes,4,opt,name=handleMsg" json:"handleMsg,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GroupApplicationAcceptedTips) Reset() { *m = GroupApplicationAcceptedTips{} } +func (m *GroupApplicationAcceptedTips) String() string { return proto.CompactTextString(m) } +func (*GroupApplicationAcceptedTips) ProtoMessage() {} +func (*GroupApplicationAcceptedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_4239643aeea36936, []int{23} +} +func (m *GroupApplicationAcceptedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupApplicationAcceptedTips.Unmarshal(m, b) +} +func (m *GroupApplicationAcceptedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupApplicationAcceptedTips.Marshal(b, m, deterministic) +} +func (dst *GroupApplicationAcceptedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupApplicationAcceptedTips.Merge(dst, src) +} +func (m *GroupApplicationAcceptedTips) XXX_Size() int { + return xxx_messageInfo_GroupApplicationAcceptedTips.Size(m) +} +func (m *GroupApplicationAcceptedTips) XXX_DiscardUnknown() { + xxx_messageInfo_GroupApplicationAcceptedTips.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupApplicationAcceptedTips proto.InternalMessageInfo + +func (m *GroupApplicationAcceptedTips) GetGroup() *GroupInfo { + if m != nil { + return m.Group + } + return nil +} + +func (m *GroupApplicationAcceptedTips) GetOpUser() *GroupMemberFullInfo { + if m != nil { + return m.OpUser + } + return nil +} + +func (m *GroupApplicationAcceptedTips) GetHandleMsg() string { + if m != nil { + return m.HandleMsg + } + return "" +} + +// OnApplicationGroupRejected() +type GroupApplicationRejectedTips struct { + Group *GroupInfo `protobuf:"bytes,1,opt,name=group" json:"group,omitempty"` + OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser" json:"opUser,omitempty"` + HandleMsg string `protobuf:"bytes,4,opt,name=handleMsg" json:"handleMsg,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GroupApplicationRejectedTips) Reset() { *m = GroupApplicationRejectedTips{} } +func (m *GroupApplicationRejectedTips) String() string { return proto.CompactTextString(m) } +func (*GroupApplicationRejectedTips) ProtoMessage() {} +func (*GroupApplicationRejectedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_4239643aeea36936, []int{24} +} +func (m *GroupApplicationRejectedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupApplicationRejectedTips.Unmarshal(m, b) +} +func (m *GroupApplicationRejectedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupApplicationRejectedTips.Marshal(b, m, deterministic) +} +func (dst *GroupApplicationRejectedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupApplicationRejectedTips.Merge(dst, src) +} +func (m *GroupApplicationRejectedTips) XXX_Size() int { + return xxx_messageInfo_GroupApplicationRejectedTips.Size(m) +} +func (m *GroupApplicationRejectedTips) XXX_DiscardUnknown() { + xxx_messageInfo_GroupApplicationRejectedTips.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupApplicationRejectedTips proto.InternalMessageInfo + +func (m *GroupApplicationRejectedTips) GetGroup() *GroupInfo { + if m != nil { + return m.Group + } + return nil +} + +func (m *GroupApplicationRejectedTips) GetOpUser() *GroupMemberFullInfo { + if m != nil { + return m.OpUser + } + return nil +} + +func (m *GroupApplicationRejectedTips) GetHandleMsg() string { + if m != nil { + return m.HandleMsg + } + return "" +} + +// OnTransferGroupOwner() +type GroupOwnerTransferredTips struct { + Group *GroupInfo `protobuf:"bytes,1,opt,name=group" json:"group,omitempty"` + OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser" json:"opUser,omitempty"` + NewGroupOwner *GroupMemberFullInfo `protobuf:"bytes,3,opt,name=newGroupOwner" json:"newGroupOwner,omitempty"` + OperationTime int64 `protobuf:"varint,4,opt,name=operationTime" json:"operationTime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GroupOwnerTransferredTips) Reset() { *m = GroupOwnerTransferredTips{} } +func (m *GroupOwnerTransferredTips) String() string { return proto.CompactTextString(m) } +func (*GroupOwnerTransferredTips) ProtoMessage() {} +func (*GroupOwnerTransferredTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_4239643aeea36936, []int{25} +} +func (m *GroupOwnerTransferredTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupOwnerTransferredTips.Unmarshal(m, b) +} +func (m *GroupOwnerTransferredTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupOwnerTransferredTips.Marshal(b, m, deterministic) +} +func (dst *GroupOwnerTransferredTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupOwnerTransferredTips.Merge(dst, src) +} +func (m *GroupOwnerTransferredTips) XXX_Size() int { + return xxx_messageInfo_GroupOwnerTransferredTips.Size(m) +} +func (m *GroupOwnerTransferredTips) XXX_DiscardUnknown() { + xxx_messageInfo_GroupOwnerTransferredTips.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupOwnerTransferredTips proto.InternalMessageInfo + +func (m *GroupOwnerTransferredTips) GetGroup() *GroupInfo { + if m != nil { + return m.Group + } + return nil +} + +func (m *GroupOwnerTransferredTips) GetOpUser() *GroupMemberFullInfo { + if m != nil { + return m.OpUser + } + return nil +} + +func (m *GroupOwnerTransferredTips) GetNewGroupOwner() *GroupMemberFullInfo { + if m != nil { + return m.NewGroupOwner + } + return nil +} + +func (m *GroupOwnerTransferredTips) GetOperationTime() int64 { + if m != nil { + return m.OperationTime + } + return 0 +} + +// OnMemberKicked() type MemberKickedTips struct { Group *GroupInfo `protobuf:"bytes,1,opt,name=group" json:"group,omitempty"` OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser" json:"opUser,omitempty"` @@ -1777,7 +2015,7 @@ func (m *MemberKickedTips) Reset() { *m = MemberKickedTips{} } func (m *MemberKickedTips) String() string { return proto.CompactTextString(m) } func (*MemberKickedTips) ProtoMessage() {} func (*MemberKickedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1c8466de999dbc0c, []int{22} + return fileDescriptor_ws_4239643aeea36936, []int{26} } func (m *MemberKickedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberKickedTips.Unmarshal(m, b) @@ -1825,308 +2063,124 @@ func (m *MemberKickedTips) GetOperationTime() int64 { return 0 } -type MemberInfoChangedTips struct { - ChangeType int32 `protobuf:"varint,1,opt,name=changeType" json:"changeType,omitempty"` - OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser" json:"opUser,omitempty"` - FinalInfo *GroupMemberFullInfo `protobuf:"bytes,3,opt,name=finalInfo" json:"finalInfo,omitempty"` - MuteTime int64 `protobuf:"varint,4,opt,name=muteTime" json:"muteTime,omitempty"` - Group *GroupInfo `protobuf:"bytes,5,opt,name=group" json:"group,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MemberInfoChangedTips) Reset() { *m = MemberInfoChangedTips{} } -func (m *MemberInfoChangedTips) String() string { return proto.CompactTextString(m) } -func (*MemberInfoChangedTips) ProtoMessage() {} -func (*MemberInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1c8466de999dbc0c, []int{23} -} -func (m *MemberInfoChangedTips) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_MemberInfoChangedTips.Unmarshal(m, b) -} -func (m *MemberInfoChangedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_MemberInfoChangedTips.Marshal(b, m, deterministic) -} -func (dst *MemberInfoChangedTips) XXX_Merge(src proto.Message) { - xxx_messageInfo_MemberInfoChangedTips.Merge(dst, src) -} -func (m *MemberInfoChangedTips) XXX_Size() int { - return xxx_messageInfo_MemberInfoChangedTips.Size(m) -} -func (m *MemberInfoChangedTips) XXX_DiscardUnknown() { - xxx_messageInfo_MemberInfoChangedTips.DiscardUnknown(m) -} - -var xxx_messageInfo_MemberInfoChangedTips proto.InternalMessageInfo - -func (m *MemberInfoChangedTips) GetChangeType() int32 { - if m != nil { - return m.ChangeType - } - return 0 -} - -func (m *MemberInfoChangedTips) GetOpUser() *GroupMemberFullInfo { - if m != nil { - return m.OpUser - } - return nil -} - -func (m *MemberInfoChangedTips) GetFinalInfo() *GroupMemberFullInfo { - if m != nil { - return m.FinalInfo - } - return nil -} - -func (m *MemberInfoChangedTips) GetMuteTime() int64 { - if m != nil { - return m.MuteTime - } - return 0 -} - -func (m *MemberInfoChangedTips) GetGroup() *GroupInfo { - if m != nil { - return m.Group - } - return nil -} - -type GroupCreatedTips struct { +// OnMemberInvited() +type MemberInvitedTips struct { Group *GroupInfo `protobuf:"bytes,1,opt,name=group" json:"group,omitempty"` - Creator *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=creator" json:"creator,omitempty"` - MemberList []*GroupMemberFullInfo `protobuf:"bytes,3,rep,name=memberList" json:"memberList,omitempty"` + OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser" json:"opUser,omitempty"` + InvitedUserList []*GroupMemberFullInfo `protobuf:"bytes,3,rep,name=invitedUserList" json:"invitedUserList,omitempty"` OperationTime int64 `protobuf:"varint,4,opt,name=operationTime" json:"operationTime,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *GroupCreatedTips) Reset() { *m = GroupCreatedTips{} } -func (m *GroupCreatedTips) String() string { return proto.CompactTextString(m) } -func (*GroupCreatedTips) ProtoMessage() {} -func (*GroupCreatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1c8466de999dbc0c, []int{24} +func (m *MemberInvitedTips) Reset() { *m = MemberInvitedTips{} } +func (m *MemberInvitedTips) String() string { return proto.CompactTextString(m) } +func (*MemberInvitedTips) ProtoMessage() {} +func (*MemberInvitedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_4239643aeea36936, []int{27} } -func (m *GroupCreatedTips) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GroupCreatedTips.Unmarshal(m, b) +func (m *MemberInvitedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MemberInvitedTips.Unmarshal(m, b) } -func (m *GroupCreatedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GroupCreatedTips.Marshal(b, m, deterministic) +func (m *MemberInvitedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MemberInvitedTips.Marshal(b, m, deterministic) } -func (dst *GroupCreatedTips) XXX_Merge(src proto.Message) { - xxx_messageInfo_GroupCreatedTips.Merge(dst, src) +func (dst *MemberInvitedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_MemberInvitedTips.Merge(dst, src) } -func (m *GroupCreatedTips) XXX_Size() int { - return xxx_messageInfo_GroupCreatedTips.Size(m) +func (m *MemberInvitedTips) XXX_Size() int { + return xxx_messageInfo_MemberInvitedTips.Size(m) } -func (m *GroupCreatedTips) XXX_DiscardUnknown() { - xxx_messageInfo_GroupCreatedTips.DiscardUnknown(m) +func (m *MemberInvitedTips) XXX_DiscardUnknown() { + xxx_messageInfo_MemberInvitedTips.DiscardUnknown(m) } -var xxx_messageInfo_GroupCreatedTips proto.InternalMessageInfo +var xxx_messageInfo_MemberInvitedTips proto.InternalMessageInfo -func (m *GroupCreatedTips) GetGroup() *GroupInfo { +func (m *MemberInvitedTips) GetGroup() *GroupInfo { if m != nil { return m.Group } return nil } -func (m *GroupCreatedTips) GetCreator() *GroupMemberFullInfo { +func (m *MemberInvitedTips) GetOpUser() *GroupMemberFullInfo { if m != nil { - return m.Creator + return m.OpUser } return nil } -func (m *GroupCreatedTips) GetMemberList() []*GroupMemberFullInfo { +func (m *MemberInvitedTips) GetInvitedUserList() []*GroupMemberFullInfo { if m != nil { - return m.MemberList + return m.InvitedUserList } return nil } -func (m *GroupCreatedTips) GetOperationTime() int64 { +func (m *MemberInvitedTips) GetOperationTime() int64 { if m != nil { return m.OperationTime } return 0 } -type GroupInfoChangedTips struct { - ChangedType int32 `protobuf:"varint,1,opt,name=changedType" json:"changedType,omitempty"` - Group *GroupInfo `protobuf:"bytes,2,opt,name=group" json:"group,omitempty"` - OpUser *GroupMemberFullInfo `protobuf:"bytes,3,opt,name=opUser" json:"opUser,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GroupInfoChangedTips) Reset() { *m = GroupInfoChangedTips{} } -func (m *GroupInfoChangedTips) String() string { return proto.CompactTextString(m) } -func (*GroupInfoChangedTips) ProtoMessage() {} -func (*GroupInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1c8466de999dbc0c, []int{25} -} -func (m *GroupInfoChangedTips) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GroupInfoChangedTips.Unmarshal(m, b) -} -func (m *GroupInfoChangedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GroupInfoChangedTips.Marshal(b, m, deterministic) -} -func (dst *GroupInfoChangedTips) XXX_Merge(src proto.Message) { - xxx_messageInfo_GroupInfoChangedTips.Merge(dst, src) -} -func (m *GroupInfoChangedTips) XXX_Size() int { - return xxx_messageInfo_GroupInfoChangedTips.Size(m) -} -func (m *GroupInfoChangedTips) XXX_DiscardUnknown() { - xxx_messageInfo_GroupInfoChangedTips.DiscardUnknown(m) -} - -var xxx_messageInfo_GroupInfoChangedTips proto.InternalMessageInfo - -func (m *GroupInfoChangedTips) GetChangedType() int32 { - if m != nil { - return m.ChangedType - } - return 0 -} - -func (m *GroupInfoChangedTips) GetGroup() *GroupInfo { - if m != nil { - return m.Group - } - return nil -} - -func (m *GroupInfoChangedTips) GetOpUser() *GroupMemberFullInfo { - if m != nil { - return m.OpUser - } - return nil -} - -type JoinGroupApplicationTips struct { - Group *GroupInfo `protobuf:"bytes,1,opt,name=group" json:"group,omitempty"` - Applicant *PublicUserInfo `protobuf:"bytes,2,opt,name=applicant" json:"applicant,omitempty"` - Reason string `protobuf:"bytes,3,opt,name=reason" json:"reason,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *JoinGroupApplicationTips) Reset() { *m = JoinGroupApplicationTips{} } -func (m *JoinGroupApplicationTips) String() string { return proto.CompactTextString(m) } -func (*JoinGroupApplicationTips) ProtoMessage() {} -func (*JoinGroupApplicationTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1c8466de999dbc0c, []int{26} -} -func (m *JoinGroupApplicationTips) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_JoinGroupApplicationTips.Unmarshal(m, b) -} -func (m *JoinGroupApplicationTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_JoinGroupApplicationTips.Marshal(b, m, deterministic) -} -func (dst *JoinGroupApplicationTips) XXX_Merge(src proto.Message) { - xxx_messageInfo_JoinGroupApplicationTips.Merge(dst, src) -} -func (m *JoinGroupApplicationTips) XXX_Size() int { - return xxx_messageInfo_JoinGroupApplicationTips.Size(m) -} -func (m *JoinGroupApplicationTips) XXX_DiscardUnknown() { - xxx_messageInfo_JoinGroupApplicationTips.DiscardUnknown(m) -} - -var xxx_messageInfo_JoinGroupApplicationTips proto.InternalMessageInfo - -func (m *JoinGroupApplicationTips) GetGroup() *GroupInfo { - if m != nil { - return m.Group - } - return nil -} - -func (m *JoinGroupApplicationTips) GetApplicant() *PublicUserInfo { - if m != nil { - return m.Applicant - } - return nil -} - -func (m *JoinGroupApplicationTips) GetReason() string { - if m != nil { - return m.Reason - } - return "" -} - -type ApplicationProcessedTips struct { +// Actively join the group +type MemberEnterTips struct { Group *GroupInfo `protobuf:"bytes,1,opt,name=group" json:"group,omitempty"` - OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser" json:"opUser,omitempty"` - Result int32 `protobuf:"varint,3,opt,name=result" json:"result,omitempty"` - Reason string `protobuf:"bytes,4,opt,name=reason" json:"reason,omitempty"` + EntrantUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=entrantUser" json:"entrantUser,omitempty"` + OperationTime int64 `protobuf:"varint,3,opt,name=operationTime" json:"operationTime,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *ApplicationProcessedTips) Reset() { *m = ApplicationProcessedTips{} } -func (m *ApplicationProcessedTips) String() string { return proto.CompactTextString(m) } -func (*ApplicationProcessedTips) ProtoMessage() {} -func (*ApplicationProcessedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1c8466de999dbc0c, []int{27} +func (m *MemberEnterTips) Reset() { *m = MemberEnterTips{} } +func (m *MemberEnterTips) String() string { return proto.CompactTextString(m) } +func (*MemberEnterTips) ProtoMessage() {} +func (*MemberEnterTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_4239643aeea36936, []int{28} } -func (m *ApplicationProcessedTips) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ApplicationProcessedTips.Unmarshal(m, b) +func (m *MemberEnterTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MemberEnterTips.Unmarshal(m, b) } -func (m *ApplicationProcessedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ApplicationProcessedTips.Marshal(b, m, deterministic) +func (m *MemberEnterTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MemberEnterTips.Marshal(b, m, deterministic) } -func (dst *ApplicationProcessedTips) XXX_Merge(src proto.Message) { - xxx_messageInfo_ApplicationProcessedTips.Merge(dst, src) +func (dst *MemberEnterTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_MemberEnterTips.Merge(dst, src) } -func (m *ApplicationProcessedTips) XXX_Size() int { - return xxx_messageInfo_ApplicationProcessedTips.Size(m) +func (m *MemberEnterTips) XXX_Size() int { + return xxx_messageInfo_MemberEnterTips.Size(m) } -func (m *ApplicationProcessedTips) XXX_DiscardUnknown() { - xxx_messageInfo_ApplicationProcessedTips.DiscardUnknown(m) +func (m *MemberEnterTips) XXX_DiscardUnknown() { + xxx_messageInfo_MemberEnterTips.DiscardUnknown(m) } -var xxx_messageInfo_ApplicationProcessedTips proto.InternalMessageInfo +var xxx_messageInfo_MemberEnterTips proto.InternalMessageInfo -func (m *ApplicationProcessedTips) GetGroup() *GroupInfo { +func (m *MemberEnterTips) GetGroup() *GroupInfo { if m != nil { return m.Group } return nil } -func (m *ApplicationProcessedTips) GetOpUser() *GroupMemberFullInfo { +func (m *MemberEnterTips) GetEntrantUser() *GroupMemberFullInfo { if m != nil { - return m.OpUser + return m.EntrantUser } return nil } -func (m *ApplicationProcessedTips) GetResult() int32 { +func (m *MemberEnterTips) GetOperationTime() int64 { if m != nil { - return m.Result + return m.OperationTime } return 0 } -func (m *ApplicationProcessedTips) GetReason() string { - if m != nil { - return m.Reason - } - return "" -} - type FriendApplication struct { AddTime int64 `protobuf:"varint,1,opt,name=addTime" json:"addTime,omitempty"` AddSource string `protobuf:"bytes,2,opt,name=addSource" json:"addSource,omitempty"` @@ -2140,7 +2194,7 @@ func (m *FriendApplication) Reset() { *m = FriendApplication{} } func (m *FriendApplication) String() string { return proto.CompactTextString(m) } func (*FriendApplication) ProtoMessage() {} func (*FriendApplication) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1c8466de999dbc0c, []int{28} + return fileDescriptor_ws_4239643aeea36936, []int{29} } func (m *FriendApplication) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplication.Unmarshal(m, b) @@ -2193,7 +2247,7 @@ func (m *FromToUserID) Reset() { *m = FromToUserID{} } func (m *FromToUserID) String() string { return proto.CompactTextString(m) } func (*FromToUserID) ProtoMessage() {} func (*FromToUserID) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1c8466de999dbc0c, []int{29} + return fileDescriptor_ws_4239643aeea36936, []int{30} } func (m *FromToUserID) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FromToUserID.Unmarshal(m, b) @@ -2239,7 +2293,7 @@ func (m *FriendApplicationAddedTips) Reset() { *m = FriendApplicationAdd func (m *FriendApplicationAddedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationAddedTips) ProtoMessage() {} func (*FriendApplicationAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1c8466de999dbc0c, []int{30} + return fileDescriptor_ws_4239643aeea36936, []int{31} } func (m *FriendApplicationAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationAddedTips.Unmarshal(m, b) @@ -2267,50 +2321,97 @@ func (m *FriendApplicationAddedTips) GetFromToUserID() *FromToUserID { } // FromUserID accept or reject ToUserID -type FriendApplicationProcessedTips struct { +type FriendApplicationApprovedTips struct { FromToUserID *FromToUserID `protobuf:"bytes,1,opt,name=fromToUserID" json:"fromToUserID,omitempty"` - HandleResult int32 `protobuf:"varint,2,opt,name=handleResult" json:"handleResult,omitempty"` + HandleMsg string `protobuf:"bytes,2,opt,name=handleMsg" json:"handleMsg,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *FriendApplicationProcessedTips) Reset() { *m = FriendApplicationProcessedTips{} } -func (m *FriendApplicationProcessedTips) String() string { return proto.CompactTextString(m) } -func (*FriendApplicationProcessedTips) ProtoMessage() {} -func (*FriendApplicationProcessedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1c8466de999dbc0c, []int{31} +func (m *FriendApplicationApprovedTips) Reset() { *m = FriendApplicationApprovedTips{} } +func (m *FriendApplicationApprovedTips) String() string { return proto.CompactTextString(m) } +func (*FriendApplicationApprovedTips) ProtoMessage() {} +func (*FriendApplicationApprovedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_4239643aeea36936, []int{32} } -func (m *FriendApplicationProcessedTips) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FriendApplicationProcessedTips.Unmarshal(m, b) +func (m *FriendApplicationApprovedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FriendApplicationApprovedTips.Unmarshal(m, b) } -func (m *FriendApplicationProcessedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FriendApplicationProcessedTips.Marshal(b, m, deterministic) +func (m *FriendApplicationApprovedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FriendApplicationApprovedTips.Marshal(b, m, deterministic) } -func (dst *FriendApplicationProcessedTips) XXX_Merge(src proto.Message) { - xxx_messageInfo_FriendApplicationProcessedTips.Merge(dst, src) +func (dst *FriendApplicationApprovedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_FriendApplicationApprovedTips.Merge(dst, src) } -func (m *FriendApplicationProcessedTips) XXX_Size() int { - return xxx_messageInfo_FriendApplicationProcessedTips.Size(m) +func (m *FriendApplicationApprovedTips) XXX_Size() int { + return xxx_messageInfo_FriendApplicationApprovedTips.Size(m) } -func (m *FriendApplicationProcessedTips) XXX_DiscardUnknown() { - xxx_messageInfo_FriendApplicationProcessedTips.DiscardUnknown(m) +func (m *FriendApplicationApprovedTips) XXX_DiscardUnknown() { + xxx_messageInfo_FriendApplicationApprovedTips.DiscardUnknown(m) } -var xxx_messageInfo_FriendApplicationProcessedTips proto.InternalMessageInfo +var xxx_messageInfo_FriendApplicationApprovedTips proto.InternalMessageInfo -func (m *FriendApplicationProcessedTips) GetFromToUserID() *FromToUserID { +func (m *FriendApplicationApprovedTips) GetFromToUserID() *FromToUserID { if m != nil { return m.FromToUserID } return nil } -func (m *FriendApplicationProcessedTips) GetHandleResult() int32 { +func (m *FriendApplicationApprovedTips) GetHandleMsg() string { if m != nil { - return m.HandleResult + return m.HandleMsg } - return 0 + return "" +} + +// FromUserID accept or reject ToUserID +type FriendApplicationRejectedTips struct { + FromToUserID *FromToUserID `protobuf:"bytes,1,opt,name=fromToUserID" json:"fromToUserID,omitempty"` + HandleMsg string `protobuf:"bytes,2,opt,name=handleMsg" json:"handleMsg,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FriendApplicationRejectedTips) Reset() { *m = FriendApplicationRejectedTips{} } +func (m *FriendApplicationRejectedTips) String() string { return proto.CompactTextString(m) } +func (*FriendApplicationRejectedTips) ProtoMessage() {} +func (*FriendApplicationRejectedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_4239643aeea36936, []int{33} +} +func (m *FriendApplicationRejectedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FriendApplicationRejectedTips.Unmarshal(m, b) +} +func (m *FriendApplicationRejectedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FriendApplicationRejectedTips.Marshal(b, m, deterministic) +} +func (dst *FriendApplicationRejectedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_FriendApplicationRejectedTips.Merge(dst, src) +} +func (m *FriendApplicationRejectedTips) XXX_Size() int { + return xxx_messageInfo_FriendApplicationRejectedTips.Size(m) +} +func (m *FriendApplicationRejectedTips) XXX_DiscardUnknown() { + xxx_messageInfo_FriendApplicationRejectedTips.DiscardUnknown(m) +} + +var xxx_messageInfo_FriendApplicationRejectedTips proto.InternalMessageInfo + +func (m *FriendApplicationRejectedTips) GetFromToUserID() *FromToUserID { + if m != nil { + return m.FromToUserID + } + return nil +} + +func (m *FriendApplicationRejectedTips) GetHandleMsg() string { + if m != nil { + return m.HandleMsg + } + return "" } // FromUserID Added a friend ToUserID @@ -2327,7 +2428,7 @@ func (m *FriendAddedTips) Reset() { *m = FriendAddedTips{} } func (m *FriendAddedTips) String() string { return proto.CompactTextString(m) } func (*FriendAddedTips) ProtoMessage() {} func (*FriendAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1c8466de999dbc0c, []int{32} + return fileDescriptor_ws_4239643aeea36936, []int{34} } func (m *FriendAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendAddedTips.Unmarshal(m, b) @@ -2380,7 +2481,7 @@ func (m *FriendDeletedTips) Reset() { *m = FriendDeletedTips{} } func (m *FriendDeletedTips) String() string { return proto.CompactTextString(m) } func (*FriendDeletedTips) ProtoMessage() {} func (*FriendDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1c8466de999dbc0c, []int{33} + return fileDescriptor_ws_4239643aeea36936, []int{35} } func (m *FriendDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendDeletedTips.Unmarshal(m, b) @@ -2418,7 +2519,7 @@ func (m *BlackAddedTips) Reset() { *m = BlackAddedTips{} } func (m *BlackAddedTips) String() string { return proto.CompactTextString(m) } func (*BlackAddedTips) ProtoMessage() {} func (*BlackAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1c8466de999dbc0c, []int{34} + return fileDescriptor_ws_4239643aeea36936, []int{36} } func (m *BlackAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackAddedTips.Unmarshal(m, b) @@ -2456,7 +2557,7 @@ func (m *BlackDeletedTips) Reset() { *m = BlackDeletedTips{} } func (m *BlackDeletedTips) String() string { return proto.CompactTextString(m) } func (*BlackDeletedTips) ProtoMessage() {} func (*BlackDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1c8466de999dbc0c, []int{35} + return fileDescriptor_ws_4239643aeea36936, []int{37} } func (m *BlackDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackDeletedTips.Unmarshal(m, b) @@ -2494,7 +2595,7 @@ func (m *FriendInfoChangedTips) Reset() { *m = FriendInfoChangedTips{} } func (m *FriendInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*FriendInfoChangedTips) ProtoMessage() {} func (*FriendInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1c8466de999dbc0c, []int{36} + return fileDescriptor_ws_4239643aeea36936, []int{38} } func (m *FriendInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfoChangedTips.Unmarshal(m, b) @@ -2533,7 +2634,7 @@ func (m *SelfInfoUpdatedTips) Reset() { *m = SelfInfoUpdatedTips{} } func (m *SelfInfoUpdatedTips) String() string { return proto.CompactTextString(m) } func (*SelfInfoUpdatedTips) ProtoMessage() {} func (*SelfInfoUpdatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_1c8466de999dbc0c, []int{37} + return fileDescriptor_ws_4239643aeea36936, []int{39} } func (m *SelfInfoUpdatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SelfInfoUpdatedTips.Unmarshal(m, b) @@ -2581,19 +2682,21 @@ func init() { proto.RegisterMapType((map[string]bool)(nil), "server_api_params.MsgData.OptionsEntry") proto.RegisterType((*OfflinePushInfo)(nil), "server_api_params.OfflinePushInfo") proto.RegisterType((*TipsComm)(nil), "server_api_params.TipsComm") - proto.RegisterType((*MemberEnterTips)(nil), "server_api_params.MemberEnterTips") - proto.RegisterType((*MemberLeaveTips)(nil), "server_api_params.MemberLeaveTips") - proto.RegisterType((*MemberInvitedTips)(nil), "server_api_params.MemberInvitedTips") - proto.RegisterType((*MemberKickedTips)(nil), "server_api_params.MemberKickedTips") - proto.RegisterType((*MemberInfoChangedTips)(nil), "server_api_params.MemberInfoChangedTips") proto.RegisterType((*GroupCreatedTips)(nil), "server_api_params.GroupCreatedTips") - proto.RegisterType((*GroupInfoChangedTips)(nil), "server_api_params.GroupInfoChangedTips") + proto.RegisterType((*GroupInfoSetTips)(nil), "server_api_params.GroupInfoSetTips") proto.RegisterType((*JoinGroupApplicationTips)(nil), "server_api_params.JoinGroupApplicationTips") - proto.RegisterType((*ApplicationProcessedTips)(nil), "server_api_params.ApplicationProcessedTips") + proto.RegisterType((*MemberQuitTips)(nil), "server_api_params.MemberQuitTips") + proto.RegisterType((*GroupApplicationAcceptedTips)(nil), "server_api_params.GroupApplicationAcceptedTips") + proto.RegisterType((*GroupApplicationRejectedTips)(nil), "server_api_params.GroupApplicationRejectedTips") + proto.RegisterType((*GroupOwnerTransferredTips)(nil), "server_api_params.GroupOwnerTransferredTips") + proto.RegisterType((*MemberKickedTips)(nil), "server_api_params.MemberKickedTips") + proto.RegisterType((*MemberInvitedTips)(nil), "server_api_params.MemberInvitedTips") + proto.RegisterType((*MemberEnterTips)(nil), "server_api_params.MemberEnterTips") proto.RegisterType((*FriendApplication)(nil), "server_api_params.FriendApplication") proto.RegisterType((*FromToUserID)(nil), "server_api_params.FromToUserID") proto.RegisterType((*FriendApplicationAddedTips)(nil), "server_api_params.FriendApplicationAddedTips") - proto.RegisterType((*FriendApplicationProcessedTips)(nil), "server_api_params.FriendApplicationProcessedTips") + proto.RegisterType((*FriendApplicationApprovedTips)(nil), "server_api_params.FriendApplicationApprovedTips") + proto.RegisterType((*FriendApplicationRejectedTips)(nil), "server_api_params.FriendApplicationRejectedTips") proto.RegisterType((*FriendAddedTips)(nil), "server_api_params.FriendAddedTips") proto.RegisterType((*FriendDeletedTips)(nil), "server_api_params.FriendDeletedTips") proto.RegisterType((*BlackAddedTips)(nil), "server_api_params.BlackAddedTips") @@ -2602,135 +2705,135 @@ func init() { proto.RegisterType((*SelfInfoUpdatedTips)(nil), "server_api_params.SelfInfoUpdatedTips") } -func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_1c8466de999dbc0c) } +func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_4239643aeea36936) } -var fileDescriptor_ws_1c8466de999dbc0c = []byte{ - // 2018 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x59, 0xcd, 0x6f, 0x1c, 0x49, - 0x15, 0x57, 0xf7, 0x7c, 0xd8, 0xf3, 0x66, 0xc6, 0xe3, 0x74, 0xb2, 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 0xe9, 0x06, 0x2a, 0x5d, 0x40, 0x65, - 0x3e, 0xa4, 0xa6, 0x33, 0x9e, 0x8b, 0x31, 0xc5, 0x70, 0xb7, 0x02, 0x03, 0x91, 0x72, 0x78, 0x42, - 0x85, 0x11, 0x46, 0x15, 0xf9, 0x05, 0x54, 0x67, 0x05, 0x8a, 0xac, 0xf8, 0xbf, 0x76, 0x60, 0xeb, - 0x34, 0x3f, 0x8f, 0xa3, 0x31, 0x2e, 0x90, 0x41, 0xab, 0x42, 0xe3, 0x58, 0xa1, 0x31, 0x1d, 0x74, - 0xaf, 0x77, 0xb0, 0x61, 0x3b, 0x78, 0x1f, 0xda, 0x53, 0xca, 0x42, 0x2a, 0x30, 0x60, 0xad, 0x40, - 0x53, 0x4b, 0x1c, 0x6f, 0x2d, 0x73, 0xdc, 0xff, 0x95, 0x0b, 0x9b, 0xff, 0x63, 0xd3, 0x76, 0xa0, - 0x9b, 0x5c, 0x70, 0x46, 0x4f, 0x72, 0x59, 0x4c, 0x3a, 0x99, 0x26, 0xe4, 0xdd, 0x83, 0xd6, 0x79, - 0x24, 0xb2, 0x0b, 0xcc, 0x66, 0x3f, 0x50, 0x84, 0x44, 0xe9, 0x8c, 0x44, 0x2a, 0x85, 0x9d, 0x40, - 0x11, 0x3a, 0xe2, 0x9b, 0xe5, 0x3e, 0xb0, 0x77, 0x56, 0xa7, 0xb6, 0xb3, 0xea, 0x81, 0x81, 0xa5, - 0x81, 0xf9, 0xa7, 0x03, 0x70, 0x24, 0x22, 0xca, 0x42, 0x0c, 0xcd, 0xc2, 0x96, 0x76, 0xea, 0x5b, - 0xfa, 0x3e, 0xb4, 0x05, 0x9d, 0x11, 0x71, 0x59, 0x94, 0xbc, 0xa2, 0x16, 0x0c, 0x6a, 0xd4, 0x0c, - 0xfa, 0x36, 0xc0, 0x04, 0xf5, 0x48, 0x39, 0x18, 0xaa, 0xee, 0xa3, 0xcf, 0xef, 0xd5, 0x9a, 0xdf, - 0x5e, 0x91, 0xa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31, 0xf7, 0xb8, - 0x71, 0x32, 0x63, 0xce, 0x4c, 0x5c, 0x7b, 0x66, 0xe2, 0x13, 0x78, 0x50, 0x33, 0xfc, 0x49, 0x18, - 0xea, 0xd0, 0xef, 0xab, 0x99, 0x4e, 0xa1, 0x49, 0x67, 0x60, 0xd9, 0x83, 0xcb, 0x34, 0x28, 0xb0, - 0x98, 0xfc, 0x9f, 0x3b, 0xf0, 0xb0, 0xa6, 0xc3, 0x4e, 0xf1, 0x6d, 0xe8, 0xa9, 0x0d, 0x69, 0xdc, - 0xfa, 0x90, 0xc6, 0xff, 0xad, 0x03, 0x03, 0x6d, 0x4b, 0xe9, 0xe4, 0x37, 0xa0, 0xad, 0x26, 0xb2, - 0x5a, 0xed, 0x17, 0x96, 0xaa, 0x2d, 0x26, 0xc9, 0x81, 0x5e, 0x5c, 0x6f, 0x19, 0xee, 0x92, 0x96, - 0xe1, 0x7d, 0x6b, 0x61, 0x0f, 0xaf, 0xb0, 0x5f, 0x8a, 0xed, 0xfb, 0xa3, 0xa2, 0xa6, 0x0e, 0x68, - 0x4c, 0xb3, 0xdb, 0xcc, 0xc8, 0x2b, 0xd8, 0xc2, 0xf1, 0xf0, 0x2d, 0x27, 0xfa, 0x63, 0xd8, 0x46, - 0xb1, 0xb7, 0x6e, 0xef, 0x8f, 0xe1, 0xbd, 0x2a, 0x01, 0x66, 0xdf, 0xbd, 0x15, 0xe9, 0x5f, 0x85, - 0xbb, 0x67, 0x34, 0x9e, 0x48, 0xd9, 0xaf, 0x92, 0xb0, 0x3c, 0xd0, 0xae, 0x99, 0xcb, 0x9c, 0xb7, - 0xf1, 0xef, 0xcd, 0xaf, 0xff, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x44, 0xad, 0x58, 0x38, 0xf1, 0x1c, - 0x00, 0x00, +var fileDescriptor_ws_4239643aeea36936 = []byte{ + // 2019 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x59, 0x4f, 0x6f, 0x23, 0x49, + 0x15, 0x57, 0x77, 0xc7, 0x8e, 0xf3, 0x6c, 0xc7, 0x99, 0x9e, 0x65, 0x30, 0x61, 0x76, 0x08, 0xad, + 0xd5, 0x32, 0x42, 0x22, 0x48, 0x83, 0x90, 0x60, 0x10, 0xa0, 0xfc, 0x67, 0x96, 0x38, 0x09, 0xed, + 0x8c, 0x96, 0x03, 0xd2, 0xa8, 0xe3, 0x2e, 0x3b, 0xbd, 0x69, 0x57, 0xb5, 0xab, 0xbb, 0x33, 0x33, + 0x17, 0x0e, 0x70, 0xe1, 0x0b, 0xc0, 0x91, 0x03, 0x17, 0xc4, 0x05, 0x71, 0x41, 0xdc, 0x11, 0x5f, + 0x80, 0x33, 0x5f, 0x81, 0x2b, 0x07, 0x24, 0xa4, 0x45, 0xf5, 0xaa, 0xba, 0xbb, 0xaa, 0xed, 0x64, + 0xad, 0x28, 0xda, 0x41, 0xe2, 0xe6, 0xf7, 0xeb, 0x7a, 0xff, 0x5f, 0xbd, 0x7a, 0x55, 0x86, 0x5e, + 0x1a, 0x5e, 0xbd, 0x7a, 0x9d, 0x7e, 0xf3, 0x75, 0xba, 0x9d, 0x70, 0x96, 0x31, 0xf7, 0x41, 0x4a, + 0xf8, 0x35, 0xe1, 0xaf, 0x82, 0x24, 0x7a, 0x95, 0x04, 0x3c, 0x98, 0xa6, 0xde, 0xbf, 0x6c, 0x58, + 0x3b, 0xe2, 0x2c, 0x4f, 0x5e, 0xd0, 0x31, 0x73, 0xfb, 0xb0, 0x3a, 0x41, 0x62, 0xbf, 0x6f, 0x6d, + 0x59, 0x4f, 0xd7, 0xfc, 0x82, 0x74, 0x1f, 0xc3, 0x1a, 0xfe, 0x3c, 0x09, 0xa6, 0xa4, 0x6f, 0xe3, + 0xb7, 0x0a, 0x70, 0x3d, 0xe8, 0x50, 0x96, 0x45, 0xe3, 0x68, 0x14, 0x64, 0x11, 0xa3, 0x7d, 0x07, +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0x15, 0x29, 0x95, 0xe1, 0x2e, 0x69, 0x3d, 0x13, 0x4d, 0x33, + 0x13, 0x1f, 0xc2, 0x7a, 0x90, 0x24, 0x83, 0x80, 0x4e, 0x08, 0x97, 0x4a, 0x57, 0x51, 0x69, 0x0d, + 0x15, 0xf9, 0x10, 0x9a, 0x86, 0x2c, 0xe7, 0x23, 0x82, 0xe1, 0x6e, 0xf8, 0x1a, 0x22, 0xe4, 0xb0, + 0x84, 0x70, 0x2d, 0x8c, 0x32, 0xf2, 0x35, 0x54, 0x65, 0x05, 0x8a, 0xac, 0x78, 0xbf, 0xb5, 0x60, + 0xfd, 0x2c, 0xbf, 0x88, 0xa3, 0x11, 0x2e, 0x10, 0x41, 0xab, 0x42, 0x63, 0x19, 0xa1, 0xd1, 0x1d, + 0xb4, 0x6f, 0x76, 0xd0, 0x31, 0x1d, 0x7c, 0x04, 0xcd, 0x09, 0xa1, 0x21, 0xe1, 0x18, 0xb0, 0x86, + 0xaf, 0xa8, 0x05, 0x8e, 0x37, 0x16, 0x39, 0xee, 0xfd, 0xc6, 0x86, 0xd6, 0xe7, 0x6c, 0xda, 0x16, + 0xb4, 0x93, 0x4b, 0x46, 0xc9, 0x49, 0x2e, 0x8a, 0x49, 0x25, 0x53, 0x87, 0xdc, 0xf7, 0xa0, 0x71, + 0x11, 0xf1, 0xec, 0x12, 0xb3, 0xd9, 0xf5, 0x25, 0x21, 0x50, 0x32, 0x0d, 0x22, 0x99, 0xc2, 0x35, + 0x5f, 0x12, 0x2a, 0xe2, 0xad, 0x72, 0x1f, 0x98, 0x3b, 0x6b, 0x6d, 0x6e, 0x67, 0xcd, 0x07, 0x06, + 0x16, 0x06, 0xe6, 0xdf, 0x16, 0xc0, 0x21, 0x8f, 0x08, 0x0d, 0x31, 0x34, 0xb5, 0x2d, 0x6d, 0xcd, + 0x6f, 0xe9, 0x47, 0xd0, 0xe4, 0x64, 0x1a, 0xf0, 0xab, 0xa2, 0xe4, 0x25, 0x55, 0x33, 0x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81, 0x8f, 0xeb, 0xbc, 0x19, 0xf4, 0x84, 0xdd, 0x43, 0x42, 0xc3, 0x41, 0x3a, 0x41, + 0x93, 0xb6, 0xa0, 0x2d, 0xb9, 0x06, 0xe9, 0xa4, 0x3a, 0xce, 0x35, 0x48, 0xac, 0x18, 0xc5, 0x11, + 0xa1, 0x99, 0x5c, 0xa1, 0xea, 0x53, 0x83, 0x64, 0x6d, 0xd1, 0xb0, 0x9c, 0x68, 0xb0, 0xb6, 0x24, + 0xed, 0xfd, 0xb5, 0x01, 0xab, 0xca, 0x08, 0x59, 0x67, 0x34, 0xac, 0x6a, 0x53, 0x52, 0xb2, 0xd7, + 0x8d, 0xae, 0xab, 0xeb, 0x81, 0xa4, 0xf4, 0x0b, 0x85, 0x63, 0x5e, 0x28, 0x6a, 0x36, 0xad, 0xcc, + 0xdb, 0x54, 0xf3, 0xab, 0x31, 0xef, 0xd7, 0xd7, 0x61, 0x23, 0xc5, 0x7e, 0x7c, 0x16, 0x07, 0xd9, + 0x98, 0xf1, 0xa9, 0x1a, 0x88, 0x1a, 0xfe, 0x1c, 0x2e, 0x66, 0x09, 0x89, 0x95, 0xe7, 0x81, 0x6c, + 0xf8, 0x35, 0x54, 0x74, 0x5f, 0x89, 0x14, 0xe7, 0x82, 0x9c, 0x44, 0x4d, 0x50, 0xda, 0x96, 0xa6, + 0x11, 0xa3, 0x78, 0xc1, 0x92, 0xed, 0x5f, 0x87, 0x84, 0xe7, 0xd3, 0x74, 0x72, 0xc8, 0xd9, 0x54, + 0xcd, 0xa3, 0x05, 0x89, 0x9e, 0x33, 0x9a, 0x11, 0x9a, 0x21, 0x6f, 0x5b, 0xf2, 0x6a, 0x90, 0xe0, + 0x55, 0x24, 0xf6, 0xfe, 0x8e, 0x5f, 0x90, 0xa2, 0xeb, 0x8f, 0x19, 0x1f, 0x11, 0xec, 0x24, 0xdd, + 0x2d, 0x47, 0x74, 0xfd, 0x12, 0x70, 0x37, 0xc0, 0x49, 0xc9, 0x0c, 0xdb, 0xbd, 0xe3, 0x8b, 0x9f, + 0x46, 0x5e, 0x7b, 0x66, 0x5e, 0x6b, 0xe7, 0xd0, 0x06, 0x7e, 0xd5, 0xcf, 0xa1, 0x1d, 0x58, 0x65, + 0x89, 0xe8, 0x12, 0x69, 0xff, 0x01, 0x56, 0xe7, 0xd7, 0x6e, 0xae, 0xce, 0xed, 0x53, 0xb9, 0xf2, + 0x80, 0x66, 0xfc, 0xad, 0x5f, 0xf0, 0xb9, 0xc7, 0xd0, 0x63, 0xe3, 0x71, 0x1c, 0x51, 0x72, 0x96, + 0xa7, 0x97, 0x38, 0x3e, 0xb9, 0x38, 0x3e, 0x79, 0x0b, 0x44, 0x9d, 0x9a, 0x2b, 0xfd, 0x3a, 0xeb, + 0xe6, 0x73, 0xe8, 0xe8, 0x6a, 0x84, 0xbb, 0x57, 0xe4, 0xad, 0xaa, 0x44, 0xf1, 0x53, 0xdc, 0x28, + 0xae, 0x83, 0x38, 0x97, 0xb3, 0x46, 0xcb, 0x97, 0xc4, 0x73, 0xfb, 0x3b, 0x96, 0xf7, 0x6b, 0x0b, + 0x7a, 0x35, 0x05, 0x62, 0x75, 0x16, 0x65, 0x31, 0x51, 0x12, 0x24, 0xe1, 0xba, 0xb0, 0x12, 0x92, + 0x74, 0xa4, 0x0a, 0x19, 0x7f, 0xab, 0xe3, 0xd2, 0x29, 0xef, 0x24, 0x1e, 0x74, 0xa2, 0xd3, 0xa1, + 0x10, 0x34, 0x64, 0x39, 0x0d, 0xcb, 0xd7, 0x04, 0x0d, 0x13, 0x85, 0x14, 0x9d, 0x0e, 0x77, 0x83, + 0x70, 0x42, 0xe4, 0x9d, 0xbf, 0x81, 0x36, 0x99, 0xa0, 0xb7, 0x0f, 0xad, 0xf3, 0x28, 0x49, 0xf7, + 0xd8, 0x74, 0x2a, 0x36, 0x51, 0x48, 0x32, 0x71, 0x21, 0xb2, 0x30, 0xeb, 0x8a, 0x12, 0x05, 0x13, + 0x92, 0x71, 0x90, 0x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to/sdk_ws/ws.proto b/pkg/proto/sdk_ws/ws.proto index ed7d7b739..ac8f8601f 100644 --- a/pkg/proto/sdk_ws/ws.proto +++ b/pkg/proto/sdk_ws/ws.proto @@ -228,13 +228,14 @@ message TipsComm{ // OnGroupCreated() message GroupCreatedTips{ GroupInfo group = 1; - GroupMemberFullInfo creator = 2; + GroupMemberFullInfo opUser = 2; repeated GroupMemberFullInfo memberList = 3; int64 operationTime = 4; + GroupMemberFullInfo groupOwnerUser = 5; } // OnGroupInfoSet() -message MemberInfoSetTips{ +message GroupInfoSetTips{ GroupMemberFullInfo opUser = 1; //who do this int64 muteTime = 2; GroupInfo group = 3; @@ -244,7 +245,7 @@ message MemberInfoSetTips{ message JoinGroupApplicationTips{ GroupInfo group = 1; PublicUserInfo applicant = 2; - string reason = 3; + string reqMsg = 3; } // OnQuitGroup() @@ -296,29 +297,10 @@ message MemberInvitedTips{ } //Actively join the group -//message MemberEnterTips{ -// GroupInfo group = 1; -// GroupMemberFullInfo entrantUser = 2; -// int64 operationTime = 3; -//} - - - - - - - - -message GroupInfoChangedTips{ - int32 changedType = 1; //bitwise operators: 0001:groupName; 0010:Notification 0100:Introduction; 1000:FaceUrl - GroupInfo group = 2; - GroupMemberFullInfo opUser = 3; -} - -message JoinGroupApplicationTips{ +message MemberEnterTips{ GroupInfo group = 1; - PublicUserInfo applicant = 2; - string reason = 3; + GroupMemberFullInfo entrantUser = 2; + int64 operationTime = 3; } @@ -326,6 +308,11 @@ message JoinGroupApplicationTips{ + + + + + //////////////////////friend///////////////////// //message FriendInfo{ // UserInfo OwnerUser = 1; @@ -351,11 +338,18 @@ message FriendApplicationAddedTips{ } //FromUserID accept or reject ToUserID -message FriendApplicationProcessedTips{ +message FriendApplicationApprovedTips{ FromToUserID fromToUserID = 1; - int32 handleResult = 2; + string handleMsg = 2; } +//FromUserID accept or reject ToUserID +message FriendApplicationRejectedTips{ + FromToUserID fromToUserID = 1; + string handleMsg = 2; +} + + // FromUserID Added a friend ToUserID message FriendAddedTips{ FriendInfo friend = 1; From 92a6c7b89eb0042492f1669efc19f6cfdd124de1 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Sun, 16 Jan 2022 18:58:07 +0800 Subject: [PATCH 286/337] Refactor code --- internal/rpc/msg/friend_notification.go | 16 +- internal/rpc/user/user.go | 4 +- pkg/common/constant/constant.go | 2 +- pkg/proto/sdk_ws/ws.pb.go | 400 ++++++++++++------------ pkg/proto/sdk_ws/ws.proto | 4 +- 5 files changed, 213 insertions(+), 213 deletions(-) diff --git a/internal/rpc/msg/friend_notification.go b/internal/rpc/msg/friend_notification.go index e1a6fd3ef..39e3684dc 100644 --- a/internal/rpc/msg/friend_notification.go +++ b/internal/rpc/msg/friend_notification.go @@ -97,10 +97,10 @@ func friendNotification(commID *pbFriend.CommID, contentType int32, m proto.Mess func FriendApplicationNotification(req *pbFriend.AddFriendReq) { log.Info(req.CommID.OperationID, utils.GetSelfFuncName(), "args: ", req.String()) - var friendApplicationAddedTips open_im_sdk.FriendApplicationAddedTips - friendApplicationAddedTips.FromToUserID.FromUserID = req.CommID.FromUserID - friendApplicationAddedTips.FromToUserID.ToUserID = req.CommID.ToUserID - friendNotification(req.CommID, constant.FriendApplicationNotification, &friendApplicationAddedTips) + var FriendApplicationTips open_im_sdk.FriendApplicationTips + FriendApplicationTips.FromToUserID.FromUserID = req.CommID.FromUserID + FriendApplicationTips.FromToUserID.ToUserID = req.CommID.ToUserID + friendNotification(req.CommID, constant.FriendApplicationNotification, &FriendApplicationTips) //fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) //if err != nil { // log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID) @@ -408,11 +408,11 @@ func BlackDeletedNotification(req *pbFriend.RemoveBlacklistReq) { // PublicUserInfo OpUser = 2; // uint64 OperationTime = 3; //} -func SelfInfoUpdatedNotification(operationID, userID string, opUserID string) { - var selfInfoUpdatedTips open_im_sdk.SelfInfoUpdatedTips +func UserInfoUpdatedNotification(operationID, userID string, needNotifiedUserID string) { + var selfInfoUpdatedTips open_im_sdk.UserInfoUpdatedTips selfInfoUpdatedTips.UserID = userID - commID := pbFriend.CommID{FromUserID: userID, ToUserID: userID, OpUserID: opUserID, OperationID: operationID} - friendNotification(&commID, constant.SelfInfoUpdatedNotification, &selfInfoUpdatedTips) + commID := pbFriend.CommID{FromUserID: userID, ToUserID: userID, OpUserID: needNotifiedUserID, OperationID: operationID} + friendNotification(&commID, constant.UserInfoUpdatedNotification, &selfInfoUpdatedTips) //u, err := imdb.GetUserByUserID(userID) //if err != nil { // log.NewError(operationID, "FindUserByUID failed ", err.Error(), userID) diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index e4366d6b6..a0c451026 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -235,8 +235,8 @@ func (s *userServer) UpdateUserInfo(ctx context.Context, req *pbUser.UpdateUserI return &pbUser.UpdateUserInfoResp{CommonResp: &pbUser.CommonResp{}}, nil } for _, v := range RpcResp.FriendInfoList { - chat.FriendInfoChangedNotification(req.OperationID, req.OpUserID, req.UserInfo.UserID, v.FriendUser.UserID) + chat.UserInfoUpdatedNotification(req.OperationID, req.UserInfo.UserID, v.FriendUser.UserID) } - chat.SelfInfoUpdatedNotification(req.OperationID, req.UserInfo.UserID, req.OpUserID) + chat.UserInfoUpdatedNotification(req.OperationID, req.UserInfo.UserID, req.OpUserID) return &pbUser.UpdateUserInfoResp{CommonResp: &pbUser.CommonResp{}}, nil } diff --git a/pkg/common/constant/constant.go b/pkg/common/constant/constant.go index 532aef20f..cd0c99fae 100644 --- a/pkg/common/constant/constant.go +++ b/pkg/common/constant/constant.go @@ -55,7 +55,7 @@ const ( BlackAddedNotification = 1207 //add_black BlackDeletedNotification = 1208 //remove_black - SelfInfoUpdatedNotification = 1303 //SetSelfInfoTip = 204 + UserInfoUpdatedNotification = 1303 //SetSelfInfoTip = 204 GroupCreatedNotification = 1501 GroupInfoSetNotification = 1502 diff --git a/pkg/proto/sdk_ws/ws.pb.go b/pkg/proto/sdk_ws/ws.pb.go index 5fa6688bd..5dc1cae3b 100644 --- a/pkg/proto/sdk_ws/ws.pb.go +++ b/pkg/proto/sdk_ws/ws.pb.go @@ -40,7 +40,7 @@ func (m *GroupInfo) Reset() { *m = GroupInfo{} } func (m *GroupInfo) String() string { return proto.CompactTextString(m) } func (*GroupInfo) ProtoMessage() {} func (*GroupInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_4239643aeea36936, []int{0} + return fileDescriptor_ws_551a30e7c7c24c98, []int{0} } func (m *GroupInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfo.Unmarshal(m, b) @@ -164,7 +164,7 @@ func (m *GroupMemberFullInfo) Reset() { *m = GroupMemberFullInfo{} } func (m *GroupMemberFullInfo) String() string { return proto.CompactTextString(m) } func (*GroupMemberFullInfo) ProtoMessage() {} func (*GroupMemberFullInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_4239643aeea36936, []int{1} + return fileDescriptor_ws_551a30e7c7c24c98, []int{1} } func (m *GroupMemberFullInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupMemberFullInfo.Unmarshal(m, b) @@ -269,7 +269,7 @@ func (m *PublicUserInfo) Reset() { *m = PublicUserInfo{} } func (m *PublicUserInfo) String() string { return proto.CompactTextString(m) } func (*PublicUserInfo) ProtoMessage() {} func (*PublicUserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_4239643aeea36936, []int{2} + return fileDescriptor_ws_551a30e7c7c24c98, []int{2} } func (m *PublicUserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PublicUserInfo.Unmarshal(m, b) @@ -344,7 +344,7 @@ func (m *UserInfo) Reset() { *m = UserInfo{} } func (m *UserInfo) String() string { return proto.CompactTextString(m) } func (*UserInfo) ProtoMessage() {} func (*UserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_4239643aeea36936, []int{3} + return fileDescriptor_ws_551a30e7c7c24c98, []int{3} } func (m *UserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserInfo.Unmarshal(m, b) @@ -451,7 +451,7 @@ func (m *FriendInfo) Reset() { *m = FriendInfo{} } func (m *FriendInfo) String() string { return proto.CompactTextString(m) } func (*FriendInfo) ProtoMessage() {} func (*FriendInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_4239643aeea36936, []int{4} + return fileDescriptor_ws_551a30e7c7c24c98, []int{4} } func (m *FriendInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfo.Unmarshal(m, b) @@ -536,7 +536,7 @@ func (m *BlackInfo) Reset() { *m = BlackInfo{} } func (m *BlackInfo) String() string { return proto.CompactTextString(m) } func (*BlackInfo) ProtoMessage() {} func (*BlackInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_4239643aeea36936, []int{5} + return fileDescriptor_ws_551a30e7c7c24c98, []int{5} } func (m *BlackInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackInfo.Unmarshal(m, b) @@ -617,7 +617,7 @@ func (m *GroupRequest) Reset() { *m = GroupRequest{} } func (m *GroupRequest) String() string { return proto.CompactTextString(m) } func (*GroupRequest) ProtoMessage() {} func (*GroupRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_4239643aeea36936, []int{6} + return fileDescriptor_ws_551a30e7c7c24c98, []int{6} } func (m *GroupRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupRequest.Unmarshal(m, b) @@ -725,7 +725,7 @@ func (m *FriendRequest) Reset() { *m = FriendRequest{} } func (m *FriendRequest) String() string { return proto.CompactTextString(m) } func (*FriendRequest) ProtoMessage() {} func (*FriendRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_4239643aeea36936, []int{7} + return fileDescriptor_ws_551a30e7c7c24c98, []int{7} } func (m *FriendRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendRequest.Unmarshal(m, b) @@ -866,7 +866,7 @@ func (m *PullMessageBySeqListResp) Reset() { *m = PullMessageBySeqListRe func (m *PullMessageBySeqListResp) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListResp) ProtoMessage() {} func (*PullMessageBySeqListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_4239643aeea36936, []int{8} + return fileDescriptor_ws_551a30e7c7c24c98, []int{8} } func (m *PullMessageBySeqListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListResp.Unmarshal(m, b) @@ -941,7 +941,7 @@ func (m *PullMessageBySeqListReq) Reset() { *m = PullMessageBySeqListReq func (m *PullMessageBySeqListReq) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListReq) ProtoMessage() {} func (*PullMessageBySeqListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_4239643aeea36936, []int{9} + return fileDescriptor_ws_551a30e7c7c24c98, []int{9} } func (m *PullMessageBySeqListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListReq.Unmarshal(m, b) @@ -996,7 +996,7 @@ func (m *PullMessageReq) Reset() { *m = PullMessageReq{} } func (m *PullMessageReq) String() string { return proto.CompactTextString(m) } func (*PullMessageReq) ProtoMessage() {} func (*PullMessageReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_4239643aeea36936, []int{10} + return fileDescriptor_ws_551a30e7c7c24c98, []int{10} } func (m *PullMessageReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageReq.Unmarshal(m, b) @@ -1060,7 +1060,7 @@ func (m *PullMessageResp) Reset() { *m = PullMessageResp{} } func (m *PullMessageResp) String() string { return proto.CompactTextString(m) } func (*PullMessageResp) ProtoMessage() {} func (*PullMessageResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_4239643aeea36936, []int{11} + return fileDescriptor_ws_551a30e7c7c24c98, []int{11} } func (m *PullMessageResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageResp.Unmarshal(m, b) @@ -1132,7 +1132,7 @@ func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} } func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqReq) ProtoMessage() {} func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_4239643aeea36936, []int{12} + return fileDescriptor_ws_551a30e7c7c24c98, []int{12} } func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) @@ -1164,7 +1164,7 @@ func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} } func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqResp) ProtoMessage() {} func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_4239643aeea36936, []int{13} + return fileDescriptor_ws_551a30e7c7c24c98, []int{13} } func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) @@ -1212,7 +1212,7 @@ func (m *GatherFormat) Reset() { *m = GatherFormat{} } func (m *GatherFormat) String() string { return proto.CompactTextString(m) } func (*GatherFormat) ProtoMessage() {} func (*GatherFormat) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_4239643aeea36936, []int{14} + return fileDescriptor_ws_551a30e7c7c24c98, []int{14} } func (m *GatherFormat) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GatherFormat.Unmarshal(m, b) @@ -1259,7 +1259,7 @@ func (m *UserSendMsgResp) Reset() { *m = UserSendMsgResp{} } func (m *UserSendMsgResp) String() string { return proto.CompactTextString(m) } func (*UserSendMsgResp) ProtoMessage() {} func (*UserSendMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_4239643aeea36936, []int{15} + return fileDescriptor_ws_551a30e7c7c24c98, []int{15} } func (m *UserSendMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserSendMsgResp.Unmarshal(m, b) @@ -1328,7 +1328,7 @@ func (m *MsgData) Reset() { *m = MsgData{} } func (m *MsgData) String() string { return proto.CompactTextString(m) } func (*MsgData) ProtoMessage() {} func (*MsgData) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_4239643aeea36936, []int{16} + return fileDescriptor_ws_551a30e7c7c24c98, []int{16} } func (m *MsgData) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgData.Unmarshal(m, b) @@ -1489,7 +1489,7 @@ func (m *OfflinePushInfo) Reset() { *m = OfflinePushInfo{} } func (m *OfflinePushInfo) String() string { return proto.CompactTextString(m) } func (*OfflinePushInfo) ProtoMessage() {} func (*OfflinePushInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_4239643aeea36936, []int{17} + return fileDescriptor_ws_551a30e7c7c24c98, []int{17} } func (m *OfflinePushInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OfflinePushInfo.Unmarshal(m, b) @@ -1556,7 +1556,7 @@ func (m *TipsComm) Reset() { *m = TipsComm{} } func (m *TipsComm) String() string { return proto.CompactTextString(m) } func (*TipsComm) ProtoMessage() {} func (*TipsComm) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_4239643aeea36936, []int{18} + return fileDescriptor_ws_551a30e7c7c24c98, []int{18} } func (m *TipsComm) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TipsComm.Unmarshal(m, b) @@ -1606,7 +1606,7 @@ func (m *GroupCreatedTips) Reset() { *m = GroupCreatedTips{} } func (m *GroupCreatedTips) String() string { return proto.CompactTextString(m) } func (*GroupCreatedTips) ProtoMessage() {} func (*GroupCreatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_4239643aeea36936, []int{19} + return fileDescriptor_ws_551a30e7c7c24c98, []int{19} } func (m *GroupCreatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupCreatedTips.Unmarshal(m, b) @@ -1675,7 +1675,7 @@ func (m *GroupInfoSetTips) Reset() { *m = GroupInfoSetTips{} } func (m *GroupInfoSetTips) String() string { return proto.CompactTextString(m) } func (*GroupInfoSetTips) ProtoMessage() {} func (*GroupInfoSetTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_4239643aeea36936, []int{20} + return fileDescriptor_ws_551a30e7c7c24c98, []int{20} } func (m *GroupInfoSetTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfoSetTips.Unmarshal(m, b) @@ -1730,7 +1730,7 @@ func (m *JoinGroupApplicationTips) Reset() { *m = JoinGroupApplicationTi func (m *JoinGroupApplicationTips) String() string { return proto.CompactTextString(m) } func (*JoinGroupApplicationTips) ProtoMessage() {} func (*JoinGroupApplicationTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_4239643aeea36936, []int{21} + return fileDescriptor_ws_551a30e7c7c24c98, []int{21} } func (m *JoinGroupApplicationTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JoinGroupApplicationTips.Unmarshal(m, b) @@ -1786,7 +1786,7 @@ func (m *MemberQuitTips) Reset() { *m = MemberQuitTips{} } func (m *MemberQuitTips) String() string { return proto.CompactTextString(m) } func (*MemberQuitTips) ProtoMessage() {} func (*MemberQuitTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_4239643aeea36936, []int{22} + return fileDescriptor_ws_551a30e7c7c24c98, []int{22} } func (m *MemberQuitTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberQuitTips.Unmarshal(m, b) @@ -1841,7 +1841,7 @@ func (m *GroupApplicationAcceptedTips) Reset() { *m = GroupApplicationAc func (m *GroupApplicationAcceptedTips) String() string { return proto.CompactTextString(m) } func (*GroupApplicationAcceptedTips) ProtoMessage() {} func (*GroupApplicationAcceptedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_4239643aeea36936, []int{23} + return fileDescriptor_ws_551a30e7c7c24c98, []int{23} } func (m *GroupApplicationAcceptedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupApplicationAcceptedTips.Unmarshal(m, b) @@ -1896,7 +1896,7 @@ func (m *GroupApplicationRejectedTips) Reset() { *m = GroupApplicationRe func (m *GroupApplicationRejectedTips) String() string { return proto.CompactTextString(m) } func (*GroupApplicationRejectedTips) ProtoMessage() {} func (*GroupApplicationRejectedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_4239643aeea36936, []int{24} + return fileDescriptor_ws_551a30e7c7c24c98, []int{24} } func (m *GroupApplicationRejectedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupApplicationRejectedTips.Unmarshal(m, b) @@ -1952,7 +1952,7 @@ func (m *GroupOwnerTransferredTips) Reset() { *m = GroupOwnerTransferred func (m *GroupOwnerTransferredTips) String() string { return proto.CompactTextString(m) } func (*GroupOwnerTransferredTips) ProtoMessage() {} func (*GroupOwnerTransferredTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_4239643aeea36936, []int{25} + return fileDescriptor_ws_551a30e7c7c24c98, []int{25} } func (m *GroupOwnerTransferredTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupOwnerTransferredTips.Unmarshal(m, b) @@ -2015,7 +2015,7 @@ func (m *MemberKickedTips) Reset() { *m = MemberKickedTips{} } func (m *MemberKickedTips) String() string { return proto.CompactTextString(m) } func (*MemberKickedTips) ProtoMessage() {} func (*MemberKickedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_4239643aeea36936, []int{26} + return fileDescriptor_ws_551a30e7c7c24c98, []int{26} } func (m *MemberKickedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberKickedTips.Unmarshal(m, b) @@ -2078,7 +2078,7 @@ func (m *MemberInvitedTips) Reset() { *m = MemberInvitedTips{} } func (m *MemberInvitedTips) String() string { return proto.CompactTextString(m) } func (*MemberInvitedTips) ProtoMessage() {} func (*MemberInvitedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_4239643aeea36936, []int{27} + return fileDescriptor_ws_551a30e7c7c24c98, []int{27} } func (m *MemberInvitedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInvitedTips.Unmarshal(m, b) @@ -2140,7 +2140,7 @@ func (m *MemberEnterTips) Reset() { *m = MemberEnterTips{} } func (m *MemberEnterTips) String() string { return proto.CompactTextString(m) } func (*MemberEnterTips) ProtoMessage() {} func (*MemberEnterTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_4239643aeea36936, []int{28} + return fileDescriptor_ws_551a30e7c7c24c98, []int{28} } func (m *MemberEnterTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberEnterTips.Unmarshal(m, b) @@ -2194,7 +2194,7 @@ func (m *FriendApplication) Reset() { *m = FriendApplication{} } func (m *FriendApplication) String() string { return proto.CompactTextString(m) } func (*FriendApplication) ProtoMessage() {} func (*FriendApplication) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_4239643aeea36936, []int{29} + return fileDescriptor_ws_551a30e7c7c24c98, []int{29} } func (m *FriendApplication) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplication.Unmarshal(m, b) @@ -2247,7 +2247,7 @@ func (m *FromToUserID) Reset() { *m = FromToUserID{} } func (m *FromToUserID) String() string { return proto.CompactTextString(m) } func (*FromToUserID) ProtoMessage() {} func (*FromToUserID) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_4239643aeea36936, []int{30} + return fileDescriptor_ws_551a30e7c7c24c98, []int{30} } func (m *FromToUserID) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FromToUserID.Unmarshal(m, b) @@ -2282,38 +2282,38 @@ func (m *FromToUserID) GetToUserID() string { } // FromUserID apply to add ToUserID -type FriendApplicationAddedTips struct { +type FriendApplicationTips struct { FromToUserID *FromToUserID `protobuf:"bytes,1,opt,name=fromToUserID" json:"fromToUserID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *FriendApplicationAddedTips) Reset() { *m = FriendApplicationAddedTips{} } -func (m *FriendApplicationAddedTips) String() string { return proto.CompactTextString(m) } -func (*FriendApplicationAddedTips) ProtoMessage() {} -func (*FriendApplicationAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_4239643aeea36936, []int{31} +func (m *FriendApplicationTips) Reset() { *m = FriendApplicationTips{} } +func (m *FriendApplicationTips) String() string { return proto.CompactTextString(m) } +func (*FriendApplicationTips) ProtoMessage() {} +func (*FriendApplicationTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_551a30e7c7c24c98, []int{31} } -func (m *FriendApplicationAddedTips) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FriendApplicationAddedTips.Unmarshal(m, b) +func (m *FriendApplicationTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FriendApplicationTips.Unmarshal(m, b) } -func (m *FriendApplicationAddedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FriendApplicationAddedTips.Marshal(b, m, deterministic) +func (m *FriendApplicationTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FriendApplicationTips.Marshal(b, m, deterministic) } -func (dst *FriendApplicationAddedTips) XXX_Merge(src proto.Message) { - xxx_messageInfo_FriendApplicationAddedTips.Merge(dst, src) +func (dst *FriendApplicationTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_FriendApplicationTips.Merge(dst, src) } -func (m *FriendApplicationAddedTips) XXX_Size() int { - return xxx_messageInfo_FriendApplicationAddedTips.Size(m) +func (m *FriendApplicationTips) XXX_Size() int { + return xxx_messageInfo_FriendApplicationTips.Size(m) } -func (m *FriendApplicationAddedTips) XXX_DiscardUnknown() { - xxx_messageInfo_FriendApplicationAddedTips.DiscardUnknown(m) +func (m *FriendApplicationTips) XXX_DiscardUnknown() { + xxx_messageInfo_FriendApplicationTips.DiscardUnknown(m) } -var xxx_messageInfo_FriendApplicationAddedTips proto.InternalMessageInfo +var xxx_messageInfo_FriendApplicationTips proto.InternalMessageInfo -func (m *FriendApplicationAddedTips) GetFromToUserID() *FromToUserID { +func (m *FriendApplicationTips) GetFromToUserID() *FromToUserID { if m != nil { return m.FromToUserID } @@ -2333,7 +2333,7 @@ func (m *FriendApplicationApprovedTips) Reset() { *m = FriendApplication func (m *FriendApplicationApprovedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationApprovedTips) ProtoMessage() {} func (*FriendApplicationApprovedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_4239643aeea36936, []int{32} + return fileDescriptor_ws_551a30e7c7c24c98, []int{32} } func (m *FriendApplicationApprovedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationApprovedTips.Unmarshal(m, b) @@ -2380,7 +2380,7 @@ func (m *FriendApplicationRejectedTips) Reset() { *m = FriendApplication func (m *FriendApplicationRejectedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationRejectedTips) ProtoMessage() {} func (*FriendApplicationRejectedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_4239643aeea36936, []int{33} + return fileDescriptor_ws_551a30e7c7c24c98, []int{33} } func (m *FriendApplicationRejectedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationRejectedTips.Unmarshal(m, b) @@ -2428,7 +2428,7 @@ func (m *FriendAddedTips) Reset() { *m = FriendAddedTips{} } func (m *FriendAddedTips) String() string { return proto.CompactTextString(m) } func (*FriendAddedTips) ProtoMessage() {} func (*FriendAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_4239643aeea36936, []int{34} + return fileDescriptor_ws_551a30e7c7c24c98, []int{34} } func (m *FriendAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendAddedTips.Unmarshal(m, b) @@ -2481,7 +2481,7 @@ func (m *FriendDeletedTips) Reset() { *m = FriendDeletedTips{} } func (m *FriendDeletedTips) String() string { return proto.CompactTextString(m) } func (*FriendDeletedTips) ProtoMessage() {} func (*FriendDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_4239643aeea36936, []int{35} + return fileDescriptor_ws_551a30e7c7c24c98, []int{35} } func (m *FriendDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendDeletedTips.Unmarshal(m, b) @@ -2519,7 +2519,7 @@ func (m *BlackAddedTips) Reset() { *m = BlackAddedTips{} } func (m *BlackAddedTips) String() string { return proto.CompactTextString(m) } func (*BlackAddedTips) ProtoMessage() {} func (*BlackAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_4239643aeea36936, []int{36} + return fileDescriptor_ws_551a30e7c7c24c98, []int{36} } func (m *BlackAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackAddedTips.Unmarshal(m, b) @@ -2557,7 +2557,7 @@ func (m *BlackDeletedTips) Reset() { *m = BlackDeletedTips{} } func (m *BlackDeletedTips) String() string { return proto.CompactTextString(m) } func (*BlackDeletedTips) ProtoMessage() {} func (*BlackDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_4239643aeea36936, []int{37} + return fileDescriptor_ws_551a30e7c7c24c98, []int{37} } func (m *BlackDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackDeletedTips.Unmarshal(m, b) @@ -2595,7 +2595,7 @@ func (m *FriendInfoChangedTips) Reset() { *m = FriendInfoChangedTips{} } func (m *FriendInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*FriendInfoChangedTips) ProtoMessage() {} func (*FriendInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_4239643aeea36936, []int{38} + return fileDescriptor_ws_551a30e7c7c24c98, []int{38} } func (m *FriendInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfoChangedTips.Unmarshal(m, b) @@ -2623,38 +2623,38 @@ func (m *FriendInfoChangedTips) GetFromToUserID() *FromToUserID { } // ////////////////////user///////////////////// -type SelfInfoUpdatedTips struct { +type UserInfoUpdatedTips struct { UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *SelfInfoUpdatedTips) Reset() { *m = SelfInfoUpdatedTips{} } -func (m *SelfInfoUpdatedTips) String() string { return proto.CompactTextString(m) } -func (*SelfInfoUpdatedTips) ProtoMessage() {} -func (*SelfInfoUpdatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_4239643aeea36936, []int{39} +func (m *UserInfoUpdatedTips) Reset() { *m = UserInfoUpdatedTips{} } +func (m *UserInfoUpdatedTips) String() string { return proto.CompactTextString(m) } +func (*UserInfoUpdatedTips) ProtoMessage() {} +func (*UserInfoUpdatedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_551a30e7c7c24c98, []int{39} } -func (m *SelfInfoUpdatedTips) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SelfInfoUpdatedTips.Unmarshal(m, b) +func (m *UserInfoUpdatedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UserInfoUpdatedTips.Unmarshal(m, b) } -func (m *SelfInfoUpdatedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SelfInfoUpdatedTips.Marshal(b, m, deterministic) +func (m *UserInfoUpdatedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UserInfoUpdatedTips.Marshal(b, m, deterministic) } -func (dst *SelfInfoUpdatedTips) XXX_Merge(src proto.Message) { - xxx_messageInfo_SelfInfoUpdatedTips.Merge(dst, src) +func (dst *UserInfoUpdatedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_UserInfoUpdatedTips.Merge(dst, src) } -func (m *SelfInfoUpdatedTips) XXX_Size() int { - return xxx_messageInfo_SelfInfoUpdatedTips.Size(m) +func (m *UserInfoUpdatedTips) XXX_Size() int { + return xxx_messageInfo_UserInfoUpdatedTips.Size(m) } -func (m *SelfInfoUpdatedTips) XXX_DiscardUnknown() { - xxx_messageInfo_SelfInfoUpdatedTips.DiscardUnknown(m) +func (m *UserInfoUpdatedTips) XXX_DiscardUnknown() { + xxx_messageInfo_UserInfoUpdatedTips.DiscardUnknown(m) } -var xxx_messageInfo_SelfInfoUpdatedTips proto.InternalMessageInfo +var xxx_messageInfo_UserInfoUpdatedTips proto.InternalMessageInfo -func (m *SelfInfoUpdatedTips) GetUserID() string { +func (m *UserInfoUpdatedTips) GetUserID() string { if m != nil { return m.UserID } @@ -2694,7 +2694,7 @@ func init() { proto.RegisterType((*MemberEnterTips)(nil), "server_api_params.MemberEnterTips") proto.RegisterType((*FriendApplication)(nil), "server_api_params.FriendApplication") proto.RegisterType((*FromToUserID)(nil), "server_api_params.FromToUserID") - proto.RegisterType((*FriendApplicationAddedTips)(nil), "server_api_params.FriendApplicationAddedTips") + proto.RegisterType((*FriendApplicationTips)(nil), "server_api_params.FriendApplicationTips") proto.RegisterType((*FriendApplicationApprovedTips)(nil), "server_api_params.FriendApplicationApprovedTips") proto.RegisterType((*FriendApplicationRejectedTips)(nil), "server_api_params.FriendApplicationRejectedTips") proto.RegisterType((*FriendAddedTips)(nil), "server_api_params.FriendAddedTips") @@ -2702,138 +2702,138 @@ func init() { proto.RegisterType((*BlackAddedTips)(nil), "server_api_params.BlackAddedTips") proto.RegisterType((*BlackDeletedTips)(nil), "server_api_params.BlackDeletedTips") proto.RegisterType((*FriendInfoChangedTips)(nil), "server_api_params.FriendInfoChangedTips") - proto.RegisterType((*SelfInfoUpdatedTips)(nil), "server_api_params.SelfInfoUpdatedTips") + proto.RegisterType((*UserInfoUpdatedTips)(nil), "server_api_params.UserInfoUpdatedTips") } -func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_4239643aeea36936) } +func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_551a30e7c7c24c98) } -var fileDescriptor_ws_4239643aeea36936 = []byte{ +var fileDescriptor_ws_551a30e7c7c24c98 = []byte{ // 2019 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x59, 0x4f, 0x6f, 0x23, 0x49, - 0x15, 0x57, 0x77, 0xc7, 0x8e, 0xf3, 0x6c, 0xc7, 0x99, 0x9e, 0x65, 0x30, 0x61, 0x76, 0x08, 0xad, - 0xd5, 0x32, 0x42, 0x22, 0x48, 0x83, 0x90, 0x60, 0x10, 0xa0, 0xfc, 0x67, 0x96, 0x38, 0x09, 0xed, + 0x15, 0x57, 0x77, 0xc7, 0x8e, 0xfd, 0x6c, 0xc7, 0x99, 0x9e, 0x65, 0x30, 0xc3, 0xec, 0x10, 0x5a, + 0xab, 0x25, 0x42, 0x22, 0x48, 0x83, 0x90, 0x60, 0x10, 0xa0, 0xfc, 0x67, 0x96, 0x38, 0x09, 0x9d, 0x8c, 0x96, 0x03, 0xd2, 0xa8, 0xe3, 0x2e, 0x3b, 0xbd, 0x69, 0x57, 0xb5, 0xab, 0xbb, 0x33, 0x33, 0x17, 0x0e, 0x70, 0xe1, 0x0b, 0xc0, 0x91, 0x03, 0x17, 0xc4, 0x05, 0x71, 0x41, 0xdc, 0x11, 0x5f, 0x80, 0x33, 0x5f, 0x81, 0x2b, 0x07, 0x24, 0xa4, 0x45, 0xf5, 0xaa, 0xba, 0xbb, 0xaa, 0xed, 0x64, - 0xad, 0x28, 0xda, 0x41, 0xe2, 0xe6, 0xf7, 0xeb, 0x7a, 0xff, 0x5f, 0xbd, 0x7a, 0x55, 0x86, 0x5e, - 0x1a, 0x5e, 0xbd, 0x7a, 0x9d, 0x7e, 0xf3, 0x75, 0xba, 0x9d, 0x70, 0x96, 0x31, 0xf7, 0x41, 0x4a, - 0xf8, 0x35, 0xe1, 0xaf, 0x82, 0x24, 0x7a, 0x95, 0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, 0xc0, 0xfb, - 0x8b, 0x0d, 0x0f, 0x31, 0xee, 0x03, 0x34, 0xe0, 0x30, 0x8f, 0xe3, 0xcf, 0xc8, 0xc0, 0x23, 0x68, - 0xe6, 0x52, 0x9d, 0x0c, 0xbf, 0xa2, 0x84, 0x1e, 0xce, 0x62, 0x72, 0x4c, 0xae, 0x49, 0x8c, 0x81, - 0x6f, 0xf8, 0x15, 0xe0, 0x6e, 0x42, 0xeb, 0x13, 0x16, 0x51, 0x8c, 0x89, 0x88, 0xb8, 0xe3, 0x97, - 0xb4, 0xf8, 0x46, 0xa3, 0xd1, 0x15, 0x15, 0x29, 0x95, 0xe1, 0x2e, 0x69, 0x3d, 0x13, 0x4d, 0x33, - 0x13, 0x1f, 0xc2, 0x7a, 0x90, 0x24, 0x83, 0x80, 0x4e, 0x08, 0x97, 0x4a, 0x57, 0x51, 0x69, 0x0d, - 0x15, 0xf9, 0x10, 0x9a, 0x86, 0x2c, 0xe7, 0x23, 0x82, 0xe1, 0x6e, 0xf8, 0x1a, 0x22, 0xe4, 0xb0, - 0x84, 0x70, 0x2d, 0x8c, 0x32, 0xf2, 0x35, 0x54, 0x65, 0x05, 0x8a, 0xac, 0x78, 0xbf, 0xb5, 0x60, - 0xfd, 0x2c, 0xbf, 0x88, 0xa3, 0x11, 0x2e, 0x10, 0x41, 0xab, 0x42, 0x63, 0x19, 0xa1, 0xd1, 0x1d, - 0xb4, 0x6f, 0x76, 0xd0, 0x31, 0x1d, 0x7c, 0x04, 0xcd, 0x09, 0xa1, 0x21, 0xe1, 0x18, 0xb0, 0x86, - 0xaf, 0xa8, 0x05, 0x8e, 0x37, 0x16, 0x39, 0xee, 0xfd, 0xc6, 0x86, 0xd6, 0xe7, 0x6c, 0xda, 0x16, - 0xb4, 0x93, 0x4b, 0x46, 0xc9, 0x49, 0x2e, 0x8a, 0x49, 0x25, 0x53, 0x87, 0xdc, 0xf7, 0xa0, 0x71, - 0x11, 0xf1, 0xec, 0x12, 0xb3, 0xd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 0x24, 0x1b, 0x04, 0x6f, 0x76, 0x68, - 0x38, 0x40, 0xf3, 0x7c, 0x32, 0xf3, 0x0e, 0xe0, 0xe1, 0x1c, 0x9a, 0x26, 0x9a, 0xa3, 0xd6, 0x0d, - 0x8e, 0xda, 0xba, 0xa3, 0xde, 0x09, 0x74, 0x74, 0xd5, 0x62, 0xe3, 0x45, 0xa1, 0x4a, 0xac, 0x1d, - 0x85, 0xee, 0x36, 0xac, 0xc4, 0xa2, 0x2a, 0x6c, 0xb4, 0x7c, 0x73, 0x81, 0xe5, 0x83, 0x74, 0xb2, - 0x1f, 0x64, 0x81, 0x8f, 0xeb, 0xbc, 0x19, 0xf4, 0x84, 0xdd, 0x43, 0x42, 0xc3, 0x41, 0x3a, 0x41, - 0x93, 0xb6, 0xa0, 0x2d, 0xb9, 0x06, 0xe9, 0xa4, 0x3a, 0xce, 0x35, 0x48, 0xac, 0x18, 0xc5, 0x11, - 0xa1, 0x99, 0x5c, 0xa1, 0xea, 0x53, 0x83, 0x64, 0x6d, 0xd1, 0xb0, 0x9c, 0x68, 0xb0, 0xb6, 0x24, - 0xed, 0xfd, 0xb5, 0x01, 0xab, 0xca, 0x08, 0x59, 0x67, 0x34, 0xac, 0x6a, 0x53, 0x52, 0xb2, 0xd7, - 0x8d, 0xae, 0xab, 0xeb, 0x81, 0xa4, 0xf4, 0x0b, 0x85, 0x63, 0x5e, 0x28, 0x6a, 0x36, 0xad, 0xcc, - 0xdb, 0x54, 0xf3, 0xab, 0x31, 0xef, 0xd7, 0xd7, 0x61, 0x23, 0xc5, 0x7e, 0x7c, 0x16, 0x07, 0xd9, - 0x98, 0xf1, 0xa9, 0x1a, 0x88, 0x1a, 0xfe, 0x1c, 0x2e, 0x66, 0x09, 0x89, 0x95, 0xe7, 0x81, 0x6c, - 0xf8, 0x35, 0x54, 0x74, 0x5f, 0x89, 0x14, 0xe7, 0x82, 0x9c, 0x44, 0x4d, 0x50, 0xda, 0x96, 0xa6, - 0x11, 0xa3, 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ef, 0x24, 0x1e, 0x74, 0xa2, 0xd3, 0xa1, - 0x10, 0x34, 0x64, 0x39, 0x0d, 0xcb, 0xd7, 0x04, 0x0d, 0x13, 0x85, 0x14, 0x9d, 0x0e, 0x77, 0x83, - 0x70, 0x42, 0xe4, 0x9d, 0xbf, 0x81, 0x36, 0x99, 0xa0, 0xb7, 0x0f, 0xad, 0xf3, 0x28, 0x49, 0xf7, - 0xd8, 0x74, 0x2a, 0x36, 0x51, 0x48, 0x32, 0x71, 0x21, 0xb2, 0x30, 0xeb, 0x8a, 0x12, 0x05, 0x13, - 0x92, 0x71, 0x90, 0xc7, 0x99, 0x58, 0x5a, 0x6c, 0x5f, 0x0d, 0xf2, 0xfe, 0x66, 0xc3, 0x06, 0x4e, - 0x9f, 0x7b, 0x98, 0xbe, 0x50, 0x80, 0xee, 0x33, 0x68, 0xe0, 0x66, 0x53, 0x13, 0xef, 0xed, 0x13, - 0xab, 0x5c, 0xea, 0xfe, 0x00, 0x9a, 0x0c, 0x1b, 0xa3, 0x1a, 0x73, 0x3f, 0xbc, 0x89, 0xc9, 0x7c, - 0x38, 0xf0, 0x15, 0x97, 0x7b, 0x08, 0x20, 0xdf, 0x34, 0xca, 0xa3, 0x6e, 0x79, 0x19, 0x1a, 0xa7, - 0x08, 0x5e, 0x79, 0x48, 0x69, 0xaf, 0x07, 0x26, 0xe8, 0x9e, 0xc0, 0x3a, 0x9a, 0x7d, 0x5a, 0x5c, - 0x5d, 0x30, 0xc6, 0xcb, 0x6b, 0xac, 0x71, 0x7b, 0xbf, 0xb3, 0x54, 0x18, 0xc5, 0xd7, 0x21, 0xc1, - 0xd8, 0x6a, 0x21, 0xb1, 0xee, 0x14, 0x92, 0x4d, 0x68, 0x4d, 0x73, 0xed, 0x26, 0xe5, 0xf8, 0x25, - 0x5d, 0xa5, 0xc8, 0x59, 0x3a, 0x45, 0xde, 0xef, 0x2d, 0xe8, 0x7f, 0xc4, 0x22, 0x8a, 0x1f, 0x76, - 0x92, 0x24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, 0xd8, 0x40, 0xb1, 0xf7, - 0x6e, 0xef, 0xcf, 0xe0, 0x0b, 0x55, 0x02, 0xf6, 0x2e, 0x03, 0x3a, 0xb9, 0x4f, 0xe9, 0xdf, 0x80, - 0x87, 0x43, 0x12, 0x8f, 0x85, 0xec, 0x97, 0x49, 0x58, 0xde, 0x53, 0x6e, 0x78, 0xef, 0xba, 0x68, - 0xe2, 0xdf, 0xc6, 0xdf, 0xfa, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x2f, 0x9a, 0xab, 0x73, 0x49, + 0xad, 0x28, 0xda, 0x41, 0xe2, 0xe6, 0xf7, 0xeb, 0x7a, 0xff, 0x5f, 0xbd, 0x7a, 0x55, 0x86, 0x7e, + 0x1a, 0x5e, 0xbd, 0x7a, 0x9d, 0x7e, 0xf3, 0x75, 0xba, 0x95, 0x70, 0x96, 0x31, 0xf7, 0x41, 0x4a, + 0xf8, 0x35, 0xe1, 0xaf, 0x82, 0x24, 0x7a, 0x95, 0x04, 0x3c, 0x98, 0xa6, 0xde, 0xbf, 0x6c, 0x68, + 0x1f, 0x72, 0x96, 0x27, 0x2f, 0xe8, 0x98, 0xb9, 0x03, 0x58, 0x9d, 0x20, 0xb1, 0x37, 0xb0, 0x36, + 0xac, 0xcd, 0xb6, 0x5f, 0x90, 0xee, 0x13, 0x68, 0xe3, 0xcf, 0xe3, 0x60, 0x4a, 0x06, 0x36, 0x7e, + 0xab, 0x00, 0xd7, 0x83, 0x2e, 0x65, 0x59, 0x34, 0x8e, 0x46, 0x41, 0x16, 0x31, 0x3a, 0x70, 0x70, + 0x81, 0x81, 0x89, 0x35, 0x11, 0xcd, 0x38, 0x0b, 0xf3, 0x11, 0xae, 0x59, 0x91, 0x6b, 0x74, 0x4c, + 0xe8, 0x1f, 0x07, 0x23, 0xf2, 0xd2, 0x3f, 0x1a, 0x34, 0xa4, 0x7e, 0x45, 0xba, 0x1b, 0xd0, 0x61, + 0xaf, 0x29, 0xe1, 0x2f, 0x53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 0x74, 0x8b, + 0xd4, 0x6d, 0xf1, 0x0d, 0x26, 0xef, 0x17, 0x16, 0xbc, 0x3f, 0x27, 0x7e, 0x3b, 0x49, 0x38, 0xbb, + 0x56, 0xc5, 0x7d, 0x1f, 0x6a, 0xcc, 0xd6, 0x6a, 0xd7, 0x5b, 0xeb, 0x42, 0x23, 0x8c, 0xe3, 0xe0, + 0x73, 0x30, 0xe2, 0x0f, 0x16, 0xf4, 0x95, 0x11, 0x61, 0xa8, 0xd4, 0x7e, 0x1b, 0x9a, 0xf2, 0x91, + 0x5b, 0x29, 0x7c, 0x7f, 0xa1, 0xc2, 0xe2, 0x71, 0xde, 0x57, 0x8b, 0xe7, 0x2b, 0xd2, 0x5e, 0x34, + 0x06, 0x7e, 0xb7, 0xec, 0x00, 0x4b, 0x3f, 0x43, 0x2b, 0x06, 0xef, 0xa7, 0x45, 0x31, 0xef, 0x91, + 0x98, 0xdc, 0x67, 0x8c, 0xbc, 0x97, 0xb0, 0x86, 0x2f, 0xee, 0x55, 0x0c, 0xee, 0x45, 0xec, 0xc7, + 0xb0, 0x8e, 0x62, 0xef, 0xdd, 0xde, 0x72, 0x77, 0x88, 0xf8, 0xec, 0x5e, 0x06, 0x74, 0x72, 0x9f, + 0xd2, 0xbf, 0x01, 0x0f, 0x8b, 0xd8, 0xbf, 0x4c, 0xc2, 0xf2, 0x8a, 0x72, 0xc3, 0x53, 0xd7, 0x45, + 0x13, 0xff, 0x31, 0xfe, 0xd6, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x10, 0x4c, 0x40, 0x71, 0x44, 0x1e, 0x00, 0x00, } diff --git a/pkg/proto/sdk_ws/ws.proto b/pkg/proto/sdk_ws/ws.proto index ac8f8601f..2f51bda22 100644 --- a/pkg/proto/sdk_ws/ws.proto +++ b/pkg/proto/sdk_ws/ws.proto @@ -333,7 +333,7 @@ message FromToUserID{ } //FromUserID apply to add ToUserID -message FriendApplicationAddedTips{ +message FriendApplicationTips{ FromToUserID fromToUserID = 1; } @@ -377,6 +377,6 @@ message FriendInfoChangedTips{ FromToUserID fromToUserID = 1; } //////////////////////user///////////////////// -message SelfInfoUpdatedTips{ +message UserInfoUpdatedTips{ string userID = 1; } From 766a05236a6b87ae2cc86cbb58cdeb65333e588b Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Mon, 17 Jan 2022 10:11:26 +0800 Subject: [PATCH 287/337] Refactor code --- internal/rpc/msg/friend_notification.go | 306 +----------------------- pkg/common/config/config.go | 5 +- 2 files changed, 11 insertions(+), 300 deletions(-) diff --git a/internal/rpc/msg/friend_notification.go b/internal/rpc/msg/friend_notification.go index 39e3684dc..e44bc0ff0 100644 --- a/internal/rpc/msg/friend_notification.go +++ b/internal/rpc/msg/friend_notification.go @@ -12,23 +12,6 @@ import ( "github.com/golang/protobuf/proto" ) -//message MemberInfoChangedTips{ -// int32 ChangeType = 1; //1:info changed; 2:mute -// GroupMemberFullInfo OpUser = 2; //who do this -// GroupMemberFullInfo FinalInfo = 3; // -// uint64 MuteTime = 4; -// GroupInfo Group = 5; -//} -//func MemberInfoChangedNotification(operationID string, group *immysql.Group, opUser *immysql.GroupMember, userFinalInfo *immysql.GroupMember) { - -//} - -//message FriendApplicationAddedTips{ -// PublicUserInfo OpUser = 1; //user1 -// FriendApplication Application = 2; -// PublicUserInfo OpedUser = 3; //user2 -//} - func getFromToUserNickname(fromUserID, toUserID string) (string, string, error) { from, err := imdb.GetUserByUserID(fromUserID) if err != nil { @@ -59,8 +42,7 @@ func friendNotification(commID *pbFriend.CommID, contentType int32, m proto.Mess cn := config.Config.Notification switch contentType { case constant.FriendApplicationNotification: - - tips.DefaultTips = fromUserNickname + cn.FriendApplicationAdded.DefaultTips.Tips + tips.DefaultTips = fromUserNickname + cn.FriendApplication.DefaultTips.Tips case constant.FriendApplicationApprovedNotification: tips.DefaultTips = fromUserNickname + cn.FriendApplicationApproved.DefaultTips.Tips case constant.FriendApplicationRejectedNotification: @@ -70,7 +52,7 @@ func friendNotification(commID *pbFriend.CommID, contentType int32, m proto.Mess case constant.FriendDeletedNotification: tips.DefaultTips = cn.FriendDeleted.DefaultTips.Tips + toUserNickname case constant.FriendRemarkSetNotification: - tips.DefaultTips = fromUserNickname + cn.FriendInfoChanged.DefaultTips.Tips + tips.DefaultTips = fromUserNickname + cn.FriendRemarkSet.DefaultTips.Tips case constant.BlackAddedNotification: tips.DefaultTips = cn.BlackAdded.DefaultTips.Tips + toUserNickname case constant.BlackDeletedNotification: @@ -96,37 +78,10 @@ func friendNotification(commID *pbFriend.CommID, contentType int32, m proto.Mess } func FriendApplicationNotification(req *pbFriend.AddFriendReq) { - log.Info(req.CommID.OperationID, utils.GetSelfFuncName(), "args: ", req.String()) - var FriendApplicationTips open_im_sdk.FriendApplicationTips + FriendApplicationTips := open_im_sdk.FriendApplicationTips{FromToUserID: &open_im_sdk.FromToUserID{}} FriendApplicationTips.FromToUserID.FromUserID = req.CommID.FromUserID FriendApplicationTips.FromToUserID.ToUserID = req.CommID.ToUserID friendNotification(req.CommID, constant.FriendApplicationNotification, &FriendApplicationTips) - //fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) - //if err != nil { - // log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID) - // return - //} - //var tips open_im_sdk.TipsComm - //tips.Detail, err = proto.Marshal(&friendApplicationAddedTips) - //if err != nil { - // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), friendApplicationAddedTips.String()) - // return - //} - //tips.DefaultTips = fromUserNickname + " FriendApplicationAddedNotification " + toUserNickname - // - //var n NotificationMsg - //n.SendID = req.CommID.FromUserID - //n.RecvID = req.CommID.ToUserID - //n.ContentType = constant.FriendApplicationAddedNotification - //n.SessionType = constant.SingleChatType - //n.MsgFrom = constant.SysMsgType - //n.OperationID = req.CommID.OperationID - //n.Content, err = proto.Marshal(&tips) - //if err != nil { - // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String()) - // return - //} - //Notification(&n) } func FriendApplicationApprovedNotification(req *pbFriend.AddFriendResponseReq) { @@ -134,35 +89,7 @@ func FriendApplicationApprovedNotification(req *pbFriend.AddFriendResponseReq) { FriendApplicationApprovedTips.FromToUserID.FromUserID = req.CommID.FromUserID FriendApplicationApprovedTips.FromToUserID.ToUserID = req.CommID.ToUserID FriendApplicationApprovedTips.HandleMsg = req.HandleMsg - //fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) - //if err != nil { - // log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID) - // return - //} - friendNotification(req.CommID, constant.FriendApplicationApprovedNotification, &FriendApplicationApprovedTips) - - //var tips open_im_sdk.TipsComm - //tips.DefaultTips = fromUserNickname + " FriendApplicationProcessedNotification " + toUserNickname - //tips.Detail, err = proto.Marshal(&friendApplicationProcessedTips) - //if err != nil { - // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), friendApplicationProcessedTips.String()) - // return - //} - // - //var n NotificationMsg - //n.SendID = req.CommID.FromUserID - //n.RecvID = req.CommID.ToUserID - //n.ContentType = constant.FriendApplicationProcessedNotification - //n.SessionType = constant.SingleChatType - //n.MsgFrom = constant.SysMsgType - //n.OperationID = req.CommID.OperationID - //n.Content, err = proto.Marshal(&tips) - //if err != nil { - // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String()) - // return - //} - //Notification(&n) } func FriendApplicationRejectedNotification(req *pbFriend.AddFriendResponseReq) { @@ -170,55 +97,11 @@ func FriendApplicationRejectedNotification(req *pbFriend.AddFriendResponseReq) { FriendApplicationApprovedTips.FromToUserID.FromUserID = req.CommID.FromUserID FriendApplicationApprovedTips.FromToUserID.ToUserID = req.CommID.ToUserID FriendApplicationApprovedTips.HandleMsg = req.HandleMsg - friendNotification(req.CommID, constant.FriendApplicationRejectedNotification, &FriendApplicationApprovedTips) } -// -// -//func FriendApplicationProcessedNotification(req *pbFriend.AddFriendResponseReq) { -// var friendApplicationProcessedTips open_im_sdk.FriendApplicationProcessedTips -// friendApplicationProcessedTips.FromToUserID.FromUserID = req.CommID.FromUserID -// friendApplicationProcessedTips.FromToUserID.ToUserID = req.CommID.ToUserID -// friendApplicationProcessedTips.HandleResult = req.HandleResult -// //fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) -// //if err != nil { -// // log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID) -// // return -// //} -// if friendApplicationProcessedTips.HandleResult == 1 { -// friendNotification(req.CommID, constant.FriendApplicationApprovedNotification, &friendApplicationProcessedTips) -// } else if friendApplicationProcessedTips.HandleResult == -1 { -// friendNotification(req.CommID, constant.FriendApplicationRejectedNotification, &friendApplicationProcessedTips) -// } else { -// log.Error(req.CommID.OperationID, "HandleResult failed ", friendApplicationProcessedTips.HandleResult) -// } -// -// //var tips open_im_sdk.TipsComm -// //tips.DefaultTips = fromUserNickname + " FriendApplicationProcessedNotification " + toUserNickname -// //tips.Detail, err = proto.Marshal(&friendApplicationProcessedTips) -// //if err != nil { -// // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), friendApplicationProcessedTips.String()) -// // return -// //} -// // -// //var n NotificationMsg -// //n.SendID = req.CommID.FromUserID -// //n.RecvID = req.CommID.ToUserID -// //n.ContentType = constant.FriendApplicationProcessedNotification -// //n.SessionType = constant.SingleChatType -// //n.MsgFrom = constant.SysMsgType -// //n.OperationID = req.CommID.OperationID -// //n.Content, err = proto.Marshal(&tips) -// //if err != nil { -// // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String()) -// // return -// //} -// //Notification(&n) -//} - func FriendAddedNotification(operationID, opUserID, fromUserID, toUserID string) { - var friendAddedTips open_im_sdk.FriendAddedTips + friendAddedTips := open_im_sdk.FriendAddedTips{Friend: &open_im_sdk.FriendInfo{}, OpUser: &open_im_sdk.PublicUserInfo{}} user, err := imdb.GetUserByUserID(opUserID) if err != nil { log.NewError(operationID, "GetUserByUserID failed ", err.Error(), opUserID) @@ -233,210 +116,39 @@ func FriendAddedNotification(operationID, opUserID, fromUserID, toUserID string) utils2.FriendDBCopyOpenIM(friendAddedTips.Friend, friend) commID := pbFriend.CommID{FromUserID: fromUserID, ToUserID: toUserID, OpUserID: opUserID, OperationID: operationID} friendNotification(&commID, constant.FriendAddedNotification, &friendAddedTips) - //fromUserNickname, toUserNickname, err := getFromToUserNickname(fromUserID, toUserID) - //if err != nil { - // log.Error(operationID, "getFromToUserNickname failed ", err.Error(), fromUserID, toUserID) - // return - //} - //var tips open_im_sdk.TipsComm - //tips.DefaultTips = fromUserNickname + " FriendAddedNotification " + toUserNickname - //tips.Detail, err = proto.Marshal(&friendAddedTips) - //if err != nil { - // log.Error(operationID, "Marshal failed ", err.Error(), friendAddedTips) - // return - //} - // - //var n NotificationMsg - //n.SendID = fromUserID - //n.RecvID = toUserID - //n.ContentType = constant.FriendAddedNotification - //n.SessionType = constant.SingleChatType - //n.MsgFrom = constant.SysMsgType - //n.OperationID = operationID - //n.Content, err = proto.Marshal(&tips) - //if err != nil { - // log.Error(operationID, "Marshal failed ", err.Error(), tips.String()) - // return - //} - //Notification(&n) } -//message FriendDeletedTips{ -// FriendInfo Friend = 1; -//} func FriendDeletedNotification(req *pbFriend.DeleteFriendReq) { - var friendDeletedTips open_im_sdk.FriendDeletedTips + friendDeletedTips := open_im_sdk.FriendDeletedTips{FromToUserID: &open_im_sdk.FromToUserID{}} friendDeletedTips.FromToUserID.FromUserID = req.CommID.FromUserID friendDeletedTips.FromToUserID.ToUserID = req.CommID.ToUserID - //fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) - //if err != nil { - // log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", req.CommID.FromUserID, req.CommID.ToUserID) - // return - //} friendNotification(req.CommID, constant.FriendDeletedNotification, &friendDeletedTips) - //var tips open_im_sdk.TipsComm - //tips.DefaultTips = fromUserNickname + " FriendDeletedNotification " + toUserNickname - //tips.Detail, err = proto.Marshal(&friendDeletedTips) - //if err != nil { - // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), friendDeletedTips.String()) - // return - //} - // - //var n NotificationMsg - //n.SendID = req.CommID.FromUserID - //n.RecvID = req.CommID.ToUserID - //n.ContentType = constant.FriendDeletedNotification - //n.SessionType = constant.SingleChatType - //n.MsgFrom = constant.SysMsgType - //n.OperationID = req.CommID.OperationID - //n.Content, err = proto.Marshal(&tips) - //if err != nil { - // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String()) - // return - //} - //Notification(&n) } -//message FriendInfoChangedTips{ -// FriendInfo Friend = 1; -// PublicUserInfo OpUser = 2; -// uint64 OperationTime = 3; -//} func FriendRemarkSetNotification(operationID, opUserID, fromUserID, toUserID string) { - var friendInfoChangedTips open_im_sdk.FriendInfoChangedTips + friendInfoChangedTips := open_im_sdk.FriendInfoChangedTips{FromToUserID: &open_im_sdk.FromToUserID{}} friendInfoChangedTips.FromToUserID.FromUserID = fromUserID friendInfoChangedTips.FromToUserID.ToUserID = toUserID - //fromUserNickname, toUserNickname, err := getFromToUserNickname(fromUserID, toUserID) - //if err != nil { - // log.Error(operationID, "getFromToUserNickname failed ", fromUserID, toUserID) - // return - //} commID := pbFriend.CommID{FromUserID: fromUserID, ToUserID: toUserID, OpUserID: opUserID, OperationID: operationID} friendNotification(&commID, constant.FriendRemarkSetNotification, &friendInfoChangedTips) - //var tips open_im_sdk.TipsComm - //tips.DefaultTips = fromUserNickname + " FriendDeletedNotification " + toUserNickname - //tips.Detail, err = proto.Marshal(&friendInfoChangedTips) - //if err != nil { - // log.Error(operationID, "Marshal failed ", err.Error(), friendInfoChangedTips.String()) - // return - //} - // - //var n NotificationMsg - //n.SendID = fromUserID - //n.RecvID = toUserID - //n.ContentType = constant.FriendInfoChangedNotification - //n.SessionType = constant.SingleChatType - //n.MsgFrom = constant.SysMsgType - //n.OperationID = operationID - //n.Content, err = proto.Marshal(&tips) - //if err != nil { - // log.Error(operationID, "Marshal failed ", err.Error(), tips.String()) - // return - //} - //Notification(&n) } func BlackAddedNotification(req *pbFriend.AddBlacklistReq) { - var blackAddedTips open_im_sdk.BlackAddedTips + blackAddedTips := open_im_sdk.BlackAddedTips{FromToUserID: &open_im_sdk.FromToUserID{}} blackAddedTips.FromToUserID.FromUserID = req.CommID.FromUserID blackAddedTips.FromToUserID.ToUserID = req.CommID.ToUserID - //fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) - //if err != nil { - // log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", req.CommID.FromUserID, req.CommID.ToUserID) - // return - //} - //var tips open_im_sdk.TipsComm - //tips.DefaultTips = fromUserNickname + " BlackAddedNotification " + toUserNickname - //tips.Detail, err = proto.Marshal(&blackAddedTips) - //if err != nil { - // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), blackAddedTips.String()) - // return - //} friendNotification(req.CommID, constant.BlackAddedNotification, &blackAddedTips) - //var n NotificationMsg - //n.SendID = req.CommID.FromUserID - //n.RecvID = req.CommID.ToUserID - //n.ContentType = constant.BlackAddedNotification - //n.SessionType = constant.SingleChatType - //n.MsgFrom = constant.SysMsgType - //n.OperationID = req.CommID.OperationID - //n.Content, err = proto.Marshal(&tips) - //if err != nil { - // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String()) - // return - //} - //Notification(&n) } -//message BlackDeletedTips{ -// BlackInfo Black = 1; -//} func BlackDeletedNotification(req *pbFriend.RemoveBlacklistReq) { - var blackDeletedTips open_im_sdk.BlackDeletedTips + blackDeletedTips := open_im_sdk.BlackDeletedTips{FromToUserID: &open_im_sdk.FromToUserID{}} blackDeletedTips.FromToUserID.FromUserID = req.CommID.FromUserID blackDeletedTips.FromToUserID.ToUserID = req.CommID.ToUserID - //fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) - //if err != nil { - // log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID) - // return - //} - //var tips open_im_sdk.TipsComm - //tips.Detail, err = proto.Marshal(&blackDeletedTips) - //if err != nil { - // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), blackDeletedTips.String()) - // return - //} friendNotification(req.CommID, constant.BlackDeletedNotification, &blackDeletedTips) - //tips.DefaultTips = fromUserNickname + " BlackDeletedNotification " + toUserNickname - //var n NotificationMsg - //n.SendID = req.CommID.FromUserID - //n.RecvID = req.CommID.ToUserID - //n.ContentType = constant.BlackDeletedNotification - //n.SessionType = constant.SingleChatType - //n.MsgFrom = constant.SysMsgType - //n.OperationID = req.CommID.OperationID - //n.Content, err = proto.Marshal(&tips) - //if err != nil { - // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String()) - // return - //} - //Notification(&n) } -//message SelfInfoUpdatedTips{ -// UserInfo SelfUserInfo = 1; -// PublicUserInfo OpUser = 2; -// uint64 OperationTime = 3; -//} func UserInfoUpdatedNotification(operationID, userID string, needNotifiedUserID string) { - var selfInfoUpdatedTips open_im_sdk.UserInfoUpdatedTips - selfInfoUpdatedTips.UserID = userID + selfInfoUpdatedTips := open_im_sdk.UserInfoUpdatedTips{UserID: userID} commID := pbFriend.CommID{FromUserID: userID, ToUserID: userID, OpUserID: needNotifiedUserID, OperationID: operationID} friendNotification(&commID, constant.UserInfoUpdatedNotification, &selfInfoUpdatedTips) - //u, err := imdb.GetUserByUserID(userID) - //if err != nil { - // log.NewError(operationID, "FindUserByUID failed ", err.Error(), userID) - // return - //} - //var tips open_im_sdk.TipsComm - //tips.Detail, err = proto.Marshal(&selfInfoUpdatedTips) - //if err != nil { - // log.Error(operationID, "Marshal failed ", err.Error(), selfInfoUpdatedTips.String()) - // return - //} - //var n NotificationMsg - //n.SendID = userID - //n.RecvID = userID - //n.ContentType = constant.SelfInfoUpdatedNotification - //n.SessionType = constant.SingleChatType - //n.MsgFrom = constant.SysMsgType - //n.OperationID = operationID - // - //tips.DefaultTips = u.Nickname + " SelfInfoUpdatedNotification " - //n.Content, err = proto.Marshal(&tips) - //if err != nil { - // log.Error(operationID, "Marshal failed ", err.Error(), tips.String()) - // return - //} - //Notification(&n) } diff --git a/pkg/common/config/config.go b/pkg/common/config/config.go index bf175b3b6..339352a77 100644 --- a/pkg/common/config/config.go +++ b/pkg/common/config/config.go @@ -182,12 +182,11 @@ type config struct { DefaultTips PDefaultTips `yaml:"defaultTips"` } //////////////////////friend/////////////////////// - FriendApplicationAdded struct { + FriendApplication struct { Conversation PConversation `yaml:"conversation"` OfflinePush POfflinePush `yaml:"offlinePush"` DefaultTips PDefaultTips `yaml:"defaultTips"` } - FriendApplicationApproved struct { Conversation PConversation `yaml:"conversation"` OfflinePush POfflinePush `yaml:"offlinePush"` @@ -211,7 +210,7 @@ type config struct { OfflinePush POfflinePush `yaml:"offlinePush"` DefaultTips PDefaultTips `yaml:"defaultTips"` } - FriendInfoChanged struct { + FriendRemarkSet struct { Conversation PConversation `yaml:"conversation"` OfflinePush POfflinePush `yaml:"offlinePush"` DefaultTips PDefaultTips `yaml:"defaultTips"` From 7f4eb5624bf77e9b47f8849d89d7820bfb8cca35 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Mon, 17 Jan 2022 14:05:09 +0800 Subject: [PATCH 288/337] Refactor code --- pkg/common/config/config.go | 54 +++++++++++++++++++++++++++++++++++-- pkg/proto/auth/auth.proto | 2 +- pkg/proto/chat/chat.proto | 12 ++++----- pkg/proto/relay/relay.proto | 2 +- 4 files changed, 60 insertions(+), 10 deletions(-) diff --git a/pkg/common/config/config.go b/pkg/common/config/config.go index 339352a77..2e6870557 100644 --- a/pkg/common/config/config.go +++ b/pkg/common/config/config.go @@ -164,23 +164,73 @@ type config struct { BadgeCount bool `yaml:"badgeCount"` } Notification struct { + ///////////////////////group///////////////////////////// GroupCreated struct { Conversation PConversation `yaml:"conversation"` OfflinePush POfflinePush `yaml:"offlinePush"` DefaultTips PDefaultTips `yaml:"defaultTips"` } - GroupInfoChanged struct { + GroupInfoSet struct { Conversation PConversation `yaml:"conversation"` OfflinePush POfflinePush `yaml:"offlinePush"` DefaultTips PDefaultTips `yaml:"defaultTips"` } - ApplyJoinGroup struct { + JoinGroupApplication struct { Conversation PConversation `yaml:"conversation"` OfflinePush POfflinePush `yaml:"offlinePush"` DefaultTips PDefaultTips `yaml:"defaultTips"` } + + MemberQuit struct { + Conversation PConversation `yaml:"conversation"` + OfflinePush POfflinePush `yaml:"offlinePush"` + DefaultTips PDefaultTips `yaml:"defaultTips"` + } + + GroupApplicationAccepted struct { + Conversation PConversation `yaml:"conversation"` + OfflinePush POfflinePush `yaml:"offlinePush"` + DefaultTips PDefaultTips `yaml:"defaultTips"` + } + + GroupApplicationRejected struct { + Conversation PConversation `yaml:"conversation"` + OfflinePush POfflinePush `yaml:"offlinePush"` + DefaultTips PDefaultTips `yaml:"defaultTips"` + } + + GroupOwnerTransferred struct { + Conversation PConversation `yaml:"conversation"` + OfflinePush POfflinePush `yaml:"offlinePush"` + DefaultTips PDefaultTips `yaml:"defaultTips"` + } + + MemberKicked struct { + Conversation PConversation `yaml:"conversation"` + OfflinePush POfflinePush `yaml:"offlinePush"` + DefaultTips PDefaultTips `yaml:"defaultTips"` + } + + MemberInvited struct { + Conversation PConversation `yaml:"conversation"` + OfflinePush POfflinePush `yaml:"offlinePush"` + DefaultTips PDefaultTips `yaml:"defaultTips"` + } + + MemberEnter struct { + Conversation PConversation `yaml:"conversation"` + OfflinePush POfflinePush `yaml:"offlinePush"` + DefaultTips PDefaultTips `yaml:"defaultTips"` + } + ////////////////////////user/////////////////////// + UserInfoUpdated struct { + Conversation PConversation `yaml:"conversation"` + OfflinePush POfflinePush `yaml:"offlinePush"` + DefaultTips PDefaultTips `yaml:"defaultTips"` + } + //////////////////////friend/////////////////////// FriendApplication struct { Conversation PConversation `yaml:"conversation"` diff --git a/pkg/proto/auth/auth.proto b/pkg/proto/auth/auth.proto index 592c4987e..c91921fe9 100644 --- a/pkg/proto/auth/auth.proto +++ b/pkg/proto/auth/auth.proto @@ -9,7 +9,7 @@ message CommonResp{ } message UserRegisterReq { - open_im_sdk.UserInfo UserInfo = 1; + server_api_params.UserInfo UserInfo = 1; string OperationID = 2; } message UserRegisterResp { diff --git a/pkg/proto/chat/chat.proto b/pkg/proto/chat/chat.proto index 6a969ac20..12bac416c 100644 --- a/pkg/proto/chat/chat.proto +++ b/pkg/proto/chat/chat.proto @@ -6,18 +6,18 @@ option go_package = "./chat;pbChat";//The generated go pb file is in the current message MsgDataToMQ{ string token =1; string operationID = 2; - open_im_sdk.MsgData msgData = 3; + server_api_params.MsgData msgData = 3; } message MsgDataToDB { - open_im_sdk.MsgData msgData = 1; + server_api_params.MsgData msgData = 1; string operationID = 2; } message PushMsgDataToMQ{ string OperationID = 1; - open_im_sdk.MsgData msgData = 2; + server_api_params.MsgData msgData = 2; } //message PullMessageReq { @@ -87,7 +87,7 @@ message SendMsgReq { string token =1; string operationID = 2; -open_im_sdk.MsgData msgData = 3; +server_api_params.MsgData msgData = 3; } @@ -102,7 +102,7 @@ message SendMsgResp { } service Chat { rpc GetMaxAndMinSeq(GetMaxAndMinSeqReq) returns(GetMaxAndMinSeqResp); - rpc PullMessage(open_im_sdk.PullMessageReq) returns(open_im_sdk.PullMessageResp); - rpc PullMessageBySeqList(open_im_sdk.PullMessageBySeqListReq) returns(open_im_sdk.PullMessageBySeqListResp); + rpc PullMessage(server_api_params.PullMessageReq) returns(server_api_params.PullMessageResp); + rpc PullMessageBySeqList(server_api_params.PullMessageBySeqListReq) returns(server_api_params.PullMessageBySeqListResp); rpc SendMsg(SendMsgReq) returns(SendMsgResp); } diff --git a/pkg/proto/relay/relay.proto b/pkg/proto/relay/relay.proto index fc95a4f7b..c0149a674 100644 --- a/pkg/proto/relay/relay.proto +++ b/pkg/proto/relay/relay.proto @@ -5,7 +5,7 @@ package relay; message OnlinePushMsgReq { string OperationID = 1; - open_im_sdk.MsgData msgData = 2; + server_api_params.MsgData msgData = 2; } message OnlinePushMsgResp{ repeated SingleMsgToUser resp = 1; From b9b0e9cf43e519606859bfd92fbc43924d19b8cd Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Mon, 17 Jan 2022 14:06:37 +0800 Subject: [PATCH 289/337] Refactor code --- pkg/proto/user/user.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/proto/user/user.proto b/pkg/proto/user/user.proto index 3b66f1f41..75455f7a0 100644 --- a/pkg/proto/user/user.proto +++ b/pkg/proto/user/user.proto @@ -52,13 +52,13 @@ message GetUserInfoReq{ } message GetUserInfoResp{ CommonResp commonResp = 1; - repeated open_im_sdk.UserInfo UserInfoList = 3; + repeated server_api_params.UserInfo UserInfoList = 3; } message UpdateUserInfoReq{ - open_im_sdk.UserInfo UserInfo = 1; + server_api_params.UserInfo UserInfo = 1; string OpUserID = 2; string operationID = 3; } From 31a6797fc3f1f4537003523dce0de9f81fb60edf Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Mon, 17 Jan 2022 14:07:21 +0800 Subject: [PATCH 290/337] Refactor code --- pkg/proto/push/push.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/proto/push/push.proto b/pkg/proto/push/push.proto index 99b2a170a..455b3e6de 100644 --- a/pkg/proto/push/push.proto +++ b/pkg/proto/push/push.proto @@ -5,7 +5,7 @@ package push; message PushMsgReq { string operationID = 1; - open_im_sdk.MsgData msgData = 2; + server_api_params.MsgData msgData = 2; } message PushMsgResp{ int32 ResultCode = 1; From 5d8e972ac77bb53123b49136027922d39b18e3f4 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Mon, 17 Jan 2022 14:10:45 +0800 Subject: [PATCH 291/337] Refactor code --- pkg/proto/auth/auth.pb.go | 63 ++++++++-------- pkg/proto/chat/chat.pb.go | 81 ++++++++++---------- pkg/proto/push/push.pb.go | 39 +++++----- pkg/proto/relay/relay.pb.go | 90 +++++++++++----------- pkg/proto/user/user.pb.go | 147 ++++++++++++++++++------------------ 5 files changed, 212 insertions(+), 208 deletions(-) diff --git a/pkg/proto/auth/auth.pb.go b/pkg/proto/auth/auth.pb.go index 1bc510860..3941570ee 100644 --- a/pkg/proto/auth/auth.pb.go +++ b/pkg/proto/auth/auth.pb.go @@ -36,7 +36,7 @@ func (m *CommonResp) Reset() { *m = CommonResp{} } func (m *CommonResp) String() string { return proto.CompactTextString(m) } func (*CommonResp) ProtoMessage() {} func (*CommonResp) Descriptor() ([]byte, []int) { - return fileDescriptor_auth_6e5d34ffb6edf37a, []int{0} + return fileDescriptor_auth_88965eda3ab7f34d, []int{0} } func (m *CommonResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CommonResp.Unmarshal(m, b) @@ -82,7 +82,7 @@ func (m *UserRegisterReq) Reset() { *m = UserRegisterReq{} } func (m *UserRegisterReq) String() string { return proto.CompactTextString(m) } func (*UserRegisterReq) ProtoMessage() {} func (*UserRegisterReq) Descriptor() ([]byte, []int) { - return fileDescriptor_auth_6e5d34ffb6edf37a, []int{1} + return fileDescriptor_auth_88965eda3ab7f34d, []int{1} } func (m *UserRegisterReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserRegisterReq.Unmarshal(m, b) @@ -127,7 +127,7 @@ func (m *UserRegisterResp) Reset() { *m = UserRegisterResp{} } func (m *UserRegisterResp) String() string { return proto.CompactTextString(m) } func (*UserRegisterResp) ProtoMessage() {} func (*UserRegisterResp) Descriptor() ([]byte, []int) { - return fileDescriptor_auth_6e5d34ffb6edf37a, []int{2} + return fileDescriptor_auth_88965eda3ab7f34d, []int{2} } func (m *UserRegisterResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserRegisterResp.Unmarshal(m, b) @@ -168,7 +168,7 @@ func (m *UserTokenReq) Reset() { *m = UserTokenReq{} } func (m *UserTokenReq) String() string { return proto.CompactTextString(m) } func (*UserTokenReq) ProtoMessage() {} func (*UserTokenReq) Descriptor() ([]byte, []int) { - return fileDescriptor_auth_6e5d34ffb6edf37a, []int{3} + return fileDescriptor_auth_88965eda3ab7f34d, []int{3} } func (m *UserTokenReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserTokenReq.Unmarshal(m, b) @@ -229,7 +229,7 @@ func (m *UserTokenResp) Reset() { *m = UserTokenResp{} } func (m *UserTokenResp) String() string { return proto.CompactTextString(m) } func (*UserTokenResp) ProtoMessage() {} func (*UserTokenResp) Descriptor() ([]byte, []int) { - return fileDescriptor_auth_6e5d34ffb6edf37a, []int{4} + return fileDescriptor_auth_88965eda3ab7f34d, []int{4} } func (m *UserTokenResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserTokenResp.Unmarshal(m, b) @@ -383,31 +383,32 @@ var _Auth_serviceDesc = grpc.ServiceDesc{ Metadata: "auth/auth.proto", } -func init() { proto.RegisterFile("auth/auth.proto", fileDescriptor_auth_6e5d34ffb6edf37a) } +func init() { proto.RegisterFile("auth/auth.proto", fileDescriptor_auth_88965eda3ab7f34d) } -var fileDescriptor_auth_6e5d34ffb6edf37a = []byte{ - // 362 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x52, 0x4d, 0x4f, 0xc2, 0x40, - 0x14, 0x4c, 0xe5, 0x43, 0x78, 0x48, 0x30, 0x2f, 0xa0, 0x4d, 0x0f, 0x06, 0x7b, 0xe2, 0xd4, 0x46, - 0xbc, 0x98, 0x98, 0x98, 0x20, 0x4a, 0xc2, 0x81, 0x60, 0x1a, 0xbc, 0x78, 0x21, 0x90, 0x2e, 0xd0, - 0xd4, 0x76, 0xd7, 0xdd, 0x12, 0x4c, 0x3c, 0x7a, 0xf1, 0x67, 0x9b, 0xdd, 0x7e, 0x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, 0x17, 0x00, 0x23, 0x4e, 0x23, 0x15, 0x33, 0x4f, 0xa5, 0x31, 0xf2, 0xdb, - 0x29, 0xcb, 0xd4, 0x92, 0x52, 0x0b, 0xbc, 0x5f, 0xa9, 0xfc, 0xb7, 0xd2, 0x07, 0x34, 0xb5, 0x24, - 0xff, 0xeb, 0x83, 0x6d, 0xa8, 0xa8, 0x05, 0x59, 0xba, 0x14, 0x48, 0xf3, 0xc7, 0x77, 0x16, 0x70, - 0xe2, 0xcf, 0x82, 0x88, 0xa8, 0x6c, 0x25, 0x4f, 0xa7, 0xfa, 0x9f, 0x06, 0x94, 0xe5, 0x5e, 0x1c, - 0xa4, 0xe7, 0x91, 0x1f, 0x2c, 0x9e, 0xe7, 0x86, 0x7b, 0xbf, 0xd5, 0x32, 0x0f, 0x0b, 0x82, 0xe1, - 0x0d, 0xd4, 0x8b, 0x22, 0xd8, 0xd6, 0xc7, 0xf2, 0x53, 0xb6, 0x3a, 0x07, 0x58, 0xc1, 0xee, 0x5b, - 0x2f, 0x4d, 0x47, 0x5d, 0xdc, 0xdb, 0x54, 0x5e, 0x56, 0xd5, 0xad, 0xbc, 0xfe, 0x0e, 0x00, 0x00, - 0xff, 0xff, 0x8c, 0xd6, 0x72, 0x1f, 0xd3, 0x02, 0x00, 0x00, +var fileDescriptor_auth_88965eda3ab7f34d = []byte{ + // 369 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x52, 0x4d, 0x4b, 0xc3, 0x40, + 0x10, 0x25, 0xf6, 0xc3, 0x76, 0x6a, 0xa9, 0x2c, 0x55, 0x43, 0x04, 0xa9, 0x39, 0xf5, 0x94, 0x40, + 0x3d, 0x28, 0x08, 0x42, 0xad, 0x16, 0x7a, 0x28, 0x95, 0xa5, 0x5e, 0xbc, 0x84, 0x94, 0x6e, 0xdb, + 0x90, 0x26, 0xbb, 0xee, 0xa6, 0x56, 0xf0, 0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xb3, 0x05, 0xb5, + 0xa7, 0xb5, 0x9f, 0x2c, 0x28, 0x8f, 0xb2, 0xe4, 0x45, 0x8d, 0x2e, 0x00, 0x86, 0x9c, 0x46, 0xca, + 0x66, 0xee, 0x4a, 0xeb, 0xc8, 0x6f, 0x27, 0x2c, 0x43, 0x4b, 0x0a, 0x2d, 0xea, 0xdd, 0x48, 0xe5, + 0xbf, 0x91, 0x3e, 0xa0, 0xa9, 0x39, 0xf9, 0x5f, 0x1e, 0xd4, 0x86, 0x8a, 0x1a, 0x90, 0xb9, 0x4b, + 0x0b, 0x29, 0xfe, 0xf8, 0xce, 0x02, 0x4e, 0xe6, 0xd3, 0x20, 0x22, 0xca, 0x5b, 0x09, 0xeb, 0xad, + 0xde, 0xa7, 0x01, 0x65, 0x39, 0x17, 0xf5, 0xd3, 0x7d, 0xe4, 0x8b, 0x45, 0x67, 0xb9, 0xe0, 0xce, + 0xcf, 0xb5, 0xcc, 0xfd, 0x80, 0x60, 0xe8, 0x06, 0xea, 0x45, 0x10, 0xd4, 0xd6, 0x69, 0xf9, 0x96, + 0xad, 0x93, 0x3d, 0x5d, 0xc1, 0xee, 0x5b, 0x2f, 0x4d, 0x47, 0x9d, 0xef, 0x6d, 0x0a, 0xcf, 0xaa, + 0xea, 0x36, 0xaf, 0xbe, 0x03, 0x00, 0x00, 0xff, 0xff, 0x1b, 0x20, 0x74, 0x9f, 0xd9, 0x02, 0x00, + 0x00, } diff --git a/pkg/proto/chat/chat.pb.go b/pkg/proto/chat/chat.pb.go index f404d783d..2a52e2c37 100644 --- a/pkg/proto/chat/chat.pb.go +++ b/pkg/proto/chat/chat.pb.go @@ -37,7 +37,7 @@ func (m *MsgDataToMQ) Reset() { *m = MsgDataToMQ{} } func (m *MsgDataToMQ) String() string { return proto.CompactTextString(m) } func (*MsgDataToMQ) ProtoMessage() {} func (*MsgDataToMQ) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_6e4ec29226096c3a, []int{0} + return fileDescriptor_chat_1eadc66417ed93b5, []int{0} } func (m *MsgDataToMQ) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgDataToMQ.Unmarshal(m, b) @@ -90,7 +90,7 @@ func (m *MsgDataToDB) Reset() { *m = MsgDataToDB{} } func (m *MsgDataToDB) String() string { return proto.CompactTextString(m) } func (*MsgDataToDB) ProtoMessage() {} func (*MsgDataToDB) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_6e4ec29226096c3a, []int{1} + return fileDescriptor_chat_1eadc66417ed93b5, []int{1} } func (m *MsgDataToDB) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgDataToDB.Unmarshal(m, b) @@ -136,7 +136,7 @@ func (m *PushMsgDataToMQ) Reset() { *m = PushMsgDataToMQ{} } func (m *PushMsgDataToMQ) String() string { return proto.CompactTextString(m) } func (*PushMsgDataToMQ) ProtoMessage() {} func (*PushMsgDataToMQ) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_6e4ec29226096c3a, []int{2} + return fileDescriptor_chat_1eadc66417ed93b5, []int{2} } func (m *PushMsgDataToMQ) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PushMsgDataToMQ.Unmarshal(m, b) @@ -202,7 +202,7 @@ func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} } func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqReq) ProtoMessage() {} func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_6e4ec29226096c3a, []int{3} + return fileDescriptor_chat_1eadc66417ed93b5, []int{3} } func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) @@ -250,7 +250,7 @@ func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} } func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqResp) ProtoMessage() {} func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_6e4ec29226096c3a, []int{4} + return fileDescriptor_chat_1eadc66417ed93b5, []int{4} } func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) @@ -311,7 +311,7 @@ func (m *SendMsgReq) Reset() { *m = SendMsgReq{} } func (m *SendMsgReq) String() string { return proto.CompactTextString(m) } func (*SendMsgReq) ProtoMessage() {} func (*SendMsgReq) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_6e4ec29226096c3a, []int{5} + return fileDescriptor_chat_1eadc66417ed93b5, []int{5} } func (m *SendMsgReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SendMsgReq.Unmarshal(m, b) @@ -367,7 +367,7 @@ func (m *SendMsgResp) Reset() { *m = SendMsgResp{} } func (m *SendMsgResp) String() string { return proto.CompactTextString(m) } func (*SendMsgResp) ProtoMessage() {} func (*SendMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_6e4ec29226096c3a, []int{6} + return fileDescriptor_chat_1eadc66417ed93b5, []int{6} } func (m *SendMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SendMsgResp.Unmarshal(m, b) @@ -603,38 +603,39 @@ var _Chat_serviceDesc = grpc.ServiceDesc{ Metadata: "chat/chat.proto", } -func init() { proto.RegisterFile("chat/chat.proto", fileDescriptor_chat_6e4ec29226096c3a) } +func init() { proto.RegisterFile("chat/chat.proto", fileDescriptor_chat_1eadc66417ed93b5) } -var fileDescriptor_chat_6e4ec29226096c3a = []byte{ - // 477 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0x4d, 0x6f, 0xda, 0x40, - 0x10, 0x15, 0x24, 0x40, 0x33, 0x56, 0x85, 0xb4, 0x41, 0x95, 0xe5, 0xf4, 0x40, 0x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x8e, 0x44, 0x71, 0x8a, 0xec, 0x62, 0xe7, - 0x27, 0x59, 0x15, 0x25, 0xf4, 0xfa, 0x70, 0x91, 0x04, 0x9b, 0x40, 0xc7, 0xa2, 0xfa, 0xbf, 0x47, - 0xb8, 0xfc, 0x9a, 0x91, 0x64, 0x6f, 0x0f, 0x4d, 0x6d, 0x5b, 0x94, 0xf6, 0xbb, 0x23, 0xba, 0x48, - 0xb0, 0x1e, 0xb4, 0xaa, 0x4d, 0x62, 0x6c, 0x13, 0xeb, 0xf1, 0xb0, 0x78, 0xe7, 0x7b, 0x1c, 0x89, - 0x7e, 0xfb, 0xe7, 0xcb, 0x40, 0x3f, 0x48, 0x1f, 0x4c, 0xf1, 0xbe, 0xa9, 0x5f, 0x9b, 0xf7, 0xff, - 0x02, 0x00, 0x00, 0xff, 0xff, 0xb3, 0x57, 0x8f, 0x13, 0xab, 0x04, 0x00, 0x00, +var fileDescriptor_chat_1eadc66417ed93b5 = []byte{ + // 482 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0x4d, 0x6f, 0xd3, 0x40, + 0x10, 0x95, 0xd3, 0x26, 0xa1, 0x63, 0xa1, 0x48, 0xdb, 0x0a, 0x59, 0xe6, 0x92, 0xfa, 0x54, 0x81, + 0x64, 0x4b, 0x81, 0x1b, 0x27, 0xd2, 0x54, 0x28, 0x88, 0xa5, 0xc5, 0x09, 0x17, 0x2e, 0xd1, 0xb6, + 0x1e, 0x39, 0x56, 0x12, 0x7b, 0xb3, 0xe3, 0x92, 0x02, 0x3f, 0x86, 0x5f, 0xc4, 0x7f, 0x42, 0xde, + 0x75, 0xd2, 0x6d, 0x03, 0x24, 0x27, 0x2e, 0x96, 0xde, 0x9b, 0xe7, 0x37, 0xf3, 0xf6, 0x0b, 0x3a, + 0x37, 0x53, 0x51, 0x46, 0xd5, 0x27, 0x94, 0xaa, 0x28, 0x0b, 0xd6, 0x92, 0xd7, 0xe7, 0x53, 0x51, + 0xfa, 0xa7, 0x97, 0x12, 0xf3, 0xc9, 0x90, 0x47, 0x72, 0x96, 0x46, 0xba, 0x14, 0x51, 0x32, 0x9b, + 0xac, 0x28, 0x5a, 0x91, 0x91, 0x06, 0x3f, 0xc0, 0xe5, 0x94, 0x0e, 0x44, 0x29, 0xc6, 0x05, 0xff, + 0xc4, 0x4e, 0xa0, 0x59, 0x16, 0x33, 0xcc, 0x3d, 0xa7, 0xeb, 0x9c, 0x1d, 0xc5, 0x06, 0xb0, 0x2e, + 0xb8, 0x85, 0x44, 0x25, 0xca, 0xac, 0xc8, 0x87, 0x03, 0xaf, 0xa1, 0x6b, 0x36, 0xc5, 0x5e, 0x43, + 0x7b, 0x61, 0x6c, 0xbc, 0x83, 0xae, 0x73, 0xe6, 0xf6, 0xfc, 0x90, 0x50, 0x7d, 0x45, 0x35, 0x11, + 0x32, 0x9b, 0x48, 0xa1, 0xc4, 0x82, 0xc2, 0xba, 0x51, 0xbc, 0x96, 0x06, 0x68, 0x35, 0x1f, 0xf4, + 0x6d, 0x13, 0x67, 0x6f, 0x93, 0xdd, 0xc3, 0x05, 0x19, 0x74, 0xae, 0x6e, 0x69, 0x6a, 0xe7, 0xec, + 0x82, 0x7b, 0x69, 0xfd, 0x64, 0xd2, 0xda, 0x94, 0x3d, 0x4c, 0x63, 0xff, 0x44, 0x1f, 0x81, 0xbd, + 0xc3, 0x92, 0x8b, 0xbb, 0xb7, 0x79, 0xc2, 0xb3, 0x7c, 0x84, 0xcb, 0x18, 0x97, 0xec, 0x19, 0xb4, + 0x3e, 0x13, 0xaa, 0x4d, 0xa3, 0x1a, 0x3d, 0x9e, 0xa2, 0xb1, 0x35, 0x45, 0xb0, 0x82, 0xe3, 0x2d, + 0x3f, 0x92, 0xcc, 0x83, 0xf6, 0x85, 0x52, 0xe7, 0x45, 0x82, 0xda, 0xb1, 0x19, 0xaf, 0x61, 0xd5, + 0xea, 0x42, 0x29, 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0xcb, 0xd3, 0x50, 0x3f, 0x60, 0x6f, 0x4c, 0xf1, 0xba, + 0xa5, 0x5f, 0xa7, 0x57, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0xcb, 0xb4, 0x87, 0x05, 0xdb, 0x04, + 0x00, 0x00, } diff --git a/pkg/proto/push/push.pb.go b/pkg/proto/push/push.pb.go index f4ef70cfb..0dc06210a 100644 --- a/pkg/proto/push/push.pb.go +++ b/pkg/proto/push/push.pb.go @@ -36,7 +36,7 @@ func (m *PushMsgReq) Reset() { *m = PushMsgReq{} } func (m *PushMsgReq) String() string { return proto.CompactTextString(m) } func (*PushMsgReq) ProtoMessage() {} func (*PushMsgReq) Descriptor() ([]byte, []int) { - return fileDescriptor_push_e9dec9fedbbc6360, []int{0} + return fileDescriptor_push_3a8dbda4109fac8a, []int{0} } func (m *PushMsgReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PushMsgReq.Unmarshal(m, b) @@ -81,7 +81,7 @@ func (m *PushMsgResp) Reset() { *m = PushMsgResp{} } func (m *PushMsgResp) String() string { return proto.CompactTextString(m) } func (*PushMsgResp) ProtoMessage() {} func (*PushMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_push_e9dec9fedbbc6360, []int{1} + return fileDescriptor_push_3a8dbda4109fac8a, []int{1} } func (m *PushMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PushMsgResp.Unmarshal(m, b) @@ -185,22 +185,23 @@ var _PushMsgService_serviceDesc = grpc.ServiceDesc{ Metadata: "push/push.proto", } -func init() { proto.RegisterFile("push/push.proto", fileDescriptor_push_e9dec9fedbbc6360) } +func init() { proto.RegisterFile("push/push.proto", fileDescriptor_push_3a8dbda4109fac8a) } -var fileDescriptor_push_e9dec9fedbbc6360 = []byte{ - // 221 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2f, 0x28, 0x2d, 0xce, - 0xd0, 0x07, 0x11, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x2c, 0x20, 0xb6, 0x94, 0xa2, 0x7f, - 0x41, 0x6a, 0x5e, 0xbc, 0xa7, 0xaf, 0x7e, 0x41, 0x76, 0xba, 0x3e, 0x58, 0x42, 0xbf, 0x38, 0x25, - 0x3b, 0xbe, 0xbc, 0x58, 0xbf, 0xbc, 0x18, 0xa2, 0x50, 0x29, 0x8e, 0x8b, 0x2b, 0xa0, 0xb4, 0x38, - 0xc3, 0xb7, 0x38, 0x3d, 0x28, 0xb5, 0x50, 0x48, 0x81, 0x8b, 0x3b, 0xbf, 0x20, 0xb5, 0x28, 0xb1, - 0x24, 0x33, 0x3f, 0xcf, 0xd3, 0x45, 0x82, 0x51, 0x81, 0x51, 0x83, 0x33, 0x08, 0x59, 0x48, 0x48, - 0x8f, 0x8b, 0x3d, 0xb7, 0x38, 0xdd, 0x25, 0xb1, 0x24, 0x51, 0x82, 0x49, 0x81, 0x51, 0x83, 0xdb, - 0x48, 0x44, 0x2f, 0x1f, 0x64, 0x49, 0x66, 0x6e, 0x7c, 0x71, 0x4a, 0xb6, 0x9e, 0x2f, 0x44, 0x2e, - 0x08, 0xa6, 0x48, 0x49, 0x97, 0x8b, 0x1b, 0x6e, 0x7e, 0x71, 0x81, 0x90, 0x1c, 0x17, 0x57, 0x50, - 0x6a, 0x71, 0x69, 0x4e, 0x89, 0x73, 0x7e, 0x4a, 0x2a, 0xd8, 0x7c, 0xd6, 0x20, 0x24, 0x11, 0x23, - 0x07, 0x2e, 0x3e, 0xa8, 0xf2, 0xe0, 0xd4, 0xa2, 0xb2, 0xcc, 0xe4, 0x54, 0x90, 0x85, 0x50, 0x11, - 0x21, 0x01, 0x3d, 0xb0, 0x0f, 0x11, 0xee, 0x95, 0x12, 0x44, 0x13, 0x29, 0x2e, 0x70, 0xe2, 0x8f, - 0xe2, 0xd5, 0x03, 0x87, 0x84, 0x75, 0x41, 0x12, 0x48, 0x3c, 0x89, 0x0d, 0xec, 0x51, 0x63, 0x40, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x02, 0x62, 0xa4, 0x3d, 0x24, 0x01, 0x00, 0x00, +var fileDescriptor_push_3a8dbda4109fac8a = []byte{ + // 229 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x90, 0x31, 0x4f, 0xc3, 0x30, + 0x10, 0x85, 0x15, 0x04, 0x54, 0x5c, 0x04, 0x05, 0x4f, 0x55, 0x06, 0x14, 0x3a, 0x75, 0xc1, 0x96, + 0x0a, 0x1b, 0x0b, 0x82, 0x2e, 0x1d, 0x22, 0x90, 0xd9, 0x58, 0x2c, 0x97, 0x9c, 0xd2, 0xa8, 0xb4, + 0x3e, 0x7c, 0x4e, 0xfb, 0xf7, 0x51, 0x9c, 0x00, 0x11, 0x8b, 0x65, 0x7d, 0xf7, 0x49, 0xef, 0xde, + 0xc1, 0x98, 0x1a, 0x5e, 0xab, 0xf6, 0x91, 0xe4, 0x5d, 0x70, 0xe2, 0xb8, 0xfd, 0x67, 0x37, 0x2f, + 0x84, 0x3b, 0xb3, 0x2c, 0x14, 0x6d, 0x2a, 0x15, 0x07, 0x8a, 0xcb, 0x8d, 0x39, 0xb0, 0x3a, 0x70, + 0x27, 0x4e, 0x4b, 0x80, 0xd7, 0x86, 0xd7, 0x05, 0x57, 0x1a, 0xbf, 0x44, 0x0e, 0xa9, 0x23, 0xf4, + 0x36, 0xd4, 0x6e, 0xb7, 0x5c, 0x4c, 0x92, 0x3c, 0x99, 0x9d, 0xe9, 0x21, 0x12, 0xf7, 0x30, 0xda, + 0x72, 0xb5, 0xb0, 0xc1, 0x4e, 0x8e, 0xf2, 0x64, 0x96, 0xce, 0x33, 0xc9, 0xe8, 0xf7, 0xe8, 0x8d, + 0xa5, 0xda, 0x90, 0xf5, 0x76, 0xcb, 0xb2, 0xe8, 0x0c, 0xfd, 0xa3, 0x4e, 0x6f, 0x21, 0xfd, 0x4d, + 0x61, 0x12, 0xd7, 0x00, 0x1a, 0xb9, 0xf9, 0x0c, 0xcf, 0xae, 0xc4, 0x98, 0x72, 0xa2, 0x07, 0x64, + 0xfe, 0x08, 0x17, 0xbd, 0xfe, 0x86, 0x7e, 0x5f, 0x7f, 0xa0, 0x90, 0x30, 0xea, 0x89, 0xb8, 0x94, + 0xb1, 0xe7, 0xdf, 0xd6, 0xd9, 0xd5, 0x3f, 0xc2, 0xf4, 0x34, 0x7e, 0x3f, 0x97, 0xf1, 0x1e, 0x0f, + 0xb4, 0x6a, 0xf9, 0xea, 0x34, 0xd6, 0xbd, 0xfb, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xa1, 0x97, 0x1e, + 0x77, 0x2a, 0x01, 0x00, 0x00, } diff --git a/pkg/proto/relay/relay.pb.go b/pkg/proto/relay/relay.pb.go index c2a3cda0c..d8451ff70 100644 --- a/pkg/proto/relay/relay.pb.go +++ b/pkg/proto/relay/relay.pb.go @@ -36,7 +36,7 @@ func (m *OnlinePushMsgReq) Reset() { *m = OnlinePushMsgReq{} } func (m *OnlinePushMsgReq) String() string { return proto.CompactTextString(m) } func (*OnlinePushMsgReq) ProtoMessage() {} func (*OnlinePushMsgReq) Descriptor() ([]byte, []int) { - return fileDescriptor_relay_de3bbbc2d62c0c49, []int{0} + return fileDescriptor_relay_aeddd7666fcf4cae, []int{0} } func (m *OnlinePushMsgReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OnlinePushMsgReq.Unmarshal(m, b) @@ -81,7 +81,7 @@ func (m *OnlinePushMsgResp) Reset() { *m = OnlinePushMsgResp{} } func (m *OnlinePushMsgResp) String() string { return proto.CompactTextString(m) } func (*OnlinePushMsgResp) ProtoMessage() {} func (*OnlinePushMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_relay_de3bbbc2d62c0c49, []int{1} + return fileDescriptor_relay_aeddd7666fcf4cae, []int{1} } func (m *OnlinePushMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OnlinePushMsgResp.Unmarshal(m, b) @@ -121,7 +121,7 @@ func (m *SingleMsgToUser) Reset() { *m = SingleMsgToUser{} } func (m *SingleMsgToUser) String() string { return proto.CompactTextString(m) } func (*SingleMsgToUser) ProtoMessage() {} func (*SingleMsgToUser) Descriptor() ([]byte, []int) { - return fileDescriptor_relay_de3bbbc2d62c0c49, []int{2} + return fileDescriptor_relay_aeddd7666fcf4cae, []int{2} } func (m *SingleMsgToUser) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SingleMsgToUser.Unmarshal(m, b) @@ -175,7 +175,7 @@ func (m *GetUsersOnlineStatusReq) Reset() { *m = GetUsersOnlineStatusReq func (m *GetUsersOnlineStatusReq) String() string { return proto.CompactTextString(m) } func (*GetUsersOnlineStatusReq) ProtoMessage() {} func (*GetUsersOnlineStatusReq) Descriptor() ([]byte, []int) { - return fileDescriptor_relay_de3bbbc2d62c0c49, []int{3} + return fileDescriptor_relay_aeddd7666fcf4cae, []int{3} } func (m *GetUsersOnlineStatusReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUsersOnlineStatusReq.Unmarshal(m, b) @@ -230,7 +230,7 @@ func (m *GetUsersOnlineStatusResp) Reset() { *m = GetUsersOnlineStatusRe func (m *GetUsersOnlineStatusResp) String() string { return proto.CompactTextString(m) } func (*GetUsersOnlineStatusResp) ProtoMessage() {} func (*GetUsersOnlineStatusResp) Descriptor() ([]byte, []int) { - return fileDescriptor_relay_de3bbbc2d62c0c49, []int{4} + return fileDescriptor_relay_aeddd7666fcf4cae, []int{4} } func (m *GetUsersOnlineStatusResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUsersOnlineStatusResp.Unmarshal(m, b) @@ -292,7 +292,7 @@ func (m *GetUsersOnlineStatusResp_SuccessDetail) Reset() { func (m *GetUsersOnlineStatusResp_SuccessDetail) String() string { return proto.CompactTextString(m) } func (*GetUsersOnlineStatusResp_SuccessDetail) ProtoMessage() {} func (*GetUsersOnlineStatusResp_SuccessDetail) Descriptor() ([]byte, []int) { - return fileDescriptor_relay_de3bbbc2d62c0c49, []int{4, 0} + return fileDescriptor_relay_aeddd7666fcf4cae, []int{4, 0} } func (m *GetUsersOnlineStatusResp_SuccessDetail) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUsersOnlineStatusResp_SuccessDetail.Unmarshal(m, b) @@ -339,7 +339,7 @@ func (m *GetUsersOnlineStatusResp_FailedDetail) Reset() { *m = GetUsersO func (m *GetUsersOnlineStatusResp_FailedDetail) String() string { return proto.CompactTextString(m) } func (*GetUsersOnlineStatusResp_FailedDetail) ProtoMessage() {} func (*GetUsersOnlineStatusResp_FailedDetail) Descriptor() ([]byte, []int) { - return fileDescriptor_relay_de3bbbc2d62c0c49, []int{4, 1} + return fileDescriptor_relay_aeddd7666fcf4cae, []int{4, 1} } func (m *GetUsersOnlineStatusResp_FailedDetail) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUsersOnlineStatusResp_FailedDetail.Unmarshal(m, b) @@ -395,7 +395,7 @@ func (m *GetUsersOnlineStatusResp_SuccessResult) Reset() { func (m *GetUsersOnlineStatusResp_SuccessResult) String() string { return proto.CompactTextString(m) } func (*GetUsersOnlineStatusResp_SuccessResult) ProtoMessage() {} func (*GetUsersOnlineStatusResp_SuccessResult) Descriptor() ([]byte, []int) { - return fileDescriptor_relay_de3bbbc2d62c0c49, []int{4, 2} + return fileDescriptor_relay_aeddd7666fcf4cae, []int{4, 2} } func (m *GetUsersOnlineStatusResp_SuccessResult) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUsersOnlineStatusResp_SuccessResult.Unmarshal(m, b) @@ -552,42 +552,42 @@ var _OnlineMessageRelayService_serviceDesc = grpc.ServiceDesc{ Metadata: "relay/relay.proto", } -func init() { proto.RegisterFile("relay/relay.proto", fileDescriptor_relay_de3bbbc2d62c0c49) } +func init() { proto.RegisterFile("relay/relay.proto", fileDescriptor_relay_aeddd7666fcf4cae) } -var fileDescriptor_relay_de3bbbc2d62c0c49 = []byte{ - // 539 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x5f, 0x8f, 0xd2, 0x40, - 0x10, 0x4f, 0xe5, 0xfe, 0xc8, 0x70, 0x78, 0xb2, 0x21, 0x77, 0xb5, 0x0f, 0x88, 0x3c, 0x18, 0x62, - 0xb4, 0x24, 0xf8, 0xe8, 0x83, 0xc9, 0x5d, 0x73, 0x86, 0xc4, 0x06, 0xb2, 0x78, 0xd1, 0xf8, 0x42, - 0x7a, 0x74, 0xae, 0x36, 0x14, 0xba, 0xec, 0x6c, 0x8f, 0xf8, 0x75, 0xfc, 0x12, 0xfa, 0xf1, 0x4c, - 0x77, 0x0b, 0x16, 0xc2, 0x79, 0xb9, 0x17, 0xc2, 0xcc, 0xec, 0xfc, 0xfe, 0xb5, 0x5d, 0x68, 0x48, - 0x4c, 0x82, 0x9f, 0x3d, 0xfd, 0xeb, 0x0a, 0x99, 0xaa, 0x94, 0x1d, 0xea, 0xc2, 0x79, 0x35, 0x14, - 0xb8, 0x98, 0x0c, 0xfc, 0x9e, 0x98, 0x45, 0x3d, 0x3d, 0xe9, 0x51, 0x38, 0x9b, 0xac, 0xa8, 0xb7, - 0x22, 0x73, 0xb2, 0x13, 0xc2, 0xf3, 0xe1, 0x22, 0x89, 0x17, 0x38, 0xca, 0xe8, 0x87, 0x4f, 0x11, - 0xc7, 0x25, 0x6b, 0x43, 0x6d, 0x28, 0x50, 0x06, 0x2a, 0x4e, 0x17, 0x03, 0xcf, 0xb6, 0xda, 0x56, - 0xb7, 0xca, 0xcb, 0x2d, 0xe6, 0xc2, 0xf1, 0x9c, 0x22, 0x2f, 0x50, 0x81, 0xfd, 0xa4, 0x6d, 0x75, - 0x6b, 0xfd, 0xa6, 0x9b, 0xe6, 0x54, 0xf1, 0x7c, 0x42, 0x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, 0x8f, 0xe0, 0x04, 0x00, 0x00, +var fileDescriptor_relay_aeddd7666fcf4cae = []byte{ + // 544 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x5f, 0x6f, 0xd2, 0x50, + 0x14, 0x4f, 0x05, 0x36, 0x39, 0x0c, 0x27, 0x37, 0xcb, 0x56, 0xfb, 0x80, 0xc8, 0x83, 0x21, 0x46, + 0x4b, 0x82, 0xbe, 0xf9, 0x60, 0xb2, 0x35, 0x33, 0x24, 0x36, 0x90, 0x8b, 0x8b, 0xc6, 0x17, 0x72, + 0x07, 0x67, 0xb5, 0xae, 0xd0, 0xcb, 0x3d, 0x2d, 0xc4, 0xaf, 0xe3, 0x97, 0xd0, 0x8f, 0x67, 0x7a, + 0x6f, 0xc1, 0x42, 0x98, 0xcb, 0x5e, 0x08, 0xe7, 0xdc, 0x73, 0x7e, 0xff, 0xda, 0x5e, 0x68, 0x28, + 0x8c, 0xc4, 0xcf, 0xae, 0xfe, 0x75, 0xa5, 0x8a, 0x93, 0x98, 0x55, 0x74, 0xe1, 0xbc, 0x18, 0x48, + 0x9c, 0x8f, 0xfb, 0x7e, 0x57, 0xde, 0x06, 0x5d, 0x7d, 0xd2, 0xa5, 0xe9, 0xed, 0x78, 0x45, 0xdd, + 0x15, 0x99, 0xc9, 0xf6, 0x0f, 0x78, 0x3a, 0x98, 0x47, 0xe1, 0x1c, 0x87, 0x29, 0x7d, 0xf7, 0x29, + 0xe0, 0xb8, 0x60, 0x2d, 0xa8, 0x0d, 0x24, 0x2a, 0x91, 0x84, 0xf1, 0xbc, 0xef, 0xd9, 0x56, 0xcb, + 0xea, 0x54, 0x79, 0xb1, 0xc5, 0xde, 0xc1, 0xe1, 0x8c, 0x02, 0x4f, 0x24, 0xc2, 0x7e, 0xd4, 0xb2, + 0x3a, 0xb5, 0x9e, 0xe3, 0x12, 0xaa, 0x25, 0xaa, 0x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 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x60, 0xd7, 0x1d, 0xf3, 0xe6, 0x04, 0x00, 0x00, } diff --git a/pkg/proto/user/user.pb.go b/pkg/proto/user/user.pb.go index 22a698a44..c9f85d568 100644 --- a/pkg/proto/user/user.pb.go +++ b/pkg/proto/user/user.pb.go @@ -36,7 +36,7 @@ func (m *CommonResp) Reset() { *m = CommonResp{} } func (m *CommonResp) String() string { return proto.CompactTextString(m) } func (*CommonResp) ProtoMessage() {} func (*CommonResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9cc4371b0c883611, []int{0} + return fileDescriptor_user_9cd4aaf870b6d3b5, []int{0} } func (m *CommonResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CommonResp.Unmarshal(m, b) @@ -83,7 +83,7 @@ func (m *DeleteUsersReq) Reset() { *m = DeleteUsersReq{} } func (m *DeleteUsersReq) String() string { return proto.CompactTextString(m) } func (*DeleteUsersReq) ProtoMessage() {} func (*DeleteUsersReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9cc4371b0c883611, []int{1} + return fileDescriptor_user_9cd4aaf870b6d3b5, []int{1} } func (m *DeleteUsersReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteUsersReq.Unmarshal(m, b) @@ -136,7 +136,7 @@ func (m *DeleteUsersResp) Reset() { *m = DeleteUsersResp{} } func (m *DeleteUsersResp) String() string { return proto.CompactTextString(m) } func (*DeleteUsersResp) ProtoMessage() {} func (*DeleteUsersResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9cc4371b0c883611, []int{2} + return fileDescriptor_user_9cd4aaf870b6d3b5, []int{2} } func (m *DeleteUsersResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteUsersResp.Unmarshal(m, b) @@ -182,7 +182,7 @@ func (m *GetAllUserIDReq) Reset() { *m = GetAllUserIDReq{} } func (m *GetAllUserIDReq) String() string { return proto.CompactTextString(m) } func (*GetAllUserIDReq) ProtoMessage() {} func (*GetAllUserIDReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9cc4371b0c883611, []int{3} + return fileDescriptor_user_9cd4aaf870b6d3b5, []int{3} } func (m *GetAllUserIDReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetAllUserIDReq.Unmarshal(m, b) @@ -228,7 +228,7 @@ func (m *GetAllUserIDResp) Reset() { *m = GetAllUserIDResp{} } func (m *GetAllUserIDResp) String() string { return proto.CompactTextString(m) } func (*GetAllUserIDResp) ProtoMessage() {} func (*GetAllUserIDResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9cc4371b0c883611, []int{4} + return fileDescriptor_user_9cd4aaf870b6d3b5, []int{4} } func (m *GetAllUserIDResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetAllUserIDResp.Unmarshal(m, b) @@ -275,7 +275,7 @@ func (m *AccountCheckReq) Reset() { *m = AccountCheckReq{} } func (m *AccountCheckReq) String() string { return proto.CompactTextString(m) } func (*AccountCheckReq) ProtoMessage() {} func (*AccountCheckReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9cc4371b0c883611, []int{5} + return fileDescriptor_user_9cd4aaf870b6d3b5, []int{5} } func (m *AccountCheckReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AccountCheckReq.Unmarshal(m, b) @@ -328,7 +328,7 @@ func (m *AccountCheckResp) Reset() { *m = AccountCheckResp{} } func (m *AccountCheckResp) String() string { return proto.CompactTextString(m) } func (*AccountCheckResp) ProtoMessage() {} func (*AccountCheckResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9cc4371b0c883611, []int{6} + return fileDescriptor_user_9cd4aaf870b6d3b5, []int{6} } func (m *AccountCheckResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AccountCheckResp.Unmarshal(m, b) @@ -374,7 +374,7 @@ func (m *AccountCheckResp_SingleUserStatus) Reset() { *m = AccountCheckR func (m *AccountCheckResp_SingleUserStatus) String() string { return proto.CompactTextString(m) } func (*AccountCheckResp_SingleUserStatus) ProtoMessage() {} func (*AccountCheckResp_SingleUserStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9cc4371b0c883611, []int{6, 0} + return fileDescriptor_user_9cd4aaf870b6d3b5, []int{6, 0} } func (m *AccountCheckResp_SingleUserStatus) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AccountCheckResp_SingleUserStatus.Unmarshal(m, b) @@ -421,7 +421,7 @@ func (m *GetUserInfoReq) Reset() { *m = GetUserInfoReq{} } func (m *GetUserInfoReq) String() string { return proto.CompactTextString(m) } func (*GetUserInfoReq) ProtoMessage() {} func (*GetUserInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9cc4371b0c883611, []int{7} + return fileDescriptor_user_9cd4aaf870b6d3b5, []int{7} } func (m *GetUserInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUserInfoReq.Unmarshal(m, b) @@ -474,7 +474,7 @@ func (m *GetUserInfoResp) Reset() { *m = GetUserInfoResp{} } func (m *GetUserInfoResp) String() string { return proto.CompactTextString(m) } func (*GetUserInfoResp) ProtoMessage() {} func (*GetUserInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9cc4371b0c883611, []int{8} + return fileDescriptor_user_9cd4aaf870b6d3b5, []int{8} } func (m *GetUserInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUserInfoResp.Unmarshal(m, b) @@ -521,7 +521,7 @@ func (m *UpdateUserInfoReq) Reset() { *m = UpdateUserInfoReq{} } func (m *UpdateUserInfoReq) String() string { return proto.CompactTextString(m) } func (*UpdateUserInfoReq) ProtoMessage() {} func (*UpdateUserInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9cc4371b0c883611, []int{9} + return fileDescriptor_user_9cd4aaf870b6d3b5, []int{9} } func (m *UpdateUserInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UpdateUserInfoReq.Unmarshal(m, b) @@ -573,7 +573,7 @@ func (m *UpdateUserInfoResp) Reset() { *m = UpdateUserInfoResp{} } func (m *UpdateUserInfoResp) String() string { return proto.CompactTextString(m) } func (*UpdateUserInfoResp) ProtoMessage() {} func (*UpdateUserInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9cc4371b0c883611, []int{10} + return fileDescriptor_user_9cd4aaf870b6d3b5, []int{10} } func (m *UpdateUserInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UpdateUserInfoResp.Unmarshal(m, b) @@ -615,7 +615,7 @@ func (m *SetReceiveMessageOptReq) Reset() { *m = SetReceiveMessageOptReq func (m *SetReceiveMessageOptReq) String() string { return proto.CompactTextString(m) } func (*SetReceiveMessageOptReq) ProtoMessage() {} func (*SetReceiveMessageOptReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9cc4371b0c883611, []int{11} + return fileDescriptor_user_9cd4aaf870b6d3b5, []int{11} } func (m *SetReceiveMessageOptReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetReceiveMessageOptReq.Unmarshal(m, b) @@ -682,7 +682,7 @@ func (m *OptResult) Reset() { *m = OptResult{} } func (m *OptResult) String() string { return proto.CompactTextString(m) } func (*OptResult) ProtoMessage() {} func (*OptResult) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9cc4371b0c883611, []int{12} + return fileDescriptor_user_9cd4aaf870b6d3b5, []int{12} } func (m *OptResult) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OptResult.Unmarshal(m, b) @@ -728,7 +728,7 @@ func (m *SetReceiveMessageOptResp) Reset() { *m = SetReceiveMessageOptRe func (m *SetReceiveMessageOptResp) String() string { return proto.CompactTextString(m) } func (*SetReceiveMessageOptResp) ProtoMessage() {} func (*SetReceiveMessageOptResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9cc4371b0c883611, []int{13} + return fileDescriptor_user_9cd4aaf870b6d3b5, []int{13} } func (m *SetReceiveMessageOptResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetReceiveMessageOptResp.Unmarshal(m, b) @@ -776,7 +776,7 @@ func (m *GetReceiveMessageOptReq) Reset() { *m = GetReceiveMessageOptReq func (m *GetReceiveMessageOptReq) String() string { return proto.CompactTextString(m) } func (*GetReceiveMessageOptReq) ProtoMessage() {} func (*GetReceiveMessageOptReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9cc4371b0c883611, []int{14} + return fileDescriptor_user_9cd4aaf870b6d3b5, []int{14} } func (m *GetReceiveMessageOptReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetReceiveMessageOptReq.Unmarshal(m, b) @@ -836,7 +836,7 @@ func (m *GetReceiveMessageOptResp) Reset() { *m = GetReceiveMessageOptRe func (m *GetReceiveMessageOptResp) String() string { return proto.CompactTextString(m) } func (*GetReceiveMessageOptResp) ProtoMessage() {} func (*GetReceiveMessageOptResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9cc4371b0c883611, []int{15} + return fileDescriptor_user_9cd4aaf870b6d3b5, []int{15} } func (m *GetReceiveMessageOptResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetReceiveMessageOptResp.Unmarshal(m, b) @@ -883,7 +883,7 @@ func (m *GetAllConversationMsgOptReq) Reset() { *m = GetAllConversationM func (m *GetAllConversationMsgOptReq) String() string { return proto.CompactTextString(m) } func (*GetAllConversationMsgOptReq) ProtoMessage() {} func (*GetAllConversationMsgOptReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9cc4371b0c883611, []int{16} + return fileDescriptor_user_9cd4aaf870b6d3b5, []int{16} } func (m *GetAllConversationMsgOptReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetAllConversationMsgOptReq.Unmarshal(m, b) @@ -936,7 +936,7 @@ func (m *GetAllConversationMsgOptResp) Reset() { *m = GetAllConversation func (m *GetAllConversationMsgOptResp) String() string { return proto.CompactTextString(m) } func (*GetAllConversationMsgOptResp) ProtoMessage() {} func (*GetAllConversationMsgOptResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_9cc4371b0c883611, []int{17} + return fileDescriptor_user_9cd4aaf870b6d3b5, []int{17} } func (m *GetAllConversationMsgOptResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetAllConversationMsgOptResp.Unmarshal(m, b) @@ -1295,59 +1295,60 @@ var _User_serviceDesc = grpc.ServiceDesc{ Metadata: "user/user.proto", } -func init() { proto.RegisterFile("user/user.proto", fileDescriptor_user_9cc4371b0c883611) } +func init() { proto.RegisterFile("user/user.proto", fileDescriptor_user_9cd4aaf870b6d3b5) } -var fileDescriptor_user_9cc4371b0c883611 = []byte{ - // 812 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xcd, 0x6e, 0xd3, 0x4a, - 0x14, 0x96, 0xe3, 0xb4, 0xb7, 0x39, 0x69, 0x13, 0xdf, 0x51, 0x7f, 0x7c, 0x7d, 0xa1, 0x4a, 0x47, - 0x08, 0xa2, 0x2e, 0x1c, 0x28, 0x2b, 0x40, 0x20, 0x95, 0x54, 0xb5, 0x2a, 0x88, 0x82, 0x5c, 0x75, - 0xc3, 0xa6, 0x32, 0xc9, 0x10, 0xa2, 0x24, 0x1e, 0xe3, 0x71, 0x5a, 0x01, 0x12, 0x2b, 0xde, 0x82, - 0x05, 0x4b, 0x9e, 0x81, 0xd7, 0xe0, 0x05, 0x78, 0x15, 0xe4, 0x19, 0xdb, 0x19, 0xff, 0x24, 0x2d, - 0x41, 0x42, 0x6c, 0x2c, 0xcf, 0x99, 0x33, 0x67, 0xbe, 0xef, 0x3b, 0x67, 0x66, 0x0e, 0xd4, 0xa7, - 0x8c, 0xf8, 0xad, 0xf0, 0x63, 0x7a, 0x3e, 0x0d, 0x28, 0x2a, 0x87, 0xff, 0xc6, 0x5e, 0xd7, 0x23, - 0xee, 0xf9, 0x49, 0xa7, 0xe5, 0x8d, 0x06, 0x2d, 0x3e, 0xd1, 0x62, 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0x2c, - 0xda, 0x14, 0x31, 0xd2, 0x17, 0xbd, 0xb1, 0x55, 0x60, 0x65, 0x1e, 0x6a, 0x43, 0x2d, 0x7d, 0x35, - 0xa1, 0x1d, 0xe1, 0x98, 0xbb, 0x36, 0x0d, 0xbd, 0x78, 0x82, 0x79, 0x21, 0x00, 0xa9, 0xb7, 0x89, - 0x01, 0xa4, 0x5b, 0xad, 0x18, 0x40, 0xb6, 0x09, 0x7a, 0x0c, 0xeb, 0x72, 0x57, 0x81, 0x66, 0x38, - 0xe5, 0xd6, 0xc5, 0xd8, 0x2e, 0x32, 0x33, 0x0f, 0x9d, 0xc1, 0x66, 0xd1, 0x45, 0x80, 0x6e, 0x0a, - 0xff, 0x39, 0xb7, 0xa5, 0xb1, 0xbb, 0x68, 0x5a, 0x84, 0xb5, 0x16, 0x84, 0xb5, 0x16, 0x87, 0x9d, - 0x7b, 0xa4, 0x1c, 0x7e, 0xdc, 0x0a, 0x6b, 0x0a, 0xed, 0xc9, 0x0c, 0x0b, 0x2b, 0xde, 0xc0, 0x57, - 0xb9, 0x08, 0x3d, 0xe5, 0x2e, 0x23, 0xd6, 0x33, 0xd3, 0x53, 0xc5, 0x7a, 0x66, 0x1b, 0x92, 0xa7, - 0x1b, 0x2f, 0xab, 0x26, 0xef, 0xcd, 0x1f, 0x85, 0x9f, 0x57, 0xab, 0xbc, 0xf1, 0xbe, 0xff, 0x33, - 0x00, 0x00, 0xff, 0xff, 0xaa, 0x27, 0xa9, 0x62, 0xb4, 0x0b, 0x00, 0x00, +var fileDescriptor_user_9cd4aaf870b6d3b5 = []byte{ + // 819 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xcd, 0x6e, 0x13, 0x3b, + 0x14, 0xd6, 0x24, 0x69, 0x6f, 0x73, 0xd2, 0x26, 0xb9, 0x56, 0x6f, 0x3b, 0x77, 0x0a, 0x55, 0x6a, + 0x21, 0x88, 0xba, 0x48, 0x50, 0x59, 0x20, 0x81, 0x00, 0x95, 0x54, 0x8d, 0x2a, 0x88, 0x82, 0xa6, + 0xea, 0x86, 0x4d, 0x34, 0x24, 0x26, 0x44, 0x4d, 0xc6, 0xc6, 0x9e, 0xb4, 0x02, 0xb6, 0xac, 0x78, + 0x05, 0x16, 0x2c, 0x79, 0x06, 0x5e, 0x83, 0x17, 0xe0, 0x55, 0xd0, 0xd8, 0x33, 0x89, 0xe7, 0x27, + 0xd3, 0x12, 0x24, 0xc4, 0x66, 0x34, 0x3e, 0x3e, 0x3e, 0xfe, 0xbe, 0xef, 0x1c, 0xdb, 0x07, 0x2a, + 0x53, 0x41, 0x78, 0xd3, 0xff, 0x34, 0x18, 0xa7, 0x1e, 0x45, 0x05, 0xff, 0xdf, 0xda, 0xeb, 0x32, + 0xe2, 0xf6, 0x4e, 0x3a, 0x4d, 0x76, 0x3e, 0x6c, 0xca, 0x89, 0xa6, 0x18, 0x9c, 0xf7, 0x2e, 0x45, + 0xf3, 0x52, 0x28, 0x47, 0xfc, 0x18, 0xa0, 0x45, 0x27, 0x13, 0xea, 0xda, 0x44, 0x30, 0x64, 0xc2, + 0x3f, 0x84, 0xf3, 0x16, 0x1d, 0x10, 0xd3, 0xa8, 0x19, 0xf5, 0x15, 0x3b, 0x1c, 0xa2, 0x2d, 0x58, + 0x25, 0x9c, 0x77, 0xc4, 0xd0, 0xcc, 0xd5, 0x8c, 0x7a, 0xd1, 0x0e, 0x46, 0xf8, 0x3d, 0x94, 0x8f, + 0xc8, 0x98, 0x78, 0xe4, 0x4c, 0x10, 0x2e, 0x6c, 0xf2, 0x16, 0xed, 0x43, 0x75, 0x6e, 0x39, 0x39, + 0x7a, 0x3e, 0x12, 0x9e, 0x99, 0xab, 0xe5, 0xeb, 0x45, 0x3b, 0x61, 0x47, 0x16, 0xac, 0x75, 0x99, + 0x1a, 0x9b, 0x79, 0x19, 0x77, 0x36, 0x46, 0x35, 0x28, 0x75, 0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5a, 0x53, 0x68, 0x4f, + 0x67, 0x98, 0x5a, 0xf1, 0x16, 0xbe, 0xca, 0x45, 0xe9, 0xa9, 0xb7, 0x1c, 0xa1, 0x9e, 0xb1, 0x06, + 0x2b, 0xd4, 0x33, 0xde, 0x9d, 0x3c, 0xdd, 0x78, 0x59, 0x6a, 0xc8, 0x46, 0xfd, 0xa1, 0xff, 0x79, + 0xb5, 0x2a, 0xbb, 0xf0, 0x7b, 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x95, 0x5e, 0xfc, 0xe6, 0xc1, + 0x0b, 0x00, 0x00, } From 655f7ff7d06907f18a79cd5043fef6a094e01957 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Mon, 17 Jan 2022 18:00:25 +0800 Subject: [PATCH 292/337] Refactor code --- internal/api/friend/friend.go | 2 +- .../third/tencent_cloud_storage_credential.go | 68 ++++++------------- pkg/base_info/cos_api_struct.go | 18 +++++ 3 files changed, 39 insertions(+), 49 deletions(-) create mode 100644 pkg/base_info/cos_api_struct.go diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go index b63591748..1c6b0a9b2 100644 --- a/internal/api/friend/friend.go +++ b/internal/api/friend/friend.go @@ -129,7 +129,7 @@ func AddFriendResponse(c *gin.Context) { req := &rpc.AddFriendResponseReq{CommID: &rpc.CommID{}} utils.CopyStructFields(req.CommID, ¶ms.ParamsCommFriend) req.HandleMsg = params.HandleMsg - req.Flag = params.Flag + req.HandleResult = params.Flag var ok bool ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) if !ok { diff --git a/internal/api/third/tencent_cloud_storage_credential.go b/internal/api/third/tencent_cloud_storage_credential.go index d6814bc93..33aac57b3 100644 --- a/internal/api/third/tencent_cloud_storage_credential.go +++ b/internal/api/third/tencent_cloud_storage_credential.go @@ -1,51 +1,37 @@ package apiThird import ( + api "Open_IM/pkg/base_info" "Open_IM/pkg/common/config" "Open_IM/pkg/common/constant" - log2 "Open_IM/pkg/common/log" + "Open_IM/pkg/common/log" + "Open_IM/pkg/common/token_verify" "github.com/gin-gonic/gin" sts "github.com/tencentyun/qcloud-cos-sts-sdk/go" "net/http" "time" ) -type paramsTencentCloudStorageCredential struct { - Token string `json:"token"` - OperationID string `json:"operationID"` -} - -var lastTime int64 -var lastRes *sts.CredentialResult - func TencentCloudStorageCredential(c *gin.Context) { - params := paramsTencentCloudStorageCredential{} - if err := c.BindJSON(¶ms); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "Parameter parsing error,please check the parameters and request service again"}) + req := api.TencentCloudStorageCredentialReq{} + if err := c.BindJSON(&req); err != nil { + log.NewError("0", "BindJSON failed ", err.Error()) + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - - log2.Info(params.Token, params.OperationID, "api TencentUpLoadCredential call start...") - - if time.Now().Unix()-lastTime < 10 && lastRes != nil { - c.JSON(http.StatusOK, gin.H{ - "errCode": 0, - "errMsg": "", - "region": config.Config.Credential.Tencent.Region, - "bucket": config.Config.Credential.Tencent.Bucket, - "data": lastRes, - }) + ok, userID := token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) + if !ok { + log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) return } - - lastTime = time.Now().Unix() + log.NewInfo(req.OperationID, "TencentCloudStorageCredential args ", userID) cli := sts.NewClient( config.Config.Credential.Tencent.SecretID, config.Config.Credential.Tencent.SecretKey, nil, ) - log2.Info(c.Request.Header.Get("token"), c.PostForm("optionID"), "api TencentUpLoadCredential sts.NewClient cli = %v", cli) opt := &sts.CredentialOptions{ DurationSeconds: int64(time.Hour.Seconds()), @@ -65,29 +51,15 @@ func TencentCloudStorageCredential(c *gin.Context) { }, }, } - log2.Info(c.Request.Header.Get("token"), c.PostForm("optionID"), "api TencentUpLoadCredential sts.CredentialOptions opt = %v", opt) - res, err := cli.GetCredential(opt) + resp := api.TencentCloudStorageCredentialResp{} if err != nil { - log2.Error(c.Request.Header.Get("token"), c.PostForm("optionID"), "api TencentUpLoadCredential cli.GetCredential err = %s", err.Error()) - c.JSON(http.StatusOK, gin.H{ - "errCode": constant.ErrTencentCredential.ErrCode, - "errMsg": err.Error(), - "bucket": "", - "region": "", - "data": res, - }) - return + resp.ErrCode = constant.ErrTencentCredential.ErrCode + resp.ErrMsg = err.Error() + } else { + resp.Bucket = config.Config.Credential.Tencent.Bucket + resp.Region = config.Config.Credential.Tencent.Region + resp.CredentialResult = res } - log2.Info(c.Request.Header.Get("token"), c.PostForm("optionID"), "api TencentUpLoadCredential cli.GetCredential success res = %v, res.Credentials = %v", res, res.Credentials) - - lastRes = res - - c.JSON(http.StatusOK, gin.H{ - "errCode": 0, - "errMsg": "", - "region": config.Config.Credential.Tencent.Region, - "bucket": config.Config.Credential.Tencent.Bucket, - "data": res, - }) + c.JSON(http.StatusOK, resp) } diff --git a/pkg/base_info/cos_api_struct.go b/pkg/base_info/cos_api_struct.go new file mode 100644 index 000000000..5efda0af1 --- /dev/null +++ b/pkg/base_info/cos_api_struct.go @@ -0,0 +1,18 @@ +package base_info + +import sts "github.com/tencentyun/qcloud-cos-sts-sdk/go" + +type TencentCloudStorageCredentialReq struct { + OperationID string `json:"operationID"` +} + +type tencentCloudStorageCredentialRespData struct { + *sts.CredentialResult + Region string `json:"region"` + Bucket string `json:"bucket"` +} + +type TencentCloudStorageCredentialResp struct { + CommResp + tencentCloudStorageCredentialRespData `json:"data"` +} From a45693685342c0e487698c61d72ee97a0562e5f6 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Mon, 17 Jan 2022 18:25:35 +0800 Subject: [PATCH 293/337] Refactor code --- internal/api/third/tencent_cloud_storage_credential.go | 6 +++--- pkg/base_info/cos_api_struct.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/api/third/tencent_cloud_storage_credential.go b/internal/api/third/tencent_cloud_storage_credential.go index 33aac57b3..537641dee 100644 --- a/internal/api/third/tencent_cloud_storage_credential.go +++ b/internal/api/third/tencent_cloud_storage_credential.go @@ -57,9 +57,9 @@ func TencentCloudStorageCredential(c *gin.Context) { resp.ErrCode = constant.ErrTencentCredential.ErrCode resp.ErrMsg = err.Error() } else { - resp.Bucket = config.Config.Credential.Tencent.Bucket - resp.Region = config.Config.Credential.Tencent.Region - resp.CredentialResult = res + resp.Data.Bucket = config.Config.Credential.Tencent.Bucket + resp.Data.Region = config.Config.Credential.Tencent.Region + resp.Data.CredentialResult = res } c.JSON(http.StatusOK, resp) } diff --git a/pkg/base_info/cos_api_struct.go b/pkg/base_info/cos_api_struct.go index 5efda0af1..41568e480 100644 --- a/pkg/base_info/cos_api_struct.go +++ b/pkg/base_info/cos_api_struct.go @@ -6,7 +6,7 @@ type TencentCloudStorageCredentialReq struct { OperationID string `json:"operationID"` } -type tencentCloudStorageCredentialRespData struct { +type TencentCloudStorageCredentialRespData struct { *sts.CredentialResult Region string `json:"region"` Bucket string `json:"bucket"` @@ -14,5 +14,5 @@ type tencentCloudStorageCredentialRespData struct { type TencentCloudStorageCredentialResp struct { CommResp - tencentCloudStorageCredentialRespData `json:"data"` + Data TencentCloudStorageCredentialRespData `json:"data"` } From d12d571c2b5f5e2c0030c54733de7bf7a2388e1c Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 18 Jan 2022 09:25:41 +0800 Subject: [PATCH 294/337] Refactor code --- config/config.yaml | 147 +++++++++++++++++++++++++++---- internal/api/chat/pull_msg.go | 2 +- internal/api/chat/send_msg.go | 2 +- internal/rpc/msg/pull_message.go | 2 +- pkg/common/config/config.go | 2 +- pkg/common/db/mongoModel.go | 2 +- pkg/common/utils/utils.go | 1 - 7 files changed, 133 insertions(+), 25 deletions(-) diff --git a/config/config.yaml b/config/config.yaml index b8ab770c2..359ecaa20 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -85,9 +85,9 @@ credential: rpcport: openImUserPort: [ 10100 ] openImFriendPort: [ 10200 ] - openImOfflineMessagePort: [ 10300] + openImOfflineMessagePort: [ 10300 ] openImOnlineRelayPort: [ 10400 ] - openImGroupPort: [ 10500 ] + openImGroupPort: [ 10500 ] openImAuthPort: [ 10600 ] openImPushPort: [ 10700 ] c2c: @@ -144,8 +144,8 @@ push: pushUrl: "https://api.jpush.cn/v3/push" pushIntent: "intent:#Intent;component=io.openim.app.enterprisechat/io.openim.app.enterprisechat.MainActivity;end" manager: - appManagerUid: ["openIM123456","openIM654321"] - secrets: ["openIM1","openIM2"] + appManagerUid: [ "openIM123456","openIM654321" ] + secrets: [ "openIM1","openIM2" ] secret: tuoyun @@ -176,6 +176,7 @@ iOSPush: badgeCount: true notification: + groupCreated: conversation: reliabilityLevel: 1 @@ -188,8 +189,7 @@ notification: defaultTips: tips: "create the group" # xx create the group - - groupInfoChanged: + groupInfoSet: conversation: reliabilityLevel: 1 unreadCount: false @@ -201,9 +201,105 @@ notification: defaultTips: tips: "group info changed by" # group info changed by xx + joinGroupApplication: + conversation: + reliabilityLevel: 1 + unreadCount: false + offlinePush: + switch: false + title: "group info changed title" + desc: "group info changed desc" + ext: "group info changed ext" + defaultTips: + tips: "group info changed by" # group info changed by xx + memberQuit: + conversation: + reliabilityLevel: 1 + unreadCount: false + offlinePush: + switch: false + title: "group info changed title" + desc: "group info changed desc" + ext: "group info changed ext" + defaultTips: + tips: "group info changed by" # group info changed by xx - FriendApplicationAdded: + groupApplicationAccepted: + conversation: + reliabilityLevel: 1 + unreadCount: false + offlinePush: + switch: false + title: "group info changed title" + desc: "group info changed desc" + ext: "group info changed ext" + defaultTips: + tips: "group info changed by" # group info changed by xx + + groupApplicationRejected: + conversation: + reliabilityLevel: 1 + unreadCount: false + offlinePush: + switch: false + title: "group info changed title" + desc: "group info changed desc" + ext: "group info changed ext" + defaultTips: + tips: "group info changed by" # group info changed by xx + + groupOwnerTransferred: + conversation: + reliabilityLevel: 1 + unreadCount: false + offlinePush: + switch: false + title: "group info changed title" + desc: "group info changed desc" + ext: "group info changed ext" + defaultTips: + tips: "group info changed by" # group info changed by xx + + memberKicked: + conversation: + reliabilityLevel: 1 + unreadCount: false + offlinePush: + switch: false + title: "group info changed title" + desc: "group info changed desc" + ext: "group info changed ext" + defaultTips: + tips: "group info changed by" # group info changed by xx + + memberInvited: + conversation: + reliabilityLevel: 1 + unreadCount: false + offlinePush: + switch: false + title: "group info changed title" + desc: "group info changed desc" + ext: "group info changed ext" + defaultTips: + tips: "group info changed by" # group info changed by xx + + memberEnter: + conversation: + reliabilityLevel: 1 + unreadCount: false + offlinePush: + switch: false + title: "group info changed title" + desc: "group info changed desc" + ext: "group info changed ext" + defaultTips: + tips: "group info changed by" # group info changed by xx + + #############################friend################################# + + friendApplicationAdded: conversation: reliabilityLevel: 2 unreadCount: false @@ -215,7 +311,7 @@ notification: defaultTips: tips: "I applies to add you as a friend" # - FriendApplicationApproved: + friendApplicationApproved: conversation: reliabilityLevel: 2 unreadCount: false @@ -228,7 +324,7 @@ notification: tips: "I applies to add your friend application" # - FriendApplicationRejected: + friendApplicationRejected: conversation: reliabilityLevel: 2 unreadCount: false @@ -244,7 +340,7 @@ notification: - FriendAdded: + friendAdded: conversation: reliabilityLevel: 3 unreadCount: true @@ -258,7 +354,7 @@ notification: - FriendDeleted: + friendDeleted: conversation: reliabilityLevel: 2 unreadCount: false @@ -271,7 +367,7 @@ notification: tips: "Deleted a friend" # - FriendInfoChanged: + friendInfoChanged: conversation: reliabilityLevel: 2 unreadCount: false @@ -285,7 +381,7 @@ notification: - BlackAdded: + blackAdded: conversation: reliabilityLevel: 2 unreadCount: false @@ -298,7 +394,7 @@ notification: tips: "Blocked a user" # - BlackDeleted: + blackDeleted: conversation: reliabilityLevel: 2 unreadCount: false @@ -310,7 +406,20 @@ notification: defaultTips: tips: "Remove a blocked user" -" # xx applied to add you as a friend + #####################user######################### + userInfoUpdated: + conversation: + reliabilityLevel: 2 + unreadCount: false + offlinePush: + switch: true + title: "Remove a blocked user" + desc: "Remove a blocked user" + ext: "Remove a blocked user" + defaultTips: + tips: "Remove a blocked user" + + " # xx applied to add you as a friend @@ -327,9 +436,9 @@ demo: superCode: 666666 mail: title: "openIM" - senderMail: "1765567899@qq.com" - senderAuthorizationCode: "1gxyausfoevlzbfag" - smtpAddr: "smtp.qq.com" - smtpPort: 25 +senderMail: "1765567899@qq.com" +senderAuthorizationCode: "1gxyausfoevlzbfag" +smtpAddr: "smtp.qq.com" +smtpPort: 25 diff --git a/internal/api/chat/pull_msg.go b/internal/api/chat/pull_msg.go index 881612681..56903f5cc 100644 --- a/internal/api/chat/pull_msg.go +++ b/internal/api/chat/pull_msg.go @@ -6,7 +6,7 @@ import ( "Open_IM/pkg/common/token_verify" "Open_IM/pkg/grpc-etcdv3/getcdv3" "Open_IM/pkg/proto/chat" - "Open_IM/pkg/proto/sdk_ws" + open_im_sdk "Open_IM/pkg/proto/sdk_ws" "context" "github.com/gin-gonic/gin" "net/http" diff --git a/internal/api/chat/send_msg.go b/internal/api/chat/send_msg.go index 3909ac125..a28dcd1ce 100644 --- a/internal/api/chat/send_msg.go +++ b/internal/api/chat/send_msg.go @@ -4,7 +4,7 @@ import ( "Open_IM/pkg/common/config" "Open_IM/pkg/common/log" pbChat "Open_IM/pkg/proto/chat" - "Open_IM/pkg/proto/sdk_ws" + open_im_sdk "Open_IM/pkg/proto/sdk_ws" "context" "Open_IM/pkg/grpc-etcdv3/getcdv3" diff --git a/internal/rpc/msg/pull_message.go b/internal/rpc/msg/pull_message.go index 46d0ad78a..af619182b 100644 --- a/internal/rpc/msg/pull_message.go +++ b/internal/rpc/msg/pull_message.go @@ -6,7 +6,7 @@ import ( commonDB "Open_IM/pkg/common/db" "Open_IM/pkg/common/log" - "Open_IM/pkg/proto/sdk_ws" + open_im_sdk "Open_IM/pkg/proto/sdk_ws" "sort" "strings" diff --git a/pkg/common/config/config.go b/pkg/common/config/config.go index 2e6870557..3f5cccd5d 100644 --- a/pkg/common/config/config.go +++ b/pkg/common/config/config.go @@ -260,7 +260,7 @@ type config struct { OfflinePush POfflinePush `yaml:"offlinePush"` DefaultTips PDefaultTips `yaml:"defaultTips"` } - FriendRemarkSet struct { + FriendInfoChanged struct { Conversation PConversation `yaml:"conversation"` OfflinePush POfflinePush `yaml:"offlinePush"` DefaultTips PDefaultTips `yaml:"defaultTips"` diff --git a/pkg/common/db/mongoModel.go b/pkg/common/db/mongoModel.go index bb8650309..128815031 100644 --- a/pkg/common/db/mongoModel.go +++ b/pkg/common/db/mongoModel.go @@ -5,7 +5,7 @@ import ( "Open_IM/pkg/common/constant" "Open_IM/pkg/common/log" pbMsg "Open_IM/pkg/proto/chat" - "Open_IM/pkg/proto/sdk_ws" + open_im_sdk "Open_IM/pkg/proto/sdk_ws" "errors" "github.com/garyburd/redigo/redis" "github.com/golang/protobuf/proto" diff --git a/pkg/common/utils/utils.go b/pkg/common/utils/utils.go index e299fefc2..2fbcf1930 100644 --- a/pkg/common/utils/utils.go +++ b/pkg/common/utils/utils.go @@ -3,7 +3,6 @@ package utils import ( db "Open_IM/pkg/common/db" imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" - "Open_IM/pkg/common/log" "Open_IM/pkg/common/token_verify" open_im_sdk "Open_IM/pkg/proto/sdk_ws" "Open_IM/pkg/utils" From bf208485f8de654c61e308d81df6b8b0d307155e Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 18 Jan 2022 09:40:08 +0800 Subject: [PATCH 295/337] Refactor code --- config/config.yaml | 2 +- internal/rpc/msg/send_msg.go | 36 ++++++++++++++++++------------------ pkg/common/config/config.go | 2 +- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/config/config.yaml b/config/config.yaml index 359ecaa20..b8719b8a1 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -367,7 +367,7 @@ notification: tips: "Deleted a friend" # - friendInfoChanged: + friendRemarkSet: conversation: reliabilityLevel: 2 unreadCount: false diff --git a/internal/rpc/msg/send_msg.go b/internal/rpc/msg/send_msg.go index 83f439120..38430b677 100644 --- a/internal/rpc/msg/send_msg.go +++ b/internal/rpc/msg/send_msg.go @@ -259,7 +259,7 @@ func Notification(n *NotificationMsg) { msg.RecvID = "" msg.GroupID = n.RecvID } - if onlineUserOnly { + if true { msg.Options = make(map[string]bool, 10) //utils.SetSwitchFromOptions(msg.Options, constant.IsOfflinePush, false) utils.SetSwitchFromOptions(msg.Options, constant.IsHistory, false) @@ -267,23 +267,23 @@ func Notification(n *NotificationMsg) { } offlineInfo.IOSBadgeCount = config.Config.IOSPush.BadgeCount offlineInfo.IOSPushSound = config.Config.IOSPush.PushSound - switch msg.ContentType { - case constant.GroupCreatedNotification: - pushSwitch = config.Config.Notification.GroupCreated.OfflinePush.PushSwitch - title = config.Config.Notification.GroupCreated.OfflinePush.Title - desc = config.Config.Notification.GroupCreated.OfflinePush.Desc - ex = config.Config.Notification.GroupCreated.OfflinePush.Ext - case constant.GroupInfoChangedNotification: - pushSwitch = config.Config.Notification.GroupInfoChanged.OfflinePush.PushSwitch - title = config.Config.Notification.GroupInfoChanged.OfflinePush.Title - desc = config.Config.Notification.GroupInfoChanged.OfflinePush.Desc - ex = config.Config.Notification.GroupInfoChanged.OfflinePush.Ext - case constant.JoinApplicationNotification: - pushSwitch = config.Config.Notification.ApplyJoinGroup.OfflinePush.PushSwitch - title = config.Config.Notification.ApplyJoinGroup.OfflinePush.Title - desc = config.Config.Notification.ApplyJoinGroup.OfflinePush.Desc - ex = config.Config.Notification.ApplyJoinGroup.OfflinePush.Ext - } + //switch msg.ContentType { + //case constant.GroupCreatedNotification: + // pushSwitch = config.Config.Notification.GroupCreated.OfflinePush.PushSwitch + // title = config.Config.Notification.GroupCreated.OfflinePush.Title + // desc = config.Config.Notification.GroupCreated.OfflinePush.Desc + // ex = config.Config.Notification.GroupCreated.OfflinePush.Ext + //case constant.GroupInfoChangedNotification: + // pushSwitch = config.Config.Notification.GroupInfoChanged.OfflinePush.PushSwitch + // title = config.Config.Notification.GroupInfoChanged.OfflinePush.Title + // desc = config.Config.Notification.GroupInfoChanged.OfflinePush.Desc + // ex = config.Config.Notification.GroupInfoChanged.OfflinePush.Ext + //case constant.JoinApplicationNotification: + // pushSwitch = config.Config.Notification.ApplyJoinGroup.OfflinePush.PushSwitch + // title = config.Config.Notification.ApplyJoinGroup.OfflinePush.Title + // desc = config.Config.Notification.ApplyJoinGroup.OfflinePush.Desc + // ex = config.Config.Notification.ApplyJoinGroup.OfflinePush.Ext + //} utils.SetSwitchFromOptions(msg.Options, constant.IsOfflinePush, pushSwitch) offlineInfo.Title = title offlineInfo.Desc = desc diff --git a/pkg/common/config/config.go b/pkg/common/config/config.go index 3f5cccd5d..2e6870557 100644 --- a/pkg/common/config/config.go +++ b/pkg/common/config/config.go @@ -260,7 +260,7 @@ type config struct { OfflinePush POfflinePush `yaml:"offlinePush"` DefaultTips PDefaultTips `yaml:"defaultTips"` } - FriendInfoChanged struct { + FriendRemarkSet struct { Conversation PConversation `yaml:"conversation"` OfflinePush POfflinePush `yaml:"offlinePush"` DefaultTips PDefaultTips `yaml:"defaultTips"` From 69643c37c16a5cdb2b3b0eaaf80bb903865afd87 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 18 Jan 2022 10:41:12 +0800 Subject: [PATCH 296/337] Refactor code --- config/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/config.yaml b/config/config.yaml index b8719b8a1..65696d2ba 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -419,7 +419,7 @@ notification: defaultTips: tips: "Remove a blocked user" - " # xx applied to add you as a friend + From b90bb10a3ff3fd39ba29163aee5c188e7c575616 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 18 Jan 2022 10:43:30 +0800 Subject: [PATCH 297/337] Refactor code --- internal/rpc/group/group.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 26de2bbd9..6fb8318d4 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -234,7 +234,7 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite toInsertInfo.OperatorUserID = req.OpUserID err = imdb.InsertIntoGroupMember(toInsertInfo) if err != nil { - log.NewError(req.OperationID, "InsertIntoGroupMember failed ", req.GroupID, toUserInfo.UserID, toUserInfo.Nickname, toUserInfo.FaceUrl) + log.NewError(req.OperationID, "InsertIntoGroupMember failed ", req.GroupID, toUserInfo.UserID, toUserInfo.Nickname, toUserInfo.FaceURL) resultNode.Result = -1 resp.Id2ResultList = append(resp.Id2ResultList, &resultNode) continue From 7416fa3a4c1dceadfe5ab8b0b8c24694cf53dfd0 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Tue, 18 Jan 2022 11:54:48 +0800 Subject: [PATCH 298/337] ws send msg modify --- internal/api/manage/management_chat.go | 2 +- internal/msg_gateway/gate/logic.go | 25 +++++++++++-------------- internal/rpc/msg/send_msg.go | 4 ++-- pkg/proto/sdk_ws/ws.proto | 6 +++--- 4 files changed, 17 insertions(+), 20 deletions(-) diff --git a/internal/api/manage/management_chat.go b/internal/api/manage/management_chat.go index f547b9b92..ba715bf68 100644 --- a/internal/api/manage/management_chat.go +++ b/internal/api/manage/management_chat.go @@ -61,7 +61,7 @@ func newUserSendMsgReq(params *ManagementSendMsgReq) *pbChat.SendMsgReq { ContentType: params.ContentType, Content: []byte(newContent), ForceList: params.ForceList, - CreateTime: utils.GetCurrentTimestampByNano(), + CreateTime: utils.GetCurrentTimestampByMill(), Options: options, OfflinePushInfo: params.OfflinePushInfo, }, diff --git a/internal/msg_gateway/gate/logic.go b/internal/msg_gateway/gate/logic.go index c7f0ff8a1..5fec367aa 100644 --- a/internal/msg_gateway/gate/logic.go +++ b/internal/msg_gateway/gate/logic.go @@ -7,7 +7,6 @@ import ( "Open_IM/pkg/grpc-etcdv3/getcdv3" pbChat "Open_IM/pkg/proto/chat" sdk_ws "Open_IM/pkg/proto/sdk_ws" - "Open_IM/pkg/utils" "bytes" "context" "encoding/gob" @@ -51,14 +50,13 @@ func (ws *WServer) msgParse(conn *UserConn, binaryMsg []byte) { switch m.ReqIdentifier { case constant.WSGetNewestSeq: - go ws.getSeqReq(conn, &m) + ws.getSeqReq(conn, &m) case constant.WSPullMsg: - go ws.pullMsgReq(conn, &m) + ws.pullMsgReq(conn, &m) case constant.WSSendMsg: - sendTime := utils.GetCurrentTimestampByNano() - go ws.sendMsgReq(conn, &m, sendTime) + ws.sendMsgReq(conn, &m) case constant.WSPullMsgBySeqList: - go ws.pullMsgBySeqListReq(conn, &m) + ws.pullMsgBySeqListReq(conn, &m) default: } log.NewInfo("", "goroutine num is ", runtime.NumGoroutine()) @@ -229,13 +227,12 @@ func (ws *WServer) pullMsgBySeqListResp(conn *UserConn, m *Req, pb *sdk_ws.PullM ws.sendMsg(conn, mReply) } -func (ws *WServer) sendMsgReq(conn *UserConn, m *Req, sendTime int64) { - log.NewInfo(m.OperationID, "Ws call success to sendMsgReq start", m.MsgIncr, m.ReqIdentifier, m.SendID, sendTime) +func (ws *WServer) sendMsgReq(conn *UserConn, m *Req) { + log.NewInfo(m.OperationID, "Ws call success to sendMsgReq start", m.MsgIncr, m.ReqIdentifier, m.SendID) nReply := new(pbChat.SendMsgResp) isPass, errCode, errMsg, pData := ws.argsValidate(m, constant.WSSendMsg) if isPass { data := pData.(sdk_ws.MsgData) - data.SendTime = sendTime pbData := pbChat.SendMsgReq{ Token: m.Token, OperationID: m.OperationID, @@ -249,26 +246,26 @@ func (ws *WServer) sendMsgReq(conn *UserConn, m *Req, sendTime int64) { log.NewError(pbData.OperationID, "UserSendMsg err", err.Error()) nReply.ErrCode = 200 nReply.ErrMsg = err.Error() - ws.sendMsgResp(conn, m, nReply, sendTime) + ws.sendMsgResp(conn, m, nReply) } else { log.NewInfo(pbData.OperationID, "rpc call success to sendMsgReq", reply.String()) - ws.sendMsgResp(conn, m, reply, sendTime) + ws.sendMsgResp(conn, m, reply) } } else { nReply.ErrCode = errCode nReply.ErrMsg = errMsg - ws.sendMsgResp(conn, m, nReply, sendTime) + ws.sendMsgResp(conn, m, nReply) } } -func (ws *WServer) sendMsgResp(conn *UserConn, m *Req, pb *pbChat.SendMsgResp, sendTime int64) { +func (ws *WServer) sendMsgResp(conn *UserConn, m *Req, pb *pbChat.SendMsgResp) { // := make(map[string]interface{}) var mReplyData sdk_ws.UserSendMsgResp mReplyData.ClientMsgID = pb.GetClientMsgID() mReplyData.ServerMsgID = pb.GetServerMsgID() - mReplyData.SendTime = sendTime + mReplyData.SendTime = pb.GetSendTime() b, _ := proto.Marshal(&mReplyData) mReply := Resp{ ReqIdentifier: m.ReqIdentifier, diff --git a/internal/rpc/msg/send_msg.go b/internal/rpc/msg/send_msg.go index bf371f0a2..96c777220 100644 --- a/internal/rpc/msg/send_msg.go +++ b/internal/rpc/msg/send_msg.go @@ -46,7 +46,7 @@ type MsgCallBackResp struct { func (rpc *rpcChat) encapsulateMsgData(msg *sdk_ws.MsgData) { msg.ServerMsgID = GetMsgID(msg.SendID) if msg.SendTime == 0 { - msg.SendTime = utils.GetCurrentTimestampByNano() + msg.SendTime = utils.GetCurrentTimestampByMill() } switch msg.ContentType { case constant.Text: @@ -252,7 +252,7 @@ func Notification(n *NotificationMsg, onlineUserOnly bool) { msg.MsgFrom = n.MsgFrom msg.ContentType = n.ContentType msg.SessionType = n.SessionType - msg.CreateTime = utils.GetCurrentTimestampByNano() + msg.CreateTime = utils.GetCurrentTimestampByMill() msg.ClientMsgID = utils.GetMsgID(n.SendID) switch n.SessionType { case constant.GroupChatType: diff --git a/pkg/proto/sdk_ws/ws.proto b/pkg/proto/sdk_ws/ws.proto index bd3729e85..fcd90b9ae 100644 --- a/pkg/proto/sdk_ws/ws.proto +++ b/pkg/proto/sdk_ws/ws.proto @@ -187,12 +187,12 @@ message MsgData { int32 msgFrom = 10; int32 contentType = 11; bytes content = 12; - repeated string forceList = 13; int64 seq = 14; int64 sendTime = 15; int64 createTime = 16; - map options = 17; - OfflinePushInfo offlinePushInfo = 18; + int32 status = 17; + map options = 18; + OfflinePushInfo offlinePushInfo = 19; } message OfflinePushInfo{ From b375877a6d70cd12fb34c60f22b94a1b92cb1e02 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Tue, 18 Jan 2022 14:06:42 +0800 Subject: [PATCH 299/337] ws send msg modify --- internal/rpc/msg/send_msg.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/rpc/msg/send_msg.go b/internal/rpc/msg/send_msg.go index 11c105d2a..d6e8c20a1 100644 --- a/internal/rpc/msg/send_msg.go +++ b/internal/rpc/msg/send_msg.go @@ -240,6 +240,7 @@ type NotificationMsg struct { } func Notification(n *NotificationMsg) { + return var req pbChat.SendMsgReq var msg sdk_ws.MsgData var offlineInfo sdk_ws.OfflinePushInfo From 896a69086bce4f935283808981c11e6a31ff70c3 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Tue, 18 Jan 2022 15:09:47 +0800 Subject: [PATCH 300/337] ws send msg modify --- pkg/common/db/mysql.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/db/mysql.go b/pkg/common/db/mysql.go index dba24ae61..41347190b 100644 --- a/pkg/common/db/mysql.go +++ b/pkg/common/db/mysql.go @@ -35,7 +35,7 @@ func initMysqlDB() { } //Check the database and table during initialization - sql := fmt.Sprintf("CREATE DATABASE IF NOT EXISTS %s ;", config.Config.Mysql.DBDatabaseName) + sql := fmt.Sprintf("CREATE DATABASE IF NOT EXISTS %s ;", config.Config.Mysql.DBDatabaseName+"test1") err = db.Exec(sql).Error if err != nil { log.NewError("0", "Exec failed ", err.Error(), sql) From da5e60a0096784f98cd44f0383dca35e52da74f5 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 18 Jan 2022 15:26:06 +0800 Subject: [PATCH 301/337] Refactor code --- internal/api/group/group.go | 1 + pkg/base_info/group_api_struct.go | 2 +- pkg/common/db/mysql.go | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/api/group/group.go b/internal/api/group/group.go index 61bc95495..16ce528fa 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -167,6 +167,7 @@ func GetGroupAllMemberList(c *gin.Context) { func GetJoinedGroupList(c *gin.Context) { params := api.GetJoinedGroupListReq{} + err := c.BindJSON(¶ms) if err := c.BindJSON(¶ms); err != nil { log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) diff --git a/pkg/base_info/group_api_struct.go b/pkg/base_info/group_api_struct.go index 01ba3da84..0ecaba7c2 100644 --- a/pkg/base_info/group_api_struct.go +++ b/pkg/base_info/group_api_struct.go @@ -90,7 +90,7 @@ type CreateGroupReq struct { } type CreateGroupResp struct { CommResp - GroupInfo open_im_sdk.GroupInfo `jason:-` + GroupInfo open_im_sdk.GroupInfo `json:-` Data map[string]interface{} `json:"data"` } diff --git a/pkg/common/db/mysql.go b/pkg/common/db/mysql.go index dba24ae61..2540ea7d9 100644 --- a/pkg/common/db/mysql.go +++ b/pkg/common/db/mysql.go @@ -44,7 +44,7 @@ func initMysqlDB() { db.Close() dsn = fmt.Sprintf("%s:%s@tcp(%s)/%s?charset=utf8mb4&parseTime=true&loc=Local", - config.Config.Mysql.DBUserName, config.Config.Mysql.DBPassword, config.Config.Mysql.DBAddress[0], config.Config.Mysql.DBDatabaseName+"test1") + config.Config.Mysql.DBUserName, config.Config.Mysql.DBPassword, config.Config.Mysql.DBAddress[0], config.Config.Mysql.DBDatabaseName) db, err = gorm.Open("mysql", dsn) if err != nil { log.NewError("0", "Open failed ", err.Error(), dsn) From f4ceef485b51a5285f5eb7f118169c3be963c958 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 18 Jan 2022 15:58:57 +0800 Subject: [PATCH 302/337] Refactor code --- pkg/base_info/group_api_struct.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/base_info/group_api_struct.go b/pkg/base_info/group_api_struct.go index 0ecaba7c2..9847ef1c5 100644 --- a/pkg/base_info/group_api_struct.go +++ b/pkg/base_info/group_api_struct.go @@ -90,7 +90,7 @@ type CreateGroupReq struct { } type CreateGroupResp struct { CommResp - GroupInfo open_im_sdk.GroupInfo `json:-` + GroupInfo open_im_sdk.GroupInfo `json:"-"` Data map[string]interface{} `json:"data"` } From b6380a17ce42f2612666ba0e1cf231458448a41b Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Tue, 18 Jan 2022 18:39:27 +0800 Subject: [PATCH 303/337] ws send msg modify --- internal/api/auth/auth.go | 1 - pkg/base_info/group_api_struct.go | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/api/auth/auth.go b/internal/api/auth/auth.go index 76effddf2..85d427fb8 100644 --- a/internal/api/auth/auth.go +++ b/internal/api/auth/auth.go @@ -78,7 +78,6 @@ func UserToken(c *gin.Context) { c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()}) return } - resp := api.UserTokenResp{CommResp: api.CommResp{ErrCode: reply.CommonResp.ErrCode, ErrMsg: reply.CommonResp.ErrMsg}, UserToken: api.UserTokenInfo{UserID: req.FromUserID, Token: reply.Token, ExpiredTime: reply.ExpiredTime}} log.NewInfo(req.OperationID, "UserRegister return ", resp) diff --git a/pkg/base_info/group_api_struct.go b/pkg/base_info/group_api_struct.go index 01ba3da84..f5f4e7018 100644 --- a/pkg/base_info/group_api_struct.go +++ b/pkg/base_info/group_api_struct.go @@ -48,6 +48,10 @@ type InviteUserToGroupResp struct { UserIDResultList []*UserIDResult `json:"data"` } +//type GetJoinedGroupListReq struct { +// OperationID string `json:"operationID" binding:"required"` +// FromUserID string `json:"fromUserID" binding:"required"` +//} type GetJoinedGroupListReq struct { OperationID string `json:"operationID" binding:"required"` FromUserID string `json:"fromUserID" binding:"required"` From e28a8db3b4aafc284b17cd69b083ae032c4135df Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 18 Jan 2022 19:46:17 +0800 Subject: [PATCH 304/337] Refactor code --- internal/api/group/group.go | 1 - 1 file changed, 1 deletion(-) diff --git a/internal/api/group/group.go b/internal/api/group/group.go index 16ce528fa..61bc95495 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -167,7 +167,6 @@ func GetGroupAllMemberList(c *gin.Context) { func GetJoinedGroupList(c *gin.Context) { params := api.GetJoinedGroupListReq{} - err := c.BindJSON(¶ms) if err := c.BindJSON(¶ms); err != nil { log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) From d132e53c064f6ff07a27edaafc9aaff0d5f512f0 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 18 Jan 2022 20:04:58 +0800 Subject: [PATCH 305/337] Refactor code --- internal/api/group/group.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/api/group/group.go b/internal/api/group/group.go index 61bc95495..4497a1578 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -245,8 +245,9 @@ func CreateGroup(c *gin.Context) { c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } - req := &rpc.CreateGroupReq{} - utils.CopyStructFields(req, ¶ms) + req := &rpc.CreateGroupReq{GroupInfo: &open_im_sdk.GroupInfo{}} + utils.CopyStructFields(req.GroupInfo, ¶ms) + for _, v := range params.MemberList { req.InitMemberList = append(req.InitMemberList, &rpc.GroupAddMemberInfo{UserID: v.UserID, RoleLevel: v.RoleLevel}) } From 28d9304ec6d87a58979f4c472837690f2d5ca945 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 18 Jan 2022 20:27:46 +0800 Subject: [PATCH 306/337] Refactor code --- internal/api/user/user.go | 5 ++--- pkg/base_info/user_api_struct.go | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/internal/api/user/user.go b/internal/api/user/user.go index c57eeb88d..8508cddc8 100644 --- a/internal/api/user/user.go +++ b/internal/api/user/user.go @@ -115,13 +115,12 @@ func GetSelfUserInfo(c *gin.Context) { return } if len(RpcResp.UserInfoList) == 1 { - resp := api.GetSelfUserInfoResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, UserInfoList: RpcResp.UserInfoList[0]} - resp.Data = jsonData.JsonDataList(resp.UserInfoList) + resp := api.GetSelfUserInfoResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}, UserInfo: RpcResp.UserInfoList[0]} + resp.Data = jsonData.JsonDataOne(resp.UserInfo) log.NewInfo(req.OperationID, "GetUserInfo api return ", resp) c.JSON(http.StatusOK, resp) } else { resp := api.GetSelfUserInfoResp{CommResp: api.CommResp{ErrCode: RpcResp.CommonResp.ErrCode, ErrMsg: RpcResp.CommonResp.ErrMsg}} - resp.Data = jsonData.JsonDataList(resp.UserInfoList) log.NewInfo(req.OperationID, "GetUserInfo api return ", resp) c.JSON(http.StatusOK, resp) } diff --git a/pkg/base_info/user_api_struct.go b/pkg/base_info/user_api_struct.go index 3ca191f98..2ccfc6cc6 100644 --- a/pkg/base_info/user_api_struct.go +++ b/pkg/base_info/user_api_struct.go @@ -29,6 +29,6 @@ type GetSelfUserInfoReq struct { } type GetSelfUserInfoResp struct { CommResp - UserInfoList *open_im_sdk.UserInfo `json:"-"` - Data []map[string]interface{} `json:"data"` + UserInfo *open_im_sdk.UserInfo `json:"-"` + Data map[string]interface{} `json:"data"` } From 0dc5c9dbac602c3b913c841aa8410984bb4d4e72 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 18 Jan 2022 21:17:35 +0800 Subject: [PATCH 307/337] Refactor code --- internal/api/group/group.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/api/group/group.go b/internal/api/group/group.go index 4497a1578..85473b4c2 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -258,6 +258,8 @@ func CreateGroup(c *gin.Context) { c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) return } + req.OwnerUserID = req.OpUserID + req.OperationID = params.OperationID log.NewInfo(req.OperationID, "CreateGroup args ", req.String()) etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName) From 1c362e487138b787c08d53757a8e5ae8c75bc37d Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Tue, 18 Jan 2022 21:42:27 +0800 Subject: [PATCH 308/337] Refactor code --- internal/rpc/group/group.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 6fb8318d4..9df6064f6 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -78,9 +78,10 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR //Time stamp + MD5 to generate group chat id groupId := utils.Md5(strconv.FormatInt(time.Now().UnixNano(), 10)) //to group - groupInfo := db.Group{GroupID: groupId} + groupInfo := db.Group{} utils.CopyStructFields(&groupInfo, req.GroupInfo) groupInfo.CreatorUserID = req.OpUserID + groupInfo.GroupID = groupId err := imdb.InsertIntoGroup(groupInfo) if err != nil { log.NewError(req.OperationID, "InsertIntoGroup failed, ", err.Error(), groupInfo) From 7f00a3075fdef633615549e1f93a8ff67667859a Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 19 Jan 2022 09:32:46 +0800 Subject: [PATCH 309/337] Refactor code --- pkg/base_info/group_api_struct.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkg/base_info/group_api_struct.go b/pkg/base_info/group_api_struct.go index 9847ef1c5..dec18fc0b 100644 --- a/pkg/base_info/group_api_struct.go +++ b/pkg/base_info/group_api_struct.go @@ -1,7 +1,6 @@ package base_info import ( - "Open_IM/pkg/common/db" open_im_sdk "Open_IM/pkg/proto/sdk_ws" ) @@ -143,8 +142,13 @@ type QuitGroupResp struct { } type SetGroupInfoReq struct { - db.Group - OperationID string `json:"operationID" binding:"required"` + GroupID string `json:"groupID" binding:"required"` + GroupName string `json:"groupName"` + Notification string `json:"notification"` + Introduction string `json:"introduction"` + FaceURL string `json:"faceURL"` + Ex string `json:"ex"` + OperationID string `json:"operationID" binding:"required"` } type SetGroupInfoResp struct { CommResp From 83e842d121fcd907e6555fbca2afea9d55f52478 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 19 Jan 2022 09:33:31 +0800 Subject: [PATCH 310/337] Refactor code --- internal/api/group/group.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/api/group/group.go b/internal/api/group/group.go index 85473b4c2..5d2d8405f 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -450,7 +450,7 @@ func SetGroupInfo(c *gin.Context) { return } req := &rpc.SetGroupInfoReq{GroupInfo: &open_im_sdk.GroupInfo{}} - utils.CopyStructFields(req.GroupInfo, ¶ms.Group) + utils.CopyStructFields(req.GroupInfo, ¶ms) req.OperationID = params.OperationID var ok bool ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) From 757b296fd0a0b084a89c6e7db06cae2e92c2c23f Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 19 Jan 2022 11:47:40 +0800 Subject: [PATCH 311/337] model length add --- pkg/common/db/model_struct.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/common/db/model_struct.go b/pkg/common/db/model_struct.go index 7cb768cd4..8dd0ab3a2 100644 --- a/pkg/common/db/model_struct.go +++ b/pkg/common/db/model_struct.go @@ -116,8 +116,8 @@ type GroupRequest struct { UserID string `gorm:"column:user_id;primary_key;size:64"` GroupID string `gorm:"column:group_id;primary_key;size:64"` HandleResult int32 `gorm:"column:handle_result"` - ReqMsg string `gorm:"column:req_msg;size:255"` - HandledMsg string `gorm:"column:handle_msg;size:255"` + ReqMsg string `gorm:"column:req_msg;size:1024"` + HandledMsg string `gorm:"column:handle_msg;size:1024"` ReqTime time.Time `gorm:"column:req_time"` HandleUserID string `gorm:"column:handle_user_id;size:64"` HandledTime time.Time `gorm:"column:handle_time"` From de5243927654e1e67d22121e581e965ce66ce8db Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 19 Jan 2022 11:49:01 +0800 Subject: [PATCH 312/337] model length add --- pkg/base_info/group_api_struct.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pkg/base_info/group_api_struct.go b/pkg/base_info/group_api_struct.go index f5f4e7018..01ba3da84 100644 --- a/pkg/base_info/group_api_struct.go +++ b/pkg/base_info/group_api_struct.go @@ -48,10 +48,6 @@ type InviteUserToGroupResp struct { UserIDResultList []*UserIDResult `json:"data"` } -//type GetJoinedGroupListReq struct { -// OperationID string `json:"operationID" binding:"required"` -// FromUserID string `json:"fromUserID" binding:"required"` -//} type GetJoinedGroupListReq struct { OperationID string `json:"operationID" binding:"required"` FromUserID string `json:"fromUserID" binding:"required"` From 1a0f626a809f493ff2547346438b1dfa19678558 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 19 Jan 2022 12:31:28 +0800 Subject: [PATCH 313/337] model length add --- pkg/common/db/mysql.go | 70 +++++++++++++++++++++--------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/pkg/common/db/mysql.go b/pkg/common/db/mysql.go index 3a26ca88f..d87a8ec61 100644 --- a/pkg/common/db/mysql.go +++ b/pkg/common/db/mysql.go @@ -60,41 +60,41 @@ func initMysqlDB() { &GroupRequest{}, &User{}, &Black{}) - - if !db.HasTable(&Friend{}) { - log.NewInfo("CreateTable Friend") - db.CreateTable(&Friend{}) - } - - if !db.HasTable(&FriendRequest{}) { - log.NewInfo("CreateTable FriendRequest") - db.CreateTable(&FriendRequest{}) - } - - if !db.HasTable(&Group{}) { - log.NewInfo("CreateTable Group") - db.CreateTable(&Group{}) - } - - if !db.HasTable(&GroupMember{}) { - log.NewInfo("CreateTable GroupMember") - db.CreateTable(&GroupMember{}) - } - - if !db.HasTable(&GroupRequest{}) { - log.NewInfo("CreateTable GroupRequest") - db.CreateTable(&GroupRequest{}) - } - - if !db.HasTable(&User{}) { - log.NewInfo("CreateTable User") - db.CreateTable(&User{}) - } - - if !db.HasTable(&Black{}) { - log.NewInfo("CreateTable Black") - db.CreateTable(&Black{}) - } + // + //if !db.HasTable(&Friend{}) { + // log.NewInfo("CreateTable Friend") + // db.CreateTable(&Friend{}) + //} + // + //if !db.HasTable(&FriendRequest{}) { + // log.NewInfo("CreateTable FriendRequest") + // db.CreateTable(&FriendRequest{}) + //} + // + //if !db.HasTable(&Group{}) { + // log.NewInfo("CreateTable Group") + // db.CreateTable(&Group{}) + //} + // + //if !db.HasTable(&GroupMember{}) { + // log.NewInfo("CreateTable GroupMember") + // db.CreateTable(&GroupMember{}) + //} + // + //if !db.HasTable(&GroupRequest{}) { + // log.NewInfo("CreateTable GroupRequest") + // db.CreateTable(&GroupRequest{}) + //} + // + //if !db.HasTable(&User{}) { + // log.NewInfo("CreateTable User") + // db.CreateTable(&User{}) + //} + // + //if !db.HasTable(&Black{}) { + // log.NewInfo("CreateTable Black") + // db.CreateTable(&Black{}) + //} return From ca0f095d6b0a4f4069e0a32f2f2dbafd365812d6 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 19 Jan 2022 14:00:25 +0800 Subject: [PATCH 314/337] db charset set utf-8 --- pkg/common/db/mysql.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/db/mysql.go b/pkg/common/db/mysql.go index d87a8ec61..24f1eb20a 100644 --- a/pkg/common/db/mysql.go +++ b/pkg/common/db/mysql.go @@ -52,7 +52,7 @@ func initMysqlDB() { } log.NewInfo("open db ok ", dsn) - + db.Set("gorm:table_options", "CHARSET=utf8") db.AutoMigrate(&Friend{}, &FriendRequest{}, &Group{}, From ae09d73257faeaaf66d76cc3941d699d4b6fa118 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 19 Jan 2022 14:10:15 +0800 Subject: [PATCH 315/337] Refactor code --- pkg/proto/sdk_ws/ws.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/proto/sdk_ws/ws.proto b/pkg/proto/sdk_ws/ws.proto index a74e3e13f..eede88e04 100644 --- a/pkg/proto/sdk_ws/ws.proto +++ b/pkg/proto/sdk_ws/ws.proto @@ -77,7 +77,7 @@ message BlackInfo{ message GroupRequest{ PublicUserInfo userInfo = 1; GroupInfo groupInfo = 2; - string handleResult = 3; + int32 handleResult = 3; string reqMsg = 4; string handleMsg = 5; uint32 reqTime = 6; From db80d8f56fd2d8a7bef6e6f77ac49d898f23df38 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 19 Jan 2022 14:12:29 +0800 Subject: [PATCH 316/337] Refactor code --- pkg/proto/sdk_ws/ws.pb.go | 357 +++++++++++++++++++------------------- 1 file changed, 178 insertions(+), 179 deletions(-) diff --git a/pkg/proto/sdk_ws/ws.pb.go b/pkg/proto/sdk_ws/ws.pb.go index 5dc1cae3b..5c6263e74 100644 --- a/pkg/proto/sdk_ws/ws.pb.go +++ b/pkg/proto/sdk_ws/ws.pb.go @@ -40,7 +40,7 @@ func (m *GroupInfo) Reset() { *m = GroupInfo{} } func (m *GroupInfo) String() string { return proto.CompactTextString(m) } func (*GroupInfo) ProtoMessage() {} func (*GroupInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_551a30e7c7c24c98, []int{0} + return fileDescriptor_ws_44bd6efa690189ed, []int{0} } func (m *GroupInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfo.Unmarshal(m, b) @@ -164,7 +164,7 @@ func (m *GroupMemberFullInfo) Reset() { *m = GroupMemberFullInfo{} } func (m *GroupMemberFullInfo) String() string { return proto.CompactTextString(m) } func (*GroupMemberFullInfo) ProtoMessage() {} func (*GroupMemberFullInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_551a30e7c7c24c98, []int{1} + return fileDescriptor_ws_44bd6efa690189ed, []int{1} } func (m *GroupMemberFullInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupMemberFullInfo.Unmarshal(m, b) @@ -269,7 +269,7 @@ func (m *PublicUserInfo) Reset() { *m = PublicUserInfo{} } func (m *PublicUserInfo) String() string { return proto.CompactTextString(m) } func (*PublicUserInfo) ProtoMessage() {} func (*PublicUserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_551a30e7c7c24c98, []int{2} + return fileDescriptor_ws_44bd6efa690189ed, []int{2} } func (m *PublicUserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PublicUserInfo.Unmarshal(m, b) @@ -344,7 +344,7 @@ func (m *UserInfo) Reset() { *m = UserInfo{} } func (m *UserInfo) String() string { return proto.CompactTextString(m) } func (*UserInfo) ProtoMessage() {} func (*UserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_551a30e7c7c24c98, []int{3} + return fileDescriptor_ws_44bd6efa690189ed, []int{3} } func (m *UserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserInfo.Unmarshal(m, b) @@ -451,7 +451,7 @@ func (m *FriendInfo) Reset() { *m = FriendInfo{} } func (m *FriendInfo) String() string { return proto.CompactTextString(m) } func (*FriendInfo) ProtoMessage() {} func (*FriendInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_551a30e7c7c24c98, []int{4} + return fileDescriptor_ws_44bd6efa690189ed, []int{4} } func (m *FriendInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfo.Unmarshal(m, b) @@ -536,7 +536,7 @@ func (m *BlackInfo) Reset() { *m = BlackInfo{} } func (m *BlackInfo) String() string { return proto.CompactTextString(m) } func (*BlackInfo) ProtoMessage() {} func (*BlackInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_551a30e7c7c24c98, []int{5} + return fileDescriptor_ws_44bd6efa690189ed, []int{5} } func (m *BlackInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackInfo.Unmarshal(m, b) @@ -601,7 +601,7 @@ func (m *BlackInfo) GetEx() string { type GroupRequest struct { UserInfo *PublicUserInfo `protobuf:"bytes,1,opt,name=userInfo" json:"userInfo,omitempty"` GroupInfo *GroupInfo `protobuf:"bytes,2,opt,name=groupInfo" json:"groupInfo,omitempty"` - HandleResult string `protobuf:"bytes,3,opt,name=handleResult" json:"handleResult,omitempty"` + HandleResult int32 `protobuf:"varint,3,opt,name=handleResult" json:"handleResult,omitempty"` ReqMsg string `protobuf:"bytes,4,opt,name=reqMsg" json:"reqMsg,omitempty"` HandleMsg string `protobuf:"bytes,5,opt,name=handleMsg" json:"handleMsg,omitempty"` ReqTime uint32 `protobuf:"varint,6,opt,name=reqTime" json:"reqTime,omitempty"` @@ -617,7 +617,7 @@ func (m *GroupRequest) Reset() { *m = GroupRequest{} } func (m *GroupRequest) String() string { return proto.CompactTextString(m) } func (*GroupRequest) ProtoMessage() {} func (*GroupRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_551a30e7c7c24c98, []int{6} + return fileDescriptor_ws_44bd6efa690189ed, []int{6} } func (m *GroupRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupRequest.Unmarshal(m, b) @@ -651,11 +651,11 @@ func (m *GroupRequest) GetGroupInfo() *GroupInfo { return nil } -func (m *GroupRequest) GetHandleResult() string { +func (m *GroupRequest) GetHandleResult() int32 { if m != nil { return m.HandleResult } - return "" + return 0 } func (m *GroupRequest) GetReqMsg() string { @@ -725,7 +725,7 @@ func (m *FriendRequest) Reset() { *m = FriendRequest{} } func (m *FriendRequest) String() string { return proto.CompactTextString(m) } func (*FriendRequest) ProtoMessage() {} func (*FriendRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_551a30e7c7c24c98, []int{7} + return fileDescriptor_ws_44bd6efa690189ed, []int{7} } func (m *FriendRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendRequest.Unmarshal(m, b) @@ -866,7 +866,7 @@ func (m *PullMessageBySeqListResp) Reset() { *m = PullMessageBySeqListRe func (m *PullMessageBySeqListResp) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListResp) ProtoMessage() {} func (*PullMessageBySeqListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_551a30e7c7c24c98, []int{8} + return fileDescriptor_ws_44bd6efa690189ed, []int{8} } func (m *PullMessageBySeqListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListResp.Unmarshal(m, b) @@ -941,7 +941,7 @@ func (m *PullMessageBySeqListReq) Reset() { *m = PullMessageBySeqListReq func (m *PullMessageBySeqListReq) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListReq) ProtoMessage() {} func (*PullMessageBySeqListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_551a30e7c7c24c98, []int{9} + return fileDescriptor_ws_44bd6efa690189ed, []int{9} } func (m *PullMessageBySeqListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListReq.Unmarshal(m, b) @@ -996,7 +996,7 @@ func (m *PullMessageReq) Reset() { *m = PullMessageReq{} } func (m *PullMessageReq) String() string { return proto.CompactTextString(m) } func (*PullMessageReq) ProtoMessage() {} func (*PullMessageReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_551a30e7c7c24c98, []int{10} + return fileDescriptor_ws_44bd6efa690189ed, []int{10} } func (m *PullMessageReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageReq.Unmarshal(m, b) @@ -1060,7 +1060,7 @@ func (m *PullMessageResp) Reset() { *m = PullMessageResp{} } func (m *PullMessageResp) String() string { return proto.CompactTextString(m) } func (*PullMessageResp) ProtoMessage() {} func (*PullMessageResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_551a30e7c7c24c98, []int{11} + return fileDescriptor_ws_44bd6efa690189ed, []int{11} } func (m *PullMessageResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageResp.Unmarshal(m, b) @@ -1132,7 +1132,7 @@ func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} } func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqReq) ProtoMessage() {} func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_551a30e7c7c24c98, []int{12} + return fileDescriptor_ws_44bd6efa690189ed, []int{12} } func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) @@ -1164,7 +1164,7 @@ func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} } func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqResp) ProtoMessage() {} func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_551a30e7c7c24c98, []int{13} + return fileDescriptor_ws_44bd6efa690189ed, []int{13} } func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) @@ -1212,7 +1212,7 @@ func (m *GatherFormat) Reset() { *m = GatherFormat{} } func (m *GatherFormat) String() string { return proto.CompactTextString(m) } func (*GatherFormat) ProtoMessage() {} func (*GatherFormat) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_551a30e7c7c24c98, []int{14} + return fileDescriptor_ws_44bd6efa690189ed, []int{14} } func (m *GatherFormat) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GatherFormat.Unmarshal(m, b) @@ -1259,7 +1259,7 @@ func (m *UserSendMsgResp) Reset() { *m = UserSendMsgResp{} } func (m *UserSendMsgResp) String() string { return proto.CompactTextString(m) } func (*UserSendMsgResp) ProtoMessage() {} func (*UserSendMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_551a30e7c7c24c98, []int{15} + return fileDescriptor_ws_44bd6efa690189ed, []int{15} } func (m *UserSendMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserSendMsgResp.Unmarshal(m, b) @@ -1313,12 +1313,12 @@ type MsgData struct { MsgFrom int32 `protobuf:"varint,10,opt,name=msgFrom" json:"msgFrom,omitempty"` ContentType int32 `protobuf:"varint,11,opt,name=contentType" json:"contentType,omitempty"` Content []byte `protobuf:"bytes,12,opt,name=content,proto3" json:"content,omitempty"` - ForceList []string `protobuf:"bytes,13,rep,name=forceList" json:"forceList,omitempty"` Seq int64 `protobuf:"varint,14,opt,name=seq" json:"seq,omitempty"` SendTime int64 `protobuf:"varint,15,opt,name=sendTime" json:"sendTime,omitempty"` CreateTime int64 `protobuf:"varint,16,opt,name=createTime" json:"createTime,omitempty"` - Options map[string]bool `protobuf:"bytes,17,rep,name=options" json:"options,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - OfflinePushInfo *OfflinePushInfo `protobuf:"bytes,18,opt,name=offlinePushInfo" json:"offlinePushInfo,omitempty"` + Status int32 `protobuf:"varint,17,opt,name=status" json:"status,omitempty"` + Options map[string]bool `protobuf:"bytes,18,rep,name=options" json:"options,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + OfflinePushInfo *OfflinePushInfo `protobuf:"bytes,19,opt,name=offlinePushInfo" json:"offlinePushInfo,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1328,7 +1328,7 @@ func (m *MsgData) Reset() { *m = MsgData{} } func (m *MsgData) String() string { return proto.CompactTextString(m) } func (*MsgData) ProtoMessage() {} func (*MsgData) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_551a30e7c7c24c98, []int{16} + return fileDescriptor_ws_44bd6efa690189ed, []int{16} } func (m *MsgData) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgData.Unmarshal(m, b) @@ -1432,13 +1432,6 @@ func (m *MsgData) GetContent() []byte { return nil } -func (m *MsgData) GetForceList() []string { - if m != nil { - return m.ForceList - } - return nil -} - func (m *MsgData) GetSeq() int64 { if m != nil { return m.Seq @@ -1460,6 +1453,13 @@ func (m *MsgData) GetCreateTime() int64 { return 0 } +func (m *MsgData) GetStatus() int32 { + if m != nil { + return m.Status + } + return 0 +} + func (m *MsgData) GetOptions() map[string]bool { if m != nil { return m.Options @@ -1489,7 +1489,7 @@ func (m *OfflinePushInfo) Reset() { *m = OfflinePushInfo{} } func (m *OfflinePushInfo) String() string { return proto.CompactTextString(m) } func (*OfflinePushInfo) ProtoMessage() {} func (*OfflinePushInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_551a30e7c7c24c98, []int{17} + return fileDescriptor_ws_44bd6efa690189ed, []int{17} } func (m *OfflinePushInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OfflinePushInfo.Unmarshal(m, b) @@ -1556,7 +1556,7 @@ func (m *TipsComm) Reset() { *m = TipsComm{} } func (m *TipsComm) String() string { return proto.CompactTextString(m) } func (*TipsComm) ProtoMessage() {} func (*TipsComm) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_551a30e7c7c24c98, []int{18} + return fileDescriptor_ws_44bd6efa690189ed, []int{18} } func (m *TipsComm) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TipsComm.Unmarshal(m, b) @@ -1606,7 +1606,7 @@ func (m *GroupCreatedTips) Reset() { *m = GroupCreatedTips{} } func (m *GroupCreatedTips) String() string { return proto.CompactTextString(m) } func (*GroupCreatedTips) ProtoMessage() {} func (*GroupCreatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_551a30e7c7c24c98, []int{19} + return fileDescriptor_ws_44bd6efa690189ed, []int{19} } func (m *GroupCreatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupCreatedTips.Unmarshal(m, b) @@ -1675,7 +1675,7 @@ func (m *GroupInfoSetTips) Reset() { *m = GroupInfoSetTips{} } func (m *GroupInfoSetTips) String() string { return proto.CompactTextString(m) } func (*GroupInfoSetTips) ProtoMessage() {} func (*GroupInfoSetTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_551a30e7c7c24c98, []int{20} + return fileDescriptor_ws_44bd6efa690189ed, []int{20} } func (m *GroupInfoSetTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfoSetTips.Unmarshal(m, b) @@ -1730,7 +1730,7 @@ func (m *JoinGroupApplicationTips) Reset() { *m = JoinGroupApplicationTi func (m *JoinGroupApplicationTips) String() string { return proto.CompactTextString(m) } func (*JoinGroupApplicationTips) ProtoMessage() {} func (*JoinGroupApplicationTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_551a30e7c7c24c98, []int{21} + return fileDescriptor_ws_44bd6efa690189ed, []int{21} } func (m *JoinGroupApplicationTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JoinGroupApplicationTips.Unmarshal(m, b) @@ -1786,7 +1786,7 @@ func (m *MemberQuitTips) Reset() { *m = MemberQuitTips{} } func (m *MemberQuitTips) String() string { return proto.CompactTextString(m) } func (*MemberQuitTips) ProtoMessage() {} func (*MemberQuitTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_551a30e7c7c24c98, []int{22} + return fileDescriptor_ws_44bd6efa690189ed, []int{22} } func (m *MemberQuitTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberQuitTips.Unmarshal(m, b) @@ -1841,7 +1841,7 @@ func (m *GroupApplicationAcceptedTips) Reset() { *m = GroupApplicationAc func (m *GroupApplicationAcceptedTips) String() string { return proto.CompactTextString(m) } func (*GroupApplicationAcceptedTips) ProtoMessage() {} func (*GroupApplicationAcceptedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_551a30e7c7c24c98, []int{23} + return fileDescriptor_ws_44bd6efa690189ed, []int{23} } func (m *GroupApplicationAcceptedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupApplicationAcceptedTips.Unmarshal(m, b) @@ -1896,7 +1896,7 @@ func (m *GroupApplicationRejectedTips) Reset() { *m = GroupApplicationRe func (m *GroupApplicationRejectedTips) String() string { return proto.CompactTextString(m) } func (*GroupApplicationRejectedTips) ProtoMessage() {} func (*GroupApplicationRejectedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_551a30e7c7c24c98, []int{24} + return fileDescriptor_ws_44bd6efa690189ed, []int{24} } func (m *GroupApplicationRejectedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupApplicationRejectedTips.Unmarshal(m, b) @@ -1952,7 +1952,7 @@ func (m *GroupOwnerTransferredTips) Reset() { *m = GroupOwnerTransferred func (m *GroupOwnerTransferredTips) String() string { return proto.CompactTextString(m) } func (*GroupOwnerTransferredTips) ProtoMessage() {} func (*GroupOwnerTransferredTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_551a30e7c7c24c98, []int{25} + return fileDescriptor_ws_44bd6efa690189ed, []int{25} } func (m *GroupOwnerTransferredTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupOwnerTransferredTips.Unmarshal(m, b) @@ -2015,7 +2015,7 @@ func (m *MemberKickedTips) Reset() { *m = MemberKickedTips{} } func (m *MemberKickedTips) String() string { return proto.CompactTextString(m) } func (*MemberKickedTips) ProtoMessage() {} func (*MemberKickedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_551a30e7c7c24c98, []int{26} + return fileDescriptor_ws_44bd6efa690189ed, []int{26} } func (m *MemberKickedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberKickedTips.Unmarshal(m, b) @@ -2078,7 +2078,7 @@ func (m *MemberInvitedTips) Reset() { *m = MemberInvitedTips{} } func (m *MemberInvitedTips) String() string { return proto.CompactTextString(m) } func (*MemberInvitedTips) ProtoMessage() {} func (*MemberInvitedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_551a30e7c7c24c98, []int{27} + return fileDescriptor_ws_44bd6efa690189ed, []int{27} } func (m *MemberInvitedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInvitedTips.Unmarshal(m, b) @@ -2140,7 +2140,7 @@ func (m *MemberEnterTips) Reset() { *m = MemberEnterTips{} } func (m *MemberEnterTips) String() string { return proto.CompactTextString(m) } func (*MemberEnterTips) ProtoMessage() {} func (*MemberEnterTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_551a30e7c7c24c98, []int{28} + return fileDescriptor_ws_44bd6efa690189ed, []int{28} } func (m *MemberEnterTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberEnterTips.Unmarshal(m, b) @@ -2194,7 +2194,7 @@ func (m *FriendApplication) Reset() { *m = FriendApplication{} } func (m *FriendApplication) String() string { return proto.CompactTextString(m) } func (*FriendApplication) ProtoMessage() {} func (*FriendApplication) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_551a30e7c7c24c98, []int{29} + return fileDescriptor_ws_44bd6efa690189ed, []int{29} } func (m *FriendApplication) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplication.Unmarshal(m, b) @@ -2247,7 +2247,7 @@ func (m *FromToUserID) Reset() { *m = FromToUserID{} } func (m *FromToUserID) String() string { return proto.CompactTextString(m) } func (*FromToUserID) ProtoMessage() {} func (*FromToUserID) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_551a30e7c7c24c98, []int{30} + return fileDescriptor_ws_44bd6efa690189ed, []int{30} } func (m *FromToUserID) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FromToUserID.Unmarshal(m, b) @@ -2293,7 +2293,7 @@ func (m *FriendApplicationTips) Reset() { *m = FriendApplicationTips{} } func (m *FriendApplicationTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationTips) ProtoMessage() {} func (*FriendApplicationTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_551a30e7c7c24c98, []int{31} + return fileDescriptor_ws_44bd6efa690189ed, []int{31} } func (m *FriendApplicationTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationTips.Unmarshal(m, b) @@ -2333,7 +2333,7 @@ func (m *FriendApplicationApprovedTips) Reset() { *m = FriendApplication func (m *FriendApplicationApprovedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationApprovedTips) ProtoMessage() {} func (*FriendApplicationApprovedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_551a30e7c7c24c98, []int{32} + return fileDescriptor_ws_44bd6efa690189ed, []int{32} } func (m *FriendApplicationApprovedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationApprovedTips.Unmarshal(m, b) @@ -2380,7 +2380,7 @@ func (m *FriendApplicationRejectedTips) Reset() { *m = FriendApplication func (m *FriendApplicationRejectedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationRejectedTips) ProtoMessage() {} func (*FriendApplicationRejectedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_551a30e7c7c24c98, []int{33} + return fileDescriptor_ws_44bd6efa690189ed, []int{33} } func (m *FriendApplicationRejectedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationRejectedTips.Unmarshal(m, b) @@ -2428,7 +2428,7 @@ func (m *FriendAddedTips) Reset() { *m = FriendAddedTips{} } func (m *FriendAddedTips) String() string { return proto.CompactTextString(m) } func (*FriendAddedTips) ProtoMessage() {} func (*FriendAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_551a30e7c7c24c98, []int{34} + return fileDescriptor_ws_44bd6efa690189ed, []int{34} } func (m *FriendAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendAddedTips.Unmarshal(m, b) @@ -2481,7 +2481,7 @@ func (m *FriendDeletedTips) Reset() { *m = FriendDeletedTips{} } func (m *FriendDeletedTips) String() string { return proto.CompactTextString(m) } func (*FriendDeletedTips) ProtoMessage() {} func (*FriendDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_551a30e7c7c24c98, []int{35} + return fileDescriptor_ws_44bd6efa690189ed, []int{35} } func (m *FriendDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendDeletedTips.Unmarshal(m, b) @@ -2519,7 +2519,7 @@ func (m *BlackAddedTips) Reset() { *m = BlackAddedTips{} } func (m *BlackAddedTips) String() string { return proto.CompactTextString(m) } func (*BlackAddedTips) ProtoMessage() {} func (*BlackAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_551a30e7c7c24c98, []int{36} + return fileDescriptor_ws_44bd6efa690189ed, []int{36} } func (m *BlackAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackAddedTips.Unmarshal(m, b) @@ -2557,7 +2557,7 @@ func (m *BlackDeletedTips) Reset() { *m = BlackDeletedTips{} } func (m *BlackDeletedTips) String() string { return proto.CompactTextString(m) } func (*BlackDeletedTips) ProtoMessage() {} func (*BlackDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_551a30e7c7c24c98, []int{37} + return fileDescriptor_ws_44bd6efa690189ed, []int{37} } func (m *BlackDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackDeletedTips.Unmarshal(m, b) @@ -2595,7 +2595,7 @@ func (m *FriendInfoChangedTips) Reset() { *m = FriendInfoChangedTips{} } func (m *FriendInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*FriendInfoChangedTips) ProtoMessage() {} func (*FriendInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_551a30e7c7c24c98, []int{38} + return fileDescriptor_ws_44bd6efa690189ed, []int{38} } func (m *FriendInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfoChangedTips.Unmarshal(m, b) @@ -2634,7 +2634,7 @@ func (m *UserInfoUpdatedTips) Reset() { *m = UserInfoUpdatedTips{} } func (m *UserInfoUpdatedTips) String() string { return proto.CompactTextString(m) } func (*UserInfoUpdatedTips) ProtoMessage() {} func (*UserInfoUpdatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_551a30e7c7c24c98, []int{39} + return fileDescriptor_ws_44bd6efa690189ed, []int{39} } func (m *UserInfoUpdatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserInfoUpdatedTips.Unmarshal(m, b) @@ -2705,135 +2705,134 @@ func init() { proto.RegisterType((*UserInfoUpdatedTips)(nil), "server_api_params.UserInfoUpdatedTips") } -func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_551a30e7c7c24c98) } +func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_44bd6efa690189ed) } -var fileDescriptor_ws_551a30e7c7c24c98 = []byte{ - // 2019 bytes of a gzipped FileDescriptorProto +var fileDescriptor_ws_44bd6efa690189ed = []byte{ + // 2010 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x59, 0x4f, 0x6f, 0x23, 0x49, 0x15, 0x57, 0x77, 0xc7, 0x8e, 0xfd, 0x6c, 0xc7, 0x99, 0x9e, 0x65, 0x30, 0xc3, 0xec, 0x10, 0x5a, 0xab, 0x25, 0x42, 0x22, 0x48, 0x83, 0x90, 0x60, 0x10, 0xa0, 0xfc, 0x67, 0x96, 0x38, 0x09, 0x9d, 0x8c, 0x96, 0x03, 0xd2, 0xa8, 0xe3, 0x2e, 0x3b, 0xbd, 0x69, 0x57, 0xb5, 0xab, 0xbb, 0x33, 0x33, - 0x17, 0x0e, 0x70, 0xe1, 0x0b, 0xc0, 0x91, 0x03, 0x17, 0xc4, 0x05, 0x71, 0x41, 0xdc, 0x11, 0x5f, - 0x80, 0x33, 0x5f, 0x81, 0x2b, 0x07, 0x24, 0xa4, 0x45, 0xf5, 0xaa, 0xba, 0xbb, 0xaa, 0xed, 0x64, - 0xad, 0x28, 0xda, 0x41, 0xe2, 0xe6, 0xf7, 0xeb, 0x7a, 0xff, 0x5f, 0xbd, 0x7a, 0x55, 0x86, 0x7e, - 0x1a, 0x5e, 0xbd, 0x7a, 0x9d, 0x7e, 0xf3, 0x75, 0xba, 0x95, 0x70, 0x96, 0x31, 0xf7, 0x41, 0x4a, - 0xf8, 0x35, 0xe1, 0xaf, 0x82, 0x24, 0x7a, 0x95, 0x04, 0x3c, 0x98, 0xa6, 0xde, 0xbf, 0x6c, 0x68, - 0x1f, 0x72, 0x96, 0x27, 0x2f, 0xe8, 0x98, 0xb9, 0x03, 0x58, 0x9d, 0x20, 0xb1, 0x37, 0xb0, 0x36, - 0xac, 0xcd, 0xb6, 0x5f, 0x90, 0xee, 0x13, 0x68, 0xe3, 0xcf, 0xe3, 0x60, 0x4a, 0x06, 0x36, 0x7e, - 0xab, 0x00, 0xd7, 0x83, 0x2e, 0x65, 0x59, 0x34, 0x8e, 0x46, 0x41, 0x16, 0x31, 0x3a, 0x70, 0x70, - 0x81, 0x81, 0x89, 0x35, 0x11, 0xcd, 0x38, 0x0b, 0xf3, 0x11, 0xae, 0x59, 0x91, 0x6b, 0x74, 0x4c, - 0xe8, 0x1f, 0x07, 0x23, 0xf2, 0xd2, 0x3f, 0x1a, 0x34, 0xa4, 0x7e, 0x45, 0xba, 0x1b, 0xd0, 0x61, - 0xaf, 0x29, 0xe1, 0x2f, 0x53, 0xc2, 0x5f, 0xec, 0x0d, 0x9a, 0xf8, 0x55, 0x87, 0xdc, 0xa7, 0x00, -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57, 0x65, 0xe8, + 0xa7, 0xe1, 0xd5, 0xab, 0xd7, 0xe9, 0x37, 0x5f, 0xa7, 0x5b, 0x09, 0x67, 0x19, 0x73, 0x1f, 0xa4, + 0x84, 0x5f, 0x13, 0xfe, 0x2a, 0x48, 0xa2, 0x57, 0x49, 0xc0, 0x83, 0x69, 0xea, 0xfd, 0xcb, 0x86, + 0xf6, 0x21, 0x67, 0x79, 0xf2, 0x82, 0x8e, 0x99, 0x3b, 0x80, 0xd5, 0x09, 0x12, 0x7b, 0x03, 0x6b, + 0xc3, 0xda, 0x6c, 0xfb, 0x05, 0xe9, 0x3e, 0x81, 0x36, 0xfe, 0x3c, 0x0e, 0xa6, 0x64, 0x60, 0xe3, + 0xb7, 0x0a, 0x70, 0x3d, 0xe8, 0x52, 0x96, 0x45, 0xe3, 0x68, 0x14, 0x64, 0x11, 0xa3, 0x03, 0x07, + 0x17, 0x18, 0x98, 0x58, 0x13, 0xd1, 0x8c, 0xb3, 0x30, 0x1f, 0xe1, 0x9a, 0x15, 0xb9, 0x46, 0xc7, + 0x84, 0xfe, 0x71, 0x30, 0x22, 0x2f, 0xfd, 0xa3, 0x41, 0x43, 0xea, 0x57, 0xa4, 0xbb, 0x01, 0x1d, + 0xf6, 0x9a, 0x12, 0xfe, 0x32, 0x25, 0xfc, 0xc5, 0xde, 0xa0, 0x89, 0x5f, 0x75, 0xc8, 0x7d, 0x0a, + 0x30, 0xe2, 0x24, 0xc8, 0xc8, 0x79, 0x34, 0x25, 0x83, 0xd5, 0x0d, 0x6b, 0xb3, 0xe7, 0x6b, 0x88, + 0x90, 0x30, 0x25, 0xd3, 0x0b, 0xc2, 0x77, 0x59, 0x4e, 0xb3, 0x41, 0x0b, 0x17, 0xe8, 0x90, 0xbb, + 0x06, 0x36, 0x79, 0x33, 0x68, 0xa3, 0x68, 0x9b, 0xbc, 0x71, 0x1f, 0x41, 0x33, 0xcd, 0x82, 0x2c, + 0x4f, 0x07, 0xb0, 0x61, 0x6d, 0x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 0xf7, 0xfb, 0xd0, 0xca, 0x0b, 0x53, 0xad, 0x65, 0x4d, 0x2d, 0x59, 0xdc, + 0xe7, 0xaa, 0x99, 0x22, 0xbf, 0x8d, 0xfc, 0x4f, 0x16, 0xf0, 0x97, 0x27, 0x99, 0x5f, 0x2d, 0x17, + 0x07, 0xcf, 0x65, 0x40, 0xc3, 0x98, 0xf8, 0x24, 0xcd, 0xe3, 0x4c, 0xf5, 0x48, 0x03, 0x93, 0x95, + 0x36, 0x1b, 0xa6, 0x13, 0x75, 0x2c, 0x29, 0x4a, 0x44, 0x47, 0xae, 0x13, 0x9f, 0xa4, 0xeb, 0x15, + 0x20, 0x36, 0x2a, 0x27, 0x33, 0xcc, 0x90, 0xdc, 0x56, 0x05, 0x59, 0xe9, 0x54, 0x51, 0x93, 0x85, + 0x60, 0x60, 0x22, 0xc5, 0x92, 0x46, 0x01, 0xf2, 0x3c, 0xd2, 0x90, 0xfa, 0x71, 0xe4, 0xfd, 0xc3, + 0x81, 0x9e, 0xdc, 0x3e, 0x45, 0x50, 0x9f, 0x8a, 0x3a, 0x67, 0x53, 0xa3, 0x8a, 0x34, 0x44, 0x58, + 0x21, 0xa8, 0x63, 0xb3, 0xd1, 0x18, 0x98, 0x28, 0x45, 0x41, 0x1f, 0x18, 0x0d, 0x47, 0x87, 0x0a, + 0x2d, 0x87, 0x7a, 0xe3, 0xd1, 0x10, 0xd1, 0xca, 0x32, 0x66, 0x54, 0x47, 0x49, 0x0b, 0xde, 0x8c, + 0x95, 0xfa, 0x65, 0x7d, 0x68, 0x88, 0x88, 0x6f, 0xc6, 0x0a, 0xdd, 0x32, 0x48, 0x15, 0x20, 0x25, + 0x2b, 0xbd, 0xf2, 0x00, 0x29, 0xe9, 0xb9, 0xac, 0xb6, 0x6f, 0xcd, 0x2a, 0x18, 0x59, 0x35, 0x37, + 0x57, 0x67, 0x6e, 0x73, 0x7d, 0x00, 0x3d, 0x29, 0xa7, 0x28, 0xfa, 0xae, 0x3c, 0xe0, 0x0d, 0xd0, + 0xac, 0x8d, 0x5e, 0xbd, 0x36, 0xcc, 0xec, 0xae, 0xdd, 0x90, 0xdd, 0x7e, 0x99, 0xdd, 0x5f, 0xd9, + 0x30, 0x38, 0xcd, 0xe3, 0x78, 0x48, 0xd2, 0x34, 0x98, 0x90, 0x9d, 0xb7, 0x67, 0x64, 0x76, 0x14, + 0xa5, 0x99, 0x4f, 0xd2, 0x44, 0x14, 0x1a, 0xe1, 0x7c, 0x97, 0x85, 0x04, 0xb3, 0xdc, 0xf0, 0x0b, + 0x52, 0xb8, 0x48, 0x38, 0x17, 0x16, 0xa8, 0x16, 0x29, 0x29, 0x81, 0x4f, 0x83, 0x37, 0x67, 0x64, + 0x86, 0x19, 0x75, 0x7c, 0x45, 0x21, 0x1e, 0x51, 0x81, 0xaf, 0x28, 0x1c, 0x29, 0x77, 0x1f, 0x7a, + 0x69, 0x44, 0x27, 0xb2, 0x38, 0x65, 0xb1, 0x3b, 0x9b, 0x9d, 0x67, 0x5f, 0x59, 0xb4, 0xc9, 0x82, + 0xec, 0x92, 0xf0, 0x03, 0xc6, 0xa7, 0x41, 0xe6, 0x9b, 0x5c, 0xee, 0x2e, 0x74, 0x71, 0xe3, 0x15, + 0x52, 0x9a, 0xcb, 0x49, 0x31, 0x98, 0xbc, 0x29, 0x7c, 0x71, 0x71, 0x24, 0x66, 0x37, 0x1e, 0xa7, + 0xa2, 0xa1, 0x62, 0x47, 0x8a, 0x18, 0x2d, 0x27, 0x24, 0x1d, 0x12, 0x21, 0x4c, 0xa5, 0x9c, 0x81, + 0xb3, 0xe1, 0x6c, 0x3a, 0x7e, 0x41, 0x7a, 0x3f, 0x17, 0xf3, 0x44, 0xa9, 0xee, 0x36, 0x2d, 0x8f, + 0xa1, 0x95, 0x92, 0xd9, 0x0e, 0x99, 0x44, 0x14, 0x55, 0x38, 0x7e, 0x49, 0xe3, 0xb0, 0x48, 0x66, + 0xfb, 0x34, 0x2c, 0x02, 0x2e, 0xa9, 0x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c, 0xde, 0x4f, 0x8b, 0x62, 0xde, 0x23, 0x31, 0xb9, 0xcf, 0x18, 0x79, 0x2f, 0x61, 0x0d, 0xdf, + 0xda, 0xab, 0x18, 0xdc, 0x8b, 0xd8, 0x8f, 0x61, 0x1d, 0xc5, 0xde, 0xbb, 0xbd, 0xe5, 0xee, 0x10, + 0xf1, 0xd9, 0xbd, 0x0c, 0xe8, 0xe4, 0x3e, 0xa5, 0x7f, 0x03, 0x1e, 0x16, 0xb1, 0x7f, 0x99, 0x84, + 0xe5, 0x15, 0xe5, 0x86, 0x47, 0xae, 0x8b, 0x26, 0xfe, 0x57, 0xfc, 0xad, 0xff, 0x06, 0x00, 0x00, + 0xff, 0xff, 0xaf, 0x96, 0xca, 0x38, 0x3e, 0x1e, 0x00, 0x00, } From 544e60eb6d48c9f2fcd58109ac98136e609ce6c6 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 19 Jan 2022 14:45:23 +0800 Subject: [PATCH 317/337] nil modify --- internal/rpc/msg/friend_notification.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/rpc/msg/friend_notification.go b/internal/rpc/msg/friend_notification.go index e44bc0ff0..b0377c854 100644 --- a/internal/rpc/msg/friend_notification.go +++ b/internal/rpc/msg/friend_notification.go @@ -101,6 +101,7 @@ func FriendApplicationRejectedNotification(req *pbFriend.AddFriendResponseReq) { } func FriendAddedNotification(operationID, opUserID, fromUserID, toUserID string) { + return friendAddedTips := open_im_sdk.FriendAddedTips{Friend: &open_im_sdk.FriendInfo{}, OpUser: &open_im_sdk.PublicUserInfo{}} user, err := imdb.GetUserByUserID(opUserID) if err != nil { From d2b411ecbb6917b26407e584f3813ccb32e89356 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 19 Jan 2022 14:50:36 +0800 Subject: [PATCH 318/337] nil modify --- pkg/common/db/mysql.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/common/db/mysql.go b/pkg/common/db/mysql.go index 24f1eb20a..9731a1716 100644 --- a/pkg/common/db/mysql.go +++ b/pkg/common/db/mysql.go @@ -52,7 +52,6 @@ func initMysqlDB() { } log.NewInfo("open db ok ", dsn) - db.Set("gorm:table_options", "CHARSET=utf8") db.AutoMigrate(&Friend{}, &FriendRequest{}, &Group{}, @@ -60,6 +59,8 @@ func initMysqlDB() { &GroupRequest{}, &User{}, &Black{}) + db.Set("gorm:table_options", "CHARSET=utf8") + // //if !db.HasTable(&Friend{}) { // log.NewInfo("CreateTable Friend") From 14ccbf335d2e5bc3e5d3ce7d30b42a2109e6299e Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 19 Jan 2022 17:17:51 +0800 Subject: [PATCH 319/337] Refactor code --- cmd/open_im_api/main.go | 28 ++++++++++++++-------------- internal/api/group/group.go | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index 07b4d5479..7f8fd7db2 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -51,20 +51,20 @@ func main() { //group related routing group groupRouterGroup := r.Group("/group") { - groupRouterGroup.POST("/create_group", group.CreateGroup) //1 - groupRouterGroup.POST("/set_group_info", group.SetGroupInfo) //1 - groupRouterGroup.POST("join_group", group.JoinGroup) //1 - groupRouterGroup.POST("/quit_group", group.QuitGroup) //1 - groupRouterGroup.POST("/group_application_response", group.ApplicationGroupResponse) //1 - groupRouterGroup.POST("/transfer_group", group.TransferGroupOwner) //1 - groupRouterGroup.POST("/get_group_applicationList", group.GetGroupApplicationList) //1 - groupRouterGroup.POST("/get_groups_info", group.GetGroupsInfo) //1 - groupRouterGroup.POST("/kick_group", group.KickGroupMember) //1 - groupRouterGroup.POST("/get_group_member_list", group.GetGroupMemberList) //no use - groupRouterGroup.POST("/get_group_all_member_list", group.GetGroupAllMemberList) //1 - groupRouterGroup.POST("/get_group_members_info", group.GetGroupMembersInfo) //1 - groupRouterGroup.POST("/invite_user_to_group", group.InviteUserToGroup) //1 - groupRouterGroup.POST("/get_joined_group_list", group.GetJoinedGroupList) //1 + groupRouterGroup.POST("/create_group", group.CreateGroup) //1 + groupRouterGroup.POST("/set_group_info", group.SetGroupInfo) //1 + groupRouterGroup.POST("join_group", group.JoinGroup) //1 + groupRouterGroup.POST("/quit_group", group.QuitGroup) //1 + groupRouterGroup.POST("/group_application_response", group.ApplicationGroupResponse) //1 + groupRouterGroup.POST("/transfer_group", group.TransferGroupOwner) //1 + groupRouterGroup.POST("/get_recv_group_applicationList", group.GetRecvGroupApplicationList) //1 + groupRouterGroup.POST("/get_groups_info", group.GetGroupsInfo) //1 + groupRouterGroup.POST("/kick_group", group.KickGroupMember) //1 + groupRouterGroup.POST("/get_group_member_list", group.GetGroupMemberList) //no use + groupRouterGroup.POST("/get_group_all_member_list", group.GetGroupAllMemberList) //1 + groupRouterGroup.POST("/get_group_members_info", group.GetGroupMembersInfo) //1 + groupRouterGroup.POST("/invite_user_to_group", group.InviteUserToGroup) //1 + groupRouterGroup.POST("/get_joined_group_list", group.GetJoinedGroupList) //1 } //certificate authRouterGroup := r.Group("/auth") diff --git a/internal/api/group/group.go b/internal/api/group/group.go index 5d2d8405f..c7b725a9e 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -281,7 +281,7 @@ func CreateGroup(c *gin.Context) { } // 群主或管理员收到的 -func GetGroupApplicationList(c *gin.Context) { +func GetRecvGroupApplicationList(c *gin.Context) { params := api.GetGroupApplicationListReq{} if err := c.BindJSON(¶ms); err != nil { log.NewError("0", "BindJSON failed ", err.Error()) From 4c3474a9f7cdc955f6215c72b9280696c8d3b4d6 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Wed, 19 Jan 2022 17:29:25 +0800 Subject: [PATCH 320/337] Refactor code --- internal/api/manage/management_chat.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/api/manage/management_chat.go b/internal/api/manage/management_chat.go index ba715bf68..f09b9acd7 100644 --- a/internal/api/manage/management_chat.go +++ b/internal/api/manage/management_chat.go @@ -60,10 +60,10 @@ func newUserSendMsgReq(params *ManagementSendMsgReq) *pbChat.SendMsgReq { MsgFrom: constant.SysMsgType, ContentType: params.ContentType, Content: []byte(newContent), - ForceList: params.ForceList, - CreateTime: utils.GetCurrentTimestampByMill(), - Options: options, - OfflinePushInfo: params.OfflinePushInfo, + // ForceList: params.ForceList, + CreateTime: utils.GetCurrentTimestampByMill(), + Options: options, + OfflinePushInfo: params.OfflinePushInfo, }, } return &pbData From 04e509fc49e67a6dd60aa098934c7a3377cc9b6b Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Wed, 19 Jan 2022 18:14:53 +0800 Subject: [PATCH 321/337] update user --- internal/api/user/user.go | 1 + pkg/base_info/auth_api_struct.go | 2 +- pkg/base_info/public_struct.go | 6 +++--- pkg/base_info/user_api_struct.go | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/internal/api/user/user.go b/internal/api/user/user.go index 8508cddc8..e42f0d1b8 100644 --- a/internal/api/user/user.go +++ b/internal/api/user/user.go @@ -63,6 +63,7 @@ func UpdateUserInfo(c *gin.Context) { } req := &rpc.UpdateUserInfoReq{UserInfo: &open_im_sdk.UserInfo{}} utils.CopyStructFields(req.UserInfo, ¶ms) + req.OperationID = params.OperationID var ok bool ok, req.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token")) diff --git a/pkg/base_info/auth_api_struct.go b/pkg/base_info/auth_api_struct.go index a4db08f84..13d6e140b 100644 --- a/pkg/base_info/auth_api_struct.go +++ b/pkg/base_info/auth_api_struct.go @@ -12,7 +12,7 @@ package base_info type UserRegisterReq struct { Secret string `json:"secret" binding:"required,max=32"` Platform int32 `json:"platform" binding:"required,min=1,max=7"` - UserInfo + ApiUserInfo OperationID string `json:"operationID" binding:"required"` } diff --git a/pkg/base_info/public_struct.go b/pkg/base_info/public_struct.go index dbb729e71..1e60ae294 100644 --- a/pkg/base_info/public_struct.go +++ b/pkg/base_info/public_struct.go @@ -5,13 +5,13 @@ import ( "net/http" ) -type UserInfo struct { +type ApiUserInfo struct { UserID string `json:"userID" binding:"required,min=1,max=64"` Nickname string `json:"nickname" binding:"omitempty,min=1,max=64"` - FaceUrl string `json:"faceUrl" binding:"omitempty,max=1024"` + FaceURL string `json:"faceURL" binding:"omitempty,max=1024"` Gender int32 `json:"gender" binding:"omitempty,oneof=0 1 2"` PhoneNumber string `json:"phoneNumber" binding:"omitempty,max=32"` - Birth int64 `json:"birth" binding:"omitempty"` + Birth uint32 `json:"birth" binding:"omitempty"` Email string `json:"email" binding:"omitempty,max=64"` Ex string `json:"ex" binding:"omitempty,max=1024"` } diff --git a/pkg/base_info/user_api_struct.go b/pkg/base_info/user_api_struct.go index 2ccfc6cc6..f4be785f2 100644 --- a/pkg/base_info/user_api_struct.go +++ b/pkg/base_info/user_api_struct.go @@ -15,7 +15,7 @@ type GetUsersInfoResp struct { } type UpdateSelfUserInfoReq struct { - UserInfo + ApiUserInfo OperationID string `json:"operationID" binding:"required"` } From 8b3df83e7e10b16f449baf35ece5305d9e26f284 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 20 Jan 2022 10:00:02 +0800 Subject: [PATCH 322/337] ws proto --- pkg/proto/sdk_ws/ws.proto | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkg/proto/sdk_ws/ws.proto b/pkg/proto/sdk_ws/ws.proto index eede88e04..cc4c70054 100644 --- a/pkg/proto/sdk_ws/ws.proto +++ b/pkg/proto/sdk_ws/ws.proto @@ -110,10 +110,7 @@ message FriendRequest{ message PullMessageBySeqListResp { int32 errCode = 1; string errMsg = 2; - int64 maxSeq = 3; - int64 minSeq = 4; - repeated GatherFormat singleUserMsg = 5; - repeated GatherFormat groupUserMsg = 6; + repeated MsgData list = 3; } message PullMessageBySeqListReq{ string userID = 1; From 184f0900fb7f660fbe60bed8352d8968bf999089 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 20 Jan 2022 11:36:43 +0800 Subject: [PATCH 323/337] protocol modify --- internal/msg_gateway/gate/logic.go | 130 ++----- internal/rpc/msg/pull_message.go | 104 +----- pkg/common/constant/constant.go | 3 +- pkg/common/db/mongoModel.go | 113 ++---- pkg/common/db/redisModel.go | 14 +- pkg/proto/chat/chat.proto | 37 +- pkg/proto/sdk_ws/ws.pb.go | 572 +++++++++-------------------- pkg/proto/sdk_ws/ws.proto | 55 +-- pkg/utils/utils.go | 34 ++ 9 files changed, 291 insertions(+), 771 deletions(-) diff --git a/internal/msg_gateway/gate/logic.go b/internal/msg_gateway/gate/logic.go index 5fec367aa..d1756093c 100644 --- a/internal/msg_gateway/gate/logic.go +++ b/internal/msg_gateway/gate/logic.go @@ -10,7 +10,6 @@ import ( "bytes" "context" "encoding/gob" - "encoding/json" "github.com/golang/protobuf/proto" "github.com/gorilla/websocket" "runtime" @@ -51,8 +50,6 @@ func (ws *WServer) msgParse(conn *UserConn, binaryMsg []byte) { switch m.ReqIdentifier { case constant.WSGetNewestSeq: ws.getSeqReq(conn, &m) - case constant.WSPullMsg: - ws.pullMsgReq(conn, &m) case constant.WSSendMsg: ws.sendMsgReq(conn, &m) case constant.WSPullMsgBySeqList: @@ -63,24 +60,24 @@ func (ws *WServer) msgParse(conn *UserConn, binaryMsg []byte) { } func (ws *WServer) getSeqReq(conn *UserConn, m *Req) { log.NewInfo(m.OperationID, "Ws call success to getNewSeq", m.MsgIncr, m.SendID, m.ReqIdentifier) - pbData := pbChat.GetMaxAndMinSeqReq{} + rpcReq := pbChat.GetMaxAndMinSeqReq{} nReply := new(pbChat.GetMaxAndMinSeqResp) - pbData.UserID = m.SendID - pbData.OperationID = m.OperationID + rpcReq.UserID = m.SendID + rpcReq.OperationID = m.OperationID grpcConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfflineMessageName) if grpcConn == nil { - log.ErrorByKv("get grpcConn err", pbData.OperationID, "args", m) + log.ErrorByKv("get grpcConn err", rpcReq.OperationID, "args", m) } msgClient := pbChat.NewChatClient(grpcConn) - reply, err := msgClient.GetMaxAndMinSeq(context.Background(), &pbData) + rpcReply, err := msgClient.GetMaxAndMinSeq(context.Background(), &rpcReq) if err != nil { - log.ErrorByKv("rpc call failed to getSeqReq", pbData.OperationID, "err", err, "pbData", pbData.String()) - nReply.ErrCode = 200 + log.Error(rpcReq.OperationID, "rpc call failed to getSeqReq", err, rpcReq.String()) + nReply.ErrCode = 500 nReply.ErrMsg = err.Error() ws.getSeqResp(conn, m, nReply) } else { - log.InfoByKv("rpc call success to getSeqReq", pbData.OperationID, "replyData", reply.String()) - ws.getSeqResp(conn, m, reply) + log.InfoByKv("rpc call success to getSeqReq", rpcReq.OperationID, "replyData", rpcReply.String()) + ws.getSeqResp(conn, m, rpcReply) } } func (ws *WServer) getSeqResp(conn *UserConn, m *Req, pb *pbChat.GetMaxAndMinSeqResp) { @@ -98,121 +95,38 @@ func (ws *WServer) getSeqResp(conn *UserConn, m *Req, pb *pbChat.GetMaxAndMinSeq } ws.sendMsg(conn, mReply) } -func (ws *WServer) pullMsgReq(conn *UserConn, m *Req) { - log.NewInfo(m.OperationID, "Ws call success to pullMsgReq", m.ReqIdentifier, m.MsgIncr, m.SendID) - nReply := new(sdk_ws.PullMessageResp) - isPass, errCode, errMsg, data := ws.argsValidate(m, constant.WSPullMsg) - if isPass { - pbData := sdk_ws.PullMessageReq{} - pbData.UserID = m.SendID - pbData.OperationID = m.OperationID - pbData.SeqBegin = data.(SeqData).SeqBegin - pbData.SeqEnd = data.(SeqData).SeqEnd - grpcConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfflineMessageName) - msgClient := pbChat.NewChatClient(grpcConn) - reply, err := msgClient.PullMessage(context.Background(), &pbData) - if err != nil { - log.ErrorByKv("PullMessage error", pbData.OperationID, "err", err.Error()) - nReply.ErrCode = 200 - nReply.ErrMsg = err.Error() - ws.pullMsgResp(conn, m, nReply) - } else { - log.InfoByKv("rpc call success to pullMsgRep", pbData.OperationID, "ReplyArgs", reply.String(), "maxSeq", reply.GetMaxSeq(), - "MinSeq", reply.GetMinSeq(), "singLen", len(reply.GetSingleUserMsg()), "groupLen", len(reply.GetGroupUserMsg())) - ws.pullMsgResp(conn, m, reply) - } - } else { - nReply.ErrCode = errCode - nReply.ErrMsg = errMsg - ws.pullMsgResp(conn, m, nReply) - } -} -func (ws *WServer) pullMsgResp(conn *UserConn, m *Req, pb *sdk_ws.PullMessageResp) { - log.NewInfo(m.OperationID, "pullMsgResp come here ", pb.String()) - var mReplyData sdk_ws.PullMessageBySeqListResp - a, err := json.Marshal(pb.SingleUserMsg) - if err != nil { - log.NewError(m.OperationID, "GetSingleUserMsg,json marshal,err", err.Error()) - } - log.NewInfo(m.OperationID, "pullMsgResp json is ", len(pb.SingleUserMsg)) - err = json.Unmarshal(a, &mReplyData.SingleUserMsg) - if err != nil { - log.NewError(m.OperationID, "SingleUserMsg,json Unmarshal,err", err.Error()) - } - b, err := json.Marshal(pb.GroupUserMsg) - if err != nil { - log.NewError(m.OperationID, "mReplyData,json marshal,err", err.Error()) - } - err = json.Unmarshal(b, &mReplyData.GroupUserMsg) - if err != nil { - log.NewError(m.OperationID, "test SingleUserMsg,json Unmarshal,err", err.Error()) - } - c, err := proto.Marshal(&mReplyData) - log.NewInfo(m.OperationID, "test info is ", len(mReplyData.SingleUserMsg), mReplyData.SingleUserMsg) - mReply := Resp{ - ReqIdentifier: m.ReqIdentifier, - MsgIncr: m.MsgIncr, - ErrCode: pb.GetErrCode(), - ErrMsg: pb.GetErrMsg(), - OperationID: m.OperationID, - Data: c, - } - log.NewInfo(m.OperationID, "pullMsgResp all data is ", mReply.ReqIdentifier, mReply.MsgIncr, mReply.ErrCode, mReply.ErrMsg, - len(mReply.Data)) - ws.sendMsg(conn, mReply) -} func (ws *WServer) pullMsgBySeqListReq(conn *UserConn, m *Req) { log.NewInfo(m.OperationID, "Ws call success to pullMsgBySeqListReq start", m.SendID, m.ReqIdentifier, m.MsgIncr) - nReply := new(sdk_ws.PullMessageResp) + nReply := new(sdk_ws.PullMessageBySeqListResp) isPass, errCode, errMsg, data := ws.argsValidate(m, constant.WSPullMsgBySeqList) log.NewInfo(m.OperationID, "Ws call success to pullMsgBySeqListReq middle", m.SendID, m.ReqIdentifier, m.MsgIncr, data.(sdk_ws.PullMessageBySeqListReq).SeqList) if isPass { - pbData := sdk_ws.PullMessageBySeqListReq{} - pbData.SeqList = data.(sdk_ws.PullMessageBySeqListReq).SeqList - pbData.UserID = m.SendID - pbData.OperationID = m.OperationID + rpcReq := sdk_ws.PullMessageBySeqListReq{} + rpcReq.SeqList = data.(sdk_ws.PullMessageBySeqListReq).SeqList + rpcReq.UserID = m.SendID + rpcReq.OperationID = m.OperationID grpcConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfflineMessageName) msgClient := pbChat.NewChatClient(grpcConn) - reply, err := msgClient.PullMessageBySeqList(context.Background(), &pbData) + reply, err := msgClient.PullMessageBySeqList(context.Background(), &rpcReq) if err != nil { - log.NewError(pbData.OperationID, "pullMsgBySeqListReq err", err.Error()) + log.NewError(rpcReq.OperationID, "pullMsgBySeqListReq err", err.Error()) nReply.ErrCode = 200 nReply.ErrMsg = err.Error() - ws.pullMsgResp(conn, m, nReply) + ws.pullMsgBySeqListResp(conn, m, nReply) } else { - log.NewInfo(pbData.OperationID, "rpc call success to pullMsgBySeqListReq", reply.String(), reply.GetMaxSeq(), reply.GetMinSeq(), len(reply.GetSingleUserMsg()), len(reply.GetGroupUserMsg())) + log.NewInfo(rpcReq.OperationID, "rpc call success to pullMsgBySeqListReq", reply.String(), len(reply.List)) ws.pullMsgBySeqListResp(conn, m, reply) } } else { nReply.ErrCode = errCode nReply.ErrMsg = errMsg - ws.pullMsgResp(conn, m, nReply) + ws.pullMsgBySeqListResp(conn, m, nReply) } } func (ws *WServer) pullMsgBySeqListResp(conn *UserConn, m *Req, pb *sdk_ws.PullMessageBySeqListResp) { - log.NewInfo(m.OperationID, "pullMsgResp come here ", pb.String()) - var mReplyData sdk_ws.PullMessageBySeqListResp - a, err := json.Marshal(pb.SingleUserMsg) - if err != nil { - log.NewError(m.OperationID, "GetSingleUserMsg,json marshal,err", err.Error()) - } - log.NewInfo(m.OperationID, "pullMsgResp json is ", len(pb.SingleUserMsg)) - err = json.Unmarshal(a, &mReplyData.SingleUserMsg) - if err != nil { - log.NewError(m.OperationID, "SingleUserMsg,json Unmarshal,err", err.Error()) - } - b, err := json.Marshal(pb.GroupUserMsg) - if err != nil { - log.NewError(m.OperationID, "mReplyData,json marshal,err", err.Error()) - } - err = json.Unmarshal(b, &mReplyData.GroupUserMsg) - if err != nil { - log.NewError(m.OperationID, "test SingleUserMsg,json Unmarshal,err", err.Error()) - } - c, err := proto.Marshal(&mReplyData) - log.NewInfo(m.OperationID, "test info is ", len(mReplyData.SingleUserMsg), mReplyData.SingleUserMsg) - + log.NewInfo(m.OperationID, "pullMsgBySeqListResp come here ", pb.String()) + c, _ := proto.Marshal(pb) mReply := Resp{ ReqIdentifier: m.ReqIdentifier, MsgIncr: m.MsgIncr, @@ -221,7 +135,7 @@ func (ws *WServer) pullMsgBySeqListResp(conn *UserConn, m *Req, pb *sdk_ws.PullM OperationID: m.OperationID, Data: c, } - log.NewInfo(m.OperationID, "pullMsgResp all data is ", mReply.ReqIdentifier, mReply.MsgIncr, mReply.ErrCode, mReply.ErrMsg, + log.NewInfo(m.OperationID, "pullMsgBySeqListResp all data is ", mReply.ReqIdentifier, mReply.MsgIncr, mReply.ErrCode, mReply.ErrMsg, len(mReply.Data)) ws.sendMsg(conn, mReply) diff --git a/internal/rpc/msg/pull_message.go b/internal/rpc/msg/pull_message.go index af619182b..6f6a614d1 100644 --- a/internal/rpc/msg/pull_message.go +++ b/internal/rpc/msg/pull_message.go @@ -6,11 +6,8 @@ import ( commonDB "Open_IM/pkg/common/db" "Open_IM/pkg/common/log" - open_im_sdk "Open_IM/pkg/proto/sdk_ws" - "sort" - "strings" - pbMsg "Open_IM/pkg/proto/chat" + open_im_sdk "Open_IM/pkg/proto/sdk_ws" ) func (rpc *rpcChat) GetMaxAndMinSeq(_ context.Context, in *pbMsg.GetMaxAndMinSeqReq) (*pbMsg.GetMaxAndMinSeqResp, error) { @@ -20,7 +17,7 @@ func (rpc *rpcChat) GetMaxAndMinSeq(_ context.Context, in *pbMsg.GetMaxAndMinSeq minSeq, err2 := commonDB.DB.GetUserMinSeq(in.UserID) resp := new(pbMsg.GetMaxAndMinSeqResp) if err1 == nil { - resp.MaxSeq = maxSeq + resp.MaxSeq = uint32(maxSeq) } else if err1 == redis.ErrNil { resp.MaxSeq = 0 } else { @@ -30,7 +27,7 @@ func (rpc *rpcChat) GetMaxAndMinSeq(_ context.Context, in *pbMsg.GetMaxAndMinSeq resp.ErrMsg = "redis get err" } if err2 == nil { - resp.MinSeq = minSeq + resp.MinSeq = uint32(minSeq) } else if err2 == redis.ErrNil { resp.MinSeq = 0 } else { @@ -41,104 +38,23 @@ func (rpc *rpcChat) GetMaxAndMinSeq(_ context.Context, in *pbMsg.GetMaxAndMinSeq } return resp, nil } -func (rpc *rpcChat) PullMessage(_ context.Context, in *open_im_sdk.PullMessageReq) (*open_im_sdk.PullMessageResp, error) { - log.InfoByKv("rpc pullMessage is arriving", in.OperationID, "args", in.String()) - resp := new(open_im_sdk.PullMessageResp) - var respSingleMsgFormat []*open_im_sdk.GatherFormat - var respGroupMsgFormat []*open_im_sdk.GatherFormat - SingleMsgFormat, GroupMsgFormat, MaxSeq, MinSeq, err := commonDB.DB.GetMsgBySeqRange(in.UserID, in.SeqBegin, in.SeqEnd) - if err != nil { - log.ErrorByKv("pullMsg data error", in.OperationID, in.String()) - resp.ErrCode = 1 - resp.ErrMsg = err.Error() - return resp, nil - } - respSingleMsgFormat = singleMsgHandleByUser(SingleMsgFormat, in.UserID) - respGroupMsgFormat = groupMsgHandleByUser(GroupMsgFormat) - return &open_im_sdk.PullMessageResp{ - ErrCode: 0, - ErrMsg: "", - MaxSeq: MaxSeq, - MinSeq: MinSeq, - SingleUserMsg: respSingleMsgFormat, - GroupUserMsg: respGroupMsgFormat, - }, nil -} func (rpc *rpcChat) PullMessageBySeqList(_ context.Context, in *open_im_sdk.PullMessageBySeqListReq) (*open_im_sdk.PullMessageBySeqListResp, error) { log.NewInfo(in.OperationID, "rpc PullMessageBySeqList is arriving", in.String()) resp := new(open_im_sdk.PullMessageBySeqListResp) - var respSingleMsgFormat []*open_im_sdk.GatherFormat - var respGroupMsgFormat []*open_im_sdk.GatherFormat - SingleMsgFormat, GroupMsgFormat, MaxSeq, MinSeq, err := commonDB.DB.GetMsgBySeqList(in.UserID, in.SeqList) + msgList, err := commonDB.DB.GetMsgBySeqList(in.UserID, in.SeqList) if err != nil { log.ErrorByKv("PullMessageBySeqList data error", in.OperationID, in.String()) resp.ErrCode = 1 resp.ErrMsg = err.Error() return resp, nil } - respSingleMsgFormat = singleMsgHandleByUser(SingleMsgFormat, in.UserID) - respGroupMsgFormat = groupMsgHandleByUser(GroupMsgFormat) - return &open_im_sdk.PullMessageBySeqListResp{ - ErrCode: 0, - ErrMsg: "", - MaxSeq: MaxSeq, - MinSeq: MinSeq, - SingleUserMsg: respSingleMsgFormat, - GroupUserMsg: respGroupMsgFormat, - }, nil -} -func singleMsgHandleByUser(allMsg []*open_im_sdk.MsgData, ownerId string) []*open_im_sdk.GatherFormat { - var userid string - var respMsgFormat []*open_im_sdk.GatherFormat - m := make(map[string]MsgFormats) - //Gather messages in the dimension of users - for _, v := range allMsg { - if v.RecvID != ownerId { - userid = v.RecvID - } else { - userid = v.SendID - } - if value, ok := m[userid]; !ok { - var t MsgFormats - m[userid] = append(t, v) - } else { - m[userid] = append(value, v) - } - } - //Return in pb format - for user, msg := range m { - tempUserMsg := new(open_im_sdk.GatherFormat) - tempUserMsg.Id = user - tempUserMsg.List = msg - sort.Sort(msg) - respMsgFormat = append(respMsgFormat, tempUserMsg) - } - return respMsgFormat -} -func groupMsgHandleByUser(allMsg []*open_im_sdk.MsgData) []*open_im_sdk.GatherFormat { - var respMsgFormat []*open_im_sdk.GatherFormat - m := make(map[string]MsgFormats) - //Gather messages in the dimension of users - for _, v := range allMsg { - //Get group ID - groupID := strings.Split(v.RecvID, " ")[1] - if value, ok := m[groupID]; !ok { - var t MsgFormats - m[groupID] = append(t, v) - } else { - m[groupID] = append(value, v) - } + //respSingleMsgFormat = singleMsgHandleByUser(SingleMsgFormat, in.UserID) + //respGroupMsgFormat = groupMsgHandleByUser(GroupMsgFormat) + resp.ErrCode = 0 + resp.ErrMsg = "" + resp.List = msgList + return resp, nil - } - //Return in pb format - for groupID, msg := range m { - tempUserMsg := new(open_im_sdk.GatherFormat) - tempUserMsg.Id = groupID - tempUserMsg.List = msg - sort.Sort(msg) - respMsgFormat = append(respMsgFormat, tempUserMsg) - } - return respMsgFormat } type MsgFormats []*open_im_sdk.MsgData diff --git a/pkg/common/constant/constant.go b/pkg/common/constant/constant.go index cd0c99fae..6e32cea2e 100644 --- a/pkg/common/constant/constant.go +++ b/pkg/common/constant/constant.go @@ -18,9 +18,8 @@ const ( //Websocket Protocol WSGetNewestSeq = 1001 - WSPullMsg = 1002 + WSPullMsgBySeqList = 1002 WSSendMsg = 1003 - WSPullMsgBySeqList = 1004 WSPushMsg = 2001 WSKickOnlineMsg = 2002 WSDataError = 3001 diff --git a/pkg/common/db/mongoModel.go b/pkg/common/db/mongoModel.go index 128815031..6538d17f4 100644 --- a/pkg/common/db/mongoModel.go +++ b/pkg/common/db/mongoModel.go @@ -2,10 +2,10 @@ package db import ( "Open_IM/pkg/common/config" - "Open_IM/pkg/common/constant" "Open_IM/pkg/common/log" pbMsg "Open_IM/pkg/proto/chat" open_im_sdk "Open_IM/pkg/proto/sdk_ws" + "Open_IM/pkg/utils" "errors" "github.com/garyburd/redigo/redis" "github.com/golang/protobuf/proto" @@ -33,51 +33,8 @@ type GroupMember_x struct { UIDList []string } -func (d *DataBases) GetMsgBySeqRange(uid string, seqBegin, seqEnd int64) (SingleMsg []*open_im_sdk.MsgData, GroupMsg []*open_im_sdk.MsgData, MaxSeq int64, MinSeq int64, err error) { - var count int64 - session := d.mgoSession.Clone() - if session == nil { - return nil, nil, MaxSeq, MinSeq, errors.New("session == nil") - } - defer session.Close() - - c := session.DB(config.Config.Mongo.DBDatabase).C(cChat) - - sChat := UserChat{} - if err = c.Find(bson.M{"uid": uid}).One(&sChat); err != nil { - return nil, nil, MaxSeq, MinSeq, err - } - for i := 0; i < len(sChat.Msg); i++ { - msg := new(open_im_sdk.MsgData) - if err = proto.Unmarshal(sChat.Msg[i].Msg, msg); err != nil { - return nil, nil, MaxSeq, MinSeq, err - } - if msg.Seq >= seqBegin && msg.Seq <= seqEnd { - if msg.Seq > MaxSeq { - MaxSeq = msg.Seq - } - if count == 0 { - MinSeq = msg.Seq - } - if msg.Seq < MinSeq { - MinSeq = msg.Seq - } - if msg.SessionType == constant.SingleChatType { - SingleMsg = append(SingleMsg, msg) - } else { - GroupMsg = append(GroupMsg, msg) - } - count++ - if count == (seqEnd - seqBegin + 1) { - break - } - } - } - - return SingleMsg, GroupMsg, MaxSeq, MinSeq, nil -} -func (d *DataBases) GetMinSeqFromMongo(uid string) (MinSeq int64, err error) { - var i int64 +func (d *DataBases) GetMinSeqFromMongo(uid string) (MinSeq uint32, err error) { + var i, NB uint32 var seqUid string session := d.mgoSession.Clone() if session == nil { @@ -89,7 +46,7 @@ func (d *DataBases) GetMinSeqFromMongo(uid string) (MinSeq int64, err error) { if err != nil && err != redis.ErrNil { return MinSeq, err } - NB := MaxSeq / singleGocMsgNum + NB = uint32(MaxSeq / singleGocMsgNum) for i = 0; i <= NB; i++ { seqUid = indexGen(uid, i) n, err := c.Find(bson.M{"uid": seqUid}).Count() @@ -97,29 +54,28 @@ func (d *DataBases) GetMinSeqFromMongo(uid string) (MinSeq int64, err error) { if i == 0 { MinSeq = 1 } else { - MinSeq = i * singleGocMsgNum + MinSeq = uint32(i * singleGocMsgNum) } break } } return MinSeq, nil } -func (d *DataBases) GetMsgBySeqList(uid string, seqList []int64) (SingleMsg []*open_im_sdk.MsgData, GroupMsg []*open_im_sdk.MsgData, MaxSeq int64, MinSeq int64, err error) { - allCount := 0 +func (d *DataBases) GetMsgBySeqList(uid string, seqList []uint32) (seqMsg []*open_im_sdk.MsgData, err error) { + var hasSeqList []uint32 singleCount := 0 session := d.mgoSession.Clone() if session == nil { - return nil, nil, MaxSeq, MinSeq, errors.New("session == nil") + return nil, errors.New("session == nil") } defer session.Close() - c := session.DB(config.Config.Mongo.DBDatabase).C(cChat) - m := func(uid string, seqList []int64) map[string][]int64 { - t := make(map[string][]int64) + m := func(uid string, seqList []uint32) map[string][]uint32 { + t := make(map[string][]uint32) for i := 0; i < len(seqList); i++ { seqUid := getSeqUid(uid, seqList[i]) if value, ok := t[seqUid]; !ok { - var temp []int64 + var temp []uint32 t[seqUid] = append(temp, seqList[i]) } else { t[seqUid] = append(value, seqList[i]) @@ -138,24 +94,11 @@ func (d *DataBases) GetMsgBySeqList(uid string, seqList []int64) (SingleMsg []*o msg := new(open_im_sdk.MsgData) if err = proto.Unmarshal(sChat.Msg[i].Msg, msg); err != nil { log.NewError("", "not find seqUid", seqUid, value, uid, seqList) - return nil, nil, MaxSeq, MinSeq, err + return nil, err } - if isContainInt64(msg.Seq, value) { - if msg.Seq > MaxSeq { - MaxSeq = msg.Seq - } - if allCount == 0 { - MinSeq = msg.Seq - } - if msg.Seq < MinSeq { - MinSeq = msg.Seq - } - if msg.SessionType == constant.SingleChatType { - SingleMsg = append(SingleMsg, msg) - } else { - GroupMsg = append(GroupMsg, msg) - } - allCount++ + if isContainInt32(msg.Seq, value) { + seqMsg = append(seqMsg, msg) + hasSeqList = append(hasSeqList, msg.Seq) singleCount++ if singleCount == len(value) { break @@ -163,8 +106,24 @@ func (d *DataBases) GetMsgBySeqList(uid string, seqList []int64) (SingleMsg []*o } } } - return SingleMsg, GroupMsg, MaxSeq, MinSeq, nil + if len(hasSeqList) != len(seqList) { + var diff []uint32 + diff = utils.Difference(hasSeqList, seqList) + exceptionMSg := genExceptionMessageBySeqList(diff) + seqMsg = append(seqMsg, exceptionMSg...) + + } + return seqMsg, nil } +func genExceptionMessageBySeqList(seqList []uint32) (exceptionMsg []*open_im_sdk.MsgData) { + for _, v := range seqList { + msg := new(open_im_sdk.MsgData) + msg.Seq = v + exceptionMsg = append(exceptionMsg, msg) + } + return exceptionMsg +} + func (d *DataBases) SaveUserChat(uid string, sendTime int64, m *pbMsg.MsgDataToDB) error { var seqUid string newTime := getCurrentTimestampByMill() @@ -318,11 +277,11 @@ func (d *DataBases) DelGroupMember(groupID, uid string) error { func getCurrentTimestampByMill() int64 { return time.Now().UnixNano() / 1e6 } -func getSeqUid(uid string, seq int64) string { +func getSeqUid(uid string, seq uint32) string { seqSuffix := seq / singleGocMsgNum return indexGen(uid, seqSuffix) } -func isContainInt64(target int64, List []int64) bool { +func isContainInt32(target uint32, List []uint32) bool { for _, element := range List { @@ -333,6 +292,6 @@ func isContainInt64(target int64, List []int64) bool { return false } -func indexGen(uid string, seqSuffix int64) string { - return uid + ":" + strconv.FormatInt(seqSuffix, 10) +func indexGen(uid string, seqSuffix uint32) string { + return uid + ":" + strconv.FormatInt(int64(seqSuffix), 10) } diff --git a/pkg/common/db/redisModel.go b/pkg/common/db/redisModel.go index 7364d7e68..a3e2ade8e 100644 --- a/pkg/common/db/redisModel.go +++ b/pkg/common/db/redisModel.go @@ -35,28 +35,28 @@ func (d *DataBases) Exec(cmd string, key interface{}, args ...interface{}) (inte } //Perform seq auto-increment operation of user messages -func (d *DataBases) IncrUserSeq(uid string) (int64, error) { +func (d *DataBases) IncrUserSeq(uid string) (uint64, error) { key := userIncrSeq + uid - return redis.Int64(d.Exec("INCR", key)) + return redis.Uint64(d.Exec("INCR", key)) } //Get the largest Seq -func (d *DataBases) GetUserMaxSeq(uid string) (int64, error) { +func (d *DataBases) GetUserMaxSeq(uid string) (uint64, error) { key := userIncrSeq + uid - return redis.Int64(d.Exec("GET", key)) + return redis.Uint64(d.Exec("GET", key)) } //Set the user's minimum seq -func (d *DataBases) SetUserMinSeq(uid string, minSeq int64) (err error) { +func (d *DataBases) SetUserMinSeq(uid string, minSeq uint32) (err error) { key := userMinSeq + uid _, err = d.Exec("SET", key, minSeq) return err } //Get the smallest Seq -func (d *DataBases) GetUserMinSeq(uid string) (int64, error) { +func (d *DataBases) GetUserMinSeq(uid string) (uint64, error) { key := userMinSeq + uid - return redis.Int64(d.Exec("GET", key)) + return redis.Uint64(d.Exec("GET", key)) } //Store Apple's device token to redis diff --git a/pkg/proto/chat/chat.proto b/pkg/proto/chat/chat.proto index 12bac416c..7fe50ddc1 100644 --- a/pkg/proto/chat/chat.proto +++ b/pkg/proto/chat/chat.proto @@ -47,41 +47,9 @@ message GetMaxAndMinSeqReq { message GetMaxAndMinSeqResp { int32 ErrCode = 1; string ErrMsg = 2; - int64 MaxSeq = 3; - int64 MinSeq = 4; + uint32 MaxSeq = 3; + uint32 MinSeq = 4; } -//message GatherFormat{ -// // @inject_tag: json:"id" -// string ID = 1; -// // @inject_tag: json:"list" -// repeated MsgFormat List = 2;//detail msg -//} -//message MsgFormat{ -// // @inject_tag: json:"sendID" -// string SendID = 1; -// // @inject_tag: json:"recvID" -// string RecvID = 2; -// // @inject_tag: json:"msgFrom" -// int32 MsgFrom = 3; -// // @inject_tag: json:"contentType" -// int32 ContentType = 4; -// // @inject_tag: json:"serverMsgID" -// string ServerMsgID = 5; -// // @inject_tag: json:"content" -// string Content = 6; -// // @inject_tag: json:"seq" -// int64 Seq = 7; -// // @inject_tag: json:"sendTime" -// int64 SendTime = 8; -// // @inject_tag: json:"senderPlatformID" -// int32 SenderPlatformID = 9; -// // @inject_tag: json:"senderNickName" -// string SenderNickName = 10; -// // @inject_tag: json:"senderFaceUrl" -// string SenderFaceURL = 11; -// // @inject_tag: json:"clientMsgID" -// string ClientMsgID = 12; -//} message SendMsgReq { @@ -102,7 +70,6 @@ message SendMsgResp { } service Chat { rpc GetMaxAndMinSeq(GetMaxAndMinSeqReq) returns(GetMaxAndMinSeqResp); - rpc PullMessage(server_api_params.PullMessageReq) returns(server_api_params.PullMessageResp); rpc PullMessageBySeqList(server_api_params.PullMessageBySeqListReq) returns(server_api_params.PullMessageBySeqListResp); rpc SendMsg(SendMsgReq) returns(SendMsgResp); } diff --git a/pkg/proto/sdk_ws/ws.pb.go b/pkg/proto/sdk_ws/ws.pb.go index 5c6263e74..c99165093 100644 --- a/pkg/proto/sdk_ws/ws.pb.go +++ b/pkg/proto/sdk_ws/ws.pb.go @@ -40,7 +40,7 @@ func (m *GroupInfo) Reset() { *m = GroupInfo{} } func (m *GroupInfo) String() string { return proto.CompactTextString(m) } func (*GroupInfo) ProtoMessage() {} func (*GroupInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{0} + return fileDescriptor_ws_dd0597f97f3a9074, []int{0} } func (m *GroupInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfo.Unmarshal(m, b) @@ -164,7 +164,7 @@ func (m *GroupMemberFullInfo) Reset() { *m = GroupMemberFullInfo{} } func (m *GroupMemberFullInfo) String() string { return proto.CompactTextString(m) } func (*GroupMemberFullInfo) ProtoMessage() {} func (*GroupMemberFullInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{1} + return fileDescriptor_ws_dd0597f97f3a9074, []int{1} } func (m *GroupMemberFullInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupMemberFullInfo.Unmarshal(m, b) @@ -269,7 +269,7 @@ func (m *PublicUserInfo) Reset() { *m = PublicUserInfo{} } func (m *PublicUserInfo) String() string { return proto.CompactTextString(m) } func (*PublicUserInfo) ProtoMessage() {} func (*PublicUserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{2} + return fileDescriptor_ws_dd0597f97f3a9074, []int{2} } func (m *PublicUserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PublicUserInfo.Unmarshal(m, b) @@ -344,7 +344,7 @@ func (m *UserInfo) Reset() { *m = UserInfo{} } func (m *UserInfo) String() string { return proto.CompactTextString(m) } func (*UserInfo) ProtoMessage() {} func (*UserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{3} + return fileDescriptor_ws_dd0597f97f3a9074, []int{3} } func (m *UserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserInfo.Unmarshal(m, b) @@ -451,7 +451,7 @@ func (m *FriendInfo) Reset() { *m = FriendInfo{} } func (m *FriendInfo) String() string { return proto.CompactTextString(m) } func (*FriendInfo) ProtoMessage() {} func (*FriendInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{4} + return fileDescriptor_ws_dd0597f97f3a9074, []int{4} } func (m *FriendInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfo.Unmarshal(m, b) @@ -536,7 +536,7 @@ func (m *BlackInfo) Reset() { *m = BlackInfo{} } func (m *BlackInfo) String() string { return proto.CompactTextString(m) } func (*BlackInfo) ProtoMessage() {} func (*BlackInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{5} + return fileDescriptor_ws_dd0597f97f3a9074, []int{5} } func (m *BlackInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackInfo.Unmarshal(m, b) @@ -617,7 +617,7 @@ func (m *GroupRequest) Reset() { *m = GroupRequest{} } func (m *GroupRequest) String() string { return proto.CompactTextString(m) } func (*GroupRequest) ProtoMessage() {} func (*GroupRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{6} + return fileDescriptor_ws_dd0597f97f3a9074, []int{6} } func (m *GroupRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupRequest.Unmarshal(m, b) @@ -725,7 +725,7 @@ func (m *FriendRequest) Reset() { *m = FriendRequest{} } func (m *FriendRequest) String() string { return proto.CompactTextString(m) } func (*FriendRequest) ProtoMessage() {} func (*FriendRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{7} + return fileDescriptor_ws_dd0597f97f3a9074, []int{7} } func (m *FriendRequest) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendRequest.Unmarshal(m, b) @@ -851,22 +851,19 @@ func (m *FriendRequest) GetEx() string { } type PullMessageBySeqListResp struct { - ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` - ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` - MaxSeq int64 `protobuf:"varint,3,opt,name=maxSeq" json:"maxSeq,omitempty"` - MinSeq int64 `protobuf:"varint,4,opt,name=minSeq" json:"minSeq,omitempty"` - SingleUserMsg []*GatherFormat `protobuf:"bytes,5,rep,name=singleUserMsg" json:"singleUserMsg,omitempty"` - GroupUserMsg []*GatherFormat `protobuf:"bytes,6,rep,name=groupUserMsg" json:"groupUserMsg,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` + List []*MsgData `protobuf:"bytes,3,rep,name=list" json:"list,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *PullMessageBySeqListResp) Reset() { *m = PullMessageBySeqListResp{} } func (m *PullMessageBySeqListResp) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListResp) ProtoMessage() {} func (*PullMessageBySeqListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{8} + return fileDescriptor_ws_dd0597f97f3a9074, []int{8} } func (m *PullMessageBySeqListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListResp.Unmarshal(m, b) @@ -900,30 +897,9 @@ func (m *PullMessageBySeqListResp) GetErrMsg() string { return "" } -func (m *PullMessageBySeqListResp) GetMaxSeq() int64 { +func (m *PullMessageBySeqListResp) GetList() []*MsgData { if m != nil { - return m.MaxSeq - } - return 0 -} - -func (m *PullMessageBySeqListResp) GetMinSeq() int64 { - if m != nil { - return m.MinSeq - } - return 0 -} - -func (m *PullMessageBySeqListResp) GetSingleUserMsg() []*GatherFormat { - if m != nil { - return m.SingleUserMsg - } - return nil -} - -func (m *PullMessageBySeqListResp) GetGroupUserMsg() []*GatherFormat { - if m != nil { - return m.GroupUserMsg + return m.List } return nil } @@ -931,7 +907,7 @@ func (m *PullMessageBySeqListResp) GetGroupUserMsg() []*GatherFormat { type PullMessageBySeqListReq struct { UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` - SeqList []int64 `protobuf:"varint,3,rep,packed,name=seqList" json:"seqList,omitempty"` + SeqList []uint32 `protobuf:"varint,3,rep,packed,name=seqList" json:"seqList,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -941,7 +917,7 @@ func (m *PullMessageBySeqListReq) Reset() { *m = PullMessageBySeqListReq func (m *PullMessageBySeqListReq) String() string { return proto.CompactTextString(m) } func (*PullMessageBySeqListReq) ProtoMessage() {} func (*PullMessageBySeqListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{9} + return fileDescriptor_ws_dd0597f97f3a9074, []int{9} } func (m *PullMessageBySeqListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListReq.Unmarshal(m, b) @@ -975,153 +951,13 @@ func (m *PullMessageBySeqListReq) GetOperationID() string { return "" } -func (m *PullMessageBySeqListReq) GetSeqList() []int64 { +func (m *PullMessageBySeqListReq) GetSeqList() []uint32 { if m != nil { return m.SeqList } return nil } -type PullMessageReq struct { - UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` - SeqBegin int64 `protobuf:"varint,2,opt,name=seqBegin" json:"seqBegin,omitempty"` - SeqEnd int64 `protobuf:"varint,3,opt,name=seqEnd" json:"seqEnd,omitempty"` - OperationID string `protobuf:"bytes,4,opt,name=operationID" json:"operationID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PullMessageReq) Reset() { *m = PullMessageReq{} } -func (m *PullMessageReq) String() string { return proto.CompactTextString(m) } -func (*PullMessageReq) ProtoMessage() {} -func (*PullMessageReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{10} -} -func (m *PullMessageReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PullMessageReq.Unmarshal(m, b) -} -func (m *PullMessageReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PullMessageReq.Marshal(b, m, deterministic) -} -func (dst *PullMessageReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_PullMessageReq.Merge(dst, src) -} -func (m *PullMessageReq) XXX_Size() int { - return xxx_messageInfo_PullMessageReq.Size(m) -} -func (m *PullMessageReq) XXX_DiscardUnknown() { - xxx_messageInfo_PullMessageReq.DiscardUnknown(m) -} - -var xxx_messageInfo_PullMessageReq proto.InternalMessageInfo - -func (m *PullMessageReq) GetUserID() string { - if m != nil { - return m.UserID - } - return "" -} - -func (m *PullMessageReq) GetSeqBegin() int64 { - if m != nil { - return m.SeqBegin - } - return 0 -} - -func (m *PullMessageReq) GetSeqEnd() int64 { - if m != nil { - return m.SeqEnd - } - return 0 -} - -func (m *PullMessageReq) GetOperationID() string { - if m != nil { - return m.OperationID - } - return "" -} - -type PullMessageResp struct { - ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` - ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` - MaxSeq int64 `protobuf:"varint,3,opt,name=maxSeq" json:"maxSeq,omitempty"` - MinSeq int64 `protobuf:"varint,4,opt,name=minSeq" json:"minSeq,omitempty"` - SingleUserMsg []*GatherFormat `protobuf:"bytes,5,rep,name=singleUserMsg" json:"singleUserMsg,omitempty"` - GroupUserMsg []*GatherFormat `protobuf:"bytes,6,rep,name=groupUserMsg" json:"groupUserMsg,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PullMessageResp) Reset() { *m = PullMessageResp{} } -func (m *PullMessageResp) String() string { return proto.CompactTextString(m) } -func (*PullMessageResp) ProtoMessage() {} -func (*PullMessageResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{11} -} -func (m *PullMessageResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PullMessageResp.Unmarshal(m, b) -} -func (m *PullMessageResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PullMessageResp.Marshal(b, m, deterministic) -} -func (dst *PullMessageResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_PullMessageResp.Merge(dst, src) -} -func (m *PullMessageResp) XXX_Size() int { - return xxx_messageInfo_PullMessageResp.Size(m) -} -func (m *PullMessageResp) XXX_DiscardUnknown() { - xxx_messageInfo_PullMessageResp.DiscardUnknown(m) -} - -var xxx_messageInfo_PullMessageResp proto.InternalMessageInfo - -func (m *PullMessageResp) GetErrCode() int32 { - if m != nil { - return m.ErrCode - } - return 0 -} - -func (m *PullMessageResp) GetErrMsg() string { - if m != nil { - return m.ErrMsg - } - return "" -} - -func (m *PullMessageResp) GetMaxSeq() int64 { - if m != nil { - return m.MaxSeq - } - return 0 -} - -func (m *PullMessageResp) GetMinSeq() int64 { - if m != nil { - return m.MinSeq - } - return 0 -} - -func (m *PullMessageResp) GetSingleUserMsg() []*GatherFormat { - if m != nil { - return m.SingleUserMsg - } - return nil -} - -func (m *PullMessageResp) GetGroupUserMsg() []*GatherFormat { - if m != nil { - return m.GroupUserMsg - } - return nil -} - type GetMaxAndMinSeqReq struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1132,7 +968,7 @@ func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} } func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqReq) ProtoMessage() {} func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{12} + return fileDescriptor_ws_dd0597f97f3a9074, []int{10} } func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) @@ -1153,8 +989,8 @@ func (m *GetMaxAndMinSeqReq) XXX_DiscardUnknown() { var xxx_messageInfo_GetMaxAndMinSeqReq proto.InternalMessageInfo type GetMaxAndMinSeqResp struct { - MaxSeq int64 `protobuf:"varint,1,opt,name=maxSeq" json:"maxSeq,omitempty"` - MinSeq int64 `protobuf:"varint,2,opt,name=minSeq" json:"minSeq,omitempty"` + MaxSeq uint32 `protobuf:"varint,1,opt,name=maxSeq" json:"maxSeq,omitempty"` + MinSeq uint32 `protobuf:"varint,2,opt,name=minSeq" json:"minSeq,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1164,7 +1000,7 @@ func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} } func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqResp) ProtoMessage() {} func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{13} + return fileDescriptor_ws_dd0597f97f3a9074, []int{11} } func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) @@ -1184,68 +1020,20 @@ func (m *GetMaxAndMinSeqResp) XXX_DiscardUnknown() { var xxx_messageInfo_GetMaxAndMinSeqResp proto.InternalMessageInfo -func (m *GetMaxAndMinSeqResp) GetMaxSeq() int64 { +func (m *GetMaxAndMinSeqResp) GetMaxSeq() uint32 { if m != nil { return m.MaxSeq } return 0 } -func (m *GetMaxAndMinSeqResp) GetMinSeq() int64 { +func (m *GetMaxAndMinSeqResp) GetMinSeq() uint32 { if m != nil { return m.MinSeq } return 0 } -type GatherFormat struct { - // @inject_tag: json:"id" - Id string `protobuf:"bytes,1,opt,name=id" json:"id"` - // @inject_tag: json:"list" - List []*MsgData `protobuf:"bytes,2,rep,name=list" json:"list"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GatherFormat) Reset() { *m = GatherFormat{} } -func (m *GatherFormat) String() string { return proto.CompactTextString(m) } -func (*GatherFormat) ProtoMessage() {} -func (*GatherFormat) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{14} -} -func (m *GatherFormat) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GatherFormat.Unmarshal(m, b) -} -func (m *GatherFormat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GatherFormat.Marshal(b, m, deterministic) -} -func (dst *GatherFormat) XXX_Merge(src proto.Message) { - xxx_messageInfo_GatherFormat.Merge(dst, src) -} -func (m *GatherFormat) XXX_Size() int { - return xxx_messageInfo_GatherFormat.Size(m) -} -func (m *GatherFormat) XXX_DiscardUnknown() { - xxx_messageInfo_GatherFormat.DiscardUnknown(m) -} - -var xxx_messageInfo_GatherFormat proto.InternalMessageInfo - -func (m *GatherFormat) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *GatherFormat) GetList() []*MsgData { - if m != nil { - return m.List - } - return nil -} - type UserSendMsgResp struct { ServerMsgID string `protobuf:"bytes,1,opt,name=serverMsgID" json:"serverMsgID,omitempty"` ClientMsgID string `protobuf:"bytes,2,opt,name=clientMsgID" json:"clientMsgID,omitempty"` @@ -1259,7 +1047,7 @@ func (m *UserSendMsgResp) Reset() { *m = UserSendMsgResp{} } func (m *UserSendMsgResp) String() string { return proto.CompactTextString(m) } func (*UserSendMsgResp) ProtoMessage() {} func (*UserSendMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{15} + return fileDescriptor_ws_dd0597f97f3a9074, []int{12} } func (m *UserSendMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserSendMsgResp.Unmarshal(m, b) @@ -1313,7 +1101,7 @@ type MsgData struct { MsgFrom int32 `protobuf:"varint,10,opt,name=msgFrom" json:"msgFrom,omitempty"` ContentType int32 `protobuf:"varint,11,opt,name=contentType" json:"contentType,omitempty"` Content []byte `protobuf:"bytes,12,opt,name=content,proto3" json:"content,omitempty"` - Seq int64 `protobuf:"varint,14,opt,name=seq" json:"seq,omitempty"` + Seq uint32 `protobuf:"varint,14,opt,name=seq" json:"seq,omitempty"` SendTime int64 `protobuf:"varint,15,opt,name=sendTime" json:"sendTime,omitempty"` CreateTime int64 `protobuf:"varint,16,opt,name=createTime" json:"createTime,omitempty"` Status int32 `protobuf:"varint,17,opt,name=status" json:"status,omitempty"` @@ -1328,7 +1116,7 @@ func (m *MsgData) Reset() { *m = MsgData{} } func (m *MsgData) String() string { return proto.CompactTextString(m) } func (*MsgData) ProtoMessage() {} func (*MsgData) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{16} + return fileDescriptor_ws_dd0597f97f3a9074, []int{13} } func (m *MsgData) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgData.Unmarshal(m, b) @@ -1432,7 +1220,7 @@ func (m *MsgData) GetContent() []byte { return nil } -func (m *MsgData) GetSeq() int64 { +func (m *MsgData) GetSeq() uint32 { if m != nil { return m.Seq } @@ -1489,7 +1277,7 @@ func (m *OfflinePushInfo) Reset() { *m = OfflinePushInfo{} } func (m *OfflinePushInfo) String() string { return proto.CompactTextString(m) } func (*OfflinePushInfo) ProtoMessage() {} func (*OfflinePushInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{17} + return fileDescriptor_ws_dd0597f97f3a9074, []int{14} } func (m *OfflinePushInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OfflinePushInfo.Unmarshal(m, b) @@ -1556,7 +1344,7 @@ func (m *TipsComm) Reset() { *m = TipsComm{} } func (m *TipsComm) String() string { return proto.CompactTextString(m) } func (*TipsComm) ProtoMessage() {} func (*TipsComm) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{18} + return fileDescriptor_ws_dd0597f97f3a9074, []int{15} } func (m *TipsComm) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TipsComm.Unmarshal(m, b) @@ -1606,7 +1394,7 @@ func (m *GroupCreatedTips) Reset() { *m = GroupCreatedTips{} } func (m *GroupCreatedTips) String() string { return proto.CompactTextString(m) } func (*GroupCreatedTips) ProtoMessage() {} func (*GroupCreatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{19} + return fileDescriptor_ws_dd0597f97f3a9074, []int{16} } func (m *GroupCreatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupCreatedTips.Unmarshal(m, b) @@ -1675,7 +1463,7 @@ func (m *GroupInfoSetTips) Reset() { *m = GroupInfoSetTips{} } func (m *GroupInfoSetTips) String() string { return proto.CompactTextString(m) } func (*GroupInfoSetTips) ProtoMessage() {} func (*GroupInfoSetTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{20} + return fileDescriptor_ws_dd0597f97f3a9074, []int{17} } func (m *GroupInfoSetTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfoSetTips.Unmarshal(m, b) @@ -1730,7 +1518,7 @@ func (m *JoinGroupApplicationTips) Reset() { *m = JoinGroupApplicationTi func (m *JoinGroupApplicationTips) String() string { return proto.CompactTextString(m) } func (*JoinGroupApplicationTips) ProtoMessage() {} func (*JoinGroupApplicationTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{21} + return fileDescriptor_ws_dd0597f97f3a9074, []int{18} } func (m *JoinGroupApplicationTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_JoinGroupApplicationTips.Unmarshal(m, b) @@ -1786,7 +1574,7 @@ func (m *MemberQuitTips) Reset() { *m = MemberQuitTips{} } func (m *MemberQuitTips) String() string { return proto.CompactTextString(m) } func (*MemberQuitTips) ProtoMessage() {} func (*MemberQuitTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{22} + return fileDescriptor_ws_dd0597f97f3a9074, []int{19} } func (m *MemberQuitTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberQuitTips.Unmarshal(m, b) @@ -1841,7 +1629,7 @@ func (m *GroupApplicationAcceptedTips) Reset() { *m = GroupApplicationAc func (m *GroupApplicationAcceptedTips) String() string { return proto.CompactTextString(m) } func (*GroupApplicationAcceptedTips) ProtoMessage() {} func (*GroupApplicationAcceptedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{23} + return fileDescriptor_ws_dd0597f97f3a9074, []int{20} } func (m *GroupApplicationAcceptedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupApplicationAcceptedTips.Unmarshal(m, b) @@ -1896,7 +1684,7 @@ func (m *GroupApplicationRejectedTips) Reset() { *m = GroupApplicationRe func (m *GroupApplicationRejectedTips) String() string { return proto.CompactTextString(m) } func (*GroupApplicationRejectedTips) ProtoMessage() {} func (*GroupApplicationRejectedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{24} + return fileDescriptor_ws_dd0597f97f3a9074, []int{21} } func (m *GroupApplicationRejectedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupApplicationRejectedTips.Unmarshal(m, b) @@ -1952,7 +1740,7 @@ func (m *GroupOwnerTransferredTips) Reset() { *m = GroupOwnerTransferred func (m *GroupOwnerTransferredTips) String() string { return proto.CompactTextString(m) } func (*GroupOwnerTransferredTips) ProtoMessage() {} func (*GroupOwnerTransferredTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{25} + return fileDescriptor_ws_dd0597f97f3a9074, []int{22} } func (m *GroupOwnerTransferredTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupOwnerTransferredTips.Unmarshal(m, b) @@ -2015,7 +1803,7 @@ func (m *MemberKickedTips) Reset() { *m = MemberKickedTips{} } func (m *MemberKickedTips) String() string { return proto.CompactTextString(m) } func (*MemberKickedTips) ProtoMessage() {} func (*MemberKickedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{26} + return fileDescriptor_ws_dd0597f97f3a9074, []int{23} } func (m *MemberKickedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberKickedTips.Unmarshal(m, b) @@ -2078,7 +1866,7 @@ func (m *MemberInvitedTips) Reset() { *m = MemberInvitedTips{} } func (m *MemberInvitedTips) String() string { return proto.CompactTextString(m) } func (*MemberInvitedTips) ProtoMessage() {} func (*MemberInvitedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{27} + return fileDescriptor_ws_dd0597f97f3a9074, []int{24} } func (m *MemberInvitedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInvitedTips.Unmarshal(m, b) @@ -2140,7 +1928,7 @@ func (m *MemberEnterTips) Reset() { *m = MemberEnterTips{} } func (m *MemberEnterTips) String() string { return proto.CompactTextString(m) } func (*MemberEnterTips) ProtoMessage() {} func (*MemberEnterTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{28} + return fileDescriptor_ws_dd0597f97f3a9074, []int{25} } func (m *MemberEnterTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberEnterTips.Unmarshal(m, b) @@ -2194,7 +1982,7 @@ func (m *FriendApplication) Reset() { *m = FriendApplication{} } func (m *FriendApplication) String() string { return proto.CompactTextString(m) } func (*FriendApplication) ProtoMessage() {} func (*FriendApplication) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{29} + return fileDescriptor_ws_dd0597f97f3a9074, []int{26} } func (m *FriendApplication) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplication.Unmarshal(m, b) @@ -2247,7 +2035,7 @@ func (m *FromToUserID) Reset() { *m = FromToUserID{} } func (m *FromToUserID) String() string { return proto.CompactTextString(m) } func (*FromToUserID) ProtoMessage() {} func (*FromToUserID) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{30} + return fileDescriptor_ws_dd0597f97f3a9074, []int{27} } func (m *FromToUserID) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FromToUserID.Unmarshal(m, b) @@ -2293,7 +2081,7 @@ func (m *FriendApplicationTips) Reset() { *m = FriendApplicationTips{} } func (m *FriendApplicationTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationTips) ProtoMessage() {} func (*FriendApplicationTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{31} + return fileDescriptor_ws_dd0597f97f3a9074, []int{28} } func (m *FriendApplicationTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationTips.Unmarshal(m, b) @@ -2333,7 +2121,7 @@ func (m *FriendApplicationApprovedTips) Reset() { *m = FriendApplication func (m *FriendApplicationApprovedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationApprovedTips) ProtoMessage() {} func (*FriendApplicationApprovedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{32} + return fileDescriptor_ws_dd0597f97f3a9074, []int{29} } func (m *FriendApplicationApprovedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationApprovedTips.Unmarshal(m, b) @@ -2380,7 +2168,7 @@ func (m *FriendApplicationRejectedTips) Reset() { *m = FriendApplication func (m *FriendApplicationRejectedTips) String() string { return proto.CompactTextString(m) } func (*FriendApplicationRejectedTips) ProtoMessage() {} func (*FriendApplicationRejectedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{33} + return fileDescriptor_ws_dd0597f97f3a9074, []int{30} } func (m *FriendApplicationRejectedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationRejectedTips.Unmarshal(m, b) @@ -2428,7 +2216,7 @@ func (m *FriendAddedTips) Reset() { *m = FriendAddedTips{} } func (m *FriendAddedTips) String() string { return proto.CompactTextString(m) } func (*FriendAddedTips) ProtoMessage() {} func (*FriendAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{34} + return fileDescriptor_ws_dd0597f97f3a9074, []int{31} } func (m *FriendAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendAddedTips.Unmarshal(m, b) @@ -2481,7 +2269,7 @@ func (m *FriendDeletedTips) Reset() { *m = FriendDeletedTips{} } func (m *FriendDeletedTips) String() string { return proto.CompactTextString(m) } func (*FriendDeletedTips) ProtoMessage() {} func (*FriendDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{35} + return fileDescriptor_ws_dd0597f97f3a9074, []int{32} } func (m *FriendDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendDeletedTips.Unmarshal(m, b) @@ -2519,7 +2307,7 @@ func (m *BlackAddedTips) Reset() { *m = BlackAddedTips{} } func (m *BlackAddedTips) String() string { return proto.CompactTextString(m) } func (*BlackAddedTips) ProtoMessage() {} func (*BlackAddedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{36} + return fileDescriptor_ws_dd0597f97f3a9074, []int{33} } func (m *BlackAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackAddedTips.Unmarshal(m, b) @@ -2557,7 +2345,7 @@ func (m *BlackDeletedTips) Reset() { *m = BlackDeletedTips{} } func (m *BlackDeletedTips) String() string { return proto.CompactTextString(m) } func (*BlackDeletedTips) ProtoMessage() {} func (*BlackDeletedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{37} + return fileDescriptor_ws_dd0597f97f3a9074, []int{34} } func (m *BlackDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackDeletedTips.Unmarshal(m, b) @@ -2595,7 +2383,7 @@ func (m *FriendInfoChangedTips) Reset() { *m = FriendInfoChangedTips{} } func (m *FriendInfoChangedTips) String() string { return proto.CompactTextString(m) } func (*FriendInfoChangedTips) ProtoMessage() {} func (*FriendInfoChangedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{38} + return fileDescriptor_ws_dd0597f97f3a9074, []int{35} } func (m *FriendInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfoChangedTips.Unmarshal(m, b) @@ -2634,7 +2422,7 @@ func (m *UserInfoUpdatedTips) Reset() { *m = UserInfoUpdatedTips{} } func (m *UserInfoUpdatedTips) String() string { return proto.CompactTextString(m) } func (*UserInfoUpdatedTips) ProtoMessage() {} func (*UserInfoUpdatedTips) Descriptor() ([]byte, []int) { - return fileDescriptor_ws_44bd6efa690189ed, []int{39} + return fileDescriptor_ws_dd0597f97f3a9074, []int{36} } func (m *UserInfoUpdatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserInfoUpdatedTips.Unmarshal(m, b) @@ -2672,11 +2460,8 @@ func init() { proto.RegisterType((*FriendRequest)(nil), "server_api_params.FriendRequest") proto.RegisterType((*PullMessageBySeqListResp)(nil), "server_api_params.PullMessageBySeqListResp") proto.RegisterType((*PullMessageBySeqListReq)(nil), "server_api_params.PullMessageBySeqListReq") - proto.RegisterType((*PullMessageReq)(nil), "server_api_params.PullMessageReq") - proto.RegisterType((*PullMessageResp)(nil), "server_api_params.PullMessageResp") proto.RegisterType((*GetMaxAndMinSeqReq)(nil), "server_api_params.GetMaxAndMinSeqReq") proto.RegisterType((*GetMaxAndMinSeqResp)(nil), "server_api_params.GetMaxAndMinSeqResp") - proto.RegisterType((*GatherFormat)(nil), "server_api_params.GatherFormat") proto.RegisterType((*UserSendMsgResp)(nil), "server_api_params.UserSendMsgResp") proto.RegisterType((*MsgData)(nil), "server_api_params.MsgData") proto.RegisterMapType((map[string]bool)(nil), "server_api_params.MsgData.OptionsEntry") @@ -2705,134 +2490,127 @@ func init() { proto.RegisterType((*UserInfoUpdatedTips)(nil), "server_api_params.UserInfoUpdatedTips") } -func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_44bd6efa690189ed) } +func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_dd0597f97f3a9074) } -var fileDescriptor_ws_44bd6efa690189ed = []byte{ - // 2010 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x59, 0x4f, 0x6f, 0x23, 0x49, - 0x15, 0x57, 0x77, 0xc7, 0x8e, 0xfd, 0x6c, 0xc7, 0x99, 0x9e, 0x65, 0x30, 0xc3, 0xec, 0x10, 0x5a, - 0xab, 0x25, 0x42, 0x22, 0x48, 0x83, 0x90, 0x60, 0x10, 0xa0, 0xfc, 0x67, 0x96, 0x38, 0x09, 0x9d, - 0x8c, 0x96, 0x03, 0xd2, 0xa8, 0xe3, 0x2e, 0x3b, 0xbd, 0x69, 0x57, 0xb5, 0xab, 0xbb, 0x33, 0x33, - 0x17, 0x0e, 0x70, 0xe1, 0x0b, 0xc0, 0x91, 0x03, 0x17, 0xc4, 0x05, 0x71, 0x41, 0x5c, 0x38, 0xf2, - 0x05, 0x38, 0xf3, 0x15, 0xb8, 0x72, 0x40, 0x42, 0x5a, 0x54, 0xaf, 0xaa, 0xbb, 0xab, 0xda, 0x4e, - 0xd6, 0x8a, 0xa2, 0x1d, 0x24, 0x6e, 0x7e, 0xbf, 0xae, 0xf7, 0xff, 0xd5, 0xab, 0x57, 0x65, 0xe8, - 0xa7, 0xe1, 0xd5, 0xab, 0xd7, 0xe9, 0x37, 0x5f, 0xa7, 0x5b, 0x09, 0x67, 0x19, 0x73, 0x1f, 0xa4, - 0x84, 0x5f, 0x13, 0xfe, 0x2a, 0x48, 0xa2, 0x57, 0x49, 0xc0, 0x83, 0x69, 0xea, 0xfd, 0xcb, 0x86, - 0xf6, 0x21, 0x67, 0x79, 0xf2, 0x82, 0x8e, 0x99, 0x3b, 0x80, 0xd5, 0x09, 0x12, 0x7b, 0x03, 0x6b, - 0xc3, 0xda, 0x6c, 0xfb, 0x05, 0xe9, 0x3e, 0x81, 0x36, 0xfe, 0x3c, 0x0e, 0xa6, 0x64, 0x60, 0xe3, - 0xb7, 0x0a, 0x70, 0x3d, 0xe8, 0x52, 0x96, 0x45, 0xe3, 0x68, 0x14, 0x64, 0x11, 0xa3, 0x03, 0x07, - 0x17, 0x18, 0x98, 0x58, 0x13, 0xd1, 0x8c, 0xb3, 0x30, 0x1f, 0xe1, 0x9a, 0x15, 0xb9, 0x46, 0xc7, - 0x84, 0xfe, 0x71, 0x30, 0x22, 0x2f, 0xfd, 0xa3, 0x41, 0x43, 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0x53, 0x10, 0x86, 0xaa, 0x6c, 0x65, 0x86, 0x2b, - 0x60, 0x41, 0xd5, 0x36, 0x6f, 0xa9, 0xda, 0xd5, 0xb2, 0x6a, 0xff, 0x69, 0x41, 0x7b, 0x27, 0x0e, - 0x46, 0x57, 0x4b, 0xba, 0x6e, 0xba, 0x68, 0xcf, 0xb9, 0x78, 0x08, 0xbd, 0x0b, 0x21, 0xae, 0x70, - 0x01, 0xa3, 0xd0, 0x79, 0xf6, 0xd5, 0x05, 0x5e, 0x9a, 0x9b, 0xc5, 0x37, 0xf9, 0x4c, 0x77, 0x57, - 0x3e, 0xdb, 0xdd, 0xc6, 0x2d, 0xee, 0x36, 0x4b, 0x77, 0xff, 0x6e, 0x43, 0x17, 0xdb, 0x9b, 0x4f, - 0x66, 0x39, 0x49, 0x33, 0xf7, 0xfb, 0xd0, 0xca, 0x0b, 0x53, 0xad, 0x65, 0x4d, 0x2d, 0x59, 0xdc, - 0xe7, 0xaa, 0x99, 0x22, 0xbf, 0x8d, 0xfc, 0x4f, 0x16, 0xf0, 0x97, 0x27, 0x99, 0x5f, 0x2d, 0x17, - 0x07, 0xcf, 0x65, 0x40, 0xc3, 0x98, 0xf8, 0x24, 0xcd, 0xe3, 0x4c, 0xf5, 0x48, 0x03, 0x93, 0x95, - 0x36, 0x1b, 0xa6, 0x13, 0x75, 0x2c, 0x29, 0x4a, 0x44, 0x47, 0xae, 0x13, 0x9f, 0xa4, 0xeb, 0x15, - 0x20, 0x36, 0x2a, 0x27, 0x33, 0xcc, 0x90, 0xdc, 0x56, 0x05, 0x59, 0xe9, 0x54, 0x51, 0x93, 0x85, - 0x60, 0x60, 0x22, 0xc5, 0x92, 0x46, 0x01, 0xf2, 0x3c, 0xd2, 0x90, 0xfa, 0x71, 0xe4, 0xfd, 0xc3, - 0x81, 0x9e, 0xdc, 0x3e, 0x45, 0x50, 0x9f, 0x8a, 0x3a, 0x67, 0x53, 0xa3, 0x8a, 0x34, 0x44, 0x58, - 0x21, 0xa8, 0x63, 0xb3, 0xd1, 0x18, 0x98, 0x28, 0x45, 0x41, 0x1f, 0x18, 0x0d, 0x47, 0x87, 0x0a, - 0x2d, 0x87, 0x7a, 0xe3, 0xd1, 0x10, 0xd1, 0xca, 0x32, 0x66, 0x54, 0x47, 0x49, 0x0b, 0xde, 0x8c, - 0x95, 0xfa, 0x65, 0x7d, 0x68, 0x88, 0x88, 0x6f, 0xc6, 0x0a, 0xdd, 0x32, 0x48, 0x15, 0x20, 0x25, - 0x2b, 0xbd, 0xf2, 0x00, 0x29, 0xe9, 0xb9, 0xac, 0xb6, 0x6f, 0xcd, 0x2a, 0x18, 0x59, 0x35, 0x37, - 0x57, 0x67, 0x6e, 0x73, 0x7d, 0x00, 0x3d, 0x29, 0xa7, 0x28, 0xfa, 0xae, 0x3c, 0xe0, 0x0d, 0xd0, - 0xac, 0x8d, 0x5e, 0xbd, 0x36, 0xcc, 0xec, 0xae, 0xdd, 0x90, 0xdd, 0x7e, 0x99, 0xdd, 0x5f, 0xd9, - 0x30, 0x38, 0xcd, 0xe3, 0x78, 0x48, 0xd2, 0x34, 0x98, 0x90, 0x9d, 0xb7, 0x67, 0x64, 0x76, 0x14, - 0xa5, 0x99, 0x4f, 0xd2, 0x44, 0x14, 0x1a, 0xe1, 0x7c, 0x97, 0x85, 0x04, 0xb3, 0xdc, 0xf0, 0x0b, - 0x52, 0xb8, 0x48, 0x38, 0x17, 0x16, 0xa8, 0x16, 0x29, 0x29, 0x81, 0x4f, 0x83, 0x37, 0x67, 0x64, - 0x86, 0x19, 0x75, 0x7c, 0x45, 0x21, 0x1e, 0x51, 0x81, 0xaf, 0x28, 0x1c, 0x29, 0x77, 0x1f, 0x7a, - 0x69, 0x44, 0x27, 0xb2, 0x38, 0x65, 0xb1, 0x3b, 0x9b, 0x9d, 0x67, 0x5f, 0x59, 0xb4, 0xc9, 0x82, - 0xec, 0x92, 0xf0, 0x03, 0xc6, 0xa7, 0x41, 0xe6, 0x9b, 0x5c, 0xee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e, 0xa8, 0xdb, 0xe2, 0x1b, 0x4c, 0xde, 0x2f, 0x2c, 0x78, - 0x7f, 0x4e, 0xfc, 0x76, 0x92, 0x70, 0x76, 0xad, 0x8a, 0xfb, 0x3e, 0xd4, 0x98, 0xad, 0xd5, 0xae, - 0xb7, 0xd6, 0x85, 0x46, 0x18, 0xc7, 0xc1, 0xe7, 0x60, 0xc4, 0x1f, 0x2c, 0xe8, 0x2b, 0x23, 0xc2, - 0x50, 0xa9, 0xfd, 0x36, 0x34, 0xe5, 0xf3, 0xb6, 0x52, 0xf8, 0xfe, 0x42, 0x85, 0xc5, 0xb3, 0xbc, - 0xaf, 0x16, 0xcf, 0x57, 0xa4, 0xbd, 0x68, 0x0c, 0xfc, 0x6e, 0xd9, 0x01, 0x96, 0x7e, 0x80, 0x56, - 0x0c, 0xde, 0x4f, 0x8b, 0x62, 0xde, 0x23, 0x31, 0xb9, 0xcf, 0x18, 0x79, 0x2f, 0x61, 0x0d, 0xdf, - 0xda, 0xab, 0x18, 0xdc, 0x8b, 0xd8, 0x8f, 0x61, 0x1d, 0xc5, 0xde, 0xbb, 0xbd, 0xe5, 0xee, 0x10, - 0xf1, 0xd9, 0xbd, 0x0c, 0xe8, 0xe4, 0x3e, 0xa5, 0x7f, 0x03, 0x1e, 0x16, 0xb1, 0x7f, 0x99, 0x84, - 0xe5, 0x15, 0xe5, 0x86, 0x47, 0xae, 0x8b, 0x26, 0xfe, 0x57, 0xfc, 0xad, 0xff, 0x06, 0x00, 0x00, - 0xff, 0xff, 0xaf, 0x96, 0xca, 0x38, 0x3e, 0x1e, 0x00, 0x00, +var fileDescriptor_ws_dd0597f97f3a9074 = []byte{ + // 1901 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0x4f, 0x6f, 0x23, 0x4b, + 0x11, 0xd7, 0xd8, 0xb1, 0x63, 0x97, 0xe3, 0x38, 0x3b, 0xfb, 0x58, 0xcc, 0xb2, 0x6f, 0x09, 0xa3, + 0xa7, 0xc7, 0x0a, 0x89, 0x20, 0x2d, 0x42, 0x82, 0x45, 0x80, 0xb2, 0xc9, 0x26, 0xec, 0x23, 0x4e, + 0xc2, 0x38, 0xab, 0xc7, 0x01, 0x69, 0x35, 0xf1, 0xb4, 0x9d, 0x79, 0x19, 0x77, 0x8f, 0xbb, 0x67, + 0xb2, 0xbb, 0x12, 0x27, 0xf8, 0x0c, 0x70, 0xe4, 0xc0, 0x05, 0x71, 0x41, 0x5c, 0x10, 0x17, 0x8e, + 0x7c, 0x01, 0xce, 0x7c, 0x05, 0xae, 0x1c, 0x90, 0x90, 0x40, 0x5d, 0xdd, 0x33, 0xd3, 0x3d, 0x76, + 0xf2, 0x2c, 0x2b, 0xda, 0xbc, 0x9b, 0xab, 0xa6, 0xab, 0xba, 0xea, 0x57, 0x7f, 0xba, 0xba, 0x0d, + 0x3d, 0x11, 0x5e, 0xbe, 0x7e, 0x23, 0xbe, 0xfd, 0x46, 0xec, 0x24, 0x9c, 0xa5, 0xcc, 0xbd, 0x27, + 0x08, 0xbf, 0x22, 0xfc, 0x75, 0x90, 0x44, 0xaf, 0x93, 0x80, 0x07, 0x53, 0xe1, 0xfd, 0xbb, 0x06, + 0xed, 0x43, 0xce, 0xb2, 0xe4, 0x25, 0x1d, 0x33, 0xb7, 0x0f, 0xeb, 0x13, 0x24, 0xf6, 0xfb, 0xce, + 0xb6, 0xf3, 0xa4, 0xed, 0xe7, 0xa4, 0xfb, 0x08, 0xda, 0xf8, 0xf3, 0x38, 0x98, 0x92, 0x7e, 0x0d, + 0xbf, 0x95, 0x0c, 0xd7, 0x83, 0x0d, 0xca, 0xd2, 0x68, 0x1c, 0x8d, 0x82, 0x34, 0x62, 0xb4, 0x5f, + 0xc7, 0x05, 0x16, 0x4f, 0xae, 0x89, 0x68, 0xca, 0x59, 0x98, 0x8d, 0x70, 0xcd, 0x9a, 0x5a, 0x63, + 0xf2, 0x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d, 0x0c, 0xa5, 0xa2, 0x21, 0xcb, 0x68, + 0x58, 0x5c, 0xf4, 0x0c, 0x9e, 0x4c, 0xa1, 0xe8, 0x64, 0xf8, 0x3c, 0x08, 0x27, 0x44, 0x5d, 0xc7, + 0x1a, 0x68, 0x93, 0xcd, 0xf4, 0xf6, 0xa1, 0x75, 0x16, 0x25, 0x62, 0x8f, 0x4d, 0xa7, 0x32, 0x10, + 0x21, 0x49, 0xe5, 0xac, 0xea, 0x60, 0xbc, 0x35, 0x25, 0x53, 0x25, 0x24, 0xe3, 0x20, 0x8b, 0x53, + 0xb9, 0x34, 0x2f, 0x5c, 0x83, 0xe5, 0xfd, 0xbd, 0x06, 0x5b, 0x38, 0x18, 0xec, 0x61, 0x58, 0x43, + 0xc9, 0x74, 0x9f, 0x42, 0x03, 0xcb, 0x4c, 0x0f, 0x23, 0x37, 0x0f, 0x13, 0x6a, 0xa9, 0xfb, 0x23, + 0x68, 0xb2, 0x04, 0x47, 0x4a, 0x35, 0x81, 0x7c, 0x7c, 0x9d, 0x90, 0x7d, 0xa7, 0xf3, 0xb5, 0x94, + 0x7b, 0x00, 0xa0, 0xae, 0x9b, 0x47, 0x65, 0x6b, 0x5e, 0x56, 0x87, 0x21, 0x29, 0xc1, 0x2b, 0xda, + 0xac, 0x71, 0xb1, 0xb3, 0x99, 0xee, 0x31, 0x6c, 0xa2, 0xd9, 0x27, 0xf9, 0x54, 0x89, 0x18, 0x2f, + 0xbf, 0x63, 0x45, 0xda, 0xfb, 0xbd, 0xa3, 0x61, 0x94, 0x5f, 0x87, 0x04, 0xb1, 0x35, 0x20, 0x71, + 0x56, 0x82, 0xe4, 0x21, 0xb4, 0xa6, 0x99, 0x31, 0xe4, 0xd6, 0xfd, 0x82, 0x2e, 0x43, 0x54, 0x5f, + 0x3a, 0x44, 0xde, 0x1f, 0x1c, 0xe8, 0x7f, 0xc2, 0x22, 0x8a, 0x1f, 0x76, 0x93, 0x24, 0xd6, 0xaf, + 0x0f, 0x2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8, 0xf6, 0xd6, 0xed, + 0x2d, 0xaa, 0x43, 0xe2, 0xb3, 0x77, 0x11, 0xd0, 0xc9, 0x6d, 0x6a, 0xff, 0x16, 0xdc, 0xcf, 0xb1, + 0x7f, 0x95, 0x84, 0xc5, 0x15, 0xe5, 0x9a, 0x87, 0x97, 0xf3, 0x26, 0xfe, 0x99, 0xf7, 0x9d, 0xff, + 0x07, 0x00, 0x00, 0xff, 0xff, 0x5a, 0xb7, 0x8c, 0x6a, 0xdf, 0x1b, 0x00, 0x00, } diff --git a/pkg/proto/sdk_ws/ws.proto b/pkg/proto/sdk_ws/ws.proto index cc4c70054..a3f018db3 100644 --- a/pkg/proto/sdk_ws/ws.proto +++ b/pkg/proto/sdk_ws/ws.proto @@ -115,61 +115,14 @@ message PullMessageBySeqListResp { message PullMessageBySeqListReq{ string userID = 1; string operationID = 2; - repeated int64 seqList = 3; -} -message PullMessageReq { - string userID = 1; - int64 seqBegin = 2; - int64 seqEnd = 3; - string operationID = 4; -} -message PullMessageResp { - int32 errCode = 1; - string errMsg = 2; - int64 maxSeq = 3; - int64 minSeq = 4; - repeated GatherFormat singleUserMsg = 5; - repeated GatherFormat groupUserMsg = 6; + repeated uint32 seqList = 3; } message GetMaxAndMinSeqReq { } message GetMaxAndMinSeqResp { - int64 maxSeq = 1; - int64 minSeq = 2; + uint32 maxSeq = 1; + uint32 minSeq = 2; } -message GatherFormat{ - // @inject_tag: json:"id" - string id = 1; - // @inject_tag: json:"list" - repeated MsgData list = 2;//detail msg -} -//message MsgFormat{ -// // @inject_tag: json:"sendID" -// string SendID = 1; -// // @inject_tag: json:"recvID" -// string RecvID = 2; -// // @inject_tag: json:"msgFrom" -// int32 MsgFrom = 3; -// // @inject_tag: json:"contentType" -// int32 ContentType = 4; -// // @inject_tag: json:"serverMsgID" -// string ServerMsgID = 5; -// // @inject_tag: json:"content" -// string Content = 6; -// // @inject_tag: json:"seq" -// int64 Seq = 7; -// // @inject_tag: json:"sendTime" -// int64 SendTime = 8; -// // @inject_tag: json:"senderPlatformID" -// int32 SenderPlatformID = 9; -// // @inject_tag: json:"senderNickName" -// string SenderNickName = 10; -// // @inject_tag: json:"senderFaceUrl" -// string SenderFaceURL = 11; -// // @inject_tag: json:"clientMsgID" -// string ClientMsgID = 12; -//} - message UserSendMsgResp { string serverMsgID = 1; @@ -190,7 +143,7 @@ message MsgData { int32 msgFrom = 10; int32 contentType = 11; bytes content = 12; - int64 seq = 14; + uint32 seq = 14; int64 sendTime = 15; int64 createTime = 16; int32 status = 17; diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index f175255ab..440d3a993 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -37,3 +37,37 @@ func cleanUpFuncName(funcName string) string { } return funcName[end+1:] } +func Intersect(slice1, slice2 []uint32) []uint32 { + m := make(map[uint32]bool) + n := make([]uint32, 0) + for _, v := range slice1 { + m[v] = true + } + for _, v := range slice2 { + flag, _ := m[v] + if flag { + n = append(n, v) + } + } + return n +} +func Difference(slice1, slice2 []uint32) []uint32 { + m := make(map[uint32]bool) + n := make([]uint32, 0) + inter := Intersect(slice1, slice2) + for _, v := range inter { + m[v] = true + } + for _, v := range slice1 { + if !m[v] { + n = append(n, v) + } + } + + for _, v := range slice2 { + if !m[v] { + n = append(n, v) + } + } + return n +} From e7c7784fec6b80b3230de24689a3e280a7ff7b47 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 20 Jan 2022 11:37:14 +0800 Subject: [PATCH 324/337] protocol modify --- pkg/proto/chat/chat.pb.go | 122 ++++++++++++++------------------------ 1 file changed, 44 insertions(+), 78 deletions(-) diff --git a/pkg/proto/chat/chat.pb.go b/pkg/proto/chat/chat.pb.go index 2a52e2c37..5d4fd0bec 100644 --- a/pkg/proto/chat/chat.pb.go +++ b/pkg/proto/chat/chat.pb.go @@ -37,7 +37,7 @@ func (m *MsgDataToMQ) Reset() { *m = MsgDataToMQ{} } func (m *MsgDataToMQ) String() string { return proto.CompactTextString(m) } func (*MsgDataToMQ) ProtoMessage() {} func (*MsgDataToMQ) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_1eadc66417ed93b5, []int{0} + return fileDescriptor_chat_68ff093a75fc0634, []int{0} } func (m *MsgDataToMQ) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgDataToMQ.Unmarshal(m, b) @@ -90,7 +90,7 @@ func (m *MsgDataToDB) Reset() { *m = MsgDataToDB{} } func (m *MsgDataToDB) String() string { return proto.CompactTextString(m) } func (*MsgDataToDB) ProtoMessage() {} func (*MsgDataToDB) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_1eadc66417ed93b5, []int{1} + return fileDescriptor_chat_68ff093a75fc0634, []int{1} } func (m *MsgDataToDB) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgDataToDB.Unmarshal(m, b) @@ -136,7 +136,7 @@ func (m *PushMsgDataToMQ) Reset() { *m = PushMsgDataToMQ{} } func (m *PushMsgDataToMQ) String() string { return proto.CompactTextString(m) } func (*PushMsgDataToMQ) ProtoMessage() {} func (*PushMsgDataToMQ) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_1eadc66417ed93b5, []int{2} + return fileDescriptor_chat_68ff093a75fc0634, []int{2} } func (m *PushMsgDataToMQ) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PushMsgDataToMQ.Unmarshal(m, b) @@ -202,7 +202,7 @@ func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} } func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqReq) ProtoMessage() {} func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_1eadc66417ed93b5, []int{3} + return fileDescriptor_chat_68ff093a75fc0634, []int{3} } func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) @@ -239,8 +239,8 @@ func (m *GetMaxAndMinSeqReq) GetOperationID() string { type GetMaxAndMinSeqResp struct { ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` - MaxSeq int64 `protobuf:"varint,3,opt,name=MaxSeq" json:"MaxSeq,omitempty"` - MinSeq int64 `protobuf:"varint,4,opt,name=MinSeq" json:"MinSeq,omitempty"` + MaxSeq uint32 `protobuf:"varint,3,opt,name=MaxSeq" json:"MaxSeq,omitempty"` + MinSeq uint32 `protobuf:"varint,4,opt,name=MinSeq" json:"MinSeq,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -250,7 +250,7 @@ func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} } func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) } func (*GetMaxAndMinSeqResp) ProtoMessage() {} func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_1eadc66417ed93b5, []int{4} + return fileDescriptor_chat_68ff093a75fc0634, []int{4} } func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) @@ -284,14 +284,14 @@ func (m *GetMaxAndMinSeqResp) GetErrMsg() string { return "" } -func (m *GetMaxAndMinSeqResp) GetMaxSeq() int64 { +func (m *GetMaxAndMinSeqResp) GetMaxSeq() uint32 { if m != nil { return m.MaxSeq } return 0 } -func (m *GetMaxAndMinSeqResp) GetMinSeq() int64 { +func (m *GetMaxAndMinSeqResp) GetMinSeq() uint32 { if m != nil { return m.MinSeq } @@ -311,7 +311,7 @@ func (m *SendMsgReq) Reset() { *m = SendMsgReq{} } func (m *SendMsgReq) String() string { return proto.CompactTextString(m) } func (*SendMsgReq) ProtoMessage() {} func (*SendMsgReq) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_1eadc66417ed93b5, []int{5} + return fileDescriptor_chat_68ff093a75fc0634, []int{5} } func (m *SendMsgReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SendMsgReq.Unmarshal(m, b) @@ -367,7 +367,7 @@ func (m *SendMsgResp) Reset() { *m = SendMsgResp{} } func (m *SendMsgResp) String() string { return proto.CompactTextString(m) } func (*SendMsgResp) ProtoMessage() {} func (*SendMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_chat_1eadc66417ed93b5, []int{6} + return fileDescriptor_chat_68ff093a75fc0634, []int{6} } func (m *SendMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SendMsgResp.Unmarshal(m, b) @@ -444,7 +444,6 @@ const _ = grpc.SupportPackageIsVersion4 type ChatClient interface { GetMaxAndMinSeq(ctx context.Context, in *GetMaxAndMinSeqReq, opts ...grpc.CallOption) (*GetMaxAndMinSeqResp, error) - PullMessage(ctx context.Context, in *sdk_ws.PullMessageReq, opts ...grpc.CallOption) (*sdk_ws.PullMessageResp, error) PullMessageBySeqList(ctx context.Context, in *sdk_ws.PullMessageBySeqListReq, opts ...grpc.CallOption) (*sdk_ws.PullMessageBySeqListResp, error) SendMsg(ctx context.Context, in *SendMsgReq, opts ...grpc.CallOption) (*SendMsgResp, error) } @@ -466,15 +465,6 @@ func (c *chatClient) GetMaxAndMinSeq(ctx context.Context, in *GetMaxAndMinSeqReq return out, nil } -func (c *chatClient) PullMessage(ctx context.Context, in *sdk_ws.PullMessageReq, opts ...grpc.CallOption) (*sdk_ws.PullMessageResp, error) { - out := new(sdk_ws.PullMessageResp) - err := grpc.Invoke(ctx, "/pbChat.Chat/PullMessage", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *chatClient) PullMessageBySeqList(ctx context.Context, in *sdk_ws.PullMessageBySeqListReq, opts ...grpc.CallOption) (*sdk_ws.PullMessageBySeqListResp, error) { out := new(sdk_ws.PullMessageBySeqListResp) err := grpc.Invoke(ctx, "/pbChat.Chat/PullMessageBySeqList", in, out, c.cc, opts...) @@ -497,7 +487,6 @@ func (c *chatClient) SendMsg(ctx context.Context, in *SendMsgReq, opts ...grpc.C type ChatServer interface { GetMaxAndMinSeq(context.Context, *GetMaxAndMinSeqReq) (*GetMaxAndMinSeqResp, error) - PullMessage(context.Context, *sdk_ws.PullMessageReq) (*sdk_ws.PullMessageResp, error) PullMessageBySeqList(context.Context, *sdk_ws.PullMessageBySeqListReq) (*sdk_ws.PullMessageBySeqListResp, error) SendMsg(context.Context, *SendMsgReq) (*SendMsgResp, error) } @@ -524,24 +513,6 @@ func _Chat_GetMaxAndMinSeq_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } -func _Chat_PullMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(sdk_ws.PullMessageReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ChatServer).PullMessage(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pbChat.Chat/PullMessage", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ChatServer).PullMessage(ctx, req.(*sdk_ws.PullMessageReq)) - } - return interceptor(ctx, in, info, handler) -} - func _Chat_PullMessageBySeqList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(sdk_ws.PullMessageBySeqListReq) if err := dec(in); err != nil { @@ -586,10 +557,6 @@ var _Chat_serviceDesc = grpc.ServiceDesc{ MethodName: "GetMaxAndMinSeq", Handler: _Chat_GetMaxAndMinSeq_Handler, }, - { - MethodName: "PullMessage", - Handler: _Chat_PullMessage_Handler, - }, { MethodName: "PullMessageBySeqList", Handler: _Chat_PullMessageBySeqList_Handler, @@ -603,39 +570,38 @@ var _Chat_serviceDesc = grpc.ServiceDesc{ Metadata: "chat/chat.proto", } -func init() { proto.RegisterFile("chat/chat.proto", fileDescriptor_chat_1eadc66417ed93b5) } +func init() { proto.RegisterFile("chat/chat.proto", fileDescriptor_chat_68ff093a75fc0634) } -var fileDescriptor_chat_1eadc66417ed93b5 = []byte{ - // 482 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0x4d, 0x6f, 0xd3, 0x40, - 0x10, 0x95, 0xd3, 0x26, 0xa1, 0x63, 0xa1, 0x48, 0xdb, 0x0a, 0x59, 0xe6, 0x92, 0xfa, 0x54, 0x81, - 0x64, 0x4b, 0x81, 0x1b, 0x27, 0xd2, 0x54, 0x28, 0x88, 0xa5, 0xc5, 0x09, 0x17, 0x2e, 0xd1, 0xb6, - 0x1e, 0x39, 0x56, 0x12, 0x7b, 0xb3, 0xe3, 0x92, 0x02, 0x3f, 0x86, 0x5f, 0xc4, 0x7f, 0x42, 0xde, - 0x75, 0xd2, 0x6d, 0x03, 0x24, 0x27, 0x2e, 0x96, 0xde, 0x9b, 0xe7, 0x37, 0xf3, 0xf6, 0x0b, 0x3a, - 0x37, 0x53, 0x51, 0x46, 0xd5, 0x27, 0x94, 0xaa, 0x28, 0x0b, 0xd6, 0x92, 0xd7, 0xe7, 0x53, 0x51, - 0xfa, 0xa7, 0x97, 0x12, 0xf3, 0xc9, 0x90, 0x47, 0x72, 0x96, 0x46, 0xba, 0x14, 0x51, 0x32, 0x9b, - 0xac, 0x28, 0x5a, 0x91, 0x91, 0x06, 0x3f, 0xc0, 0xe5, 0x94, 0x0e, 0x44, 0x29, 0xc6, 0x05, 0xff, - 0xc4, 0x4e, 0xa0, 0x59, 0x16, 0x33, 0xcc, 0x3d, 0xa7, 0xeb, 0x9c, 0x1d, 0xc5, 0x06, 0xb0, 0x2e, - 0xb8, 0x85, 0x44, 0x25, 0xca, 0xac, 0xc8, 0x87, 0x03, 0xaf, 0xa1, 0x6b, 0x36, 0xc5, 0x5e,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2, 0x66, 0x9e, 0x61, 0x5e, 0x1a, 0x45, 0xd3, 0x28, 0x2c, 0x8a, - 0xf9, 0xf0, 0x84, 0x30, 0x4f, 0xc6, 0xd9, 0x02, 0xbd, 0x96, 0x5e, 0x9b, 0x0d, 0xee, 0xfd, 0x6a, - 0xc0, 0x61, 0x75, 0xc3, 0xd8, 0x7b, 0xe8, 0x3c, 0xda, 0x1f, 0xe6, 0x87, 0xe6, 0xf6, 0x85, 0xdb, - 0x07, 0xc1, 0x7f, 0xfe, 0xd7, 0x1a, 0x49, 0x36, 0x06, 0xf7, 0xea, 0x76, 0x3e, 0xe7, 0x48, 0x24, - 0x52, 0x64, 0xa7, 0x7f, 0x58, 0x2a, 0xab, 0x5e, 0xd9, 0x05, 0xbb, 0x24, 0x24, 0x59, 0x01, 0x27, - 0x16, 0xd5, 0xff, 0x36, 0xc2, 0xe5, 0x87, 0x8c, 0x4a, 0xf6, 0xe2, 0xdf, 0xff, 0x6e, 0x84, 0x55, - 0x9f, 0x97, 0x7b, 0x6b, 0x49, 0xb2, 0x1e, 0xb4, 0xeb, 0xcd, 0x63, 0x6c, 0x1d, 0xf7, 0xfe, 0x28, - 0xf9, 0xc7, 0x5b, 0x1c, 0xc9, 0x7e, 0xe7, 0xcb, 0xd3, 0x50, 0x3f, 0x60, 0x6f, 0x4c, 0xf1, 0xba, - 0xa5, 0x5f, 0xa7, 0x57, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0xcb, 0xb4, 0x87, 0x05, 0xdb, 0x04, - 0x00, 0x00, +var fileDescriptor_chat_68ff093a75fc0634 = []byte{ + // 469 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0x4f, 0x6f, 0xd3, 0x4e, + 0x10, 0x95, 0xd3, 0x26, 0xf9, 0x75, 0xac, 0x2a, 0xd2, 0xb6, 0xfa, 0xc9, 0x32, 0x17, 0xe3, 0x53,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9, 0x4a, 0x38, 0xbd, 0xbc, 0x5d, 0x2c, + 0x38, 0x12, 0x89, 0x0c, 0x87, 0xdf, 0x26, 0xb8, 0xfa, 0x90, 0x53, 0xc5, 0x5e, 0x3c, 0xb1, 0x66, + 0x4f, 0x35, 0xd6, 0x06, 0x2f, 0xf7, 0xee, 0x25, 0xc9, 0x06, 0xd0, 0x6d, 0x96, 0x99, 0xb1, 0xcd, + 0x60, 0xf7, 0x9b, 0xee, 0x9f, 0xec, 0x70, 0x24, 0x87, 0xbd, 0x2f, 0xc7, 0x91, 0x7e, 0x6a, 0xde, + 0x98, 0xe2, 0x75, 0x47, 0xbf, 0x23, 0xaf, 0x7e, 0x07, 0x00, 0x00, 0xff, 0xff, 0x3a, 0xe6, 0x81, + 0xce, 0x85, 0x04, 0x00, 0x00, } From ff779fcc7cfa3e4a43829e5c8be488e798c5be15 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 20 Jan 2022 11:42:43 +0800 Subject: [PATCH 325/337] protocol modify --- internal/msg_transfer/logic/db.go | 2 +- internal/push/logic/push_to_client.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/msg_transfer/logic/db.go b/internal/msg_transfer/logic/db.go index 0c09e0c8e..b9ce8b589 100644 --- a/internal/msg_transfer/logic/db.go +++ b/internal/msg_transfer/logic/db.go @@ -14,7 +14,7 @@ func saveUserChat(uid string, msg *pbMsg.MsgDataToMQ) error { log.NewError(msg.OperationID, "data insert to redis err", err.Error(), msg.String()) return err } - msg.MsgData.Seq = seq + msg.MsgData.Seq = uint32(seq) pbSaveData := pbMsg.MsgDataToDB{} pbSaveData.MsgData = msg.MsgData log.NewInfo(msg.OperationID, "IncrUserSeq cost time", utils.GetCurrentTimestampByMill()-time) diff --git a/internal/push/logic/push_to_client.go b/internal/push/logic/push_to_client.go index 7d566a10a..803bb5b3b 100644 --- a/internal/push/logic/push_to_client.go +++ b/internal/push/logic/push_to_client.go @@ -24,7 +24,7 @@ type OpenIMContent struct { SessionType int `json:"sessionType"` From string `json:"from"` To string `json:"to"` - Seq int64 `json:"seq"` + Seq uint32 `json:"seq"` } type AtContent struct { Text string `json:"text"` From e4f87b53b485237d56eb1d7cf82e4c10962291d3 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 20 Jan 2022 11:53:57 +0800 Subject: [PATCH 326/337] protocol modify --- cmd/open_im_api/main.go | 1 - internal/api/chat/pull_msg.go | 77 +++-------------------------------- 2 files changed, 6 insertions(+), 72 deletions(-) diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index 7f8fd7db2..817042f5c 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -81,7 +81,6 @@ func main() { chatGroup := r.Group("/msg") { chatGroup.POST("/newest_seq", apiChat.GetSeq) - chatGroup.POST("/pull_msg", apiChat.PullMsg) chatGroup.POST("/send_msg", apiChat.SendMsg) chatGroup.POST("/pull_msg_by_seq", apiChat.PullMsgBySeqList) } diff --git a/internal/api/chat/pull_msg.go b/internal/api/chat/pull_msg.go index 56903f5cc..0872319c6 100644 --- a/internal/api/chat/pull_msg.go +++ b/internal/api/chat/pull_msg.go @@ -23,61 +23,11 @@ type paramsUserPullMsg struct { } } -func PullMsg(c *gin.Context) { - params := paramsUserPullMsg{} - if err := c.BindJSON(¶ms); err != nil { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) - return - } - - token := c.Request.Header.Get("token") - if ok, err := token_verify.VerifyToken(token, params.SendID); !ok { - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "token validate err" + err.Error()}) - return - } - pbData := open_im_sdk.PullMessageReq{} - pbData.UserID = params.SendID - pbData.OperationID = params.OperationID - pbData.SeqBegin = *params.Data.SeqBegin - pbData.SeqEnd = *params.Data.SeqEnd - grpcConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfflineMessageName) - msgClient := pbChat.NewChatClient(grpcConn) - reply, err := msgClient.PullMessage(context.Background(), &pbData) - if err != nil { - log.NewError(params.OperationID, "UserPullMsg rpc failed, ", params, err.Error()) - c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "UserPullMsg rpc failed, " + err.Error()}) - return - } - log.InfoByKv("rpc call success to pullMsgRep", pbData.OperationID, "ReplyArgs", reply.String(), "maxSeq", reply.GetMaxSeq(), - "MinSeq", reply.GetMinSeq(), "singLen", len(reply.GetSingleUserMsg()), "groupLen", len(reply.GetGroupUserMsg())) - - msg := make(map[string]interface{}) - if v := reply.GetSingleUserMsg(); v != nil { - msg["single"] = v - } else { - msg["single"] = []open_im_sdk.GatherFormat{} - } - if v := reply.GetGroupUserMsg(); v != nil { - msg["group"] = v - } else { - msg["group"] = []open_im_sdk.GatherFormat{} - } - msg["maxSeq"] = reply.GetMaxSeq() - msg["minSeq"] = reply.GetMinSeq() - c.JSON(http.StatusOK, gin.H{ - "errCode": reply.ErrCode, - "errMsg": reply.ErrMsg, - "reqIdentifier": *params.ReqIdentifier, - "data": msg, - }) - -} - type paramsUserPullMsgBySeqList struct { - ReqIdentifier int `json:"reqIdentifier" binding:"required"` - SendID string `json:"sendID" binding:"required"` - OperationID string `json:"operationID" binding:"required"` - SeqList []int64 `json:"seqList"` + ReqIdentifier int `json:"reqIdentifier" binding:"required"` + SendID string `json:"sendID" binding:"required"` + OperationID string `json:"operationID" binding:"required"` + SeqList []uint32 `json:"seqList"` } func PullMsgBySeqList(c *gin.Context) { @@ -104,26 +54,11 @@ func PullMsgBySeqList(c *gin.Context) { log.ErrorByKv("PullMessageBySeqList error", pbData.OperationID, "err", err.Error()) return } - log.InfoByKv("rpc call success to PullMessageBySeqList", pbData.OperationID, "ReplyArgs", reply.String(), "maxSeq", reply.GetMaxSeq(), - "MinSeq", reply.GetMinSeq(), "singLen", len(reply.GetSingleUserMsg()), "groupLen", len(reply.GetGroupUserMsg())) - - msg := make(map[string]interface{}) - if v := reply.GetSingleUserMsg(); v != nil { - msg["single"] = v - } else { - msg["single"] = []open_im_sdk.GatherFormat{} - } - if v := reply.GetGroupUserMsg(); v != nil { - msg["group"] = v - } else { - msg["group"] = []open_im_sdk.GatherFormat{} - } - msg["maxSeq"] = reply.GetMaxSeq() - msg["minSeq"] = reply.GetMinSeq() + log.InfoByKv("rpc call success to PullMessageBySeqList", pbData.OperationID, "ReplyArgs", reply.String(), len(reply.List)) c.JSON(http.StatusOK, gin.H{ "errCode": reply.ErrCode, "errMsg": reply.ErrMsg, "reqIdentifier": params.ReqIdentifier, - "data": msg, + "data": reply.List, }) } From 3c64d8498007d837cf2acdd239075fb7ea7d3d88 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 20 Jan 2022 11:55:08 +0800 Subject: [PATCH 327/337] protocol modify --- internal/rpc/msg/pull_message.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/internal/rpc/msg/pull_message.go b/internal/rpc/msg/pull_message.go index 6f6a614d1..d4b8ec0e6 100644 --- a/internal/rpc/msg/pull_message.go +++ b/internal/rpc/msg/pull_message.go @@ -22,7 +22,6 @@ func (rpc *rpcChat) GetMaxAndMinSeq(_ context.Context, in *pbMsg.GetMaxAndMinSeq resp.MaxSeq = 0 } else { log.NewError(in.OperationID, "getMaxSeq from redis error", in.String(), err1.Error()) - resp.MaxSeq = -1 resp.ErrCode = 200 resp.ErrMsg = "redis get err" } @@ -32,7 +31,6 @@ func (rpc *rpcChat) GetMaxAndMinSeq(_ context.Context, in *pbMsg.GetMaxAndMinSeq resp.MinSeq = 0 } else { log.NewError(in.OperationID, "getMaxSeq from redis error", in.String(), err2.Error()) - resp.MinSeq = -1 resp.ErrCode = 201 resp.ErrMsg = "redis get err" } From 911100923fae94f90af0a996394dedc2ac31798f Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 20 Jan 2022 17:18:41 +0800 Subject: [PATCH 328/337] chat log model update --- pkg/common/db/model_struct.go | 19 +++++++++++ pkg/common/db/mysql.go | 2 +- .../im_mysql_msg_model/chat_log_model.go | 33 ++++--------------- 3 files changed, 26 insertions(+), 28 deletions(-) diff --git a/pkg/common/db/model_struct.go b/pkg/common/db/model_struct.go index 8dd0ab3a2..eabc26668 100644 --- a/pkg/common/db/model_struct.go +++ b/pkg/common/db/model_struct.go @@ -165,3 +165,22 @@ type Black struct { OperatorUserID string `gorm:"column:operator_user_id;size:64"` Ex string `gorm:"column:ex;size:1024"` } + +type ChatLog struct { + ServerMsgID string `gorm:"column:server_msg_id;primary_key;type:char(64)" json:"serverMsgID"` + ClientMsgID string `gorm:"column:client_msg_id;type:char(64)" json:"clientMsgID"` + SendID string `gorm:"column:send_id;type:char(64)" json:"sendID"` + RecvID string `gorm:"column:recv_id;type:char(64)" json:"recvID"` + SenderPlatformID int32 `gorm:"column:sender_platform_id" json:"senderPlatformID"` + SenderNickname string `gorm:"column:sender_nick_name;type:varchar(255)" json:"senderNickname"` + SenderFaceURL string `gorm:"column:sender_face_url;type:varchar(255)" json:"senderFaceURL"` + SessionType int32 `gorm:"column:session_type" json:"sessionType"` + MsgFrom int32 `gorm:"column:msg_from" json:"msgFrom"` + ContentType int32 `gorm:"column:content_type" json:"contentType"` + Content string `gorm:"column:content;type:varchar(1000)" json:"content"` + Status int32 `gorm:"column:status" json:"status"` + Seq uint32 `gorm:"column:seq;index:index_seq;default:0" json:"seq"` + SendTime time.Time `gorm:"column:send_time" json:"sendTime"` + CreateTime time.Time `gorm:"column:create_time" json:"createTime"` + Ex string `gorm:"column:ex;type:varchar(1024)" json:"ex"` +} diff --git a/pkg/common/db/mysql.go b/pkg/common/db/mysql.go index 9731a1716..56ca3648c 100644 --- a/pkg/common/db/mysql.go +++ b/pkg/common/db/mysql.go @@ -58,7 +58,7 @@ func initMysqlDB() { &GroupMember{}, &GroupRequest{}, &User{}, - &Black{}) + &Black{}, &ChatLog{}) db.Set("gorm:table_options", "CHARSET=utf8") // diff --git a/pkg/common/db/mysql_model/im_mysql_msg_model/chat_log_model.go b/pkg/common/db/mysql_model/im_mysql_msg_model/chat_log_model.go index 5a80e6bb2..58f60b0c0 100644 --- a/pkg/common/db/mysql_model/im_mysql_msg_model/chat_log_model.go +++ b/pkg/common/db/mysql_model/im_mysql_msg_model/chat_log_model.go @@ -11,45 +11,24 @@ import ( "Open_IM/pkg/common/db" pbMsg "Open_IM/pkg/proto/chat" "Open_IM/pkg/utils" - "database/sql" - "time" + "github.com/jinzhu/copier" ) -// ChatLog Chat information table structure -type ChatLog struct { - MsgId string `gorm:"primary_key"` // Chat history primary key ID - SendID string `gorm:"column:send_id"` // Send ID - RecvID string `gorm:"column:recv_id"` //Receive ID - SendTime time.Time `gorm:"column:send_time"` // Send time - SessionType int32 `gorm:"column:session_type"` // Session type - ContentType int32 `gorm:"column:content_type"` // Message content type - MsgFrom int32 `gorm:"column:msg_from"` // Source, user, system - Content string `gorm:"column:content"` // Chat content - SenderPlatformID int32 `gorm:"column:sender_platform_id"` //The sender's platform ID - Remark sql.NullString `gorm:"column:remark"` // remark -} - func InsertMessageToChatLog(msg pbMsg.MsgDataToMQ) error { dbConn, err := db.DB.MysqlDB.DefaultGormDB() if err != nil { return err } - chatLog := ChatLog{ - MsgId: msg.MsgData.ServerMsgID, - SendID: msg.MsgData.SendID, - SendTime: utils.UnixNanoSecondToTime(msg.MsgData.SendTime), - SessionType: msg.MsgData.SessionType, - ContentType: msg.MsgData.ContentType, - MsgFrom: msg.MsgData.MsgFrom, - Content: string(msg.MsgData.Content), - SenderPlatformID: msg.MsgData.SenderPlatformID, - } + chatLog := new(db.ChatLog) + copier.Copy(chatLog, msg.MsgData) switch msg.MsgData.SessionType { case constant.GroupChatType: chatLog.RecvID = msg.MsgData.GroupID case constant.SingleChatType: chatLog.RecvID = msg.MsgData.RecvID } - + chatLog.Content = string(msg.MsgData.Content) + chatLog.CreateTime = utils.UnixNanoSecondToTime(msg.MsgData.CreateTime) + chatLog.SendTime = utils.UnixNanoSecondToTime(msg.MsgData.SendTime) return dbConn.Table("chat_log").Create(chatLog).Error } From aa7b89115062a25eaeb8b4f3c33ed3593348c55e Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 20 Jan 2022 17:29:38 +0800 Subject: [PATCH 329/337] chat log model update --- pkg/utils/map.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/utils/map.go b/pkg/utils/map.go index 05712fe64..fc24cc87d 100644 --- a/pkg/utils/map.go +++ b/pkg/utils/map.go @@ -121,6 +121,9 @@ func GetSwitchFromOptions(Options map[string]bool, key string) (result bool) { } return false } -func SetSwitchFromOptions(Options map[string]bool, key string, value bool) { - Options[key] = value +func SetSwitchFromOptions(options map[string]bool, key string, value bool) { + if options == nil { + options = make(map[string]bool, 5) + } + options[key] = value } From f7ab90724e71d0aa0d0cb76a04e4d2d9043e7119 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 20 Jan 2022 18:04:24 +0800 Subject: [PATCH 330/337] msg test --- internal/rpc/msg/send_msg.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/rpc/msg/send_msg.go b/internal/rpc/msg/send_msg.go index d6e8c20a1..8b91a3c39 100644 --- a/internal/rpc/msg/send_msg.go +++ b/internal/rpc/msg/send_msg.go @@ -210,7 +210,7 @@ func modifyMessageByUserMessageReceiveOpt(userID, sourceID string, sessionType i conversationID := utils.GetConversationIDBySessionType(sourceID, sessionType) opt, err := db.DB.GetSingleConversationMsgOpt(userID, conversationID) if err != nil || err != redis.ErrNil { - log.NewError(pb.OperationID, "GetSingleConversationMsgOpt from redis err", pb.String()) + log.NewError(pb.OperationID, "GetSingleConversationMsgOpt from redis err", conversationID, pb.String(), err.Error()) return true } switch opt { From cd7efee49c550cf824707ed472057b15da5428a5 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 20 Jan 2022 18:28:45 +0800 Subject: [PATCH 331/337] msg test --- pkg/common/db/mysql_model/im_mysql_msg_model/chat_log_model.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/db/mysql_model/im_mysql_msg_model/chat_log_model.go b/pkg/common/db/mysql_model/im_mysql_msg_model/chat_log_model.go index 58f60b0c0..8455e3885 100644 --- a/pkg/common/db/mysql_model/im_mysql_msg_model/chat_log_model.go +++ b/pkg/common/db/mysql_model/im_mysql_msg_model/chat_log_model.go @@ -30,5 +30,5 @@ func InsertMessageToChatLog(msg pbMsg.MsgDataToMQ) error { chatLog.Content = string(msg.MsgData.Content) chatLog.CreateTime = utils.UnixNanoSecondToTime(msg.MsgData.CreateTime) chatLog.SendTime = utils.UnixNanoSecondToTime(msg.MsgData.SendTime) - return dbConn.Table("chat_log").Create(chatLog).Error + return dbConn.Table("chat_logs").Create(chatLog).Error } From cbed698a1c50e11af1a00806e5bbfc9998fcda1c Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 20 Jan 2022 18:36:30 +0800 Subject: [PATCH 332/337] msg test --- internal/rpc/msg/pull_message.go | 4 ++-- pkg/common/db/mongoModel.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/rpc/msg/pull_message.go b/internal/rpc/msg/pull_message.go index d4b8ec0e6..05f1dad39 100644 --- a/internal/rpc/msg/pull_message.go +++ b/internal/rpc/msg/pull_message.go @@ -39,10 +39,10 @@ func (rpc *rpcChat) GetMaxAndMinSeq(_ context.Context, in *pbMsg.GetMaxAndMinSeq func (rpc *rpcChat) PullMessageBySeqList(_ context.Context, in *open_im_sdk.PullMessageBySeqListReq) (*open_im_sdk.PullMessageBySeqListResp, error) { log.NewInfo(in.OperationID, "rpc PullMessageBySeqList is arriving", in.String()) resp := new(open_im_sdk.PullMessageBySeqListResp) - msgList, err := commonDB.DB.GetMsgBySeqList(in.UserID, in.SeqList) + msgList, err := commonDB.DB.GetMsgBySeqList(in.UserID, in.SeqList, in.OperationID) if err != nil { log.ErrorByKv("PullMessageBySeqList data error", in.OperationID, in.String()) - resp.ErrCode = 1 + resp.ErrCode = 201 resp.ErrMsg = err.Error() return resp, nil } diff --git a/pkg/common/db/mongoModel.go b/pkg/common/db/mongoModel.go index 6538d17f4..1ea86d004 100644 --- a/pkg/common/db/mongoModel.go +++ b/pkg/common/db/mongoModel.go @@ -61,7 +61,7 @@ func (d *DataBases) GetMinSeqFromMongo(uid string) (MinSeq uint32, err error) { } return MinSeq, nil } -func (d *DataBases) GetMsgBySeqList(uid string, seqList []uint32) (seqMsg []*open_im_sdk.MsgData, err error) { +func (d *DataBases) GetMsgBySeqList(uid string, seqList []uint32, operationID string) (seqMsg []*open_im_sdk.MsgData, err error) { var hasSeqList []uint32 singleCount := 0 session := d.mgoSession.Clone() @@ -86,14 +86,14 @@ func (d *DataBases) GetMsgBySeqList(uid string, seqList []uint32) (seqMsg []*ope sChat := UserChat{} for seqUid, value := range m { if err = c.Find(bson.M{"uid": seqUid}).One(&sChat); err != nil { - log.NewError("", "not find seqUid", seqUid, value, uid, seqList) + log.NewError(operationID, "not find seqUid", seqUid, value, uid, seqList, err.Error()) continue } singleCount = 0 for i := 0; i < len(sChat.Msg); i++ { msg := new(open_im_sdk.MsgData) if err = proto.Unmarshal(sChat.Msg[i].Msg, msg); err != nil { - log.NewError("", "not find seqUid", seqUid, value, uid, seqList) + log.NewError(operationID, "Unmarshal err", seqUid, value, uid, seqList, err.Error()) return nil, err } if isContainInt32(msg.Seq, value) { From 64f2fb9e734567a9d13066c773c82b9dac11733b Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 20 Jan 2022 18:38:20 +0800 Subject: [PATCH 333/337] msg test --- pkg/common/db/mongoModel.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/db/mongoModel.go b/pkg/common/db/mongoModel.go index 1ea86d004..98318dd65 100644 --- a/pkg/common/db/mongoModel.go +++ b/pkg/common/db/mongoModel.go @@ -142,7 +142,7 @@ func (d *DataBases) SaveUserChat(uid string, sendTime int64, m *pbMsg.MsgDataToD log.NewDebug("", "find mgo uid cost time", getCurrentTimestampByMill()-newTime) sMsg := MsgInfo{} sMsg.SendTime = sendTime - if sMsg.Msg, err = proto.Marshal(m); err != nil { + if sMsg.Msg, err = proto.Marshal(m.MsgData); err != nil { return err } if n == 0 { From 5a9f3f1f5e6fa93c7d873c54f55bdb3c78d5a3d5 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 20 Jan 2022 19:20:56 +0800 Subject: [PATCH 334/337] msg test --- .../db/mysql_model/im_mysql_msg_model/chat_log_model.go | 4 ++-- pkg/utils/time_format.go | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/pkg/common/db/mysql_model/im_mysql_msg_model/chat_log_model.go b/pkg/common/db/mysql_model/im_mysql_msg_model/chat_log_model.go index 8455e3885..96d03a7c7 100644 --- a/pkg/common/db/mysql_model/im_mysql_msg_model/chat_log_model.go +++ b/pkg/common/db/mysql_model/im_mysql_msg_model/chat_log_model.go @@ -28,7 +28,7 @@ func InsertMessageToChatLog(msg pbMsg.MsgDataToMQ) error { chatLog.RecvID = msg.MsgData.RecvID } chatLog.Content = string(msg.MsgData.Content) - chatLog.CreateTime = utils.UnixNanoSecondToTime(msg.MsgData.CreateTime) - chatLog.SendTime = utils.UnixNanoSecondToTime(msg.MsgData.SendTime) + chatLog.CreateTime = utils.UnixMillSecondToTime(msg.MsgData.CreateTime) + chatLog.SendTime = utils.UnixMillSecondToTime(msg.MsgData.SendTime) return dbConn.Table("chat_logs").Create(chatLog).Error } diff --git a/pkg/utils/time_format.go b/pkg/utils/time_format.go index 3accd0567..0587db531 100644 --- a/pkg/utils/time_format.go +++ b/pkg/utils/time_format.go @@ -30,6 +30,11 @@ func UnixSecondToTime(second int64) time.Time { func UnixNanoSecondToTime(nanoSecond int64) time.Time { return time.Unix(0, nanoSecond) } +func UnixMillSecondToTime(millSecond int64) time.Time { + sec := millSecond / 1000 + msec := millSecond % 1000 + return time.Unix(sec, msec*int64(time.Millisecond)) +} //Get the current timestamp by Nano func GetCurrentTimestampByNano() int64 { From 8e105336811a9982c85e7205ff8a02c2aaab4085 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 20 Jan 2022 19:23:20 +0800 Subject: [PATCH 335/337] msg test --- pkg/utils/time_format.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/utils/time_format.go b/pkg/utils/time_format.go index 0587db531..b24d11398 100644 --- a/pkg/utils/time_format.go +++ b/pkg/utils/time_format.go @@ -31,9 +31,7 @@ func UnixNanoSecondToTime(nanoSecond int64) time.Time { return time.Unix(0, nanoSecond) } func UnixMillSecondToTime(millSecond int64) time.Time { - sec := millSecond / 1000 - msec := millSecond % 1000 - return time.Unix(sec, msec*int64(time.Millisecond)) + return time.Unix(0, millSecond*1e6) } //Get the current timestamp by Nano From 1944b24fba7b9b5d2c2381adfd02a318b3ba22b3 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Fri, 21 Jan 2022 09:39:09 +0800 Subject: [PATCH 336/337] push message modify --- internal/msg_gateway/gate/rpc_server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/msg_gateway/gate/rpc_server.go b/internal/msg_gateway/gate/rpc_server.go index 450cb1c73..240934d3b 100644 --- a/internal/msg_gateway/gate/rpc_server.go +++ b/internal/msg_gateway/gate/rpc_server.go @@ -94,8 +94,8 @@ func (r *RPCServer) OnlinePushMsg(_ context.Context, in *pbRelay.OnlinePushMsgRe } //Single chat sender synchronization message if in.MsgData.GetSessionType() == constant.SingleChatType { - for k, v := range ws.getSingleUserAllConn(recvID) { - _ = sendMsgToUser(v, replyBytes.Bytes(), in, k, recvID) + for k, v := range ws.getSingleUserAllConn(in.MsgData.SendID) { + _ = sendMsgToUser(v, replyBytes.Bytes(), in, k, in.MsgData.SendID) } } if !tag { From 8525dcb376e8efc0d4e1ebda3c3803f40740df4e Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Mon, 24 Jan 2022 16:44:14 +0800 Subject: [PATCH 337/337] fix time convert --- internal/rpc/user/user.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index a0c451026..147bf2d86 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -80,6 +80,7 @@ func (s *userServer) GetUserInfo(ctx context.Context, req *pbUser.GetUserInfoReq continue } utils.CopyStructFields(&userInfo, user) + userInfo.Birth = uint32(user.Birth.Unix()) userInfoList = append(userInfoList, &userInfo) } } else {