types: instance for contact connection type (#1822)

Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
This commit is contained in:
Evgeny
2026-07-01 17:37:45 +01:00
committed by GitHub
co-authored by Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
parent 6ef38a6ee7
commit 93925b257c
+4
View File
@@ -1691,6 +1691,10 @@ ctTypeChar = \case
CCTRelay -> 'R'
{-# INLINE ctTypeChar #-}
instance StrEncoding ContactConnType where
strEncode = B.singleton . ctTypeChar
strP = A.anyChar >>= ctTypeP
-- the servers passed to this function should be all preset servers, not servers configured by the user.
shortenShortLink :: NonEmpty SMPServer -> ConnShortLink m -> ConnShortLink m
shortenShortLink presetSrvs = \case