From 0d07d5a350b889f3e0462cbe0574b9627e596d5c Mon Sep 17 00:00:00 2001 From: Believethehype <1097224+believethehype@users.noreply.github.com> Date: Sun, 16 Jun 2024 08:25:12 +0200 Subject: [PATCH] Update nostr_utils.py --- nostr_dvm/utils/nostr_utils.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nostr_dvm/utils/nostr_utils.py b/nostr_dvm/utils/nostr_utils.py index 913b007..f93ca64 100644 --- a/nostr_dvm/utils/nostr_utils.py +++ b/nostr_dvm/utils/nostr_utils.py @@ -166,8 +166,9 @@ async def send_event_outbox(event: Event, client, dvm_config) -> EventId: # 4. If we don't find inbox relays (e.g. because the user didn't announce them, we just send to our default relays if len(relays) == 0: print("[" + dvm_config.NIP89.NAME + "] No Inbox found, replying to generic relays") - eventid = await send_event(event, client, dvm_config) - return eventid + relays = dvm_config.RELAY_LIST + #eventid = await send_event(event, client, dvm_config) + #return eventid # 5. Otherwise, we create a new Outbox client with the inbox relays and send the event there relaylimits = RelayLimits.disable() @@ -188,16 +189,15 @@ async def send_event_outbox(event: Event, client, dvm_config) -> EventId: print("[" + dvm_config.NIP89.NAME + "] " + relay + " couldn't be added to outbox relays") await outboxclient.connect() - try: - event_id = await outboxclient.send_event(event) - except: - event_id = await send_event(event, client, dvm_config) + event_id = await outboxclient.send_event(event) await outboxclient.shutdown() return event_id + + async def send_event(event: Event, client: Client, dvm_config, blastr=False) -> EventId: try: relays = []