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"] = {});