-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
event_match key in push rule conditions does not cater for field names with dots #648
event_match key in push rule conditions does not cater for field names with dots #648
Comments
In practice, it looks like {
"m": { "foo": "bar" }
} and {
"m.foo": "bar"
} |
What will it match in the case of ambiguity? {
"m": { "foo": "bar" },
"m.foo": "baz"
} |
IT DEPENDS 🎉 depends what order python decides to go through the dictionary, which is probably ultimately determined by the order they arrive over the wire from the client. so that's fun. |
Could we just deprecate the "dot-separated" in
? |
How would you refer to match |
Well, like in your example, {
"content": { "body": "foo" }
} |
My example is of an event body, how would you refer to it in the |
Okay, I misunderstood then. In that case, and if we want to continue only matching on one key (which is probably a good idea, otherwise we'd open another can of worms), maybe we could adopt JSON pointers? That would make the implementation much more straight-forward, though we'd have to figure out the compatibility story for that. |
yeah the problem is that we could do any number of better things, but it's going to be hard to maintain compatibility. Ultimately servers are probably going to have to support either of two formats. Meanwhile it's more of a wart than a practical problem. |
Escaping would be fairly cheap to implement and it would fix the issues with dots in a prop key. |
https://matrix.org/docs/spec/client_server/r0.6.1#conditions says:
Various standard event fields (notably those in matrix-org/matrix-spec-proposals#1849) have dots in their names. It's unclear how these are handled.
The text was updated successfully, but these errors were encountered: