Merge pull request #17 from bitvora/dev-fixLazySubscription

only get notes since 5 minuts ago when subscribing to inbox
This commit is contained in:
Barry Deen
2024-09-26 19:14:49 -04:00
committed by GitHub

View File

@@ -115,10 +115,12 @@ func importTaggedNotes() {
func subscribeInbox() {
ctx := context.Background()
wdb := eventstore.RelayWrapper{Store: &inboxDB}
startTime := nostr.Timestamp(time.Now().Add(-time.Minute * 5).Unix())
filters := []nostr.Filter{{
Tags: nostr.TagMap{
"p": {nPubToPubkey(config.OwnerNpub)},
},
Since: &startTime,
}}
log.Println("📢 subscribing to inbox")