From 4021651d34d2262d5869ec54f18c06a10c064687 Mon Sep 17 00:00:00 2001 From: zappityzap Date: Sun, 24 Mar 2024 14:54:21 -0700 Subject: [PATCH] Add NIP-11 icon setting --- src/apps/relay/RelayWebsocket.cpp | 1 + src/apps/relay/golpe.yaml | 3 +++ strfry.conf | 3 +++ 3 files changed, 7 insertions(+) diff --git a/src/apps/relay/RelayWebsocket.cpp b/src/apps/relay/RelayWebsocket.cpp index ed11553..01fbbc8 100644 --- a/src/apps/relay/RelayWebsocket.cpp +++ b/src/apps/relay/RelayWebsocket.cpp @@ -62,6 +62,7 @@ void RelayServer::runWebsocket(ThreadPool::Thread &thr) { if (cfg().relay__info__description.size()) nip11["description"] = cfg().relay__info__description; if (cfg().relay__info__contact.size()) nip11["contact"] = cfg().relay__info__contact; if (cfg().relay__info__pubkey.size()) nip11["pubkey"] = cfg().relay__info__pubkey; + if (cfg().relay__info__icon.size()) nip11["icon"] = cfg().relay__info__icon; rendered = preGenerateHttpResponse("application/json", tao::json::to_string(nip11)); ver = cfg().version(); diff --git a/src/apps/relay/golpe.yaml b/src/apps/relay/golpe.yaml index e205764..9eab478 100644 --- a/src/apps/relay/golpe.yaml +++ b/src/apps/relay/golpe.yaml @@ -27,6 +27,9 @@ config: - name: relay__info__contact desc: "NIP-11: Alternative administrative contact (email, website, etc)" default: "" + - name: relay__info__icon + desc: "NIP-11: URL pointing to an image to be used as an icon for the relay" + default: "" - name: relay__maxWebsocketPayloadSize desc: "Maximum accepted incoming websocket frame size (should be larger than max event)" diff --git a/strfry.conf b/strfry.conf index e643878..b59e1ec 100644 --- a/strfry.conf +++ b/strfry.conf @@ -64,6 +64,9 @@ relay { # NIP-11: Alternative administrative contact (email, website, etc) contact = "" + + # NIP-11: URL pointing to an image to be used as an icon for the relay + icon = "" } # Maximum accepted incoming websocket frame size (should be larger than max event) (restart required)