-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
No .m.rule.contains_user_name
rule sent to clients
#14348
Comments
AFAICT from the spec, this rule is supposed to show up under the global/content. This doesn't look promising:
|
On 1.68.0, this snippet synapse/synapse/push/clientformat.py Lines 42 to 43 in 5442891
sets
Not a regression then? |
We return synapse/synapse/push/clientformat.py Lines 97 to 98 in 5442891
rule.conditions[0] is {'kind': 'event_match', 'key': 'content.body', 'pattern_type': 'user_localpart'} .
|
There is code here to account for this, but it happens after we've already decided the template_rule is synapse/synapse/push/clientformat.py Lines 58 to 71 in 5442891
Would guess this was broken in #13522, so a regression in 1.66. |
@erikjohnston I think you're best-placed to look at this when you're back. I don't fully grok the templaterule machinery here so wouldn't want to attempt a fix without your insight, at the very least. |
Dirty fix for matrix-org#14348 A proper fix would have proper tests and factor out the pattern_type cases as well as clean up the logic. Signed-off-by: Nicolas Werner <[email protected]>
I made a temporary fix in #14356. It is more of a bodge though, so you might want to fix it properly instead. |
Description
When I curl
/_matrix/client/v3/pushrules/
it doesn't return the.m.rule.contains_user_name
rule. This means clients don't properly highlight those messages. It also isn't present in the pseudo account data eventSteps to reproduce
/_matrix/client/v3/pushrules/
and grep for user_name.Homeserver
nheko.im, neko.dev, ocean.joedonofry.com
Synapse Version
1.71rc1, 1.69.0
Installation Method
Other (please mention below)
Platform
Docker, custom ebuild, etc
Relevant log output
Anything else that would be useful to know?
The rule is present in https://github.com/matrix-org/synapse/blob/2d0ba3f89aaf9545d81c4027500e543ec70b68a6/rust/src/push/base_rules.rs, which would suggest it is formatted. The formatting should happen here: https://github.com/matrix-org/synapse/blob/99a7e7e0230cba5d00ec204926edae89d4b6b8c3/synapse/push/clientformat.py
I have no idea yet, where it goes poof.
The text was updated successfully, but these errors were encountered: