mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-05-25 12:04:22 +00:00
core: check saved links and hashes by both connection request uri schemas for connection plan (#3233)
This commit is contained in:
@@ -559,3 +559,11 @@ currentChatVRangeInfo =
|
||||
|
||||
vRangeStr :: VersionRange -> String
|
||||
vRangeStr (VersionRange minVer maxVer) = "(" <> show minVer <> ", " <> show maxVer <> ")"
|
||||
|
||||
linkAnotherSchema :: String -> String
|
||||
linkAnotherSchema link
|
||||
| "https://simplex.chat/" `isPrefixOf` link =
|
||||
T.unpack $ T.replace "https://simplex.chat/" "simplex:/" $ T.pack link
|
||||
| "simplex:/" `isPrefixOf` link =
|
||||
T.unpack $ T.replace "simplex:/" "https://simplex.chat/" $ T.pack link
|
||||
| otherwise = error "link starts with neither https://simplex.chat/ nor simplex:/"
|
||||
|
||||
Reference in New Issue
Block a user