- {/* Icon + Name */}
+ {/* Icon/Avatar + Name */}
- {conversation.metadata?.icon && (
-

{
- // Hide image if it fails to load
- e.currentTarget.style.display = "none";
- }}
- />
- )}
-
- {conversation.protocol === "nip-17" ? (
+ {/* For NIP-17 DMs, just show title without big avatars */}
+ {conversation.protocol === "nip-17" ? (
+
- ) : (
- conversation.title
- )}
-
+
+ ) : (
+ <>
+ {conversation.metadata?.icon && (
+

{
+ // Hide image if it fails to load
+ e.currentTarget.style.display = "none";
+ }}
+ />
+ )}
+
+ {conversation.title}
+
+ >
+ )}
{/* Description */}
{conversation.metadata?.description && (
@@ -878,26 +1013,78 @@ export function ChatViewer({
)}
{/* Protocol Type - Clickable */}
- {(conversation.type === "group" ||
- conversation.type === "live-chat") && (
-
- )}
- {(conversation.type === "group" ||
- conversation.type === "live-chat") && (
- •
- )}
+
+ •
{conversation.type}
+ {/* Participants (NIP-17) */}
+ {conversation.protocol === "nip-17" &&
+ (() => {
+ const others = conversation.participants.filter(
+ (p) => p.pubkey !== activeAccount?.pubkey,
+ );
+
+ // Self-chat
+ if (others.length === 0) {
+ return (
+
+ Saved Messages
+
+ );
+ }
+
+ // 1-on-1 chat
+ if (others.length === 1) {
+ return (
+
+ );
+ }
+
+ // Group chat (2+ others)
+ return (
+
+
+ Participants:
+
+
+ {others.map((p) => (
+
+ ))}
+
+
+ );
+ })()}
{/* Live Activity Status */}
{liveActivity?.status && (
@@ -922,10 +1109,13 @@ export function ChatViewer({
{/* Copy Chat ID button */}
- {getChatIdentifier(conversation) && (
+ {getChatIdentifier(conversation, activeAccount?.pubkey) && (
+ {/* Lock icon for encrypted conversations */}
+ {conversation.protocol === "nip-17" && (
+
+ )}
- {(conversation.type === "group" ||
- conversation.type === "live-chat") && (
-
- )}
+ {/* NIP badge - clickable for all protocols */}
+
@@ -1037,6 +1229,8 @@ export function ChatViewer({