firehose: expand criteria, improve logging

This commit is contained in:
Alex Gleason 2023-08-14 19:01:28 -05:00
parent b11677573b
commit 45a3e2974e
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ const pool = new RelayPool(relays);
// side-effects based on them, such as trending hashtag tracking // side-effects based on them, such as trending hashtag tracking
// and storing events for notifications and the home feed. // and storing events for notifications and the home feed.
pool.subscribe( pool.subscribe(
[{ kinds: [1], since: nostrNow() }], [{ kinds: [0, 1, 3, 5, 6, 7], since: nostrNow() }],
relays, relays,
handleEvent, handleEvent,
undefined, undefined,
@ -23,7 +23,7 @@ pool.subscribe(
/** Handle events through the firehose pipeline. */ /** Handle events through the firehose pipeline. */
async function handleEvent(event: SignedEvent): Promise<void> { async function handleEvent(event: SignedEvent): Promise<void> {
console.info('firehose event:', event.id); console.info(`firehose: Event<${event.kind}> ${event.id}`);
trackHashtags(event); trackHashtags(event);
trackRelays(event); trackRelays(event);