mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Replaced exported data of callbacks from markup replies with base64.
This commit is contained in:
parent
8718d94e7d
commit
4db885d8b4
1 changed files with 16 additions and 1 deletions
|
@ -804,7 +804,22 @@ QByteArray SerializeMessage(
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (!entry.data.isEmpty()) {
|
if (!entry.data.isEmpty()) {
|
||||||
pairs.push_back({ "data", SerializeString(entry.data) });
|
using Type = HistoryMessageMarkupButton::Type;
|
||||||
|
const auto isCallback = (entry.type == Type::Callback)
|
||||||
|
|| (entry.type == Type::CallbackWithPassword);
|
||||||
|
const auto data = isCallback
|
||||||
|
? entry.data.toBase64(QByteArray::Base64UrlEncoding
|
||||||
|
| QByteArray::OmitTrailingEquals)
|
||||||
|
: entry.data;
|
||||||
|
if (isCallback) {
|
||||||
|
pairs.push_back({
|
||||||
|
"dataBase64",
|
||||||
|
SerializeString(data),
|
||||||
|
});
|
||||||
|
pairs.push_back({ "data", SerializeString({}) });
|
||||||
|
} else {
|
||||||
|
pairs.push_back({ "data", SerializeString(data) });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!entry.forwardText.isEmpty()) {
|
if (!entry.forwardText.isEmpty()) {
|
||||||
pairs.push_back({
|
pairs.push_back({
|
||||||
|
|
Loading…
Add table
Reference in a new issue