mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-08-22 21:29:51 +08:00
test cron
This commit is contained in:
parent
9326b10d3a
commit
741cfec1ec
@ -166,6 +166,10 @@ func checkMaxSeqWithMongo(operationID, ID string, diffusionType int) error {
|
||||
if err != nil {
|
||||
return utils.Wrap(err, "GetNewestMsg failed")
|
||||
}
|
||||
if msg == nil {
|
||||
log.NewInfo(operationID, "msg has del")
|
||||
return nil
|
||||
}
|
||||
msgPb := &server_api_params.MsgData{}
|
||||
err = proto.Unmarshal(msg.Msg, msgPb)
|
||||
if err != nil {
|
||||
|
@ -305,7 +305,7 @@ func (d *DataBases) ReplaceMsgToBlankByIndex(suffixID string, index int) error {
|
||||
msg.SendTime = 0
|
||||
}
|
||||
}
|
||||
_, err = c.UpdateOne(ctx, bson.M{"uid": suffixID}, userChat)
|
||||
_, err = c.UpdateOne(ctx, bson.M{"uid": suffixID}, bson.M{"$set": bson.M{"msg": userChat.Msg}})
|
||||
return err
|
||||
}
|
||||
|
||||
@ -329,7 +329,7 @@ func (d *DataBases) GetNewestMsg(ID string) (msg *MsgInfo, err error) {
|
||||
}
|
||||
return nil, errors.New("len(userChats[0].Msg) < 0")
|
||||
}
|
||||
return nil, errors.New("len(userChats) < 0")
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (d *DataBases) GetMsgBySeqListMongo2(uid string, seqList []uint32, operationID string) (seqMsg []*open_im_sdk.MsgData, err error) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user