mute keys, updates for noogle

This commit is contained in:
Believethehype 2024-09-05 16:57:25 +02:00
parent 565526145a
commit be7d2280e2
11 changed files with 33 additions and 5 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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.

View File

@ -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')

View File

@ -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;

View File

@ -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')){

View File

@ -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();

View File

@ -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;

View File

@ -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)

View File

@ -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;

View File

@ -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",