diff --git a/nostr_dvm/dvm.py b/nostr_dvm/dvm.py index 516f52f..bef4c29 100644 --- a/nostr_dvm/dvm.py +++ b/nostr_dvm/dvm.py @@ -583,7 +583,9 @@ class DVM: for tag in original_event.tags(): if tag.as_vec()[0] == "relays": relay_tag = tag - break + if tag.as_vec()[0] == "client": + client = tag.as_vec()[1] + reply_tags.append(Tag.parse(["client", client])) if relay_tag is not None: reply_tags.append(relay_tag) diff --git a/nostr_dvm/tasks/content_discovery_update_db_only.py b/nostr_dvm/tasks/content_discovery_update_db_only.py index 2624f70..fec6f64 100644 --- a/nostr_dvm/tasks/content_discovery_update_db_only.py +++ b/nostr_dvm/tasks/content_discovery_update_db_only.py @@ -136,6 +136,11 @@ class DicoverContentDBUpdateScheduler(DVMTaskInterface): await cli.connect() + + + # Mute public key + await cli.mute_public_keys(self.dvm_config.MUTE) + timestamp_since = Timestamp.now().as_secs() - self.db_since since = Timestamp.from_secs(timestamp_since) diff --git a/nostr_dvm/utils/dvmconfig.py b/nostr_dvm/utils/dvmconfig.py index 53e5cc2..f68abdf 100644 --- a/nostr_dvm/utils/dvmconfig.py +++ b/nostr_dvm/utils/dvmconfig.py @@ -24,6 +24,13 @@ class DVMConfig: "wss://nostr.oxtr.dev", "wss://relay.nostr.net" , "wss://relay.primal.net"] #, "wss://relay.snort.social"] + MUTE = ["npub1x5vhtx7j2prvueeenwf7tmesrzmuzc50zs0aakgd75v5c30ekj3s5zjckj", + "npub1l03urys27uet2u6wq6u90rnzf7kv5c3wfu3cyndqz9lq75g46c5q0wkpsj", + "npub17g7qhlu4caefd88vateedm9wau9ys6xt6jhjcfu2kqyw9xmnucxs5d6crj", + "npub1epwccahqndqhseh6q02seu40cqa2ghk3u9tvu92yh4hd6lmxg33spwzujc", + "npub1v0kgu3hymtd4fw9zrlem6l74c3cwl8jdqentt4qsxrrzan6paxaqkkf6dr", + ] + AVOID_PAID_OUTBOX_RELAY_LIST = AVOID_OUTBOX_RELAY_LIST #If a DVM has a paid subscription, overwrite list without the paid one. diff --git a/setup.py b/setup.py index 3de867d..7a7de9f 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from setuptools import setup, find_packages -VERSION = '0.8.18' +VERSION = '0.8.19' DESCRIPTION = 'A framework to build and run Nostr NIP90 Data Vending Machines' LONG_DESCRIPTION = ('A framework to build and run Nostr NIP90 Data Vending Machines. See the github repository for more information') diff --git a/ui/noogle/src/components/FilterGeneration.vue b/ui/noogle/src/components/FilterGeneration.vue index 5bce351..a4796ee 100644 --- a/ui/noogle/src/components/FilterGeneration.vue +++ b/ui/noogle/src/components/FilterGeneration.vue @@ -75,7 +75,8 @@ async function generate_feed(id) { let tags = [] //tags.push(["param", "max_results", "200"]) tags.push(["param", "user", store.state.pubkey.toHex()]) - + let r = store.state.relays.join(",") + tags.push(["relays", r]) let res; let requestid; diff --git a/ui/noogle/src/components/ImageGeneration.vue b/ui/noogle/src/components/ImageGeneration.vue index 01dbf6a..868f163 100644 --- a/ui/noogle/src/components/ImageGeneration.vue +++ b/ui/noogle/src/components/ImageGeneration.vue @@ -61,6 +61,8 @@ async function generate_image(message) { let tags = [ ["i", message, "text"] ] + let r = store.state.relays.join(",") + tags.push(["relays", r]) hasmultipleinputs = false if (urlinput.value !== "" && urlinput.value.startsWith('http')){ diff --git a/ui/noogle/src/components/Login.vue b/ui/noogle/src/components/Login.vue index 2450cc1..820573e 100644 --- a/ui/noogle/src/components/Login.vue +++ b/ui/noogle/src/components/Login.vue @@ -686,7 +686,10 @@ export default { let limits = RelayLimits.disable() let opts = new Options().waitForSend(false).connectionTimeout(Duration.fromSecs(5)).relayLimits(limits); let client = new ClientBuilder().signer(this.signer).opts(opts).build() - for (const relay of store.state.relays){ + + + + for (const relay of store.state.relays){ await client.addRelay(relay); } await client.connect(); diff --git a/ui/noogle/src/components/RecommendationGeneration.vue b/ui/noogle/src/components/RecommendationGeneration.vue index e9648ff..3e12123 100644 --- a/ui/noogle/src/components/RecommendationGeneration.vue +++ b/ui/noogle/src/components/RecommendationGeneration.vue @@ -93,6 +93,8 @@ async function generate_feed(id) { let tags = [] tags.push(["param", "max_results", "200"]) tags.push(["param", "user", store.state.pubkey.toHex()]) + let r = store.state.relays.join(",") + tags.push(["relays", r]) let res; let requestid; diff --git a/ui/noogle/src/components/Search.vue b/ui/noogle/src/components/Search.vue index bf81913..2973abe 100644 --- a/ui/noogle/src/components/Search.vue +++ b/ui/noogle/src/components/Search.vue @@ -153,6 +153,8 @@ async function send_search_request(msg) { ["param", "until", ((dateto.value/1000).toFixed(0))], ['param', 'users', JSON.stringify(users)] ] + let r = store.state.relays.join(",") + tags.push(["relays", r]) let tags_as_str = JSON.stringify(tags) diff --git a/ui/noogle/src/components/SummarizationGeneration.vue b/ui/noogle/src/components/SummarizationGeneration.vue index 2f997ba..7787f97 100644 --- a/ui/noogle/src/components/SummarizationGeneration.vue +++ b/ui/noogle/src/components/SummarizationGeneration.vue @@ -59,9 +59,13 @@ let sortedIds = eventids.sort(function(a,b) {return (a.index > b.index) ? 1 : (( try{ tags.push(["i", tag.id, "event"]) } + catch{} } + let r = store.state.relays.join(",") + tags.push(["relays", r]) + let res; let requestid; diff --git a/ui/noogle/src/store.js b/ui/noogle/src/store.js index 9f5d5cf..b3306c9 100644 --- a/ui/noogle/src/store.js +++ b/ui/noogle/src/store.js @@ -29,7 +29,7 @@ const store = createStore({ summarizationdvms: [], results: [], profile_results: [], - relays: ["wss://nostr.wine", "wss://relay.primal.net", + relays: ["wss://relay.primal.net", "wss://nostr.mom", "wss://nostr.oxtr.dev", "wss://relay.nostr.net", //"wss://relay.nostr.bg",