mirror of
https://github.com/believethehype/nostrdvm.git
synced 2025-05-22 23:49:59 +02:00
mute keys, updates for noogle
This commit is contained in:
parent
565526145a
commit
be7d2280e2
@ -583,7 +583,9 @@ class DVM:
|
|||||||
for tag in original_event.tags():
|
for tag in original_event.tags():
|
||||||
if tag.as_vec()[0] == "relays":
|
if tag.as_vec()[0] == "relays":
|
||||||
relay_tag = tag
|
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:
|
if relay_tag is not None:
|
||||||
reply_tags.append(relay_tag)
|
reply_tags.append(relay_tag)
|
||||||
|
|
||||||
|
@ -136,6 +136,11 @@ class DicoverContentDBUpdateScheduler(DVMTaskInterface):
|
|||||||
|
|
||||||
await cli.connect()
|
await cli.connect()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Mute public key
|
||||||
|
await cli.mute_public_keys(self.dvm_config.MUTE)
|
||||||
|
|
||||||
timestamp_since = Timestamp.now().as_secs() - self.db_since
|
timestamp_since = Timestamp.now().as_secs() - self.db_since
|
||||||
since = Timestamp.from_secs(timestamp_since)
|
since = Timestamp.from_secs(timestamp_since)
|
||||||
|
|
||||||
|
@ -24,6 +24,13 @@ class DVMConfig:
|
|||||||
"wss://nostr.oxtr.dev",
|
"wss://nostr.oxtr.dev",
|
||||||
"wss://relay.nostr.net" , "wss://relay.primal.net"] #, "wss://relay.snort.social"]
|
"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
|
AVOID_PAID_OUTBOX_RELAY_LIST = AVOID_OUTBOX_RELAY_LIST
|
||||||
#If a DVM has a paid subscription, overwrite list without the paid one.
|
#If a DVM has a paid subscription, overwrite list without the paid one.
|
||||||
|
|
||||||
|
2
setup.py
2
setup.py
@ -1,6 +1,6 @@
|
|||||||
from setuptools import setup, find_packages
|
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'
|
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')
|
LONG_DESCRIPTION = ('A framework to build and run Nostr NIP90 Data Vending Machines. See the github repository for more information')
|
||||||
|
|
||||||
|
@ -75,7 +75,8 @@ async function generate_feed(id) {
|
|||||||
let tags = []
|
let tags = []
|
||||||
//tags.push(["param", "max_results", "200"])
|
//tags.push(["param", "max_results", "200"])
|
||||||
tags.push(["param", "user", store.state.pubkey.toHex()])
|
tags.push(["param", "user", store.state.pubkey.toHex()])
|
||||||
|
let r = store.state.relays.join(",")
|
||||||
|
tags.push(["relays", r])
|
||||||
let res;
|
let res;
|
||||||
let requestid;
|
let requestid;
|
||||||
|
|
||||||
|
@ -61,6 +61,8 @@ async function generate_image(message) {
|
|||||||
let tags = [
|
let tags = [
|
||||||
["i", message, "text"]
|
["i", message, "text"]
|
||||||
]
|
]
|
||||||
|
let r = store.state.relays.join(",")
|
||||||
|
tags.push(["relays", r])
|
||||||
|
|
||||||
hasmultipleinputs = false
|
hasmultipleinputs = false
|
||||||
if (urlinput.value !== "" && urlinput.value.startsWith('http')){
|
if (urlinput.value !== "" && urlinput.value.startsWith('http')){
|
||||||
|
@ -686,6 +686,9 @@ export default {
|
|||||||
let limits = RelayLimits.disable()
|
let limits = RelayLimits.disable()
|
||||||
let opts = new Options().waitForSend(false).connectionTimeout(Duration.fromSecs(5)).relayLimits(limits);
|
let opts = new Options().waitForSend(false).connectionTimeout(Duration.fromSecs(5)).relayLimits(limits);
|
||||||
let client = new ClientBuilder().signer(this.signer).opts(opts).build()
|
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.addRelay(relay);
|
||||||
}
|
}
|
||||||
|
@ -93,6 +93,8 @@ async function generate_feed(id) {
|
|||||||
let tags = []
|
let tags = []
|
||||||
tags.push(["param", "max_results", "200"])
|
tags.push(["param", "max_results", "200"])
|
||||||
tags.push(["param", "user", store.state.pubkey.toHex()])
|
tags.push(["param", "user", store.state.pubkey.toHex()])
|
||||||
|
let r = store.state.relays.join(",")
|
||||||
|
tags.push(["relays", r])
|
||||||
|
|
||||||
let res;
|
let res;
|
||||||
let requestid;
|
let requestid;
|
||||||
|
@ -153,6 +153,8 @@ async function send_search_request(msg) {
|
|||||||
["param", "until", ((dateto.value/1000).toFixed(0))],
|
["param", "until", ((dateto.value/1000).toFixed(0))],
|
||||||
['param', 'users', JSON.stringify(users)]
|
['param', 'users', JSON.stringify(users)]
|
||||||
]
|
]
|
||||||
|
let r = store.state.relays.join(",")
|
||||||
|
tags.push(["relays", r])
|
||||||
|
|
||||||
|
|
||||||
let tags_as_str = JSON.stringify(tags)
|
let tags_as_str = JSON.stringify(tags)
|
||||||
|
@ -59,9 +59,13 @@ let sortedIds = eventids.sort(function(a,b) {return (a.index > b.index) ? 1 : ((
|
|||||||
try{
|
try{
|
||||||
tags.push(["i", tag.id, "event"])
|
tags.push(["i", tag.id, "event"])
|
||||||
}
|
}
|
||||||
|
|
||||||
catch{}
|
catch{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let r = store.state.relays.join(",")
|
||||||
|
tags.push(["relays", r])
|
||||||
|
|
||||||
|
|
||||||
let res;
|
let res;
|
||||||
let requestid;
|
let requestid;
|
||||||
|
@ -29,7 +29,7 @@ const store = createStore({
|
|||||||
summarizationdvms: [],
|
summarizationdvms: [],
|
||||||
results: [],
|
results: [],
|
||||||
profile_results: [],
|
profile_results: [],
|
||||||
relays: ["wss://nostr.wine", "wss://relay.primal.net",
|
relays: ["wss://relay.primal.net",
|
||||||
"wss://nostr.mom", "wss://nostr.oxtr.dev",
|
"wss://nostr.mom", "wss://nostr.oxtr.dev",
|
||||||
"wss://relay.nostr.net",
|
"wss://relay.nostr.net",
|
||||||
//"wss://relay.nostr.bg",
|
//"wss://relay.nostr.bg",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user