mirror of
https://github.com/element-hq/synapse.git
synced 2026-08-28 09:24:41 +00:00
No need to move config
This commit is contained in:
@@ -41,7 +41,7 @@ impl VersionsHandler {
|
||||
.is_feature_enabled(user_id, PerUserExperimentalFeature::MSC3881)
|
||||
.await?
|
||||
}
|
||||
None => PerUserExperimentalFeature::MSC3881.is_globally_enabled(self.config),
|
||||
None => PerUserExperimentalFeature::MSC3881.is_globally_enabled(&self.config),
|
||||
};
|
||||
|
||||
let msc3575_enabled = match user_id {
|
||||
@@ -50,7 +50,7 @@ impl VersionsHandler {
|
||||
.is_feature_enabled(user_id, PerUserExperimentalFeature::MSC3575)
|
||||
.await?
|
||||
}
|
||||
None => PerUserExperimentalFeature::MSC3575.is_globally_enabled(self.config),
|
||||
None => PerUserExperimentalFeature::MSC3575.is_globally_enabled(&self.config),
|
||||
};
|
||||
|
||||
// TODO: Calculate these once since they shouldn't change after start-up.
|
||||
|
||||
@@ -25,7 +25,7 @@ pub enum PerUserExperimentalFeature {
|
||||
}
|
||||
|
||||
impl PerUserExperimentalFeature {
|
||||
pub fn is_globally_enabled(&self, config: SynapseConfig) -> bool {
|
||||
pub fn is_globally_enabled(&self, config: &SynapseConfig) -> bool {
|
||||
match self {
|
||||
PerUserExperimentalFeature::MSC3881 => config.experimental.msc3881_enabled,
|
||||
PerUserExperimentalFeature::MSC3575 => config.experimental.msc3575_enabled,
|
||||
|
||||
Reference in New Issue
Block a user