mirror of
https://github.com/aljazceru/haven.git
synced 2025-12-18 14:24:18 +01:00
discard bad notes sent by relays
This commit is contained in:
@@ -85,8 +85,12 @@ func importTaggedNotes() {
|
||||
}}
|
||||
|
||||
for ev := range pool.SubManyEose(ctx, config.ImportSeedRelays, filters) {
|
||||
wdb.Publish(ctx, *ev.Event)
|
||||
taggedImportedNotes++
|
||||
for _, tag := range ev.Event.Tags.GetAll([]string{"p"}) {
|
||||
if tag[1] == nPubToPubkey(config.OwnerNpub) {
|
||||
wdb.Publish(ctx, *ev.Event)
|
||||
taggedImportedNotes++
|
||||
}
|
||||
}
|
||||
}
|
||||
log.Println("📦 imported", taggedImportedNotes, "tagged notes")
|
||||
time.Sleep(5 * time.Second)
|
||||
|
||||
Reference in New Issue
Block a user