mirror of
https://github.com/Qz3rK/tdesktop.git
synced 2026-06-02 03:53:42 +02:00
Fixed handling of no-argument bot webview commands.
Regression was introduced in c46fe28908.
This commit is contained in:
@@ -128,11 +128,17 @@ struct NativeMessage {
|
||||
return RectPart::Left;
|
||||
}
|
||||
|
||||
[[nodiscard]] bool IsNoArgumentsSentinel(const QString &string) {
|
||||
return string.isEmpty() || string == u"\"\""_q;
|
||||
}
|
||||
|
||||
[[nodiscard]] bool CanParseArguments(QJsonValue value) {
|
||||
if (value.isObject()) {
|
||||
return true;
|
||||
} else if (!value.isString()) {
|
||||
return false;
|
||||
} else if (IsNoArgumentsSentinel(value.toString())) {
|
||||
return true;
|
||||
}
|
||||
auto error = QJsonParseError();
|
||||
const auto document = QJsonDocument::fromJson(
|
||||
|
||||
Reference in New Issue
Block a user