Skip to content

Commit

Permalink
Only download notes
Browse files Browse the repository at this point in the history
We made this decision with Matt after seeing high Firestore usage due to
saving contact lists with a ton of p tags in them as other events are
not supported in the app anyway.
  • Loading branch information
boreq committed Jul 6, 2023
1 parent 25374ab commit 6a959a6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions service/app/downloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ const (
storeMetricsEvery = 10 * time.Second
)

var eventKindsToDownload = []int{domain.EventKindNote.Int()}

type ReceivedEventPublisher interface {
Publish(relay domain.RelayAddress, event domain.Event)
}
Expand Down Expand Up @@ -365,6 +367,7 @@ func (d *RelayDownloader) updateSubs(
envelope := nostr.ReqEnvelope{
SubscriptionID: publicKey.Hex(),
Filters: nostr.Filters{nostr.Filter{
Kinds: eventKindsToDownload,
Tags: map[string][]string{
"p": {publicKey.Hex()},
},
Expand Down

0 comments on commit 6a959a6

Please sign in to comment.