forked from MirrorHub/synapse
Insert 'age' into top level when returning events to clients
This commit is contained in:
parent
f3467d4646
commit
39585bf556
1 changed files with 1 additions and 1 deletions
|
@ -98,7 +98,7 @@ def serialize_event(hs, e):
|
|||
d = {k: v for k, v in e.get_dict().items()}
|
||||
if "age_ts" in d["unsigned"]:
|
||||
now = int(hs.get_clock().time_msec())
|
||||
d["unsigned"]["age"] = now - d["unsigned"]["age_ts"]
|
||||
d["age"] = now - d["unsigned"]["age_ts"]
|
||||
del d["unsigned"]["age_ts"]
|
||||
|
||||
d["user_id"] = d.pop("sender", None)
|
||||
|
|
Loading…
Reference in a new issue