Skip to content

Commit

Permalink
Use getInternalLinkType for proxy links
Browse files Browse the repository at this point in the history
Fix proxy related test
  • Loading branch information
zevlg committed May 27, 2024
1 parent 60865b7 commit 58b4963
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 4 additions & 0 deletions telega-tme.el
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,10 @@ Return non-nil if url has been handled."
(concat "tg:addlist?slug=" (match-string 1 path)))
((string-match "^/\\+\\([^/]+\\)$" path)
(concat "tg:join?invite=" (match-string 1 path)))
((string-match "^/\\(socks\\|proxy\\)$" path)
;; Use getInternalLinkType for proxies
nil)

((and just-convert
(string-match
(eval-when-compile
Expand Down
2 changes: 0 additions & 2 deletions test.el
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,6 @@ Have Stoploss 690 Satoshi." :entities []))))
"tg:join?invite=itshitout"))
(should (string= (telega-tme-open "https://t.me/itshit/23423" 'offline)
"tg:resolve?domain=itshit&post=23423"))
(should (string= (telega-tme-open "https://t.me/socks?server=my&port=1234" 'offline)
"tg:socks?server=my&port=1234"))
(should (string= (telega-tme-open "https://t.me/c/101110111/286125" 'offline)
"tg:privatepost?channel=101110111&post=286125"))
;; Non telegram urls
Expand Down

0 comments on commit 58b4963

Please sign in to comment.