summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorPatrick Cloke <patrickc@matrix.org>2022-10-12 12:18:34 -0400
committerPatrick Cloke <patrickc@matrix.org>2022-10-12 12:18:34 -0400
commite6e876b9b158f47811b6dfedd8783f658ce960a4 (patch)
tree17b44cba6d922747f61b6e6d815b20757e58204a /synapse
parentReturn the main timeline for events which are not part of a thread. (#14140) (diff)
downloadsynapse-e6e876b9b158f47811b6dfedd8783f658ce960a4.tar.xz
Return the thread ID properly down sync. (#14159)
A receipt's thread ID, if one exists, should be added to the
body of a receipt.
Diffstat (limited to 'synapse')
-rw-r--r--synapse/storage/databases/main/receipts.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/synapse/storage/databases/main/receipts.py b/synapse/storage/databases/main/receipts.py
index 246f78ac1f..b04026c21b 100644
--- a/synapse/storage/databases/main/receipts.py
+++ b/synapse/storage/databases/main/receipts.py
@@ -416,6 +416,8 @@ 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"])