mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +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()) {
|
||||
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()) {
|
||||
pairs.push_back({
|
||||
|
|
Loading…
Add table
Reference in a new issue