Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Unbreak json parsing.
Browse files Browse the repository at this point in the history
  • Loading branch information
JorikSchellekens committed Jul 17, 2019
1 parent 51e5a12 commit 7f282d1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion synapse/handlers/devicemessage.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def send_device_message(self, sender_user_id, message_type, messages):
"message_id": message_id,
"context": json.dumps(context)
if opentracing.whitelisted_homeserver(destination)
else "",
else "{}",
}

opentracing.log_kv({"local_messages": local_messages})
Expand Down
4 changes: 2 additions & 2 deletions synapse/storage/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def _get_device_update_edus_by_remote(self, destination, from_stream_id, query_m
"stream_id": stream_id,
"context": query_map[(user_id, device_id)][1]
if opentracing.whitelisted_homeserver(destination)
else "",
else "{}",
}

prev_id = stream_id
Expand Down Expand Up @@ -839,7 +839,7 @@ def _add_device_change_txn(self, txn, user_id, device_ids, hosts, stream_id):
"ts": now,
"context": json.dumps(context)
if opentracing.whitelisted_homeserver(destination)
else "",
else "{}",
}
for destination in hosts
for device_id in device_ids
Expand Down

0 comments on commit 7f282d1

Please sign in to comment.