mirror of
https://github.com/scsibug/nostr-rs-relay.git
synced 2024-11-22 17:19:07 -05:00
feat: replace email with contact field in relay info.
This finalizes the NIP-11 spec implementation. Fixes https://todo.sr.ht/~gheartsfield/nostr-rs-relay/21.
This commit is contained in:
parent
c7eadb1154
commit
030b64de62
|
@ -13,8 +13,8 @@ description = "A newly created nostr-rs-relay.\n\nCustomize this with your own i
|
||||||
# Administrative contact pubkey
|
# Administrative contact pubkey
|
||||||
#pubkey = "0c2d168a4ae8ca58c9f1ab237b5df682599c6c7ab74307ea8b05684b60405d41"
|
#pubkey = "0c2d168a4ae8ca58c9f1ab237b5df682599c6c7ab74307ea8b05684b60405d41"
|
||||||
|
|
||||||
# Administrative contact email
|
# Administrative contact URI
|
||||||
#email = "contact@example.com"
|
#contact = "mailto:contact@example.com"
|
||||||
|
|
||||||
[database]
|
[database]
|
||||||
# Directory for SQLite files. Defaults to the current directory. Can
|
# Directory for SQLite files. Defaults to the current directory. Can
|
||||||
|
|
|
@ -15,7 +15,7 @@ pub struct Info {
|
||||||
pub name: Option<String>,
|
pub name: Option<String>,
|
||||||
pub description: Option<String>,
|
pub description: Option<String>,
|
||||||
pub pubkey: Option<String>,
|
pub pubkey: Option<String>,
|
||||||
pub email: Option<String>,
|
pub contact: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Serialize, Deserialize)]
|
#[derive(Debug, Serialize, Deserialize)]
|
||||||
|
@ -105,7 +105,7 @@ impl Default for Settings {
|
||||||
name: Some("Unnamed nostr-rs-relay".to_owned()),
|
name: Some("Unnamed nostr-rs-relay".to_owned()),
|
||||||
description: None,
|
description: None,
|
||||||
pubkey: None,
|
pubkey: None,
|
||||||
email: None,
|
contact: None,
|
||||||
},
|
},
|
||||||
database: Database {
|
database: Database {
|
||||||
data_directory: ".".to_owned(),
|
data_directory: ".".to_owned(),
|
||||||
|
|
|
@ -16,7 +16,7 @@ pub struct RelayInfo {
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub pubkey: Option<String>,
|
pub pubkey: Option<String>,
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub email: Option<String>,
|
pub contact: Option<String>,
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub supported_nips: Option<Vec<i64>>,
|
pub supported_nips: Option<Vec<i64>>,
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
@ -33,7 +33,7 @@ impl From<config::Info> for RelayInfo {
|
||||||
name: i.name,
|
name: i.name,
|
||||||
description: i.description,
|
description: i.description,
|
||||||
pubkey: i.pubkey,
|
pubkey: i.pubkey,
|
||||||
email: i.email,
|
contact: i.contact,
|
||||||
supported_nips: Some(vec![1]),
|
supported_nips: Some(vec![1]),
|
||||||
software: Some("https://git.sr.ht/~gheartsfield/nostr-rs-relay".to_owned()),
|
software: Some("https://git.sr.ht/~gheartsfield/nostr-rs-relay".to_owned()),
|
||||||
version: CARGO_PKG_VERSION.map(|x| x.to_owned()),
|
version: CARGO_PKG_VERSION.map(|x| x.to_owned()),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user