You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Open-IM-Server/internal/rpc/msg/del_msg.go

24 lines
777 B

3 years ago
package msg
import (
3 years ago
"Open_IM/pkg/common/constant"
"Open_IM/pkg/common/db"
3 years ago
"Open_IM/pkg/common/log"
commonPb "Open_IM/pkg/proto/sdk_ws"
"Open_IM/pkg/utils"
"context"
)
func (rpc *rpcChat) DelMsgList(_ context.Context, req *commonPb.DelMsgListReq) (*commonPb.DelMsgListResp, error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
resp := &commonPb.DelMsgListResp{}
3 years ago
if err := db.DB.DelMsgLogic(req.UserID, req.SeqList, req.OperationID); err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "DelMsg failed", err.Error())
resp.ErrMsg = constant.ErrDB.ErrMsg
resp.ErrCode = constant.ErrDB.ErrCode
return resp, err
}
3 years ago
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
3 years ago
return resp, nil
}