From 93c88704e0a49a405faf4b5b86a31d35ac329f3c Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 6 Jan 2026 13:11:39 +0000 Subject: [PATCH] Fix watch history hydration by prioritizing readRelays The `createWatchHistoryHydrationStage` in the feed engine was incorrectly relying solely on `nostrClient.relays` for network fetches. This could cause hydration failures if `relays` contained write-only servers or was otherwise restricted. This commit updates the logic to prioritize `nostrClient.readRelays` if available, falling back to `nostrClient.relays`. This ensures that hydration attempts query the correct relays configured for reading data. Fixes an issue where watch history items would display as "Untitled video" due to failed metadata resolution. --- js/feedEngine/watchHistoryFeed.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/js/feedEngine/watchHistoryFeed.js b/js/feedEngine/watchHistoryFeed.js index a1860609..4f5dc2bb 100644 --- a/js/feedEngine/watchHistoryFeed.js +++ b/js/feedEngine/watchHistoryFeed.js @@ -318,11 +318,18 @@ function createWatchHistoryHydrationStage() { const uniqueIds = Array.from(new Set(missing)); const uniqueAddresses = Array.from(new Set(missingAddresses)); - const relays = + const readRelays = + Array.isArray(nostrClient?.readRelays) && nostrClient.readRelays.length + ? nostrClient.readRelays + : null; + + const fallbackRelays = Array.isArray(nostrClient?.relays) && nostrClient.relays.length ? nostrClient.relays : null; + const relays = readRelays || fallbackRelays; + if (!relays || !nostrClient?.pool) { return items; }