Default intentional mentions (#11602)

* Default intentional mentions

* wait for autocomplete to settle before submitting edit

* lint

* Update strings

---------

Co-authored-by: Kerry Archibald <kerrya@element.io>
This commit is contained in:
Johannes Marbach 2023-09-14 13:36:15 +02:00 committed by GitHub
parent 237038aa56
commit 3608d52c4a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 282 additions and 349 deletions

View file

@ -90,10 +90,9 @@ export function attachMentions(
replyToEvent: MatrixEvent | undefined,
editedContent: IContent | null = null,
): void {
// If this feature is disabled, do nothing.
if (!SettingsStore.getValue("feature_intentional_mentions")) {
return;
}
// We always attach the mentions even if the home server doesn't yet support
// intentional mentions. This is safe because m.mentions is an additive change
// that should simply be ignored by incapable home servers.
// The mentions property *always* gets included to disable legacy push rules.
const mentions: IMentions = (content["m.mentions"] = {});

View file

@ -1151,7 +1151,6 @@
"voice_broadcast": "Voice broadcast",
"rust_crypto": "Rust cryptography implementation",
"hidebold": "Hide notification dot (only display counters badges)",
"intentional_mentions": "Enable intentional mentions",
"ask_to_join": "Enable ask to join",
"new_room_decoration_ui": "New room header & details interface",
"beta_feature": "This is a beta feature",

View file

@ -531,20 +531,6 @@ export const SETTINGS: { [setting: string]: ISetting } = {
labsGroup: LabGroup.Rooms,
default: false,
},
// MSC3952 intentional mentions support.
"feature_intentional_mentions": {
isFeature: true,
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS_WITH_CONFIG,
displayName: _td("labs|intentional_mentions"),
labsGroup: LabGroup.Rooms,
default: false,
controller: new ServerSupportUnstableFeatureController(
"feature_intentional_mentions",
defaultWatchManager,
[["org.matrix.msc3952_intentional_mentions"]],
"v1.7",
),
},
"feature_ask_to_join": {
default: false,
displayName: _td("labs|ask_to_join"),