From 36475f009e64b9abff6f6f6d21ae6f86b9f83a43 Mon Sep 17 00:00:00 2001 From: Silberengel Date: Wed, 8 Apr 2026 09:33:24 +0200 Subject: [PATCH] bug-fix last http relay problems --- src/components/NoteList/index.tsx | 6 +++--- src/components/RelayInfo/RelayReviewsPreview.tsx | 4 ++-- src/services/client.service.ts | 4 +++- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/components/NoteList/index.tsx b/src/components/NoteList/index.tsx index 8db129a3..3a665410 100644 --- a/src/components/NoteList/index.tsx +++ b/src/components/NoteList/index.tsx @@ -14,7 +14,7 @@ import { stableSpellFeedFilterKey } from '@/lib/spell-feed-request-identity' import logger from '@/lib/logger' -import { normalizeUrl } from '@/lib/url' +import { normalizeAnyRelayUrl, normalizeUrl } from '@/lib/url' import { shouldIncludeZapReceiptAtReplyThreshold } from '@/lib/event-metadata' import { isTouchDevice } from '@/lib/utils' import { useContentPolicy } from '@/providers/ContentPolicyProvider' @@ -625,7 +625,7 @@ const NoteList = forwardRef( const subRequestsKey = useMemo(() => { return JSON.stringify( subRequests.map((req) => ({ - urls: [...req.urls].map((u) => normalizeUrl(u) || u).filter(Boolean).sort(), + urls: [...req.urls].map((u) => normalizeAnyRelayUrl(u) || u).filter(Boolean).sort(), filter: stableSpellFeedFilterKey(req.filter) })) ) @@ -635,7 +635,7 @@ const NoteList = forwardRef( () => JSON.stringify( (followingFeedDeltaSubRequests ?? []).map((req) => ({ - urls: [...req.urls].map((u) => normalizeUrl(u) || u).filter(Boolean).sort(), + urls: [...req.urls].map((u) => normalizeAnyRelayUrl(u) || u).filter(Boolean).sort(), filter: stableSpellFeedFilterKey(req.filter) })) ), diff --git a/src/components/RelayInfo/RelayReviewsPreview.tsx b/src/components/RelayInfo/RelayReviewsPreview.tsx index 9f43d83a..74b6120d 100644 --- a/src/components/RelayInfo/RelayReviewsPreview.tsx +++ b/src/components/RelayInfo/RelayReviewsPreview.tsx @@ -21,7 +21,7 @@ import { relayReviewEventTargetsRelay, relayReviewsFeedSnapshotKey } from '@/lib/relay-review-feed' -import { normalizeUrl } from '@/lib/url' +import { normalizeAnyRelayUrl } from '@/lib/url' import { cn, isTouchDevice } from '@/lib/utils' import { useMuteList } from '@/contexts/mute-list-context' import { muteSetHas } from '@/lib/mute-set' @@ -93,7 +93,7 @@ export default function RelayReviewsPreview({ relayUrl }: { relayUrl: string }) setReviews([]) setInitialized(false) - const normalizedTarget = normalizeUrl(relayUrl) || relayUrl + const normalizedTarget = normalizeAnyRelayUrl(relayUrl) || relayUrl const dTags = relayReviewDTagsForRelayUrl(relayUrl) const snapKey = relayReviewsFeedSnapshotKey(normalizedTarget) const fromSession = getSessionFeedSnapshot(snapKey) diff --git a/src/services/client.service.ts b/src/services/client.service.ts index 1f96f54e..e6dce3d0 100644 --- a/src/services/client.service.ts +++ b/src/services/client.service.ts @@ -2576,7 +2576,9 @@ class ClientService extends EventTarget { that.scheduleTimelinePersist(key) } - const subCloser = this.subscribe(relays, filter, { + // HTTP index relays are handled via httpTimelinePollBases above — never pass them to the WS subscribe path. + const wsRelays = relays.filter((u) => !isHttpRelayUrl(u)) + const subCloser = this.subscribe(wsRelays, filter, { startLogin, onevent: (evt: NEvent) => { applySubscribedTimelineEvent(evt)