From 6f4c4adcc8a6347a021caa342908ce9c2145c113 Mon Sep 17 00:00:00 2001 From: levlam Date: Fri, 30 Oct 2020 15:51:20 +0300 Subject: [PATCH] Improve field names. GitOrigin-RevId: ded67301be27af1f3b7c8f7e11b2172bb92934c7 --- td/generate/scheme/td_api.tl | 20 +++++++++--------- td/generate/scheme/td_api.tlo | Bin 185236 -> 185220 bytes td/telegram/InlineQueriesManager.cpp | 2 +- td/telegram/Location.cpp | 10 ++++----- td/telegram/Location.h | 2 +- td/telegram/MessageContent.cpp | 30 +++++++++++++-------------- td/telegram/MessagesManager.cpp | 8 +++---- td/telegram/MessagesManager.h | 4 ++-- td/telegram/Td.cpp | 13 ++++++------ td/telegram/cli.cpp | 12 +++++------ 10 files changed, 50 insertions(+), 51 deletions(-) diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index d6361b5b2..5e180a06a 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -1593,8 +1593,8 @@ messageVoiceNote voice_note:voiceNote caption:formattedText is_listened:Bool = M //@description A message with a location @location The location description @live_period Time relative to the message send date, for which the location can be updated, in seconds //@expires_in Left time for which the location can be updated, in seconds. updateMessageContent is not sent when this field changes //@heading For live locations, a direction in which the location moves, in degrees; 1-360. If 0 the direction is unknown -//@proximity_alert_distance For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000). 0 if the notification is disabled. Available only for the message sender -messageLocation location:location live_period:int32 expires_in:int32 heading:int32 proximity_alert_distance:int32 = MessageContent; +//@proximity_alert_radius For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000). 0 if the notification is disabled. Available only for the message sender +messageLocation location:location live_period:int32 expires_in:int32 heading:int32 proximity_alert_radius:int32 = MessageContent; //@description A message with information about a venue @venue The venue description messageVenue venue:venue = MessageContent; @@ -1814,8 +1814,8 @@ inputMessageVoiceNote voice_note:InputFile duration:int32 waveform:bytes caption //@description A message with a location @location Location to be sent @live_period Period for which the location can be updated, in seconds; should be between 60 and 86400 for a live location and 0 otherwise //@heading For live locations, a direction in which the location moves, in degrees; 1-360. Pass 0 if unknown -//@proximity_alert_distance For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000). Pass 0 if the notification is disabled. Can't be enabled in channels and Saved Messages -inputMessageLocation location:location live_period:int32 heading:int32 proximity_alert_distance:int32 = InputMessageContent; +//@proximity_alert_radius For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000). Pass 0 if the notification is disabled. Can't be enabled in channels and Saved Messages +inputMessageLocation location:location live_period:int32 heading:int32 proximity_alert_radius:int32 = InputMessageContent; //@description A message with information about a venue @venue Venue to send inputMessageVenue venue:venue = InputMessageContent; @@ -2094,8 +2094,8 @@ animations animations:vector = Animations; diceStickersRegular sticker:sticker = DiceStickers; //@description Animated stickers to be combined into a slot machine -//@background The animated sticker with the slot machine background -//@lever The animated sticker with the lever animation +//@background The animated sticker with the slot machine background. The background animation must start playing after all reel animations finish +//@lever The animated sticker with the lever animation. The lever animation must play once in the initial dice state //@left_reel The animated sticker with the left reel //@center_reel The animated sticker with the center reel //@right_reel The animated sticker with the right reel @@ -3849,8 +3849,8 @@ editMessageText chat_id:int53 message_id:int53 reply_markup:ReplyMarkup input_me //@description Edits the message content of a live location. Messages can be edited for a limited period of time specified in the live location. Returns the edited message after the edit is completed on the server side //@chat_id The chat the message belongs to @message_id Identifier of the message @reply_markup The new message reply markup; for bots only @location New location content of the message; may be null. Pass null to stop sharing the live location //@heading The new direction in which the location moves, in degrees; 1-360. Pass 0 if unknown -//@proximity_alert_distance The new maximum distance for proximity alerts, in meters (0-100000). Pass 0 if the notification is disabled -editMessageLiveLocation chat_id:int53 message_id:int53 reply_markup:ReplyMarkup location:location heading:int32 proximity_alert_distance:int32 = Message; +//@proximity_alert_radius The new maximum distance for proximity alerts, in meters (0-100000). Pass 0 if the notification is disabled +editMessageLiveLocation chat_id:int53 message_id:int53 reply_markup:ReplyMarkup location:location heading:int32 proximity_alert_radius:int32 = Message; //@description Edits the content of a message with an animation, an audio, a document, a photo or a video. The media in the message can't be replaced if the message was set to self-destruct. Media can't be replaced by self-destructing media. Media in an album can be edited only to contain a photo or a video. Returns the edited message after the edit is completed on the server side //@chat_id The chat the message belongs to @message_id Identifier of the message @reply_markup The new message reply markup; for bots only @input_message_content New content of the message. Must be one of the following types: InputMessageAnimation, InputMessageAudio, InputMessageDocument, InputMessagePhoto or InputMessageVideo @@ -3870,8 +3870,8 @@ editInlineMessageText inline_message_id:string reply_markup:ReplyMarkup input_me //@description Edits the content of a live location in an inline message sent via a bot; for bots only @inline_message_id Inline message identifier @reply_markup The new message reply markup //@location New location content of the message; may be null. Pass null to stop sharing the live location //@heading The new direction in which the location moves, in degrees; 1-360. Pass 0 if unknown -//@proximity_alert_distance The new maximum distance for proximity alerts, in meters (0-100000). Pass 0 if the notification is disabled -editInlineMessageLiveLocation inline_message_id:string reply_markup:ReplyMarkup location:location heading:int32 proximity_alert_distance:int32 = Ok; +//@proximity_alert_radius The new maximum distance for proximity alerts, in meters (0-100000). Pass 0 if the notification is disabled +editInlineMessageLiveLocation inline_message_id:string reply_markup:ReplyMarkup location:location heading:int32 proximity_alert_radius:int32 = Ok; //@description Edits the content of a message with an animation, an audio, a document, a photo or a video in an inline message sent via a bot; for bots only @inline_message_id Inline message identifier //@reply_markup The new message reply markup; for bots only @input_message_content New content of the message. Must be one of the following types: InputMessageAnimation, InputMessageAudio, InputMessageDocument, InputMessagePhoto or InputMessageVideo diff --git a/td/generate/scheme/td_api.tlo b/td/generate/scheme/td_api.tlo index 267121cbfd7788794f0dbe12f814700f6014d69c..58abfb374ad5d6537aaf2dd821a4cffcc1d814d8 100644 GIT binary patch delta 2073 zcmaJ?UrbwN6z6faCTuj&MNDce z$)cFdgzY1IJP_?%kj3zTsYz#ou8YK=uni(pHrPhTAB*8(CUcn)qrLas+g_HyeLDB| zJHKV%vA(BHhut%Glg%r+WF75$SWQDK z9ZDSyRlpi~D2)p#pK_MYdz$`iJ_;s!>0Shdo>eWEItnKC=rSpyZ!O#CrB$CxI%uA9 z-LO0v2yK34=YuChr^3hDdwN>lZTEMzwuFOSCo?%xE_JPiOG`rCUA@5*!SMUXTRPjj z!^gW@+JdKg=;zOtW7n0n+)02IP1>kyT{&d!I_{ArOTmTN!wN)`>rIFlH(sWpxG+ z3Z!b1fe4-d&cge%(h`B#g}+ zRO>Z|iJ9KN%wtUlui}0l!iY`rdsG@K1~EJJKFLMTus|{RPMEfhv4Khj zOC&3y0}ynI;M{$AAyM7Jh^P*~pkhN+;Kd@oDz#gn72IsRO5IMnO5L5=uKH!fzQ^mA zShPd*g7OhcO@lQN`5D4SEx@lr+jH^V+5vh{YkZ6b>pwn8&awZm!m5TQaI`Vd)zttODJp^GJA zm4Kps$e?;cPlXNyD|r!&WDJ4vAoc<=a&=$KyF;C{6LtA0fqL_34Gz+y| zwJ6bD&a@cN;Zr})Gu*S}N7PU9mua1%`);>xm-^Mi^o8GKw)*0}n<+}ado>qi;Cpam z?{bhPFuUw(P_w@OW3&HBeCEap>{%(|f-F(G$`_^wRf_C9s2LdW>p$4=xrft~k{?Ps zUn|!gcxyR|lX8%h%wQm!pMw=AdyG_UFW1BdvUC+WajYC>j&xiDG514jPFy+13W=_| zsA_g~jxM}wx|GP01#F~x6`AoHvV*vrkc8zm$)gro$G*GA4hQAK)tf@(LhPORYav6L+Ha?b!j7H+`o)1Mw#^dMl_6JUu<2r2-8EOR&%VUFe zZD@lbX^t#x1gJ)+FpaOmPGGK5YeXY?HVn?(Rwd4g4Ogi=H(j+eDEo-jFF*QP^O;Ni zY3-_42d<8+Tt_{mYywdmz|YRwiD(9|wjn_?NNn{A^x=}+q@IgggJznU$;_+ZQz(H7 z6C5UU%@Cm2V+Ctaqp2fvh?w7pp1r=vbPGsUu25S({_+!UWADe;RE!i`SSYg9qI6Ef zBw?@5{{Q$a2nYGxQP^5e`0}ca^c_Ja60m@uMwqwo;)@nYxYVd@80yq%$QmkxM@IJ! zf|gnIDVW`73^d-?%B#`lK*Q1;!|EVt&}J*x>8i;Jcb-u(efWup{7)kb-ya$sQF*n! zfWKWhLG8S4+(Ynh-nLX53!cxm!7xyv)y9Qh8zd>VU}NV@V(rT9PsP2se7WI}dK^JJ zr&4zAw_pbsHLPLcQI7eKa$Qov_CM%?!tNdl5VIZnsZ-yvgUlusmg>YSJdnJL4NV|6 z&S%@XPN`{-S`^!La{y#}5j{r|M!GT?%G((8aVDv=~`@880(q;DajDlSUSB4@W{7 z^b#fdI(a6sPKZ*h+{s%hbipLW(p?8!seGvml3%h{<=RbX&&O{=+^Pqf)?oOg_5zWT z^5W#v7UXvr!l?HYS@)t_|9@*p`83MbYmYJcbP> InlineQueriesManager: } return make_tl_object( flags, location.location.get_input_geo_point(), location.heading, location.live_period, - location.proximity_alert_distance, std::move(input_reply_markup)); + location.proximity_alert_radius, std::move(input_reply_markup)); } if (constructor_id == td_api::inputMessageVenue::ID) { TRY_RESULT(venue, process_input_message_venue(std::move(input_message_content))); diff --git a/td/telegram/Location.cpp b/td/telegram/Location.cpp index 30a63e729..7f084da5f 100644 --- a/td/telegram/Location.cpp +++ b/td/telegram/Location.cpp @@ -151,17 +151,17 @@ Result process_input_message_location( return Status::Error(400, "Wrong live location heading specified"); } - constexpr int32 MAX_PROXIMITY_ALERT_DISTANCE = 100000; // meters, server side limit - auto proximity_alert_distance = input_location->proximity_alert_distance_; - if (proximity_alert_distance < 0 || proximity_alert_distance > MAX_PROXIMITY_ALERT_DISTANCE) { - return Status::Error(400, "Wrong live location proximity alert distance specified"); + constexpr int32 MAX_PROXIMITY_ALERT_RADIUS = 100000; // meters, server side limit + auto proximity_alert_radius = input_location->proximity_alert_radius_; + if (proximity_alert_radius < 0 || proximity_alert_radius > MAX_PROXIMITY_ALERT_RADIUS) { + return Status::Error(400, "Wrong live location proximity alert radius specified"); } InputMessageLocation result; result.location = std::move(location); result.live_period = period; result.heading = heading; - result.proximity_alert_distance = proximity_alert_distance; + result.proximity_alert_radius = proximity_alert_radius; return std::move(result); } diff --git a/td/telegram/Location.h b/td/telegram/Location.h index 6cd97aeca..ebf21d393 100644 --- a/td/telegram/Location.h +++ b/td/telegram/Location.h @@ -126,7 +126,7 @@ struct InputMessageLocation { Location location; int32 live_period; int32 heading; - int32 proximity_alert_distance; + int32 proximity_alert_radius; }; Result process_input_message_location( td_api::object_ptr &&input_message_content) TD_WARN_UNUSED_RESULT; diff --git a/td/telegram/MessageContent.cpp b/td/telegram/MessageContent.cpp index 425638150..3427dbef8 100644 --- a/td/telegram/MessageContent.cpp +++ b/td/telegram/MessageContent.cpp @@ -568,14 +568,14 @@ class MessageLiveLocation : public MessageContent { Location location; int32 period = 0; int32 heading = 0; - int32 proximity_alert_distance = 0; + int32 proximity_alert_radius = 0; MessageLiveLocation() = default; - MessageLiveLocation(Location &&location, int32 period, int32 heading, int32 proximity_alert_distance) + MessageLiveLocation(Location &&location, int32 period, int32 heading, int32 proximity_alert_radius) : location(std::move(location)) , period(period) , heading(heading) - , proximity_alert_distance(proximity_alert_distance) { + , proximity_alert_radius(proximity_alert_radius) { if (period < 0) { period = 0; } @@ -583,8 +583,8 @@ class MessageLiveLocation : public MessageContent { LOG(ERROR) << "Receive wrong heading " << heading; heading = 0; } - if (proximity_alert_distance < 0) { - proximity_alert_distance = 0; + if (proximity_alert_radius < 0) { + proximity_alert_radius = 0; } } @@ -765,7 +765,7 @@ static void store(const MessageContent *content, StorerT &storer) { store(m->location, storer); store(m->period, storer); store(m->heading, storer); - store(m->proximity_alert_distance, storer); + store(m->proximity_alert_radius, storer); break; } case MessageContentType::Location: { @@ -1073,9 +1073,9 @@ static void parse(unique_ptr &content, ParserT &parser) { m->heading = 0; } if (parser.version() >= static_cast(Version::AddLiveLocationProximityAlertDistance)) { - parse(m->proximity_alert_distance, parser); + parse(m->proximity_alert_radius, parser); } else { - m->proximity_alert_distance = 0; + m->proximity_alert_radius = 0; } content = std::move(m); break; @@ -1417,13 +1417,13 @@ InlineMessageContent create_inline_message_content(Td *td, FileId file_id, auto heading = (inline_message_geo->flags_ & telegram_api::botInlineMessageMediaGeo::HEADING_MASK) != 0 ? inline_message_geo->heading_ : 0; - auto approacing_notification_distance = + auto approacing_notification_radius = (inline_message_geo->flags_ & telegram_api::botInlineMessageMediaGeo::PROXIMITY_NOTIFICATION_RADIUS_MASK) != 0 ? inline_message_geo->proximity_notification_radius_ : 0; result.message_content = make_unique( - Location(inline_message_geo->geo_), inline_message_geo->period_, heading, approacing_notification_distance); + Location(inline_message_geo->geo_), inline_message_geo->period_, heading, approacing_notification_radius); } else { result.message_content = make_unique(Location(inline_message_geo->geo_)); } @@ -1687,7 +1687,7 @@ static Result create_input_message_content( content = make_unique(std::move(location.location)); } else { content = make_unique(std::move(location.location), location.live_period, location.heading, - location.proximity_alert_distance); + location.proximity_alert_radius); } break; } @@ -2289,7 +2289,7 @@ static tl_object_ptr get_input_media_impl( flags |= telegram_api::inputMediaGeoLive::PROXIMITY_NOTIFICATION_RADIUS_MASK; return make_tl_object(flags, false /*ignored*/, m->location.get_input_geo_point(), m->heading, m->period, - m->proximity_alert_distance); + m->proximity_alert_radius); } case MessageContentType::Location: { auto m = static_cast(content); @@ -2872,7 +2872,7 @@ void merge_message_contents(Td *td, const MessageContent *old_content, MessageCo need_update = true; } if (old_->period != new_->period || old_->heading != new_->heading || - old_->proximity_alert_distance != new_->proximity_alert_distance) { + old_->proximity_alert_radius != new_->proximity_alert_radius) { need_update = true; } if (old_->location.get_access_hash() != new_->location.get_access_hash()) { @@ -4486,9 +4486,9 @@ tl_object_ptr get_message_content_object(const MessageCo auto passed = max(G()->unix_time_cached() - message_date, 0); auto expires_in = max(0, m->period - passed); auto heading = expires_in == 0 ? 0 : m->heading; - auto proximity_alert_distance = expires_in == 0 ? 0 : m->proximity_alert_distance; + auto proximity_alert_radius = expires_in == 0 ? 0 : m->proximity_alert_radius; return make_tl_object(m->location.get_location_object(), m->period, expires_in, heading, - proximity_alert_distance); + proximity_alert_radius); } case MessageContentType::Location: { const MessageLocation *m = static_cast(content); diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index 9a768b43f..718f7108c 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -24135,7 +24135,7 @@ void MessagesManager::edit_message_text(FullMessageId full_message_id, void MessagesManager::edit_message_live_location(FullMessageId full_message_id, tl_object_ptr &&reply_markup, tl_object_ptr &&input_location, int32 heading, - int32 proximity_alert_distance, Promise &&promise) { + int32 proximity_alert_radius, Promise &&promise) { LOG(INFO) << "Begin to edit live location of " << full_message_id; auto dialog_id = full_message_id.get_dialog_id(); Dialog *d = get_dialog_force(dialog_id); @@ -24186,7 +24186,7 @@ void MessagesManager::edit_message_live_location(FullMessageId full_message_id, } flags |= telegram_api::inputMediaGeoLive::PROXIMITY_NOTIFICATION_RADIUS_MASK; auto input_media = telegram_api::make_object( - flags, false /*ignored*/, location.get_input_geo_point(), heading, 0, proximity_alert_distance); + flags, false /*ignored*/, location.get_input_geo_point(), heading, 0, proximity_alert_radius); send_closure(td_->create_net_actor(std::move(promise)), &EditMessageActor::send, 0, dialog_id, m->message_id, string(), vector>(), std::move(input_media), std::move(input_reply_markup), get_message_schedule_date(m), @@ -24500,7 +24500,7 @@ void MessagesManager::edit_inline_message_text(const string &inline_message_id, void MessagesManager::edit_inline_message_live_location(const string &inline_message_id, tl_object_ptr &&reply_markup, tl_object_ptr &&input_location, int32 heading, - int32 proximity_alert_distance, Promise &&promise) { + int32 proximity_alert_radius, Promise &&promise) { if (!td_->auth_manager_->is_bot()) { return promise.set_error(Status::Error(3, "Method is available only for bots")); } @@ -24529,7 +24529,7 @@ void MessagesManager::edit_inline_message_live_location(const string &inline_mes } flags |= telegram_api::inputMediaGeoLive::PROXIMITY_NOTIFICATION_RADIUS_MASK; auto input_media = telegram_api::make_object( - flags, false /*ignored*/, location.get_input_geo_point(), heading, 0, proximity_alert_distance); + flags, false /*ignored*/, location.get_input_geo_point(), heading, 0, proximity_alert_radius); td_->create_handler(std::move(promise)) ->send(0, std::move(input_bot_inline_message_id), "", vector>(), std::move(input_media), get_input_reply_markup(r_new_reply_markup.ok())); diff --git a/td/telegram/MessagesManager.h b/td/telegram/MessagesManager.h index 66f47b3b8..6f4c908ce 100644 --- a/td/telegram/MessagesManager.h +++ b/td/telegram/MessagesManager.h @@ -440,7 +440,7 @@ class MessagesManager : public Actor { void edit_message_live_location(FullMessageId full_message_id, tl_object_ptr &&reply_markup, tl_object_ptr &&input_location, int32 heading, - int32 proximity_alert_distance, Promise &&promise); + int32 proximity_alert_radius, Promise &&promise); void edit_message_media(FullMessageId full_message_id, tl_object_ptr &&reply_markup, tl_object_ptr &&input_message_content, Promise &&promise); @@ -458,7 +458,7 @@ class MessagesManager : public Actor { void edit_inline_message_live_location(const string &inline_message_id, tl_object_ptr &&reply_markup, tl_object_ptr &&input_location, int32 heading, - int32 proximity_alert_distance, Promise &&promise); + int32 proximity_alert_radius, Promise &&promise); void edit_inline_message_media(const string &inline_message_id, tl_object_ptr &&reply_markup, tl_object_ptr &&input_message_content, diff --git a/td/telegram/Td.cpp b/td/telegram/Td.cpp index d131fe31e..f3e678303 100644 --- a/td/telegram/Td.cpp +++ b/td/telegram/Td.cpp @@ -1225,11 +1225,11 @@ class EditMessageLiveLocationRequest : public RequestOnceActor { tl_object_ptr reply_markup_; tl_object_ptr location_; int32 heading_; - int32 proximity_alert_distance_; + int32 proximity_alert_radius_; void do_run(Promise &&promise) override { td->messages_manager_->edit_message_live_location(full_message_id_, std::move(reply_markup_), std::move(location_), - heading_, proximity_alert_distance_, std::move(promise)); + heading_, proximity_alert_radius_, std::move(promise)); } void do_send_result() override { @@ -1239,14 +1239,13 @@ class EditMessageLiveLocationRequest : public RequestOnceActor { public: EditMessageLiveLocationRequest(ActorShared td, uint64 request_id, int64 dialog_id, int64 message_id, tl_object_ptr reply_markup, - tl_object_ptr location, int32 heading, - int32 proximity_alert_distance) + tl_object_ptr location, int32 heading, int32 proximity_alert_radius) : RequestOnceActor(std::move(td), request_id) , full_message_id_(DialogId(dialog_id), MessageId(message_id)) , reply_markup_(std::move(reply_markup)) , location_(std::move(location)) , heading_(heading) - , proximity_alert_distance_(proximity_alert_distance) { + , proximity_alert_radius_(proximity_alert_radius) { } }; @@ -5766,7 +5765,7 @@ void Td::on_request(uint64 id, td_api::editMessageText &request) { void Td::on_request(uint64 id, td_api::editMessageLiveLocation &request) { CREATE_REQUEST(EditMessageLiveLocationRequest, request.chat_id_, request.message_id_, std::move(request.reply_markup_), std::move(request.location_), request.heading_, - request.proximity_alert_distance_); + request.proximity_alert_radius_); } void Td::on_request(uint64 id, td_api::editMessageMedia &request) { @@ -5799,7 +5798,7 @@ void Td::on_request(uint64 id, td_api::editInlineMessageLiveLocation &request) { CREATE_OK_REQUEST_PROMISE(); messages_manager_->edit_inline_message_live_location( std::move(request.inline_message_id_), std::move(request.reply_markup_), std::move(request.location_), - request.heading_, request.proximity_alert_distance_, std::move(promise)); + request.heading_, request.proximity_alert_radius_, std::move(promise)); } void Td::on_request(uint64 id, td_api::editInlineMessageMedia &request) { diff --git a/td/telegram/cli.cpp b/td/telegram/cli.cpp index 8b5736113..6c120d29e 100644 --- a/td/telegram/cli.cpp +++ b/td/telegram/cli.cpp @@ -3159,16 +3159,16 @@ class CliClient final : public Actor { string longitude; string accuracy; string heading; - string proximity_alert_distance; + string proximity_alert_radius; std::tie(chat_id, args) = split(args); std::tie(message_id, args) = split(args); std::tie(latitude, args) = split(args); std::tie(longitude, args) = split(args); std::tie(accuracy, args) = split(args); - std::tie(heading, proximity_alert_distance) = split(args); + std::tie(heading, proximity_alert_radius) = split(args); send_request(td_api::make_object( as_chat_id(chat_id), as_message_id(message_id), nullptr, as_location(latitude, longitude, accuracy), - to_integer(heading), to_integer(proximity_alert_distance))); + to_integer(heading), to_integer(proximity_alert_radius))); } else if (op == "emss") { string chat_id; string message_id; @@ -3432,17 +3432,17 @@ class CliClient final : public Actor { string longitude; string accuracy; string heading; - string proximity_alert_distance; + string proximity_alert_radius; std::tie(chat_id, args) = split(args); std::tie(period, args) = split(args); std::tie(latitude, args) = split(args); std::tie(longitude, args) = split(args); std::tie(accuracy, args) = split(args); - std::tie(heading, proximity_alert_distance) = split(args); + std::tie(heading, proximity_alert_radius) = split(args); send_message(chat_id, td_api::make_object( as_location(latitude, longitude, accuracy), to_integer(period), - to_integer(heading), to_integer(proximity_alert_distance))); + to_integer(heading), to_integer(proximity_alert_radius))); } else if (op == "spoll" || op == "spollm" || op == "spollp" || op == "squiz") { string chat_id; string question;