core: check saved links and hashes by both connection request uri schemas for connection plan (#3233)

This commit is contained in:
spaced4ndy
2023-10-16 16:16:03 +04:00
committed by GitHub
parent 4b6df43e97
commit 9ed31261e1
8 changed files with 118 additions and 28 deletions
+8
View File
@@ -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:/"