Properly return the thread ID down sync. (#14159)

Fix a broken conflict in e6e876b9b1,
by not stomping over a field right after creating it.
This commit is contained in:
Patrick Cloke 2022-10-13 12:15:41 -04:00
parent 3bbe532abb
commit 7d59a515bb
1 changed files with 2 additions and 2 deletions

View File

@ -416,10 +416,10 @@ class ReceiptsWorkerStore(SQLBaseStore):
# {"$foo:bar": { "read": { "@user:host": <receipt> }, .. }, .. } # {"$foo:bar": { "read": { "@user:host": <receipt> }, .. }, .. }
event_entry = room_event["content"].setdefault(row["event_id"], {}) event_entry = room_event["content"].setdefault(row["event_id"], {})
receipt_type = event_entry.setdefault(row["receipt_type"], {}) 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"]) 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 = { results = {
room_id: [results[room_id]] if room_id in results else [] room_id: [results[room_id]] if room_id in results else []