0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-23 22:04:07 +01:00

Only add the user_id if the sender is present

This commit is contained in:
Mark Haines 2015-12-01 11:14:48 +00:00
parent bde8d78b8a
commit 306415391d

View file

@ -102,7 +102,9 @@ def format_event_raw(d):
def format_event_for_client_v1(d):
d = format_event_for_client_v2(d)
d["user_id"] = d.get("sender", None)
sender = d.get("sender")
if sender is not None:
d["user_id"] = sender
copy_keys = (
"age", "redacted_because", "replaces_state", "prev_content",