]> Untitled Git - lemmy.git/blobdiff - server/src/settings.rs
Merge branch 'dev' into federation
[lemmy.git] / server / src / settings.rs
index 6e5667cb2ee7fbc56a9a8394c3aedae18f07efa9..8c3cd6a1251d035b7220a43f5e7440e266220767 100644 (file)
@@ -20,7 +20,7 @@ pub struct Settings {
   pub front_end_dir: String,
   pub rate_limit: RateLimitConfig,
   pub email: Option<EmailConfig>,
-  pub federation_enabled: bool,
+  pub federation: Federation,
 }
 
 #[derive(Debug, Deserialize, Clone)]
@@ -60,6 +60,13 @@ pub struct Database {
   pub pool_size: u32,
 }
 
+#[derive(Debug, Deserialize)]
+pub struct Federation {
+  pub enabled: bool,
+  pub followed_instances: String,
+  pub tls_enabled: bool,
+}
+
 lazy_static! {
   static ref SETTINGS: RwLock<Settings> = RwLock::new(match Settings::init() {
     Ok(c) => c,