diff options
| author | levlam <levlam@telegram.org> | 2026-05-27 14:47:47 +0300 |
|---|---|---|
| committer | levlam <levlam@telegram.org> | 2026-05-27 14:47:47 +0300 |
| commit | ee229f16dc223cecace4115652c007833f9a51ef (patch) | |
| tree | b1f342f8e75ee8336e597c2854f8b593213906c3 | |
| parent | ba8ea32bc068b6da98fd494b07f5c4f742d82bf9 (diff) | |
Add InputMediaLink.
| -rw-r--r-- | telegram-bot-api/Client.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/telegram-bot-api/Client.cpp b/telegram-bot-api/Client.cpp index a385b04..ff20d24 100644 --- a/telegram-bot-api/Client.cpp +++ b/telegram-bot-api/Client.cpp @@ -11872,6 +11872,13 @@ td::Result<td_api::object_ptr<td_api::InputPollMedia>> Client::get_input_poll_me TRY_RESULT(venue, get_venue(object)); return make_object<td_api::inputPollMediaVenue>(std::move(venue)); } + if (type == "link") { + if (!for_option) { + return td::Status::Error(PSLICE() << "type \"" << type << "\" is unsupported"); + } + TRY_RESULT(url, object.get_required_string_field("url")); + return make_object<td_api::inputPollMediaLink>(url); + } TRY_RESULT(media, object.get_optional_string_field("media")); auto input_file = get_input_file(query, td::Slice(), media, false); |
