diff options
Diffstat (limited to 'src/nostr/policy')
| -rw-r--r-- | src/nostr/policy/mod.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nostr/policy/mod.rs b/src/nostr/policy/mod.rs index dc023a9..1566b6c 100644 --- a/src/nostr/policy/mod.rs +++ b/src/nostr/policy/mod.rs | |||
| @@ -32,6 +32,8 @@ pub struct PolicyContext { | |||
| 32 | pub purgatory: Arc<Purgatory>, | 32 | pub purgatory: Arc<Purgatory>, |
| 33 | /// Local relay for notifying WebSocket subscribers (set after relay creation) | 33 | /// Local relay for notifying WebSocket subscribers (set after relay creation) |
| 34 | pub local_relay: Arc<std::sync::RwLock<Option<LocalRelay>>>, | 34 | pub local_relay: Arc<std::sync::RwLock<Option<LocalRelay>>>, |
| 35 | /// Configuration reference for policy settings (includes blacklists) | ||
| 36 | pub config: crate::config::Config, | ||
| 35 | } | 37 | } |
| 36 | 38 | ||
| 37 | impl PolicyContext { | 39 | impl PolicyContext { |
| @@ -40,6 +42,7 @@ impl PolicyContext { | |||
| 40 | database: SharedDatabase, | 42 | database: SharedDatabase, |
| 41 | git_data_path: impl Into<std::path::PathBuf>, | 43 | git_data_path: impl Into<std::path::PathBuf>, |
| 42 | purgatory: Arc<Purgatory>, | 44 | purgatory: Arc<Purgatory>, |
| 45 | config: crate::config::Config, | ||
| 43 | ) -> Self { | 46 | ) -> Self { |
| 44 | Self { | 47 | Self { |
| 45 | domain: domain.into(), | 48 | domain: domain.into(), |
| @@ -47,6 +50,7 @@ impl PolicyContext { | |||
| 47 | git_data_path: git_data_path.into(), | 50 | git_data_path: git_data_path.into(), |
| 48 | purgatory, | 51 | purgatory, |
| 49 | local_relay: Arc::new(std::sync::RwLock::new(None)), | 52 | local_relay: Arc::new(std::sync::RwLock::new(None)), |
| 53 | config, | ||
| 50 | } | 54 | } |
| 51 | } | 55 | } |
| 52 | 56 | ||