diff options
| author | Adam Soltys <[email protected]> | 2026-09-28 22:58:40 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-09-28 22:58:40 -0700 |
| commit | c0e428aff3ff34fec56a434bc1837e49ab9c1a81 (patch) | |
| tree | 63bb5e1f314d2a53b9551be17bf6fa4a261958e4 /tools/thread-cache-test.js | |
| parent | 86d5609a188ce4dae248d1b56c4563bae299af31 (diff) | |
| download | coinosv3-c0e428aff3ff34fec56a434bc1837e49ab9c1a81.tar.gz coinosv3-c0e428aff3ff34fec56a434bc1837e49ab9c1a81.zip | |
Polls (NIP-88): options with each one's share of the vote, votable from the feed and the thread.
A kind 1068 poll showed as "an event this app doesn't show". Now its
options are rows with the vote share behind them (kind 1018 votes, each
person's latest counts, single/multiple choice, endsAt honored); a tap
votes, marked as yours at once. A quoted poll is pictured in its card.
Feeds and profiles list polls alongside notes, and a thread's root is
looked up by id with any kind, so replies to a poll find it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Du1qT1wbkYwYK6zkGH79Rp
Diffstat (limited to 'tools/thread-cache-test.js')
| -rw-r--r-- | tools/thread-cache-test.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/thread-cache-test.js b/tools/thread-cache-test.js index e8b0ccf..6bac353 100644 --- a/tools/thread-cache-test.js +++ b/tools/thread-cache-test.js @@ -84,7 +84,8 @@ try { const { messagesFeature } = await import(path); let requests = [], waiting = []; globalThis.__threadQuery = (filter) => { - if (filter.kinds?.includes(1) && (filter.ids || filter['#e'])) { + // root lookups by id carry no kind (a root can be a poll); reply queries are kind 1 + if (filter.ids || (filter.kinds?.includes(1) && filter['#e'])) { requests.push(filter); return new Promise((resolve) => waiting.push({ filter, resolve })); } |
