diff options
author | Mark Haines <mark.haines@matrix.org> | 2015-10-01 17:53:07 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2015-10-01 17:53:07 +0100 |
commit | f31014b18f618d81cb667c2b01146b246d32760c (patch) | |
tree | cc606424425dadc127114ce4da1a300c79d3be36 /synapse/api | |
parent | Merge pull request #288 from matrix-org/markjh/unused_definitions (diff) | |
download | synapse-f31014b18f618d81cb667c2b01146b246d32760c.tar.xz |
Start updating the sync API to match the specification
Diffstat (limited to 'synapse/api')
-rw-r--r-- | synapse/api/filtering.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/api/filtering.py b/synapse/api/filtering.py index 4d570b74f8..c066ce89ef 100644 --- a/synapse/api/filtering.py +++ b/synapse/api/filtering.py @@ -54,7 +54,7 @@ class Filtering(object): ] room_level_definitions = [ - "state", "events", "ephemeral" + "state", "timeline", "ephemeral" ] for key in top_level_definitions: @@ -135,6 +135,9 @@ class Filter(object): def __init__(self, filter_json): self.filter_json = filter_json + def timeline_limit(self): + return self.filter_json.get("room", {}).get("timeline", {}).get(limit, 10) + def filter_public_user_data(self, events): return self._filter_on_key(events, ["public_user_data"]) |