Always export file_name in json.

This commit is contained in:
John Preston 2024-04-12 19:10:44 +04:00
parent 18f5521be5
commit dc438cff23

View file

@ -653,6 +653,7 @@ QByteArray SerializeMessage(
pushTTL(); pushTTL();
}, [&](const Document &data) { }, [&](const Document &data) {
pushPath(data.file, "file"); pushPath(data.file, "file");
push("file_name", data.name);
if (data.thumb.width > 0) { if (data.thumb.width > 0) {
pushPath(data.thumb.file, "thumbnail"); pushPath(data.thumb.file, "thumbnail");
} }
@ -675,9 +676,7 @@ QByteArray SerializeMessage(
push("performer", data.songPerformer); push("performer", data.songPerformer);
push("title", data.songTitle); push("title", data.songTitle);
} }
if (!data.isSticker) { push("mime_type", data.mime);
push("mime_type", data.mime);
}
if (data.duration) { if (data.duration) {
push("duration_seconds", data.duration); push("duration_seconds", data.duration);
} }