This commit is contained in:
Believethehype 2024-11-27 18:17:27 +01:00
parent 94b72b772d
commit 332459785f
2 changed files with 6 additions and 5 deletions

View File

@ -23,7 +23,7 @@ use_logger = True
#SYNC_DB_RELAY_LIST = ["wss://relay.momostr.pink", "wss://relay.mostr.pub/"] # , "wss://relay.snort.social"]
if use_logger:
init_logger(LogLevel.DEBUG)
init_logger(LogLevel.ERROR)
RELAY_LIST = ["wss://nostr.mom",
@ -40,7 +40,8 @@ def build_example_mostr(name, identifier, admin_config, options, image, cost=0,
# dvm_config.SHOWLOG = True
dvm_config.SCHEDULE_UPDATES_SECONDS = update_rate # Every 10 minutes
dvm_config.UPDATE_DATABASE = update_db
dvm_config.SYNC_DB_RELAY_LIST = ["wss://nfrelay.app/?user=activitypub"]
dvm_config.SYNC_DB_RELAY_LIST = ["wss://relay.mostr.pub"]
#dvm_config.SYNC_DB_RELAY_LIST = ["wss://nfrelay.app/?user=activitypub"]
dvm_config.AVOID_OUTBOX_RELAY_LIST = AVOID_OUTBOX_RELAY_LIST
dvm_config.RELAY_LIST = RELAY_LIST
dvm_config.LOGLEVEL = LogLevel.DEBUG

View File

@ -5,7 +5,7 @@ from pathlib import Path
import dotenv
from duck_chat import ModelType
from nostr_sdk import Kind, Filter, PublicKey, SecretKey, Keys, NostrSigner, RelayLimits, Options, Client, Tag, \
from nostr_sdk import Kind, Filter, PublicKey, SecretKey, Keys, NostrSigner, RelayLimits, Options, ClientBuilder, Tag, \
LogLevel, Timestamp, NostrDatabase
@ -121,8 +121,8 @@ def playground(announce=False):
relaylimits = RelayLimits.disable()
opts = Options().relay_limits(relaylimits)
cli = Client.with_opts(keys, opts)
signer = NostrSigner.keys(keys)
cli = ClientBuilder().signer(signer).opts(opts).build()
for relay in dvm.dvm_config.RELAY_LIST:
await cli.add_relay(relay)
# ropts = RelayOptions().ping(False)