Fixed handling of no-argument bot webview commands.

Regression was introduced in c46fe28908.
This commit is contained in:
23rd
2026-05-26 16:53:22 +03:00
committed by John Preston
parent b09327e476
commit a220f56319
@@ -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(