0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-14 18:03:53 +01:00

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

View file

@ -416,10 +416,10 @@ class ReceiptsWorkerStore(SQLBaseStore):
# {"$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 []