core: add fields to chat relay profiles; remove unique name requirement; update relay profile in relay address link data (#6743)

* core: add fields to chat relay profiles

* wip

* wip

* fix

* fix

* fix

* enable tests

* schema

* api

---------

Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>
This commit is contained in:
Evgeny
2026-04-03 13:42:43 +01:00
committed by GitHub
parent 0ca7cdaf1d
commit 8167f7c2ab
29 changed files with 153 additions and 131 deletions
+12 -1
View File
@@ -1455,11 +1455,22 @@ data RelayShortLinkData = RelayShortLinkData
$(JQ.deriveJSON defaultJSON ''RelayShortLinkData)
data RelayProfile = RelayProfile {name :: ContactName}
data RelayProfile = RelayProfile
{ displayName :: ContactName,
fullName :: Text,
shortDescr :: Maybe Text,
image :: Maybe ImageData
}
deriving (Eq, Show)
$(JQ.deriveJSON defaultJSON ''RelayProfile)
toRelayProfile :: (ContactName, Text, Maybe Text, Maybe ImageData) -> RelayProfile
toRelayProfile (displayName, fullName, shortDescr, image) = RelayProfile {displayName, fullName, shortDescr, image}
relayProfileFromName :: ContactName -> RelayProfile
relayProfileFromName displayName = RelayProfile {displayName, fullName = "", shortDescr = Nothing, image = Nothing}
data RelayAddressLinkData = RelayAddressLinkData {relayProfile :: RelayProfile}
deriving (Show)