mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-18 00:01:24 +01:00
make a media section in the config file
This commit is contained in:
parent
f6b0a10e6e
commit
0a6d2b2731
4 changed files with 15 additions and 7 deletions
|
|
@ -45,6 +45,8 @@ pub(crate) struct Config {
|
|||
pub(crate) server_discovery: ServerDiscovery,
|
||||
pub(crate) database: DatabaseConfig,
|
||||
#[serde(default)]
|
||||
pub(crate) media: MediaConfig,
|
||||
#[serde(default)]
|
||||
pub(crate) federation: FederationConfig,
|
||||
#[serde(default)]
|
||||
pub(crate) cache: CacheConfig,
|
||||
|
|
@ -59,8 +61,6 @@ pub(crate) struct Config {
|
|||
pub(crate) allow_encryption: bool,
|
||||
#[serde(default = "true_fn")]
|
||||
pub(crate) allow_room_creation: bool,
|
||||
#[serde(default = "false_fn")]
|
||||
pub(crate) serve_media_unauthenticated: bool,
|
||||
#[serde(default = "default_default_room_version")]
|
||||
pub(crate) default_room_version: RoomVersionId,
|
||||
#[serde(default)]
|
||||
|
|
@ -74,6 +74,13 @@ pub(crate) struct Config {
|
|||
pub(crate) emergency_password: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Default)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub(crate) struct MediaConfig {
|
||||
#[serde(default)]
|
||||
pub(crate) serve_media_unauthenticated: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
#[serde(deny_unknown_fields, default)]
|
||||
pub(crate) struct CacheConfig {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue