mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 23:54:51 -04:00
Start updating the sync API to match the specification
This commit is contained in:
parent
301141515a
commit
f31014b18f
3 changed files with 54 additions and 90 deletions
|
@ -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"])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue