mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
msg
This commit is contained in:
parent
303e2c4ecc
commit
dd99f52355
@ -144,7 +144,8 @@ func (m *MsgMongoDriver) GetMsgBySeqIndexIn1Doc(ctx context.Context, docID strin
|
||||
bson.M{
|
||||
"$project": bson.M{
|
||||
"msgs": bson.M{
|
||||
"$slice": []interface{}{"$msgs", beginIndex, num},
|
||||
// "$slice": []interface{}{"$msgs", beginIndex, num},
|
||||
"$slice": bson.A{"$msgs", beginIndex, num},
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -155,7 +156,7 @@ func (m *MsgMongoDriver) GetMsgBySeqIndexIn1Doc(ctx context.Context, docID strin
|
||||
}
|
||||
log.ZDebug(ctx, "info", "beginIndex", beginIndex, "num", num)
|
||||
var msgInfos []*table.MsgInfoModel
|
||||
if err := cursor.Decode(&msgInfos); err != nil {
|
||||
if err := cursor.All(ctx, &msgInfos); err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
if len(msgInfos) < 1 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user