mirror of
https://github.com/believethehype/nostrdvm.git
synced 2025-10-05 19:42:31 +02:00
Update nostr_utils.py
This commit is contained in:
@@ -181,7 +181,7 @@ async def send_event_outbox(event: Event, client, dvm_config) -> EventId:
|
|||||||
print("[" + dvm_config.NIP89.NAME + "] Receiver Inbox relays: " + str(relays))
|
print("[" + dvm_config.NIP89.NAME + "] Receiver Inbox relays: " + str(relays))
|
||||||
|
|
||||||
for relay in relays:
|
for relay in relays:
|
||||||
opts = RelayOptions().ping(True)
|
opts = RelayOptions().ping(False)
|
||||||
try:
|
try:
|
||||||
await outboxclient.add_relay_with_opts(relay, opts)
|
await outboxclient.add_relay_with_opts(relay, opts)
|
||||||
except:
|
except:
|
||||||
@@ -205,7 +205,13 @@ async def send_event(event: Event, client: Client, dvm_config, blastr=False) ->
|
|||||||
if tag.as_vec()[0] == 'relays':
|
if tag.as_vec()[0] == 'relays':
|
||||||
for index, param in enumerate(tag.as_vec()):
|
for index, param in enumerate(tag.as_vec()):
|
||||||
if index != 0:
|
if index != 0:
|
||||||
|
if tag.as_vec()[index].rstrip("/") not in dvm_config.AVOID_PAID_OUTBOX_RELAY_LIST:
|
||||||
|
try:
|
||||||
relays.append(tag.as_vec()[index])
|
relays.append(tag.as_vec()[index])
|
||||||
|
except:
|
||||||
|
print("[" + dvm_config.NIP89.NAME + "] " + tag.as_vec()[
|
||||||
|
index] + " couldn't be added to outbox relays")
|
||||||
|
break
|
||||||
|
|
||||||
for relay in relays:
|
for relay in relays:
|
||||||
if relay not in dvm_config.RELAY_LIST:
|
if relay not in dvm_config.RELAY_LIST:
|
||||||
|
Reference in New Issue
Block a user