feat: restricted_writes

This commit is contained in:
Kieran 2023-11-20 10:20:15 +00:00
parent 8a67770206
commit e9edd4e786
No known key found for this signature in database
GPG Key ID: DE71CEB3925BE941

View File

@ -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 {