diff --git a/src/components/ChatViewer.tsx b/src/components/ChatViewer.tsx index 7f7d0e1..187ef50 100644 --- a/src/components/ChatViewer.tsx +++ b/src/components/ChatViewer.tsx @@ -804,7 +804,8 @@ export function ChatViewer({ {(conversation.type === "group" || - conversation.type === "live-chat") && ( + conversation.type === "live-chat" || + conversation.type === "dm") && ( + + +
+ Private Inbox Relays (NIP-17) +
+
+ {nip17RelayData.map(({ pubkey, relays, loading, relayData }) => ( +
+
+ + + {loading + ? "..." + : `${relays.length} relay${relays.length !== 1 ? "s" : ""}`} + +
+ {loading ? ( +
+ Loading... +
+ ) : relays.length === 0 ? ( +
+ No inbox relays configured +
+ ) : ( + relayData.map(({ url, state }) => { + const connIcon = getConnectionIcon(state); + const authIcon = getAuthIcon(state); + return ( +
+
+ {connIcon.icon} + {authIcon.icon} +
+ +
+ ); + }) + )} +
+ ))} +
+
+ + ); + } + + // Standard relay display for other protocols return (
- Relays ({relays.length}) + Relays ({standardRelays.length})
- {relayData.map(({ url, state }) => { + {standardRelayData.map(({ url, state }) => { const connIcon = getConnectionIcon(state); const authIcon = getAuthIcon(state);