mirror of
https://github.com/scsibug/nostr-rs-relay.git
synced 2024-06-02 18:14:08 -04:00
feat: restricted_writes
This commit is contained in:
parent
8a67770206
commit
e9edd4e786
|
@ -13,6 +13,9 @@ pub const UNIT: &str = "msats";
|
|||
pub struct Limitation {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
payment_required: Option<bool>,
|
||||
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
restricted_writes: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
|
@ -75,6 +78,7 @@ impl From<Settings> for RelayInfo {
|
|||
|
||||
let limitations = Limitation {
|
||||
payment_required: Some(p.enabled),
|
||||
restricted_writes: Some(p.enabled || c.verified_users.is_enabled() || c.authorization.pubkey_whitelist.is_some()),
|
||||
};
|
||||
|
||||
let (payment_url, fees) = if p.enabled {
|
||||
|
|
Loading…
Reference in New Issue
Block a user