mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-27 20:30:40 +08:00
RevokeMsg
This commit is contained in:
parent
2b14eae33d
commit
3bdeb29483
@ -201,18 +201,26 @@ func (m *MsgMongoDriver) GetMsgBySeqIndexIn1Doc(ctx context.Context, docID strin
|
|||||||
}
|
}
|
||||||
defer cursor.Close(ctx)
|
defer cursor.Close(ctx)
|
||||||
var doc table.MsgDocModel
|
var doc table.MsgDocModel
|
||||||
//i := 0
|
if cursor.Next(ctx) {
|
||||||
for cursor.Next(ctx) {
|
if err := cursor.Decode(&doc); err != nil {
|
||||||
err := cursor.Decode(&doc)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
//if i == 0 {
|
|
||||||
// break
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
////i := 0
|
||||||
|
//for cursor.Next(ctx) {
|
||||||
|
// err := cursor.Decode(&doc)
|
||||||
|
// if err != nil {
|
||||||
|
// return nil, err
|
||||||
|
// }
|
||||||
|
// //if i == 0 {
|
||||||
|
// // break
|
||||||
|
// //}
|
||||||
|
//}
|
||||||
log.ZDebug(ctx, "msgInfos", "num", len(doc.Msg), "docID", docID)
|
log.ZDebug(ctx, "msgInfos", "num", len(doc.Msg), "docID", docID)
|
||||||
for _, v := range doc.Msg {
|
for _, v := range doc.Msg {
|
||||||
|
if v.Msg == nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
if v.Msg.Seq >= beginSeq && v.Msg.Seq <= endSeq {
|
if v.Msg.Seq >= beginSeq && v.Msg.Seq <= endSeq {
|
||||||
log.ZDebug(ctx, "find msg", "msg", v.Msg)
|
log.ZDebug(ctx, "find msg", "msg", v.Msg)
|
||||||
msgs = append(msgs, v)
|
msgs = append(msgs, v)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user