Fix JSON output when exporting custom emojis

Fixes #24961
This commit is contained in:
Yue Wu 2022-08-23 16:21:58 +08:00 committed by GitHub
parent 2259f747f1
commit 82d68f5b98
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -194,10 +194,11 @@ QByteArray SerializeText(
: (part.type == Type::TextUrl) : (part.type == Type::TextUrl)
? "href" ? "href"
: "none"; : "none";
const auto additionalValue = (part.type == Type::MentionName const auto additionalValue = (part.type == Type::MentionName)
|| part.type == Type::CustomEmoji)
? part.additional ? 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) ? SerializeString(part.additional)
: QByteArray(); : QByteArray();
return SerializeObject(context, { return SerializeObject(context, {