diff --git a/www/js/version.json b/www/js/version.json index e293f2d..a615342 100644 --- a/www/js/version.json +++ b/www/js/version.json @@ -1,5 +1,5 @@ { - "VERSION": "v0.7.53", - "VERSION_NUMBER": "0.7.53", - "BUILD_DATE": "2026-06-27T00:20:37.017Z" + "VERSION": "v0.7.54", + "VERSION_NUMBER": "0.7.54", + "BUILD_DATE": "2026-06-27T01:33:34.109Z" } diff --git a/www/ndk-worker.js b/www/ndk-worker.js index 46dd34d..39f0e66 100644 --- a/www/ndk-worker.js +++ b/www/ndk-worker.js @@ -6449,8 +6449,11 @@ function shortHexPubkey(hex) { } // Cache for discovered relays — rebuilt only when the contact list changes. +// The version suffix forces a rebuild when the handler code changes (e.g. +// adding servingNames). let discoveredRelaysCache = null; let discoveredRelaysCacheKey = ''; +const DISCOVERED_RELAYS_CACHE_VERSION = 'v2-names'; async function handleGetDiscoveredRelays(requestId, port) { try { @@ -6478,7 +6481,7 @@ async function handleGetDiscoveredRelays(requestId, port) { ? Array.from(kind3Events).sort((a, b) => (b.created_at || 0) - (a.created_at || 0))[0] : null; const followedPubkeys = latestKind3 ? extractFollowedPubkeysFromKind3(latestKind3) : []; - const cacheKey = `${latestKind3?.id || 'none'}_${latestKind3?.created_at || 0}`; + const cacheKey = `${DISCOVERED_RELAYS_CACHE_VERSION}_${latestKind3?.id || 'none'}_${latestKind3?.created_at || 0}`; // Rebuild the relay→[pubkeys] mapping from follows' kind 10002 events // in the Dexie cache if the contact list has changed.