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 710200cd2..0d2b5dae6 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, 0x96, 0x64, 0xa7, 0x89, 0x8f, 0x56, 0x6f, 0xd1, - 0x7b, 0x38, 0x70, 0x95, 0x82, 0xd8, 0x30, 0x14, 0xc2, 0x73, 0x16, 0x58, 0xc6, 0xa2, 0xf7, 0x70, - 0xe4, 0x56, 0xb2, 0xf3, 0x1b, 0xcc, 0x9f, 0x62, 0x7e, 0x2e, 0x8c, 0xb2, 0x55, 0xbc, 0x49, 0x5c, - 0x7c, 0x43, 0x66, 0x60, 0xbe, 0xa5, 0xbe, 0x30, 0x34, 0x72, 0xf9, 0x23, 0x59, 0xc0, 0xf8, 0x45, - 0x8a, 0x99, 0x97, 0xd3, 0x24, 0x5e, 0x9d, 0x15, 0x56, 0x74, 0x15, 0x39, 0x82, 0xc1, 0x45, 0xf2, - 0x1a, 0x63, 0xcb, 0x14, 0xef, 0xa4, 0xe0, 0x5c, 0x6b, 0xe6, 0xa5, 0xf5, 0x5d, 0xbc, 0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b, 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, 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, 0xb3, 0x12, 0x88, 0x33, + 0x03, 0x08, 0xb9, 0xc2, 0x17, 0xd0, 0x9a,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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, } 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, 0xdc, 0x7c, 0x51, 0xea, 0xaf, - 0xfa, 0x14, 0xf1, 0x10, 0xa4, 0x54, 0x20, 0x15, 0x2a, 0x44, 0x9b, 0x5b, 0xb7, 0xd0, 0x94, 0x3a, - 0xe9, 0x4b, 0x25, 0x54, 0xdc, 0xf5, 0xec, 0xe2, 0x66, 0xd7, 0xf6, 0xda, 0x5e, 0xda, 0x4a, 0x08, - 0x09, 0xa9, 0xa8, 0x48, 0x3c, 0x22, 0x21, 0xf1, 0xc6, 0x03, 0x82, 0x37, 0x24, 0x5e, 0xe0, 0x5f, - 0xe1, 0xbf, 0x01, 0xcd, 0xd5, 0xe3, 0x6b, 0xa2, 0x45, 0x94, 0x97, 0x95, 0xcf, 0x99, 0x33, 0x33, - 0x67, 0x7e, 0x73, 0xce, 0x6f, 0xce, 0xcc, 0xc2, 0xca, 0x20, 0x0a, 0x26, 0xe1, 0x9b, 0xf4, 0x77, - 0x27, 0x8c,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0xb8, 0x5a, - 0x31, 0xf8, 0xe3, 0x7d, 0x27, 0x71, 0x1e, 0x93, 0x91, 0xd0, 0x22, 0x34, 0xe4, 0xe8, 0x8d, 0xee, - 0x3e, 0x59, 0xff, 0x11, 0xc7, 0x9f, 0x8d, 0x29, 0x44, 0xb4, 0x09, 0x70, 0x18, 0x05, 0x23, 0xee, - 0x0f, 0xc3, 0x57, 0xd1, 0x10, 0x6f, 0x4f, 0x83, 0x6c, 0x58, 0x09, 0x19, 0x21, 0xd0, 0x0f, 0x87, - 0xce, 0x80, 0x42, 0xda, 0xb2, 0xe9, 0x37, 0x19, 0xcf, 0xc6, 0xe3, 0x09, 0x8e, 0x13, 0x12, 0x3f, - 0x0c, 0x54, 0x45, 0x43, 0xda, 0xef, 0x38, 0xbe, 0x3b, 0xc4, 0x2e, 0x69, 0x67, 0xc0, 0x2a, 0x1a, - 0xe2, 0xe9, 0x2d, 0xd7, 0x3d, 0xf5, 0x46, 0x98, 0xc2, 0xda, 0xb4, 0x85, 0x88, 0xde, 0x80, 0x65, - 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, 0xd2, 0x76, 0x8c, 0x9f, 0xb1, 0x36, 0x96, 0x16, - 0x52, 0xce, 0xa7, 0xa9, 0x5e, 0x48, 0xd3, 0x4c, 0x92, 0xb7, 0x72, 0xf4, 0x70, 0x17, 0xd6, 0xcb, - 0x1c, 0x9d, 0xaa, 0x72, 0xf8, 0x4e, 0x83, 0xf9, 0xbb, 0x81, 0xe7, 0xcb, 0xba, 0xa1, 0x9a, 0x69, - 0x0d, 0x98, 0x19, 0xe1, 0x38, 0x76, 0x06, 0x82, 0x67, 0x85, 0x98, 0x72, 0x60, 0x33, 0xc7, 0x81, - 0x7f, 0x63, 0x91, 0xdf, 0xe8, 0x70, 0x25, 0xbf, 0x63, 0x64, 0x8d, 0x81, 0x1f, 0x63, 0x7e, 0x10, - 0xaa, 0xa3, 0x6b, 0xf5, 0xa3, 0x37, 0x72, 0x3c, 0xa9, 0x6c, 0x69, 0xb3, 0x8e, 0xcf, 0xf4,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xd5, 0xfa, 0x57, 0x07, 0x32, 0xa0, 0x75, 0x9e, - 0x49, 0x1c, 0xa2, 0x07, 0x80, 0x92, 0xc2, 0x45, 0x1f, 0x6d, 0xf0, 0x9e, 0xa5, 0x8f, 0x15, 0xe6, - 0x7f, 0x6b, 0x5a, 0xe3, 0x10, 0xf5, 0xc0, 0x18, 0x54, 0x5c, 0xa4, 0x90, 0x95, 0xf9, 0x7b, 0xa0, - 0xf4, 0xda, 0x6d, 0xfe, 0xef, 0x5c, 0x1b, 0xe6, 0xf7, 0xa0, 0x50, 0xde, 0x49, 0xbf, 0x4b, 0x6b, - 0x56, 0xe9, 0x77, 0x45, 0x5d, 0x78, 0x0a, 0xab, 0x83, 0x62, 0x95, 0x83, 0xca, 0x7b, 0xc9, 0x7d, - 0xdf, 0xac, 0x6b, 0x8e, 0x43, 0x74, 0x07, 0x96, 0xce, 0xb2, 0x07, 0x34, 0x12, 0xff, 0x91, 0x14, - 0x2b, 0x19, 0xd3, 0xac, 0x6a, 0x92, 0x4b, 0xce, 0x1d, 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, 0xfb, 0x51, 0x30, 0x0e, 0x77, 0xd8, 0xef, 0x76, 0x18, + 0x05, 0x71, 0x80, 0x9a, 0x6c, 0x61, 0xdc, 0x39, 0x0d, 0xb1, 0x7f, 0xde, 0x39, 0xde, 0x09, 0x07, + 0xfd, 0x1d, 0xc6, 0xd9, 0x21, 0xce, 0xe0, 0xfc, 0x82, 0xec, 0x5c, 0x10, 0x2e, 0x69, 0x7e, 0x08, + 0xb0, 0x1f, 0x0c, 0x87, 0x81, 0x6f, 0x61, 0x12, 0x22, 0x1d, 0xae, 0x1d, 0x46, 0xd1, 0x7e, 0xe0, + 0x60, 0x5d, 0xdb, 0xd4, 0xb6, 0x9a, 0x56, 0xb2, 0x44, 0xeb, 0x30, 0x77, 0x18, 0x45, 0xc7, 0xa4, + 0xaf, 0xd7, 0x36, 0xb5, 0xad, 0x96, 0x25, 0x56, 0xe6, 0x23, 0x40, 0x4f, 0xa8, 0xae,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x2f, 0x73, 0x99, 0xe8, 0x3d, 0x11, 0x34, 0x1a, 0x51, 0x16, 0x93, 0x85, + 0xdd, 0xf5, 0xed, 0x80, 0xe6, 0x90, 0x3b, 0x3c, 0x27, 0xce, 0x60, 0x3b, 0xe5, 0x5a, 0x13, 0x41, + 0x33, 0x82, 0x95, 0x27, 0x38, 0x66, 0x6b, 0xc2, 0x78, 0x78, 0x44, 0x9d, 0xe5, 0x02, 0x07, 0xe9, + 0xf5, 0xb5, 0x2c, 0x99, 0xa4, 0x86, 0xa3, 0x56, 0x1d, 0x8e, 0x7a, 0x36, 0x1c, 0xe6, 0xb7, 0x1a, + 0xac, 0x2a, 0x4a, 0x2f, 0xe5, 0xf1, 0x43, 0x58, 0x4a, 0x1d, 0x61, 0x96, 0xd6, 0x59, 0xa2, 0x95, + 0x79, 0x9d, 0x15, 0x36, 0x7f, 0xd3, 0xa0, 0x7d, 0x26, 0xac, 0x48, 0x3c, 0xcf, 0xc4, 0x50, 0x9b, + 0x31, 0x86, 0x19, 0x5f, 0x6b, 0x95, 0x57, 0x5f, 0x57, 0xaf, 0x5e, 0x8d, 0x64, 0x23, 0x17, 0x49, + 0xf3, 0x4b, 0x30, 0x92, 0x60, 0xed, 0x85, 0xa1, 0x27, 0xb2, 0x97, 0xba, 0x40, 0x2d, 0x96, 0x75, + 0x6b, 0x8a, 0xee, 0xe9, 0xb7, 0x34, 0xc5, 0x3a, 0xf3, 0x97, 0x06, 0xdc, 0x29, 0x51, 0x7e, 0x7e, + 0x60, 0xc7, 0xf6, 0x39, 0x95, 0x43, 0xcb, 0x50, 0x4b, 0xb5, 0xd7, 0x3a, 0x07, 0xf4, 0x26, 0x45, + 0xb2, 0x08, 0x9d, 0xc9, 0x72, 0x6a, 0x34, 0x0c, 0x98, 0xef, 0x06, 0x82, 0xcb, 0x43, 0x91, 0xae, + 0x29, 0xfc, 0x1c, 0x79, 0x76, 0x9f, 0xd5, 0x6a, 0xd3, 0x62, 0xff, 0xe9, 0x79, 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 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 48480cfa1..4e7bd82bc 100644 --- a/pkg/proto/sdk_ws/ws.pb.go +++ b/pkg/proto/sdk_ws/ws.pb.go @@ -19,12 +19,10 @@ var _ = math.Inf const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package 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"` + 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -34,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_9a4768ae4ab79d99, []int{0} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{0} } func (m *PullMessageBySeqListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListResp.Unmarshal(m, b) @@ -54,20 +52,6 @@ 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 @@ -97,9 +81,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 []int64 `protobuf:"varint,1,rep,packed,name=seqList" json:"seqList,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -109,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_9a4768ae4ab79d99, []int{1} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{1} } func (m *PullMessageBySeqListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PullMessageBySeqListReq.Unmarshal(m, b) @@ -129,20 +111,6 @@ 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 @@ -160,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_9a4768ae4ab79d99, []int{2} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{2} } func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) @@ -192,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_9a4768ae4ab79d99, []int{3} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{3} } func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) @@ -230,17 +198,17 @@ 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:"-"` + 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_ws_9a4768ae4ab79d99, []int{4} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{4} } func (m *GatherFormat) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GatherFormat.Unmarshal(m, b) @@ -267,13 +235,269 @@ func (m *GatherFormat) GetID() string { return "" } -func (m *GatherFormat) GetList() []*MsgData { +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_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"` @@ -287,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_9a4768ae4ab79d99, []int{5} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{7} } func (m *UserSendMsgResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserSendMsgResp.Unmarshal(m, b) @@ -356,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_9a4768ae4ab79d99, []int{6} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{8} } func (m *MsgData) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MsgData.Unmarshal(m, b) @@ -517,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_9a4768ae4ab79d99, []int{7} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{9} } func (m *OfflinePushInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_OfflinePushInfo.Unmarshal(m, b) @@ -591,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_9a4768ae4ab79d99, []int{8} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{10} } func (m *GroupInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfo.Unmarshal(m, b) @@ -685,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_9a4768ae4ab79d99, []int{9} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{11} } func (m *GroupMemberFullInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupMemberFullInfo.Unmarshal(m, b) @@ -772,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_9a4768ae4ab79d99, []int{10} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{12} } func (m *UserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserInfo.Unmarshal(m, b) @@ -856,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_9a4768ae4ab79d99, []int{11} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{13} } func (m *PublicUserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_PublicUserInfo.Unmarshal(m, b) @@ -916,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_9a4768ae4ab79d99, []int{12} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{14} } func (m *TipsComm) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TipsComm.Unmarshal(m, b) @@ -965,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_9a4768ae4ab79d99, []int{13} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{15} } func (m *MemberEnterTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberEnterTips.Unmarshal(m, b) @@ -1020,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_9a4768ae4ab79d99, []int{14} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{16} } func (m *MemberLeaveTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberLeaveTips.Unmarshal(m, b) @@ -1075,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_9a4768ae4ab79d99, []int{15} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{17} } func (m *MemberInvitedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInvitedTips.Unmarshal(m, b) @@ -1137,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_9a4768ae4ab79d99, []int{16} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{18} } func (m *MemberKickedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberKickedTips.Unmarshal(m, b) @@ -1200,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_9a4768ae4ab79d99, []int{17} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{19} } func (m *MemberInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MemberInfoChangedTips.Unmarshal(m, b) @@ -1269,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_9a4768ae4ab79d99, []int{18} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{20} } func (m *GroupCreatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupCreatedTips.Unmarshal(m, b) @@ -1330,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_9a4768ae4ab79d99, []int{19} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{21} } func (m *GroupInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GroupInfoChangedTips.Unmarshal(m, b) @@ -1384,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_9a4768ae4ab79d99, []int{20} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{22} } func (m *ReceiveJoinApplicationTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ReceiveJoinApplicationTips.Unmarshal(m, b) @@ -1439,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_9a4768ae4ab79d99, []int{21} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{23} } func (m *ApplicationProcessedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ApplicationProcessedTips.Unmarshal(m, b) @@ -1502,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_9a4768ae4ab79d99, []int{22} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{24} } func (m *FriendInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfo.Unmarshal(m, b) @@ -1563,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_9a4768ae4ab79d99, []int{23} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{25} } func (m *FriendApplication) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplication.Unmarshal(m, b) @@ -1619,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_9a4768ae4ab79d99, []int{24} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{26} } func (m *FriendApplicationAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationAddedTips.Unmarshal(m, b) @@ -1682,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_9a4768ae4ab79d99, []int{25} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{27} } func (m *FriendApplicationProcessedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendApplicationProcessedTips.Unmarshal(m, b) @@ -1742,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_9a4768ae4ab79d99, []int{26} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{28} } func (m *FriendAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendAddedTips.Unmarshal(m, b) @@ -1788,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_9a4768ae4ab79d99, []int{27} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{29} } func (m *FriendDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendDeletedTips.Unmarshal(m, b) @@ -1835,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_9a4768ae4ab79d99, []int{28} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{30} } func (m *BlackInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackInfo.Unmarshal(m, b) @@ -1888,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_9a4768ae4ab79d99, []int{29} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{31} } func (m *BlackAddedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackAddedTips.Unmarshal(m, b) @@ -1934,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_9a4768ae4ab79d99, []int{30} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{32} } func (m *BlackDeletedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_BlackDeletedTips.Unmarshal(m, b) @@ -1981,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_9a4768ae4ab79d99, []int{31} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{33} } func (m *FriendInfoChangedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_FriendInfoChangedTips.Unmarshal(m, b) @@ -2036,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_9a4768ae4ab79d99, []int{32} + return fileDescriptor_ws_ca4877c90b77c1e9, []int{34} } func (m *SelfInfoUpdatedTips) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SelfInfoUpdatedTips.Unmarshal(m, b) @@ -2083,6 +2307,9 @@ 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") @@ -2114,114 +2341,124 @@ func init() { proto.RegisterType((*SelfInfoUpdatedTips)(nil), "open_im_sdk.SelfInfoUpdatedTips") } -func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_9a4768ae4ab79d99) } +func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_ca4877c90b77c1e9) } -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, 0x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 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, - 0x81, 0x23, 0x7b, 0x36, 0x83, 0xf1, 0xf6, 0x71, 0xdb, 0x9d, 0x2d, 0xdb, 0xe9, 0x93, 0xed, 0x70, - 0x14, 0x44, 0xd8, 0xb6, 0xb3, 0x56, 0x16, 0x34, 0xbf, 0xcc, 0x41, 0x79, 0x0f, 0x07, 0x81, 0x73, - 0x32, 0x60, 0x66, 0x4f, 0x0e, 0x89, 0x60, 0x15, 0x8b, 0xbc, 0xdc, 0xf8, 0x88, 0xfd, 0x2a, 0xc8, - 0xa5, 0x00, 0xe7, 0xf3, 0x34, 0x8c, 0xdc, 0x9e, 0xdb, 0xc5, 0xf5, 0x26, 0xa9, 0x66, 0x30, 0xae, - 0xd3, 0x0c, 0x22, 0x1a, 0x3a, 0xa3, 0x2e, 0xea, 0x48, 0xce, 0x2a, 0xc6, 0xfd, 0x63, 0x5f, 0x53, - 0x4f, 0x0e, 0x59, 0x2c, 0xea, 0xef, 0x40, 0xb1, 0xfd, 0x3c, 0x20, 0x14, 0xa7, 0xaa, 0xb2, 0xf6, - 0x7a, 0xa6, 0x76, 0x07, 0xa3, 0x63, 0xcf, 0xed, 0xf2,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, 0x6e, 0xcd, 0x06, 0xf1, 0x48, 0xf4, 0x72, 0x7d, 0x7d, 0xa3, 0x41, 0x79, 0xcb, - 0xb3, 0xbb, 0x03, 0x1c, 0xdc, 0x8d, 0xc9, 0xc1, 0xbd, 0x7c, 0x9f, 0xa5, 0xe3, 0x7b, 0xd5, 0x98, - 0x6e, 0x48, 0x3f, 0xca, 0x94, 0x5e, 0x7e, 0x74, 0xa2, 0x6d, 0x3a, 0x30, 0x8f, 0x42, 0x9a, 0xf8, - 0x07, 0x50, 0x44, 0xe4, 0xc2, 0x3d, 0x98, 0x84, 0x63, 0x09, 0xa5, 0x29, 0x33, 0xd1, 0x83, 0x45, - 0x54, 0x57, 0x93, 0xfe, 0x32, 0xfc, 0x7c, 0xab, 0xc1, 0x9d, 0xb4, 0x5c, 0xea, 0x4b, 0xf2, 0xda, - 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, +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,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7a, 0x0a, 0x1b, 0x6a, 0x59, 0x91, 0x6e, 0x63, + 0xf6, 0x5e, 0xce, 0x04, 0x3e, 0x9a, 0xf7, 0xa1, 0x39, 0x73, 0xc3, 0xa9, 0x28, 0x6b, 0xd3, 0x11, + 0xc2, 0xd3, 0xda, 0x97, 0x86, 0x7d, 0x05, 0x5b, 0x5a, 0x87, 0xf8, 0x64, 0x9e, 0xe9, 0x46, 0x95, + 0xe9, 0x73, 0x21, 0xd5, 0x2a, 0x21, 0x21, 0xbf, 0x79, 0xce, 0xef, 0xba, 0xe0, 0x77, 0x2e, 0xdb, + 0x7f, 0x6e, 0x52, 0x75, 0xbb, 0x6e, 0xe6, 0x62, 0xb1, 0xb8, 0x36, 0xc1, 0xbc, 0x98, 0xe0, 0x54, + 0x9b, 0xe0, 0xb4, 0x98, 0xe0, 0x11, 0x6e, 0xbb, 0x5e, 0x57, 0xb6, 0x3e, 0x17, 0x31, 0x26, 0x4f, + 0x89, 0xa9, 0x21, 0x62, 0x52, 0x20, 0xd4, 0xe0, 0xd5, 0x09, 0x56, 0x20, 0x9c, 0x3c, 0x3e, 0x3f, + 0x79, 0xa2, 0xff, 0x15, 0x1c, 0x29, 0xcb, 0x75, 0xca, 0xae, 0x09, 0xca, 0xf2, 0x0a, 0x65, 0xb9, + 0x46, 0x59, 0xc1, 0x0a, 0x1d, 0x14, 0xb1, 0x95, 0x94, 0x14, 0xe3, 0xae, 0x42, 0x98, 0x79, 0x24, + 0x29, 0x09, 0x82, 0x92, 0x51, 0x49, 0x49, 0x4f, 0xa1, 0x64, 0x47, 0xd8, 0x2a, 0x10, 0xda, 0x4a, + 0x91, 0x66, 0x7a, 0xc3, 0xc9, 0x45, 0x24, 0xe5, 0xb0, 0x20, 0xe5, 0x1d, 0x41, 0xca, 0x02, 0x40, + 0x22, 0x71, 0x76, 0x65, 0x6d, 0x8a, 0xbd, 0xc5, 0xc5, 0xde, 0x2a, 0xfa, 0xba, 0xa5, 0xf7, 0x15, + 0xc7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 0x29, 0xfa, 0xf6, 0x05, 0xb4, 0x04, 0x24, 0xc3, 0xff, 0x64, 0x41, 0xf5, 0x45, + 0xe8, 0xe2, 0xb9, 0xea, 0xa9, 0xb6, 0xc8, 0xd3, 0xcf, 0x72, 0x6a, 0x76, 0x59, 0xc8, 0xb2, 0x0f, + 0xeb, 0xeb, 0xd7, 0x06, 0xb4, 0x8f, 0x42, 0xd7, 0x1b, 0xd3, 0xe0, 0x3e, 0xa9, 0x0e, 0xee, 0xf5, + 0xfb, 0xac, 0x1c, 0xdf, 0x9b, 0xc6, 0xf4, 0x89, 0xf4, 0xa3, 0x4c, 0xe9, 0xf5, 0x47, 0x17, 0xda, + 0xb6, 0x0f, 0x9b, 0x24, 0x94, 0x85, 0xff, 0x1c, 0x9a, 0x84, 0x2c, 0xdc, 0x83, 0x45, 0x3a, 0x8e, + 0x50, 0x5a, 0xb2, 0x12, 0x43, 0xd8, 0x26, 0x75, 0xb5, 0xe8, 0x1f, 0xc2, 0xcf, 0x6f, 0x0c, 0x78, + 0x50, 0xb6, 0x4b, 0xfd, 0x48, 0xae, 0xdc, 0xe2, 0x83, 0xb9, 0x05, 0xbf, 0xd4, 0xf8, 0x2c, 0x77, + 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, } diff --git a/pkg/proto/sdk_ws/ws.proto b/pkg/proto/sdk_ws/ws.proto index 8ee089fb6..05359cf21 100644 --- a/pkg/proto/sdk_ws/ws.proto +++ b/pkg/proto/sdk_ws/ws.proto @@ -115,6 +115,7 @@ message GroupInfo{ PublicUserInfo Owner = 6; uint64 CreateTime = 7; uint32 MemberCount = 8; + string Ext = 9; } @@ -138,6 +139,7 @@ message UserInfo{ string Mobile = 5; string Birth = 6; string Email = 7; + string Ext = 8; } //No permissions required