also remove main relays after send

This commit is contained in:
Believethehype 2024-11-13 08:15:34 +01:00
parent 53c37f73dc
commit c62c5d1687
3 changed files with 8 additions and 2 deletions

View File

@ -251,6 +251,11 @@ async def send_event_outbox(event: Event, client, dvm_config) -> EventId:
try:
await outboxclient.connect()
event_id = await outboxclient.send_event(event)
for relay in relays:
try:
await outboxclient.force_remove_relay(relay)
except:
print("Error removing relay: " + relay)
except Exception as e:
# Love yourself then.
event_id = None

View File

@ -65,6 +65,7 @@ AVOID_OUTBOX_RELAY_LIST = ["wss://nos.lol",
"wss://momostr.pink", "wss://nostr.bitcoinlighthouse.de", "wss://140.f7z.io",
"wss://relay.nostrcheck.me", "wss://relay.mostr.pub", "wss://purplepag.es",
"wss://nostr.bitcoiner.social", "wss://relay.galtsgulch.cc",
"ws://oxtrdevav64z64yb7x6rjg4ntzqjhedm5b5zjqulugknhzr46ny2qbad.onion"
"ws://oxtrdevav64z64yb7x6rjg4ntzqjhedm5b5zjqulugknhzr46ny2qbad.onion",
"wss://relay.f7z.io"
]

View File

@ -104,7 +104,7 @@ def playground(announce=False):
keys = Keys.parse(sk.to_hex())
relaylimits = RelayLimits.disable()
opts = (Options().relay_limits(relaylimits))
opts = Options().relay_limits(relaylimits)
cli = Client.with_opts(keys, opts)
for relay in dvm.dvm_config.RELAY_LIST: