diff options
Diffstat (limited to 'src/http/nip11.rs')
| -rw-r--r-- | src/http/nip11.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/http/nip11.rs b/src/http/nip11.rs index ecb9769..e6a1e46 100644 --- a/src/http/nip11.rs +++ b/src/http/nip11.rs | |||
| @@ -57,9 +57,9 @@ impl RelayInformationDocument { | |||
| 57 | /// Create NIP-11 relay information document from configuration | 57 | /// Create NIP-11 relay information document from configuration |
| 58 | pub fn from_config(config: &Config) -> Self { | 58 | pub fn from_config(config: &Config) -> Self { |
| 59 | Self { | 59 | Self { |
| 60 | name: config.relay_name.clone(), | 60 | name: config.relay_name(), |
| 61 | description: config.relay_description.clone(), | 61 | description: config.relay_description.clone(), |
| 62 | pubkey: Some(config.owner_npub.clone()), | 62 | pubkey: config.owner_npub.clone(), |
| 63 | contact: None, // Could be added to config if needed | 63 | contact: None, // Could be added to config if needed |
| 64 | supported_nips: vec![ | 64 | supported_nips: vec![ |
| 65 | 1, // NIP-01: Basic protocol flow | 65 | 1, // NIP-01: Basic protocol flow |
| @@ -98,8 +98,8 @@ mod tests { | |||
| 98 | fn test_relay_information_document_structure() { | 98 | fn test_relay_information_document_structure() { |
| 99 | let config = Config { | 99 | let config = Config { |
| 100 | domain: "relay.example.com".to_string(), | 100 | domain: "relay.example.com".to_string(), |
| 101 | owner_npub: "npub1test".to_string(), | 101 | owner_npub: Some("npub1test".to_string()), |
| 102 | relay_name: "Test Relay".to_string(), | 102 | relay_name_override: Some("Test Relay".to_string()), |
| 103 | relay_description: "A test relay".to_string(), | 103 | relay_description: "A test relay".to_string(), |
| 104 | git_data_path: "./data/git".to_string(), | 104 | git_data_path: "./data/git".to_string(), |
| 105 | relay_data_path: "./data/relay".to_string(), | 105 | relay_data_path: "./data/relay".to_string(), |
| @@ -128,8 +128,8 @@ mod tests { | |||
| 128 | fn test_relay_information_document_json() { | 128 | fn test_relay_information_document_json() { |
| 129 | let config = Config { | 129 | let config = Config { |
| 130 | domain: "relay.example.com".to_string(), | 130 | domain: "relay.example.com".to_string(), |
| 131 | owner_npub: "npub1test".to_string(), | 131 | owner_npub: Some("npub1test".to_string()), |
| 132 | relay_name: "Test Relay".to_string(), | 132 | relay_name_override: Some("Test Relay".to_string()), |
| 133 | relay_description: "A test relay".to_string(), | 133 | relay_description: "A test relay".to_string(), |
| 134 | git_data_path: "./data/git".to_string(), | 134 | git_data_path: "./data/git".to_string(), |
| 135 | relay_data_path: "./data/relay".to_string(), | 135 | relay_data_path: "./data/relay".to_string(), |