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

Commit

Permalink
Properly return the thread ID down sync. (#14159)
Browse files Browse the repository at this point in the history
Fix a broken conflict in e6e876b,
by not stomping over a field right after creating it.
  • Loading branch information
clokep committed Oct 13, 2022
1 parent 3bbe532 commit 7d59a51
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions synapse/storage/databases/main/receipts.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,10 +416,10 @@ def f(txn: LoggingTransaction) -> List[Dict[str, Any]]:
# {"$foo:bar": { "read": { "@user:host": <receipt> }, .. }, .. }
event_entry = room_event["content"].setdefault(row["event_id"], {})
receipt_type = event_entry.setdefault(row["receipt_type"], {})
if row["thread_id"]:
receipt_type[row["user_id"]]["thread_id"] = row["thread_id"]

receipt_type[row["user_id"]] = db_to_json(row["data"])
if row["thread_id"]:
receipt_type[row["user_id"]]["thread_id"] = row["thread_id"]

results = {
room_id: [results[room_id]] if room_id in results else []
Expand Down

0 comments on commit 7d59a51

Please sign in to comment.