-
-
Notifications
You must be signed in to change notification settings - Fork 595
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pushrules with Dotted Value keys break #1454
Comments
This is a feature of the spec. |
Under https://matrix.org/docs/spec/client_server/latest#conditions i only see that key is defined as a
How can the feature of the spec result in inconsistent behaviour over server (synapse) and client (matrix-js-sdk)? |
it would be a synapse bug, though would likely get redirected to the spec to be fixed via an MSC |
This doesn't sound like a Synapse bug as per https://github.com/matrix-org/matrix-doc/issues/2641#issuecomment-645275547 It sounds like a js-sdk pushprocessor.js bug if it is relating to encrypted rooms. |
Synapse is off-spec though? |
Based on https://github.com/matrix-org/matrix-doc/issues/2641 saying
I'd say neither are incorrect and the spec needs clarification/changing |
The spec is fairly clear on what to do, and the issue is categorized as a wart rather than a bug. All this means is that it needs an MSC, but until then it's something we live with. |
I wanted to configure a pushrule ignoring "m.replace" events.
Therefore i used this configuration:
But the behaviour of Synapse and the matrix-js-sdk didn't match.
The condition key
content.m.relates_to.rel_type
is interpreted in the valueDottedForKey method wrong:Actual part splitting:
['content', 'm', 'relates_to', 'rel_type']
Needed splitting:
['content', 'm.relates_to', 'rel_type']
https://github.com/matrix-org/matrix-js-sdk/blob/develop/src/pushprocessor.js#L292
Maybe the approach of just splitting by the dot is undesirable.
Synapse takes the apporach the other way around, converting the nested object to a flat object and afterwards just accessing by the key.
Pseudo:
The text was updated successfully, but these errors were encountered: