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
+2 -2
View File
@@ -1579,7 +1579,7 @@ viewUserServers UserOperatorServers {operator, smpServers, xftpServers, chatRela
[" Chat relays"] <> map (plain . (" " <>) . viewChatRelay) cRelays
| otherwise = []
where
viewChatRelay UserChatRelay {relayProfile = RelayProfile {name}, address, preset, tested, enabled} = name <> relayAddress <> relayInfo
viewChatRelay UserChatRelay {relayProfile = RelayProfile {displayName, fullName, shortDescr}, address, preset, tested, enabled} = displayName <> optionalFullName displayName fullName shortDescr <> relayAddress <> relayInfo
where
relayAddress = ": " <> safeDecodeUtf8 (strEncode address)
relayInfo = if null relayInfo_ then "" else parens $ T.intercalate ", " relayInfo_
@@ -1619,7 +1619,7 @@ viewRelayTestResult relayProfile_ = \case
Just RelayTestFailure {rtfStep, rtfError} ->
["relay test failed at " <> plain (show rtfStep) <> ", error: " <> plain (show rtfError)]
Nothing -> case relayProfile_ of
Just RelayProfile {name} -> ["relay test passed, profile: " <> plain (T.unpack name)]
Just RelayProfile {displayName, fullName, shortDescr} -> ["relay test passed, profile: " <> ttyFullName displayName fullName shortDescr]
Nothing -> ["relay test passed"]
viewServerOperators :: [ServerOperator] -> Maybe UsageConditionsAction -> [StyledString]