matrix-org / matrix-org/matrix-spec
Unclear what filtering with empty arrays does
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 330
- Forks
- 150
- Avg merge
- 2h 21m
- Merged PRs (30d)
- 3
Description
**Link to problem area**: https://spec.matrix.org/v1.4/client-server-api/#_matrixclientv3useruseridfilter_eventfilter
**Issue**
It is unclear what providing an empty array for e.g. `types` or `not_types` would do. Is that treated as not providing the field (empirically this is what happens)?
According to tulir the proper way to filter out all event types is: `{"not_types": ["*"]}`
See https://matrix.to/#/!NasysSDfxKxZBzJJoE:matrix.org/$q-MFBajP8Lvnxs7r1u_AyfGtUf7spu86BUVFuhqTHXM?via=matrix.org&via=libera.chat&via=element.io.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Matrix v1.4 client-server API section for the user filter and inspect the definitions of `types` and `not_types`, including their empty-array examples. Confirm the intended behavior and update the specification so empty arrays and the `*` exclusion form are described unambiguously.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- json
- Domain
- api, documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100