From c3e134c6d7e833020091dbb8741bf4fd20f079ef Mon Sep 17 00:00:00 2001 From: dbth <1097224+believethehype@users.noreply.github.com> Date: Mon, 6 Jan 2025 15:46:33 +0100 Subject: [PATCH] Update nostr_utils.py --- nostr_dvm/utils/nostr_utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nostr_dvm/utils/nostr_utils.py b/nostr_dvm/utils/nostr_utils.py index 6df0228..bc06814 100644 --- a/nostr_dvm/utils/nostr_utils.py +++ b/nostr_dvm/utils/nostr_utils.py @@ -218,6 +218,8 @@ async def send_event_outbox(event: Event, client, dvm_config) -> SendEventOutput for relay in relays[:5]: try: + if not relay.startswith("ws://") and not relay.startswith("wss://"): + raise Exception("wrong Scheme") await outboxclient.add_relay(relay) except: print("[" + dvm_config.NIP89.NAME + "] " + relay + " couldn't be added to outbox relays") @@ -238,6 +240,8 @@ async def send_event_outbox(event: Event, client, dvm_config) -> SendEventOutput return None for relay in relays: try: + if not relay.startswith("ws://") and not relay.startswith("wss://"): + raise Exception("wrong Scheme") await outboxclient.add_relay(relay) except: print("[" + dvm_config.NIP89.NAME + "] " + relay + " couldn't be added to outbox relays")