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:
parent
bde8d78b8a
commit
306415391d
1 changed files with 3 additions and 1 deletions
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue