core: relay key and member id as immutable relay link data (#6711)

This commit is contained in:
spaced4ndy authored and GitHub committed 2026-03-28 09:51:50 +00:00
1 parent 80eb678892
commit d665b1f5d8
29 files changed
+302 -141

No files matched your search

+2 -1
View File
@@ -474,6 +474,7 @@ chatEventToView hu ChatConfig {logLevel, showReactions, showReceipts, testView}
CEvtGroupLinkDataUpdated u g groupLink relays relaysChanged
| relaysChanged -> ttyUser u $ viewGroupLinkRelaysUpdated g groupLink relays
| otherwise -> []
CEvtGroupRelayUpdated {} -> []
CEvtJoinedGroupMember u g m -> ttyUser u $ viewJoinedGroupMember g m
CEvtHostConnected p h -> [plain $ "connected to " <> viewHostEvent p h]
CEvtHostDisconnected p h -> [plain $ "disconnected from " <> viewHostEvent p h]
@@ -2062,7 +2063,7 @@ viewConnectionPlan ChatConfig {logLevel, testView} _connLink = \case
GLPOk groupSLinkInfo_ groupSLinkData ->
let direct = maybe True (\(GroupShortLinkInfo {direct = d}) -> d) groupSLinkInfo_
in [grpLink $ if direct then "ok to connect directly" else "ok to connect via relays"]
<> [viewJSON groupSLinkData] -- | testView] -- TODO [relays] disable link data output in cli (uncomment testView)
<> [viewJSON groupSLinkData | testView]
GLPOwnLink g -> [grpLink "own link for group " <> ttyGroup' g]
GLPConnectingConfirmReconnect -> [grpLink "connecting, allowed to reconnect"]
GLPConnectingProhibit Nothing -> [grpLink "connecting"]