diff --git a/static/components/relay-details/relay-details.html b/static/components/relay-details/relay-details.html
index 2deeeb5..8ea8394 100644
--- a/static/components/relay-details/relay-details.html
+++ b/static/components/relay-details/relay-details.html
@@ -68,6 +68,26 @@
+
+
Web Socket Link:
+
+
+
+
+ Copy
+
+
diff --git a/static/components/relay-details/relay-details.js b/static/components/relay-details/relay-details.js
index 21a3775..37616b9 100644
--- a/static/components/relay-details/relay-details.js
+++ b/static/components/relay-details/relay-details.js
@@ -92,6 +92,13 @@ async function relayDetails(path) {
{value: 'block', label: 'Block New Events'},
{value: 'prune', label: 'Prune Old Events'}
]
+ },
+ wssLink: function () {
+ this.relay.config.domain =
+ this.relay.config.domain || window.location.hostname
+ return (
+ 'wss://' + this.relay.config.domain + '/nostrrelay/' + this.relay.id
+ )
}
},
@@ -138,7 +145,7 @@ async function relayDetails(path) {
updateRelay: async function () {
try {
const {data} = await LNbits.api.request(
- 'PUT',
+ 'PATCH',
'/nostrrelay/api/v1/relay/' + this.relayId,
this.adminkey,
this.relay
diff --git a/static/js/index.js b/static/js/index.js
index 0845fc1..1b6d317 100644
--- a/static/js/index.js
+++ b/static/js/index.js
@@ -140,11 +140,7 @@ const relays = async () => {
'PUT',
'/nostrrelay/api/v1/relay/' + relay.id,
this.g.user.wallets[0].adminkey,
- {
- active: relay.active,
- id: relay.id,
- name: relay.name
- }
+ {}
)
} catch (error) {
LNbits.utils.notifyApiError(error)