From e8c71152648ec7107690a2b79de14e4c38b69f35 Mon Sep 17 00:00:00 2001 From: Slavasil Date: Fri, 18 Oct 2024 20:21:59 +0300 Subject: [PATCH] hide raw link from the intermediate message --- commands.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/commands.cpp b/commands.cpp index 0612977..c1caffb 100644 --- a/commands.cpp +++ b/commands.cpp @@ -65,10 +65,11 @@ void cmd::handle_inline_query(context *ctx, td_api::updateNewInlineQuery &query) std::vector> results; if (url::is_url_valid(query.query_)) { uint64_t pendingQueryId = new_pending_query_id(); + spdlog::debug("inserting new inline query for url {}", query.query_); ctx->inlineQueries.insert(std::pair(pendingQueryId, {query.query_, std::chrono::steady_clock::now() + std::chrono::hours(5)})); auto messageButton = td_api::make_object( - "press to shorten", + "shorten", static_cast>(td_api::make_object(std::to_string(pendingQueryId))) ); @@ -91,7 +92,7 @@ void cmd::handle_inline_query(context *ctx, td_api::updateNewInlineQuery &query) )), static_cast>(td_api::make_object( td_api::make_object( - query.query_, + "press the button to shorten", std::move(std::vector>()) ), td_api::make_object(true, "", false, false, false),