mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-06 04:42:57 +00:00
Merge pull request #2483 from PR0M3TH3AN/fix-torch-dashboard-events-loading-8148177310068210665
Fix TORCH dashboard event loading for active locks
This commit is contained in:
2 files changed
+4
-4
No files matched your search
Binary file not shown.
|
Before Width: | Height: | Size: 20 KiB |
@@ -520,13 +520,13 @@
|
||||
updateConnectionBadge();
|
||||
|
||||
// NIP-01 REQ: subscribe to TORCH lock events
|
||||
// Since today is the start of the window, request from today
|
||||
const sinceToday =
|
||||
Math.floor(new Date().setUTCHours(0, 0, 0, 0) / 1000);
|
||||
// Request from 7 days ago to cover active locks created before midnight
|
||||
// and recent history for weekly cadence
|
||||
const since = Math.floor(Date.now() / 1000) - 7 * 24 * 60 * 60;
|
||||
const filter = {
|
||||
kinds: [LOCK_EVENT_KIND],
|
||||
'#t': [HASHTAG],
|
||||
since: sinceToday,
|
||||
since: since,
|
||||
};
|
||||
ws.send(JSON.stringify(['REQ', subId, filter]));
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user