mirror of
https://github.com/vector-im/element-web.git
synced 2025-08-23 07:21:22 +02:00
Merge pull request #1473 from matrix-org/dbkr/honour_enablelabs
Honour the (now legacy) enableLabs flag
This commit is contained in:
commit
42e31ecba6
@ -36,13 +36,21 @@ export default {
|
|||||||
getLabsFeatures() {
|
getLabsFeatures() {
|
||||||
const featuresConfig = SdkConfig.get()['features'] || {};
|
const featuresConfig = SdkConfig.get()['features'] || {};
|
||||||
|
|
||||||
return FEATURES.filter((f) => {
|
// The old flag: honourned for backwards compat
|
||||||
const sdkConfigValue = featuresConfig[f.id];
|
const enableLabs = SdkConfig.get()['enableLabs'];
|
||||||
|
|
||||||
if (sdkConfigValue === 'labs') {
|
let labsFeatures;
|
||||||
return true;
|
if (enableLabs) {
|
||||||
}
|
labsFeatures = FEATURES;
|
||||||
}).map((f) => {
|
} else {
|
||||||
|
labsFeatures.filter((f) => {
|
||||||
|
const sdkConfigValue = featuresConfig[f.id];
|
||||||
|
if (sdkConfigValue === 'labs') {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return labsFeatures.map((f) => {
|
||||||
return f.id;
|
return f.id;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user