pass feature flag to js-sdk

pull/21833/head
Bruno Windels 2019-05-14 15:41:55 +01:00
parent 45991bc3de
commit 0b18ff52c5
3 changed files with 4 additions and 2 deletions

View File

@ -176,6 +176,7 @@ class MatrixClientPeg {
_createClient(creds: MatrixClientCreds) {
const aggregateRelations = SettingsStore.isFeatureEnabled("feature_reactions");
const enableEdits = SettingsStore.isFeatureEnabled("feature_message_editing");
const opts = {
baseUrl: creds.homeserverUrl,
@ -187,6 +188,7 @@ class MatrixClientPeg {
forceTURN: !SettingsStore.getValue('webRtcAllowPeerToPeer', false),
verificationMethods: [verificationMethods.SAS],
unstableClientRelationAggregation: aggregateRelations,
unstableClientRelationReplacements: enableEdits,
};
this.matrixClient = createMatrixClient(opts);

View File

@ -300,7 +300,7 @@
"Show recent room avatars above the room list": "Show recent room avatars above the room list",
"Group & filter rooms by custom tags (refresh to apply changes)": "Group & filter rooms by custom tags (refresh to apply changes)",
"Render simple counters in room header": "Render simple counters in room header",
"Edit messages after they have been sent": "Edit messages after they have been sent",
"Edit messages after they have been sent (refresh to apply changes)": "Edit messages after they have been sent (refresh to apply changes)",
"React to messages with emoji (refresh to apply changes)": "React to messages with emoji (refresh to apply changes)",
"Enable Emoji suggestions while typing": "Enable Emoji suggestions while typing",
"Use compact timeline layout": "Use compact timeline layout",

View File

@ -120,7 +120,7 @@ export const SETTINGS = {
},
"feature_message_editing": {
isFeature: true,
displayName: _td("Edit messages after they have been sent"),
displayName: _td("Edit messages after they have been sent (refresh to apply changes)"),
supportedLevels: LEVELS_FEATURE,
default: false,
},