Skip to content

Commit

Permalink
chore(export): enhance robustness
Browse files Browse the repository at this point in the history
  • Loading branch information
iyear committed Nov 4, 2022
1 parent 74b845f commit facd471
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/chat/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ var cmdExport = &cobra.Command{
to = int(time.Now().Unix()) // it's also the latest message id(very big message id)
}

if from > to {
from, to = to, from
}

return chat.Export(cmd.Context(), _chat, from, to, output, _time, msg)
},
}
Expand Down

0 comments on commit facd471

Please sign in to comment.