From dc438cff23ab33ed9e83320b8d9f1369071cbbdc Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 12 Apr 2024 19:10:44 +0400 Subject: [PATCH] Always export file_name in json. --- Telegram/SourceFiles/export/output/export_output_json.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Telegram/SourceFiles/export/output/export_output_json.cpp b/Telegram/SourceFiles/export/output/export_output_json.cpp index ed50aa5c8..67814e5b2 100644 --- a/Telegram/SourceFiles/export/output/export_output_json.cpp +++ b/Telegram/SourceFiles/export/output/export_output_json.cpp @@ -653,6 +653,7 @@ QByteArray SerializeMessage( pushTTL(); }, [&](const Document &data) { pushPath(data.file, "file"); + push("file_name", data.name); if (data.thumb.width > 0) { pushPath(data.thumb.file, "thumbnail"); } @@ -675,9 +676,7 @@ QByteArray SerializeMessage( push("performer", data.songPerformer); push("title", data.songTitle); } - if (!data.isSticker) { - push("mime_type", data.mime); - } + push("mime_type", data.mime); if (data.duration) { push("duration_seconds", data.duration); }