Start updating the sync API to match the specification

This commit is contained in:
Mark Haines 2015-10-01 17:53:07 +01:00
parent 301141515a
commit f31014b18f
3 changed files with 54 additions and 90 deletions

View file

@ -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"])