|
|
@ -258,7 +258,7 @@ func CreateGroup(c *gin.Context) {
|
|
|
|
c.JSON(http.StatusOK, resp)
|
|
|
|
c.JSON(http.StatusOK, resp)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//my application 我发出去的
|
|
|
|
// 群主或管理员收到的
|
|
|
|
func GetGroupApplicationList(c *gin.Context) {
|
|
|
|
func GetGroupApplicationList(c *gin.Context) {
|
|
|
|
params := api.GetGroupApplicationListReq{}
|
|
|
|
params := api.GetGroupApplicationListReq{}
|
|
|
|
if err := c.BindJSON(¶ms); err != nil {
|
|
|
|
if err := c.BindJSON(¶ms); err != nil {
|
|
|
@ -279,16 +279,19 @@ func GetGroupApplicationList(c *gin.Context) {
|
|
|
|
|
|
|
|
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName)
|
|
|
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName)
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
client := rpc.NewGroupClient(etcdConn)
|
|
|
|
|
|
|
|
|
|
|
|
reply, err := client.GetGroupApplicationList(context.Background(), req)
|
|
|
|
reply, err := client.GetGroupApplicationList(context.Background(), req)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
log.NewError(req.OperationID, "GetGroupApplicationList failed ", err.Error(), req.String())
|
|
|
|
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()})
|
|
|
|
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": err.Error()})
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
resp := api.GetGroupApplicationListResp{CommResp: api.CommResp{ErrCode: reply.ErrCode, ErrMsg: reply.ErrMsg}, Data: reply.GroupRequestList}
|
|
|
|
resp := api.GetGroupApplicationListResp{CommResp: api.CommResp{ErrCode: reply.ErrCode, ErrMsg: reply.ErrMsg}, GroupRequestList: reply.GroupRequestList}
|
|
|
|
c.JSON(http.StatusOK, resp)
|
|
|
|
if len(resp.GroupRequestList) == 0 {
|
|
|
|
|
|
|
|
resp.GroupRequestList = []*open_im_sdk.GroupRequest{}
|
|
|
|
|
|
|
|
}
|
|
|
|
log.NewInfo(req.OperationID, "GetGroupApplicationList api return ", resp)
|
|
|
|
log.NewInfo(req.OperationID, "GetGroupApplicationList api return ", resp)
|
|
|
|
|
|
|
|
c.JSON(http.StatusOK, resp)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func GetGroupsInfo(c *gin.Context) {
|
|
|
|
func GetGroupsInfo(c *gin.Context) {
|
|
|
|