nostr-rs-relay

My dev fork of nostr-rs-relay
git clone git://jb55.com/nostr-rs-relay
Log | Files | Refs | README | LICENSE

commit 030b64de6295e9dcf972bfe4fe1599fa8fe9f86e
parent c7eadb1154afc7cec64fbfd89bea7c651366cea3
Author: Greg Heartsfield <scsibug@imap.cc>
Date:   Sun, 16 Jan 2022 08:34:19 -0600

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.

Diffstat:
Mconfig.toml | 4++--
Msrc/config.rs | 4++--
Msrc/info.rs | 4++--
3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/config.toml b/config.toml @@ -13,8 +13,8 @@ description = "A newly created nostr-rs-relay.\n\nCustomize this with your own i # Administrative contact pubkey #pubkey = "0c2d168a4ae8ca58c9f1ab237b5df682599c6c7ab74307ea8b05684b60405d41" -# Administrative contact email -#email = "contact@example.com" +# Administrative contact URI +#contact = "mailto:contact@example.com" [database] # Directory for SQLite files. Defaults to the current directory. Can diff --git a/src/config.rs b/src/config.rs @@ -15,7 +15,7 @@ pub struct Info { pub name: Option<String>, pub description: Option<String>, pub pubkey: Option<String>, - pub email: Option<String>, + pub contact: Option<String>, } #[derive(Debug, Serialize, Deserialize)] @@ -105,7 +105,7 @@ impl Default for Settings { name: Some("Unnamed nostr-rs-relay".to_owned()), description: None, pubkey: None, - email: None, + contact: None, }, database: Database { data_directory: ".".to_owned(), diff --git a/src/info.rs b/src/info.rs @@ -16,7 +16,7 @@ pub struct RelayInfo { #[serde(skip_serializing_if = "Option::is_none")] pub pubkey: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] - pub email: Option<String>, + pub contact: Option<String>, #[serde(skip_serializing_if = "Option::is_none")] pub supported_nips: Option<Vec<i64>>, #[serde(skip_serializing_if = "Option::is_none")] @@ -33,7 +33,7 @@ impl From<config::Info> for RelayInfo { name: i.name, description: i.description, pubkey: i.pubkey, - email: i.email, + contact: i.contact, supported_nips: Some(vec![1]), software: Some("https://git.sr.ht/~gheartsfield/nostr-rs-relay".to_owned()), version: CARGO_PKG_VERSION.map(|x| x.to_owned()),