Skip to content
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 push rule condition behavior for non-string values is unspecified #3082

Closed
jplatte opened this issue Mar 31, 2021 · 0 comments · Fixed by #3690
Closed

event_match push rule condition behavior for non-string values is unspecified #3082

jplatte opened this issue Mar 31, 2021 · 0 comments · Fixed by #3690
Labels
clarification An area where the spec could do with being more explicit

Comments

@jplatte
Copy link
Contributor

jplatte commented Mar 31, 2021

Link to problem area: https://matrix.org/docs/spec/client_server/r0.6.1#conditions

Issue

The event_match condition has a key parameter that allows choosing any part of an event to be matched against a glob pattern. Glob matches operate on strings, but the JSON value at key might be an array, a number, a boolean or null too (an object is impossible if matching is implemented the same way as in Synapse, i.e. by first flattening the event JSON). The spec should clarify what to do in this case. The two possibilities I see:

  • Ignore arrays; stringify numbers, booleans and nulls
  • Ignore anything that's not a string

See also:

@jplatte jplatte added the clarification An area where the spec could do with being more explicit label Mar 31, 2021
richvdh added a commit that referenced this issue Feb 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification An area where the spec could do with being more explicit
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant