From 4e77898487d7b3ccced6e10bb857c639ec8b4483 Mon Sep 17 00:00:00 2001 From: jeffser Date: Mon, 2 Sep 2024 16:16:27 -0600 Subject: [PATCH] Fixed export chat --- src/custom_widgets/chat_widget.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/custom_widgets/chat_widget.py b/src/custom_widgets/chat_widget.py index 78fdca7..2c34c5d 100644 --- a/src/custom_widgets/chat_widget.py +++ b/src/custom_widgets/chat_widget.py @@ -362,7 +362,7 @@ class chat_list(Gtk.ListBox): file = file_dialog.save_finish(result) if not file: return - json_data = json.dumps({chat_name: self.get_chat_by_name(chat_name).messages_to_dict()}, indent=4).encode("UTF-8") + json_data = json.dumps({chat_name: {"messages": self.get_chat_by_name(chat_name).messages_to_dict()}}, indent=4).encode("UTF-8") with tempfile.TemporaryDirectory() as temp_dir: json_path = os.path.join(temp_dir, "data.json")