Add NIP-11 icon setting

This commit is contained in:
zappityzap
2024-03-24 14:54:21 -07:00
parent c0dec7c53f
commit 4021651d34
3 changed files with 7 additions and 0 deletions

View File

@ -62,6 +62,7 @@ void RelayServer::runWebsocket(ThreadPool<MsgWebsocket>::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();

View File

@ -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)"

View File

@ -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)