Use get_json_object_field_force to extract @extra.

This commit is contained in:
levlam 2023-07-31 14:12:01 +03:00
parent 43941c1e69
commit 88f169b714

View File

@ -41,8 +41,7 @@ static std::pair<td_api::object_ptr<td_api::Function>, string> to_request(Slice
string extra;
if (has_json_object_field(json_value.get_object(), "@extra")) {
extra = json_encode<string>(
get_json_object_field(json_value.get_object(), "@extra", JsonValue::Type::Null).move_as_ok());
extra = json_encode<string>(get_json_object_field_force(json_value.get_object(), "@extra"));
}
td_api::object_ptr<td_api::Function> func;