diff --git a/apps/smp-server/static/link.html b/apps/smp-server/static/link.html
index b5be2d7ab..396f3dc12 100644
--- a/apps/smp-server/static/link.html
+++ b/apps/smp-server/static/link.html
@@ -512,6 +512,8 @@
element.innerHTML = 'This is a one-time link of the SimpleX network user'
} else if (url.includes('/c')) {
element.innerHTML = 'This is a public channel address on SimpleX network'
+ } else if (url.includes('/r')) {
+ element.innerHTML = 'This is a chat relay address on SimpleX network'
}
}
diff --git a/apps/smp-server/web/Static.hs b/apps/smp-server/web/Static.hs
index 50e4415eb..dc8f24ec9 100644
--- a/apps/smp-server/web/Static.hs
+++ b/apps/smp-server/web/Static.hs
@@ -103,6 +103,7 @@ generateSite si onionHost sitePath = do
createLinkPage "a"
createLinkPage "c"
createLinkPage "g"
+ createLinkPage "r"
createLinkPage "i"
logInfo $ "Generated static site contents at " <> tshow sitePath
where
diff --git a/src/Simplex/Messaging/Agent/Protocol.hs b/src/Simplex/Messaging/Agent/Protocol.hs
index 74a6221b5..f1d5f2ec8 100644
--- a/src/Simplex/Messaging/Agent/Protocol.hs
+++ b/src/Simplex/Messaging/Agent/Protocol.hs
@@ -1445,7 +1445,7 @@ instance ConnectionModeI c => ToField (ConnShortLink c) where toField = toField
instance (Typeable c, ConnectionModeI c) => FromField (ConnShortLink c) where fromField = blobFieldDecoder strDecode
-data ContactConnType = CCTContact | CCTChannel | CCTGroup deriving (Eq, Show)
+data ContactConnType = CCTContact | CCTChannel | CCTGroup | CCTRelay deriving (Eq, Show)
data AConnShortLink = forall m. ConnectionModeI m => ACSL (SConnectionMode m) (ConnShortLink m)
@@ -1593,6 +1593,7 @@ ctTypeP = \case
'A' -> pure CCTContact
'C' -> pure CCTChannel
'G' -> pure CCTGroup
+ 'R' -> pure CCTRelay
_ -> fail "unknown contact address type"
{-# INLINE ctTypeP #-}
@@ -1601,6 +1602,7 @@ ctTypeChar = \case
CCTContact -> 'A'
CCTChannel -> 'C'
CCTGroup -> 'G'
+ CCTRelay -> 'R'
{-# INLINE ctTypeChar #-}
-- the servers passed to this function should be all preset servers, not servers configured by the user.