mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-07 02:26:00 +08:00
superGroupMaxSeq
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
package msg
|
||||
|
||||
import (
|
||||
"Open_IM/pkg/common/constant"
|
||||
"Open_IM/pkg/common/db"
|
||||
"Open_IM/pkg/common/log"
|
||||
pbMsg "Open_IM/pkg/proto/msg"
|
||||
"Open_IM/pkg/utils"
|
||||
"context"
|
||||
goRedis "github.com/go-redis/redis/v8"
|
||||
)
|
||||
|
||||
func (rpc *rpcChat) SetSendMsgFailedFlag(_ context.Context, req pbMsg.SetSendMsgFailedFlagReq) (resp pbMsg.SetSendMsgFailedFlagResp, err error) {
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), req.String())
|
||||
if err := db.DB.SetSendMsgFailedFlag(req.OperationID); err != nil {
|
||||
resp.ErrCode = constant.ErrDB.ErrCode
|
||||
resp.ErrMsg = err.Error()
|
||||
return resp, nil
|
||||
}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), resp.String())
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (rpc *rpcChat) GetSendMsgStatus(_ context.Context, req pbMsg.GetSendMsgStatusReq) (resp pbMsg.GetSendMsgStatusResp, err error) {
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), req.String())
|
||||
if err := db.DB.GetSendMsgStatus(req.OperationID); err != nil {
|
||||
if err == goRedis.Nil {
|
||||
resp.Status = 0
|
||||
return
|
||||
} else {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error())
|
||||
resp.ErrMsg = err.Error()
|
||||
resp.ErrCode = constant.ErrDB.ErrCode
|
||||
return
|
||||
}
|
||||
}
|
||||
resp.Status = 1
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), resp.String())
|
||||
return resp, nil
|
||||
}
|
||||
@@ -43,6 +43,7 @@ func (rpc *rpcChat) GetMaxAndMinSeq(_ context.Context, in *open_im_sdk.GetMaxAnd
|
||||
resp.GroupMaxAndMinSeq = m
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func (rpc *rpcChat) PullMessageBySeqList(_ context.Context, in *open_im_sdk.PullMessageBySeqListReq) (*open_im_sdk.PullMessageBySeqListResp, error) {
|
||||
log.NewInfo(in.OperationID, "rpc PullMessageBySeqList is arriving", in.String())
|
||||
resp := new(open_im_sdk.PullMessageBySeqListResp)
|
||||
|
||||
Reference in New Issue
Block a user