aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorlevlam <levlam@telegram.org>2026-01-28 18:23:27 +0300
committerlevlam <levlam@telegram.org>2026-01-28 18:23:27 +0300
commit5eac9b519d87a4e197f8b21ee567b2f515cc9491 (patch)
tree04ac0df8993d06b6e3d1f3b6d74bed9ac7d1af36 /test
parentb33529778fdd88c8969919e376e63aa1d7636380 (diff)
Treat OAuth links as external links.
Diffstat (limited to 'test')
-rw-r--r--test/link.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/link.cpp b/test/link.cpp
index f90c8ddf8..4fa19234d 100644
--- a/test/link.cpp
+++ b/test/link.cpp
@@ -667,6 +667,12 @@ TEST(Link, parse_internal_link_part1) {
parse_internal_link("tg:resolve?phone=123456&attach=test%30&startattach=*",
attachment_menu_bot(nullptr, user_phone_number("123456"), "test0", ""));
+ parse_internal_link("tg:resolve?domain=oauth&startapp=12345", nullptr);
+ parse_internal_link("tg:resolve?domain=oauth&startapp=", main_web_app("oauth", "", false, false));
+ parse_internal_link("tg:resolve?domain=oauth", public_chat("oauth"));
+ parse_internal_link("tg:oauth?token=12345", nullptr);
+ parse_internal_link("tg:oauth?token=", unknown_deep_link("tg://oauth?token="));
+
parse_internal_link("tg:contact?token=1", user_token("1"));
parse_internal_link("tg:contact?token=123456", user_token("123456"));
parse_internal_link("tg:contact?token=123456&startattach", user_token("123456"));