From 0c58f4347bccc70d727038191cfe29b76667d4fc Mon Sep 17 00:00:00 2001 From: Gigi Date: Thu, 9 Oct 2025 16:23:28 +0100 Subject: [PATCH] fix(highlights): show remote relay list for fetched highlights Instead of 'no relay info', show the list of remote relays we're connected to as a fallback for highlights that don't have publishedRelays metadata (i.e., highlights fetched from other users) --- src/components/HighlightItem.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/HighlightItem.tsx b/src/components/HighlightItem.tsx index 3ec603c1..1bae179c 100644 --- a/src/components/HighlightItem.tsx +++ b/src/components/HighlightItem.tsx @@ -8,7 +8,7 @@ import { Models, IEventStore } from 'applesauce-core' import { RelayPool } from 'applesauce-relay' import { onSyncStateChange, isEventSyncing } from '../services/offlineSyncService' import { RELAYS } from '../config/relays' -import { areAllRelaysLocal } from '../utils/helpers' +import { areAllRelaysLocal, isLocalRelay } from '../utils/helpers' interface HighlightWithLevel extends Highlight { level?: 'mine' | 'friends' | 'nostrverse' @@ -201,10 +201,14 @@ export const HighlightItem: React.FC = ({ } } - // Default server icon for highlights without relay info + // Fallback: show remote relays we queried (where this was likely fetched from) + const remoteRelays = RELAYS.filter(url => !isLocalRelay(url)) + const relayNames = remoteRelays.map(url => + url.replace(/^wss?:\/\//, '').replace(/\/$/, '') + ) return { icon: faServer, - tooltip: 'no relay info', + tooltip: relayNames.join('\n'), spin: false } }