fix(export): retain the last msg id. close #89

This commit is contained in:
iyear 2023-01-25 12:49:49 +08:00
parent fcb034b1cf
commit 48e952d7cb

View File

@ -58,10 +58,10 @@ func Export(ctx context.Context, chat string, from, to int, output string, _time
builder := query.Messages(c.API()).GetHistory(peer.InputPeer()).BatchSize(batchSize)
if _time {
builder = builder.OffsetDate(to)
builder = builder.OffsetDate(to + 1)
}
if _msg {
builder = builder.OffsetID(to)
builder = builder.OffsetID(to + 1) // #89: retain the last msg id
}
iter := builder.Iter()