From 752fad2e3c98214cb9c1984d7c0446d6bdc5112a Mon Sep 17 00:00:00 2001 From: Vlad Stan Date: Thu, 23 Feb 2023 11:58:56 +0200 Subject: [PATCH] fix: allow `ws://` relays --- templates/nostrclient/index.html | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/templates/nostrclient/index.html b/templates/nostrclient/index.html index 1edaed9..79ec7ed 100644 --- a/templates/nostrclient/index.html +++ b/templates/nostrclient/index.html @@ -73,6 +73,7 @@ icon="cancel" color="pink" > + {% endraw %} @@ -203,14 +204,17 @@ }) }, addRelay() { - if (!this.relayToAdd.startsWith("wss://")) { - this.relayToAdd = "" + if ( + !this.relayToAdd.startsWith('wss://') && + !this.relayToAdd.startsWith('ws://') + ) { + this.relayToAdd = '' this.$q.notify({ - timeout: 5000, - type: 'warning', - message: `Invalid relay URL.`, - caption: "Should start with wss://" - }) + timeout: 5000, + type: 'warning', + message: `Invalid relay URL.`, + caption: "Should start with 'wss://'' or 'ws://'" + }) return } console.log("ADD RELAY " + this.relayToAdd)