summaryrefslogtreecommitdiff
path: root/protocols/Telegram/tdlib/td/td/telegram/LinkManager.h
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Telegram/tdlib/td/td/telegram/LinkManager.h')
-rw-r--r--protocols/Telegram/tdlib/td/td/telegram/LinkManager.h36
1 files changed, 29 insertions, 7 deletions
diff --git a/protocols/Telegram/tdlib/td/td/telegram/LinkManager.h b/protocols/Telegram/tdlib/td/td/telegram/LinkManager.h
index 6de87f5018..0620815d94 100644
--- a/protocols/Telegram/tdlib/td/td/telegram/LinkManager.h
+++ b/protocols/Telegram/tdlib/td/td/telegram/LinkManager.h
@@ -1,5 +1,5 @@
//
-// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2022
+// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2023
//
// 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)
@@ -23,6 +23,7 @@
namespace td {
+class Proxy;
class Td;
class LinkManager final : public Actor {
@@ -59,8 +60,12 @@ class LinkManager final : public Actor {
// checks whether the link is a supported tg or t.me link and parses it
static unique_ptr<InternalLink> parse_internal_link(Slice link, bool is_trusted = false);
- void update_autologin_domains(string autologin_token, vector<string> autologin_domains,
- vector<string> url_auth_domains, vector<string> whitelisted_domains);
+ static Result<string> get_internal_link(const td_api::object_ptr<td_api::InternalLinkType> &type, bool is_internal);
+
+ void update_autologin_token(string autologin_token);
+
+ void update_autologin_domains(vector<string> autologin_domains, vector<string> url_auth_domains,
+ vector<string> whitelisted_domains);
void get_deep_link_info(Slice link, Promise<td_api::object_ptr<td_api::deepLinkInfo>> &&promise);
@@ -78,9 +83,13 @@ class LinkManager final : public Actor {
static Result<string> get_background_url(const string &name,
td_api::object_ptr<td_api::BackgroundType> background_type);
+ static string get_dialog_filter_invite_link_slug(Slice invite_link);
+
+ static string get_dialog_filter_invite_link(Slice slug, bool is_internal);
+
static string get_dialog_invite_link_hash(Slice invite_link);
- static string get_dialog_invite_link(Slice hash, bool is_internal);
+ static string get_dialog_invite_link(Slice invite_hash, bool is_internal);
static string get_instant_view_link_url(Slice link);
@@ -88,8 +97,14 @@ class LinkManager final : public Actor {
static string get_instant_view_link(Slice url, Slice rhash);
+ static string get_public_dialog_link(Slice username, bool is_internal);
+
+ static Result<string> get_proxy_link(const Proxy &proxy, bool is_internal);
+
static UserId get_link_user_id(Slice url);
+ static string get_t_me_url();
+
static Result<CustomEmojiId> get_link_custom_emoji_id(Slice url);
static Result<MessageLinkInfo> get_message_link_info(Slice url);
@@ -108,8 +123,11 @@ class LinkManager final : public Actor {
class InternalLinkBotStartInGroup;
class InternalLinkChangePhoneNumber;
class InternalLinkConfirmPhone;
+ class InternalLinkDefaultMessageAutoDeleteTimerSettings;
+ class InternalLinkDialogFolderInvite;
+ class InternalLinkDialogFolderSettings;
class InternalLinkDialogInvite;
- class InternalLinkFilterSettings;
+ class InternalLinkEditProfileSettings;
class InternalLinkGame;
class InternalLinkInstantView;
class InternalLinkInvoice;
@@ -131,7 +149,9 @@ class LinkManager final : public Actor {
class InternalLinkUnknownDeepLink;
class InternalLinkUnsupportedProxy;
class InternalLinkUserPhoneNumber;
+ class InternalLinkUserToken;
class InternalLinkVoiceChat;
+ class InternalLinkWebApp;
enum class LinkType : int32 { External, TMe, Tg, Telegraph };
@@ -146,11 +166,13 @@ class LinkManager final : public Actor {
static unique_ptr<InternalLink> parse_t_me_link_query(Slice query, bool is_trusted);
- static unique_ptr<InternalLink> get_internal_link_passport(Slice query,
- const vector<std::pair<string, string>> &args);
+ static unique_ptr<InternalLink> get_internal_link_passport(Slice query, const vector<std::pair<string, string>> &args,
+ bool allow_unknown);
static unique_ptr<InternalLink> get_internal_link_message_draft(Slice url, Slice text);
+ static Result<string> get_internal_link_impl(const td_api::InternalLinkType *type_ptr, bool is_internal);
+
static Result<string> check_link_impl(Slice link, bool http_only, bool https_only);
Td *td_;