diff options
Diffstat (limited to 'protocols/Telegram/tdlib/td/td/tl/tl_json.h')
-rw-r--r-- | protocols/Telegram/tdlib/td/td/tl/tl_json.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/protocols/Telegram/tdlib/td/td/tl/tl_json.h b/protocols/Telegram/tdlib/td/td/tl/tl_json.h index 5d3e376d0e..9832ca801e 100644 --- a/protocols/Telegram/tdlib/td/td/tl/tl_json.h +++ b/protocols/Telegram/tdlib/td/td/tl/tl_json.h @@ -1,5 +1,5 @@ // -// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023 +// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024 // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -161,7 +161,7 @@ std::enable_if_t<!std::is_constructible<T>::value, Status> from_json(tl_object_p } auto &object = from.get_object(); - TRY_RESULT(constructor_value, get_json_object_field(object, "@type", JsonValue::Type::Null, false)); + TRY_RESULT(constructor_value, object.extract_required_field("@type", JsonValue::Type::Null)); int32 constructor = 0; if (constructor_value.type() == JsonValue::Type::Number) { constructor = to_integer<int32>(constructor_value.get_number()); |