diff options
Diffstat (limited to 'synapse/storage')
-rw-r--r-- | synapse/storage/receipts.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/synapse/storage/receipts.py b/synapse/storage/receipts.py index 0ed9f45ecd..a535063547 100644 --- a/synapse/storage/receipts.py +++ b/synapse/storage/receipts.py @@ -168,13 +168,8 @@ class ReceiptsStore(SQLBaseStore): # The content is of the form: # {"$foo:bar": { "read": { "@user:host": <receipt> }, .. }, .. } - event_id = room_event["content"].setdefault( - row["event_id"], {} - ) - - receipt_type = event_id.setdefault( - row["receipt_type"], {} - ) + event_entry = room_event["content"].setdefault(row["event_id"], {}) + receipt_type = event_entry.setdefault(row["receipt_type"], {}) receipt_type[row["user_id"]] = json.loads(row["data"]) |