aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorlevlam <levlam@telegram.org>2026-05-05 18:38:21 +0300
committerlevlam <levlam@telegram.org>2026-05-05 18:38:21 +0300
commiteb6fc396eba0a34b69986a2f166018565bfe7feb (patch)
tree635cd67d7f4d867203299a35be742289802e9729
parentea77886558ff8cfc924f00e94a4d53698bb9d4b9 (diff)
Add InputPaidMediaLivePhoto.
-rw-r--r--telegram-bot-api/Client.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/telegram-bot-api/Client.cpp b/telegram-bot-api/Client.cpp
index 13d7c57..e8a2d9b 100644
--- a/telegram-bot-api/Client.cpp
+++ b/telegram-bot-api/Client.cpp
@@ -11881,6 +11881,13 @@ td::Result<td_api::object_ptr<td_api::inputPaidMedia>> Client::get_input_paid_me
TRY_RESULT(type, object.get_required_string_field("type"));
if (type == "photo") {
media_type = make_object<td_api::inputPaidMediaTypePhoto>(nullptr);
+ } else if (type == "live_photo") {
+ TRY_RESULT(photo, object.get_optional_string_field("photo"));
+ media_type = make_object<td_api::inputPaidMediaTypePhoto>(std::move(input_file));
+ input_file = get_input_file(query, "photo", photo, false);
+ if (input_file == nullptr) {
+ return td::Status::Error("photo not found");
+ }
} else if (type == "video") {
TRY_RESULT(duration, object.get_optional_int_field("duration"));
TRY_RESULT(supports_streaming, object.get_optional_bool_field("supports_streaming"));