Use get_json_object_field_force to extract @extra.
This commit is contained in:
parent
43941c1e69
commit
88f169b714
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user