diff --git a/cmd/chat/export.go b/cmd/chat/export.go index f45db3cbd1..71b4d6f87d 100644 --- a/cmd/chat/export.go +++ b/cmd/chat/export.go @@ -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) }, }