bring back unique events.

This commit is contained in:
fiatjaf
2022-11-13 19:33:48 -03:00
parent 2641327c28
commit 37235a1394
2 changed files with 9 additions and 4 deletions

View File

@@ -24,7 +24,7 @@ for notice := range pool.Notices {
### Listening for events
```go
sub := pool.Sub(nostr.Filters{
subId, allEvents, uniqueEvents := pool.Sub(nostr.Filters{
{
Authors: []string{"0ded86bf80c76847320b16f22b7451c08169434837a51ad5fe3b178af6c35f5d"},
Kinds: []int{nostr.KindTextNote}, // or {1}
@@ -32,7 +32,7 @@ sub := pool.Sub(nostr.Filters{
})
go func() {
for event := range sub.UniqueEvents {
for event := range uniqueEvents {
log.Print(event)
}
}()