diff --git a/www/js/version.json b/www/js/version.json index c0827ef..ed0ad9c 100644 --- a/www/js/version.json +++ b/www/js/version.json @@ -1,5 +1,5 @@ { - "VERSION": "v0.7.70", - "VERSION_NUMBER": "0.7.70", - "BUILD_DATE": "2026-06-30T13:28:38.113Z" + "VERSION": "v0.7.71", + "VERSION_NUMBER": "0.7.71", + "BUILD_DATE": "2026-06-30T13:33:08.793Z" } diff --git a/www/ndk-worker.js b/www/ndk-worker.js index 18a8611..3745e97 100644 --- a/www/ndk-worker.js +++ b/www/ndk-worker.js @@ -6308,6 +6308,8 @@ async function handlePublish(requestId, event, port) { broadcast({ type: 'broadcastProgress', sessionId: publishSessionId, + eventId: ndkEvent.id || null, + eventKind: event.kind, phase: 'done', total: totalTarget, successful: publishedSoFar.size, @@ -6323,6 +6325,24 @@ async function handlePublish(requestId, event, port) { } } + // For non-broadcast publishes, emit a simplified broadcastProgress 'done' + // event so post cards can still show the relay count (e.g., "3r - 1h"). + // We use the relaySet result to count successful relays. + if (!isBroadcast) { + const successCount = relaySet ? relaySet.size : 0; + broadcast({ + type: 'broadcastProgress', + sessionId: publishSessionId, + eventId: ndkEvent.id || null, + eventKind: event.kind, + phase: 'done', + total: successCount, + successful: successCount, + failed: 0, + latestRelay: null, + }); + } + // Get detailed relay results const relayResults = { successful: [],