From 87c64bdb2b54484a11023ae9f30e4bc50d8e23aa Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Fri, 5 Aug 2022 14:42:39 +0800 Subject: [PATCH] del conversation bug fix --- internal/api/msg/del_msg.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/api/msg/del_msg.go b/internal/api/msg/del_msg.go index 2ae84505f..f52bf83ea 100644 --- a/internal/api/msg/del_msg.go +++ b/internal/api/msg/del_msg.go @@ -79,7 +79,7 @@ func DelSuperGroupMsg(c *gin.Context) { resp api.DelSuperGroupMsgResp ) rpcReq := &rpc.DelSuperGroupMsgReq{} - utils.CopyStructFields(req, &req) + utils.CopyStructFields(rpcReq, &req) if err := c.BindJSON(&req); err != nil { c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return @@ -140,8 +140,8 @@ func DelSuperGroupMsg(c *gin.Context) { client := rpc.NewMsgClient(etcdConn) log.Info(req.OperationID, "", "api DelSuperGroupMsg call, api call rpc...") - if req.IsAllDelete { - RpcResp, err := client.DelSuperGroupMsg(context.Background(),rpcReq) + if req.IsAllDelete { + RpcResp, err := client.DelSuperGroupMsg(context.Background(), rpcReq) if err != nil { log.NewError(req.OperationID, "call delete DelSuperGroupMsg rpc server failed", err.Error()) c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "call DelSuperGroupMsg rpc server failed"}) @@ -152,7 +152,7 @@ func DelSuperGroupMsg(c *gin.Context) { resp.ErrMsg = RpcResp.ErrMsg log.NewInfo(req.OperationID, utils.GetSelfFuncName(), resp) c.JSON(http.StatusOK, resp) - }else{ + } else { RpcResp, err := client.SendMsg(context.Background(), &pbData) if err != nil { log.NewError(req.OperationID, "call delete UserSendMsg rpc server failed", err.Error())