Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Synapse sends value_type field for .m.rule.is_user_mention, instead of value #15780

Closed
jplatte opened this issue Jun 14, 2023 · 2 comments · Fixed by #15781
Closed

Synapse sends value_type field for .m.rule.is_user_mention, instead of value #15780

jplatte opened this issue Jun 14, 2023 · 2 comments · Fixed by #15781
Labels
A-Spec-Compliance places where synapse does not conform to the spec O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.

Comments

@jplatte
Copy link
Contributor

jplatte commented Jun 14, 2023

Matrix discussion (internal)

Currently, the push condition for the default rule .m.rule.is_user_mention looks like this in a (sliding) sync response:

{
    "kind": "event_property_contains",
    "key": "content.m\\.mentions.user_ids",
    "value_type": "user_id"
}

That last property should be "value": <actual user ID> instead.

@jplatte
Copy link
Contributor Author

jplatte commented Jun 14, 2023

More context:

  • sync response that contained this: here (internal)
  • impact: This breaks ElementX parsing the push rules and thus degrades notifications for encrypted messages (not sure to what extent); we could implement a workaround to still parse the other push rules, or even interpret this unspecced thing

@clokep
Copy link
Member

clokep commented Jun 14, 2023

This should be being converted by the serialization code at

for type_key in ("pattern", "value"):

@MatMaul MatMaul added A-Spec-Compliance places where synapse does not conform to the spec S-Minor Blocks non-critical functionality, workarounds exist. O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. labels Jun 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Spec-Compliance places where synapse does not conform to the spec O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants