matrix-org / matrix-org/matrix-spec

Unclear what filtering with empty arrays does

Open
#1,312 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

A-Client-Server clarification
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.