diff options
author | Mark Haines <mark.haines@matrix.org> | 2015-10-05 16:39:22 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2015-10-05 16:39:36 +0100 |
commit | 471555b3a815968c4d7e41a1b99390c6a7917a21 (patch) | |
tree | 686684d102482f93a7628eec74e9ac73d8e90b96 /synapse/api | |
parent | Start updating the sync API to match the specification (diff) | |
download | synapse-471555b3a815968c4d7e41a1b99390c6a7917a21.tar.xz |
Move the rooms out into a room_map mapping from room_id to room.
Diffstat (limited to 'synapse/api')
-rw-r--r-- | synapse/api/filtering.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/synapse/api/filtering.py b/synapse/api/filtering.py index c066ce89ef..2d5431ba60 100644 --- a/synapse/api/filtering.py +++ b/synapse/api/filtering.py @@ -136,7 +136,13 @@ class Filter(object): self.filter_json = filter_json def timeline_limit(self): - return self.filter_json.get("room", {}).get("timeline", {}).get(limit, 10) + return self.filter_json.get("room", {}).get("timeline", {}).get("limit", 10) + + def presence_limit(self): + return self.filter_json.get("presence", {}).get("limit", 10) + + def ephemeral_limit(self): + return self.filter_json.get("room", {}).get("ephemeral", {}).get("limit", 10) def filter_public_user_data(self, events): return self._filter_on_key(events, ["public_user_data"]) |