mirror of
https://github.com/iyear/tdl
synced 2025-01-09 04:17:35 +08:00
fix(export): retain the last msg id. close #89
This commit is contained in:
parent
fcb034b1cf
commit
48e952d7cb
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user