From 82d68f5b985a5a7ab981bd72a6023e742c6ec50c Mon Sep 17 00:00:00 2001 From: Yue Wu Date: Tue, 23 Aug 2022 16:21:58 +0800 Subject: [PATCH] Fix JSON output when exporting custom emojis Fixes #24961 --- Telegram/SourceFiles/export/output/export_output_json.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Telegram/SourceFiles/export/output/export_output_json.cpp b/Telegram/SourceFiles/export/output/export_output_json.cpp index 6d1ade00f0..71f8efcd71 100644 --- a/Telegram/SourceFiles/export/output/export_output_json.cpp +++ b/Telegram/SourceFiles/export/output/export_output_json.cpp @@ -194,10 +194,11 @@ QByteArray SerializeText( : (part.type == Type::TextUrl) ? "href" : "none"; - const auto additionalValue = (part.type == Type::MentionName - || part.type == Type::CustomEmoji) + const auto additionalValue = (part.type == Type::MentionName) ? part.additional - : (part.type == Type::Pre || part.type == Type::TextUrl) + : (part.type == Type::Pre + || part.type == Type::TextUrl + || part.type == Type::CustomEmoji) ? SerializeString(part.additional) : QByteArray(); return SerializeObject(context, {