matrix-org / matrix-org/matrix-spec

Negation in filters

Open
#231 0 comments 0 reactions 0 assignees View on GitHub
A-Client-Server enhancement
Dominant language
HTML
Stars
330
Forks
150
Avg merge
2h 21m
Merged PRs (30d)
3

Description

I feel like the `foobar` and `no_foobar` idiom used in the filters is quite inelegant. As there is already a special character involved in the patterns (`*`) I propose to introduce a second one `^` which could be prepended to a string to negate it. I was first thinking about the `!` character but it would clash with room ids, `^` seems the second logical one to me because of it's use in regex character-class negation (we could also consider `-` or `~`).

reference: [filter spec](https://matrix.org/docs/spec/client_server/r0.2.0.html#post-matrix-client-r0-user-userid-filter)

Contributor guide

Open the contributing guide

Research direction

Start with the linked Matrix filter specification and review how filter patterns currently define the foobar and no_foobar idiom. Clarify the negation character and its semantics, then update the specification so the supported syntax and examples are unambiguous.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.