|
|
|
@ -13,7 +13,7 @@ use ts_rs::TS;
|
|
|
|
|
use typed_builder::TypedBuilder;
|
|
|
|
|
|
|
|
|
|
#[skip_serializing_none]
|
|
|
|
|
#[derive(PartialEq, Eq, Debug, Clone, Serialize, Deserialize)]
|
|
|
|
|
#[derive(PartialEq, Eq, Debug, Clone, Serialize, Deserialize, Default)]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(Queryable, Identifiable, TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", diesel(table_name = local_site))]
|
|
|
|
|
#[cfg_attr(feature = "full", diesel(belongs_to(crate::source::site::Site)))]
|
|
|
|
@ -60,6 +60,9 @@ pub struct LocalSite {
|
|
|
|
|
pub registration_mode: RegistrationMode,
|
|
|
|
|
/// Whether to email admins on new reports.
|
|
|
|
|
pub reports_email_admins: bool,
|
|
|
|
|
/// Whether to sign outgoing Activitypub fetches with private key of local instance. Some
|
|
|
|
|
/// Fediverse instances and platforms require this.
|
|
|
|
|
pub federation_signed_fetch: bool,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[derive(Clone, TypedBuilder)]
|
|
|
|
@ -88,6 +91,7 @@ pub struct LocalSiteInsertForm {
|
|
|
|
|
pub captcha_difficulty: Option<String>,
|
|
|
|
|
pub registration_mode: Option<RegistrationMode>,
|
|
|
|
|
pub reports_email_admins: Option<bool>,
|
|
|
|
|
pub federation_signed_fetch: Option<bool>,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[derive(Clone, Default)]
|
|
|
|
@ -114,4 +118,5 @@ pub struct LocalSiteUpdateForm {
|
|
|
|
|
pub registration_mode: Option<RegistrationMode>,
|
|
|
|
|
pub reports_email_admins: Option<bool>,
|
|
|
|
|
pub updated: Option<Option<DateTime<Utc>>>,
|
|
|
|
|
pub federation_signed_fetch: Option<bool>,
|
|
|
|
|
}
|
|
|
|
|