Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
57863fddcd | ||
|
|
7d500495a7 | ||
|
|
7da3b7047c |
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"VERSION": "v0.7.90",
|
||||
"VERSION_NUMBER": "0.7.90",
|
||||
"BUILD_DATE": "2026-07-01T20:54:24.423Z"
|
||||
"VERSION": "v0.7.93",
|
||||
"VERSION_NUMBER": "0.7.93",
|
||||
"BUILD_DATE": "2026-07-03T10:29:34.780Z"
|
||||
}
|
||||
|
||||
@@ -1049,9 +1049,8 @@ function pruneSeenEventIds(seenEventIds) {
|
||||
function wireSubscriptionHandlers(subId, state, filtersForCache) {
|
||||
if (!state?.sub) return;
|
||||
|
||||
state.sub.on('event', async (event) => {
|
||||
state.sub.on('event', (event) => {
|
||||
if (state.seenEventIds.has(event.id)) {
|
||||
console.log('[Worker] Dedup dropped event for sub:', subId, 'id:', event.id);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1063,14 +1062,7 @@ function wireSubscriptionHandlers(subId, state, filtersForCache) {
|
||||
state.lastEventCreatedAt = Math.max(Number(state.lastEventCreatedAt || 0), createdAt);
|
||||
}
|
||||
|
||||
console.log('[Worker] Event received for sub:', subId, 'kind:', event.kind, 'id:', event.id);
|
||||
|
||||
if (isWorkerEventMuted(event)) {
|
||||
console.log('[Worker][mute] Filtered muted event for sub:', subId, {
|
||||
id: event?.id || null,
|
||||
kind: event?.kind || null,
|
||||
pubkey: event?.pubkey || null,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1079,14 +1071,14 @@ function wireSubscriptionHandlers(subId, state, filtersForCache) {
|
||||
trackRelayRead(event.relay.url);
|
||||
}
|
||||
|
||||
// Cache the event to IndexedDB
|
||||
// Cache the event to IndexedDB — fire-and-forget (NOT awaited).
|
||||
// Awaiting serializes all incoming events through IndexedDB I/O,
|
||||
// which blocks the worker's event loop and starves port.onmessage
|
||||
// handlers (getRelayData, getRelayStats, etc.), causing 15s timeouts
|
||||
// and relay indicators disappearing over extended sessions.
|
||||
if (ndk.cacheAdapter && typeof ndk.cacheAdapter.setEvent === 'function') {
|
||||
try {
|
||||
await ndk.cacheAdapter.setEvent(event, filtersForCache, event.relay);
|
||||
console.log('[Worker] Cached event:', event.id, 'from relay:', event.relay?.url);
|
||||
} catch (error) {
|
||||
console.error('[Worker] Failed to cache event:', error);
|
||||
}
|
||||
void ndk.cacheAdapter.setEvent(event, filtersForCache, event.relay)
|
||||
.catch(error => console.error('[Worker] Failed to cache event:', error));
|
||||
}
|
||||
|
||||
broadcast({
|
||||
|
||||
@@ -1108,12 +1108,6 @@ import { createProfileCache } from './js/profile-cache.mjs';
|
||||
// post-interactions module via a detached interaction bar (kept out of
|
||||
// the DOM so it never shows up in the row). Menu items trigger clicks
|
||||
// on the corresponding buttons in that detached bar.
|
||||
console.log('[notifications] buildNotificationRow menu check', {
|
||||
notifId: item.id,
|
||||
kind: item.kind,
|
||||
targetEventId: item.targetEventId,
|
||||
hasInteractions: !!interactions
|
||||
});
|
||||
if (item.targetEventId && interactions) {
|
||||
const targetPubkey = item.targetPubkey || currentPubkey;
|
||||
const targetEventData = { id: item.targetEventId, pubkey: targetPubkey };
|
||||
|
||||
@@ -491,17 +491,9 @@ import { initPostCards } from './js/post-interactions2.mjs';
|
||||
}
|
||||
|
||||
function handleComposerCommentIntent({ postId, postPubkey }) {
|
||||
const postEl = document.querySelector(`.divPostItem[data-post-id="${postId}"]`);
|
||||
if (!postEl) return false;
|
||||
|
||||
const entry = getOrCreateInlineComposer(postId, postEl);
|
||||
if (!entry) return false;
|
||||
entry.tags = [
|
||||
['e', postId, '', 'reply'],
|
||||
['p', postPubkey]
|
||||
];
|
||||
if (entry.instance?.show) entry.instance.show();
|
||||
return focusInlineComposer(entry.hostEl, '');
|
||||
if (!postId) return false;
|
||||
window.open('./post-feed.html?event=' + encodeURIComponent(postId), '_blank');
|
||||
return true;
|
||||
}
|
||||
|
||||
function handleComposerQuoteIntent({ postId, postPubkey }) {
|
||||
|
||||
Reference in New Issue
Block a user