diff --git a/pkg/common/db/unrelation/msg.go b/pkg/common/db/unrelation/msg.go index 5d26d45b2..f0fa9d25a 100644 --- a/pkg/common/db/unrelation/msg.go +++ b/pkg/common/db/unrelation/msg.go @@ -1196,5 +1196,7 @@ func (m *MsgMongoDriver) searchMessage(ctx context.Context, req *msg.SearchMessa msgs = append(msgs, msg) } } + start := (req.Pagination.PageNumber - 1) * req.Pagination.ShowNumber + msgs = msgs[start : start+req.Pagination.ShowNumber] return msgs, nil }