Skip to content

Commit

Permalink
Merge pull request #246 from matrix-org/markjh/room_filter
Browse files Browse the repository at this point in the history
Add top level filters for filtering by room id.
  • Loading branch information
NegativeMjark committed Dec 23, 2015
2 parents c9ecfa7 + 4c43939 commit f648360
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
6 changes: 3 additions & 3 deletions api/client-server/definitions/event_filter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ properties:
not_senders:
description: A list of sender IDs to exclude. If this list is absent then no senders
are excluded. A matching sender will be excluded even if it is listed in the
'senders' filter.
``'senders'`` filter.
items:
type: string
type: array
not_types:
description: A list of event types to exclude. If this list is absent then no
event types are excluded. A matching type will be excluded even if it is listed
in the 'types' filter. A '*' can be used as a wildcard to match any sequence
in the ``'types'`` filter. A '*' can be used as a wildcard to match any sequence
of characters.
items:
type: string
Expand All @@ -25,7 +25,7 @@ properties:
type: array
types:
description: A list of event types to include. If this list is absent then all
event types are included. A '*' can be used as a wildcard to match any sequence
event types are included. A ``'*'`` can be used as a wildcard to match any sequence
of characters.
items:
type: string
Expand Down
2 changes: 1 addition & 1 deletion api/client-server/definitions/room_event_filter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ allOf:
properties:
not_rooms:
description: A list of room IDs to exclude. If this list is absent then no rooms
are excluded. A matching room will be excluded even if it is listed in the 'rooms'
are excluded. A matching room will be excluded even if it is listed in the ``'rooms'``
filter.
items:
type: string
Expand Down
15 changes: 15 additions & 0 deletions api/client-server/definitions/sync_filter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,21 @@ properties:
description: The user account data that isn't associated with rooms to include.
room:
properties:
not_rooms:
description: A list of room IDs to exclude. If this list is absent then no rooms
are excluded. A matching room will be excluded even if it is listed in the ``'rooms'``
filter. This filter is applied before the filters in ``ephemeral``,
``state``, ``timeline`` or ``account_data``
items:
type: string
type: array
rooms:
description: A list of room IDs to include. If this list is absent then all rooms
are included. This filter is applied before the filters in ``ephemeral``,
``state``, ``timeline`` or ``account_data``
items:
type: string
type: array
ephemeral:
allOf:
- $ref: room_event_filter.yaml
Expand Down

0 comments on commit f648360

Please sign in to comment.