diff --git a/config.toml b/config.toml index ef5f68d..6a78aba 100644 --- a/config.toml +++ b/config.toml @@ -20,6 +20,9 @@ description = "A newly created nostr-rs-relay.\n\nCustomize this with your own i # ICO format. #favicon = "favicon.ico" +# URL of Relay's icon. +#relay_icon = "https://example.test/img.png" + [diagnostics] # Enable tokio tracing (for use with tokio-console) #tracing = false diff --git a/src/config.rs b/src/config.rs index 03cc243..c5ead74 100644 --- a/src/config.rs +++ b/src/config.rs @@ -15,6 +15,7 @@ pub struct Info { pub pubkey: Option, pub contact: Option, pub favicon: Option, + pub relay_icon: Option, } #[derive(Debug, Clone, Serialize, Deserialize)] @@ -268,6 +269,7 @@ impl Default for Settings { pubkey: None, contact: None, favicon: None, + relay_icon: None, }, diagnostics: Diagnostics { tracing: false }, database: Database { diff --git a/src/info.rs b/src/info.rs index d2233ca..35f6430 100644 --- a/src/info.rs +++ b/src/info.rs @@ -45,6 +45,8 @@ pub struct RelayInfo { #[serde(skip_serializing_if = "Option::is_none")] pub contact: Option, #[serde(skip_serializing_if = "Option::is_none")] + pub icon: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub supported_nips: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub software: Option, @@ -124,6 +126,7 @@ impl From for RelayInfo { limitation: Some(limitations), payment_url, fees, + icon: i.relay_icon, } } }