mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-05-02 16:34:48 -04:00
Start implementing the non-incremental sync portion of the v2 /sync API
This commit is contained in:
parent
3186c5bdbc
commit
436513068d
4 changed files with 145 additions and 53 deletions
|
@ -89,7 +89,7 @@ def prune_event(event):
|
|||
return type(event)(allowed_fields)
|
||||
|
||||
|
||||
def serialize_event(e, time_now_ms, client_event=True):
|
||||
def serialize_event(e, time_now_ms, client_event=True, strip_ids=False):
|
||||
# FIXME(erikj): To handle the case of presence events and the like
|
||||
if not isinstance(e, EventBase):
|
||||
return e
|
||||
|
@ -138,4 +138,8 @@ def serialize_event(e, time_now_ms, client_event=True):
|
|||
d.pop("unsigned", None)
|
||||
d.pop("origin", None)
|
||||
|
||||
if strip_ids:
|
||||
d.pop("room_id", None)
|
||||
d.pop("event_id", None)
|
||||
|
||||
return d
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue