Fixed readme for publishing with pool

This commit is contained in:
Egge
2023-03-01 18:41:49 +01:00
committed by fiatjaf_
parent 0d77013aab
commit e48d722227

View File

@@ -154,11 +154,10 @@ sub.on('event', event => {
}) })
let pubs = pool.publish(relays, newEvent) let pubs = pool.publish(relays, newEvent)
pubs.forEach(pub => pubs.on('ok', () => {
pub.on('ok', () => { // this may be called multiple times, once for every relay that accepts the event
// ... // ...
}) })
)
let events = await pool.list(relays, [{kinds: [0, 1]}]) let events = await pool.list(relays, [{kinds: [0, 1]}])
let event = await pool.get(relays, { let event = await pool.get(relays, {