nostr_cn_dev's avatar
nostr_cn_dev
npub1l5r0...m9jm
Developed the following products: - NostrBridge, 网桥转发 - TaskQ5, 分布式多任务 - NostrHTTP, nostr to http - Postr, 匿名交友,匿名邮局 - nostrclient (Python client) . -nostrbook, (https://nostrbook.com) 用nostr在线写书 https://www.duozhutuan.com nostrhttp demo
nostr_cn_dev's avatar
nostr_cn_dev 11 months ago
let sub = pool.subscribeMany( nostrUser ? filterRelays(nostrUser?.relays || [], relaysOnPlatform) : relaysOnPlatform, [ { kinds: [6, 7], "#e": [event.id], }, { kinds: [1], "#q": [event.id], }, { kinds: [1], "#e": [event.id], }, { kinds: [9735], "#p": [event.pubkey], "#e": [event.id], }, ], https://github.com/YakiHonne/yakihonne-web-app/blob/main/client/src/Components/NOSTR/NotesComment.js yakihonne代码看 这个评论获取的是全数据。 处理数据: async onevent(event_) { if (event_.kind === 9735) { let sats = decodeBolt11(getBolt11(event_)); let zapper = getZapper(event_); setZappers((prev) => { return [...prev, zapper]; }); setZapsCount((prev) => prev + sats); } if (event_.kind === 7) { setReactions((reactions_) => [...reactions_, event_]); } if (event_.kind === 6) { setReposts((reposts) => [...reposts, event_]); } if (event_.kind === 1) { let check_kind1 = await onEvent(event_); if (check_kind1.checkForQuote) setQuotes((quotes) => [...quotes, event_]); if (check_kind1.checkForComment) setComments((comments) => [...comments, event_]); } }, } );
nostr_cn_dev's avatar
nostr_cn_dev 11 months ago
@Cody const filters: Filter[] = [ { '#e': [event.id], kinds: [kinds.Reaction], limit: 500 }, { '#e': [event.id], kinds: [kinds.Repost], limit: 100 } ] 点赞数 和评论数是 通过查询所有的点赞列表统计的?按照你的例子超过500其实并没有统计出来?
nostr_cn_dev's avatar
nostr_cn_dev 11 months ago
image nostrbook 更新了 navbar功能,可以给每篇文章点赞和评论。 细节还没有完成。