You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-23 17:02:25 +03:00
Stabilize support for MSC3952: intentional mentions (#3397)
* use stable identifiers for MSC3952: intentional mentions * add matrix version to feature support for intentional mentions
This commit is contained in:
@@ -78,7 +78,7 @@ const DEFAULT_OVERRIDE_RULES: IPushRule[] = [
|
||||
conditions: [
|
||||
{
|
||||
kind: ConditionKind.EventPropertyContains,
|
||||
key: "content.org\\.matrix\\.msc3952\\.mentions.user_ids",
|
||||
key: "content.m\\.mentions.user_ids",
|
||||
value: "", // The user ID is dynamically added in rewriteDefaultRules.
|
||||
},
|
||||
],
|
||||
@@ -91,7 +91,7 @@ const DEFAULT_OVERRIDE_RULES: IPushRule[] = [
|
||||
conditions: [
|
||||
{
|
||||
kind: ConditionKind.EventPropertyIs,
|
||||
key: "content.org\\.matrix\\.msc3952\\.mentions.room",
|
||||
key: "content.m\\.mentions.room",
|
||||
value: true,
|
||||
},
|
||||
{
|
||||
@@ -724,7 +724,7 @@ export class PushProcessor {
|
||||
// Disable the deprecated mentions push rules if the new mentions property exists.
|
||||
if (
|
||||
this.client.supportsIntentionalMentions() &&
|
||||
ev.getContent()["org.matrix.msc3952.mentions"] !== undefined &&
|
||||
ev.getContent()["m.mentions"] !== undefined &&
|
||||
(rule.rule_id === RuleId.ContainsUserName ||
|
||||
rule.rule_id === RuleId.ContainsDisplayName ||
|
||||
rule.rule_id === RuleId.AtRoomNotification)
|
||||
|
||||
Reference in New Issue
Block a user