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.
30 lines
802 B
30 lines
802 B
package msg
|
|
|
|
import (
|
|
"Open_IM/pkg/common/constant"
|
|
"Open_IM/pkg/common/log"
|
|
commonPb "Open_IM/pkg/proto/sdk_ws"
|
|
"Open_IM/pkg/utils"
|
|
"context"
|
|
"time"
|
|
)
|
|
|
|
func (rpc *rpcChat) DelMsgList(_ context.Context, req *commonPb.DelMsgListReq) (*commonPb.DelMsgListResp, error) {
|
|
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
|
|
resp := &commonPb.DelMsgListResp{}
|
|
select {
|
|
case rpc.delMsgCh <- deleteMsg{
|
|
UserID: req.UserID,
|
|
OpUserID: req.OpUserID,
|
|
SeqList: req.SeqList,
|
|
OperationID: req.OperationID,
|
|
}:
|
|
case <-time.After(1 * time.Second):
|
|
resp.ErrCode = constant.ErrSendLimit.ErrCode
|
|
resp.ErrMsg = constant.ErrSendLimit.ErrMsg
|
|
return resp, nil
|
|
}
|
|
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String())
|
|
return resp, nil
|
|
}
|