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

Commit d35ee33

Browse files
committed
Return thread receipts down sync.
1 parent 8b6d839 commit d35ee33

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

synapse/storage/databases/main/receipts.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,7 @@ def f(txn: LoggingTransaction) -> List[Dict[str, Any]]:
411411
"_get_linearized_receipts_for_rooms", f
412412
)
413413

414+
# Map of room ID to a dictionary in the form that sync wants it.
414415
results: JsonDict = {}
415416
for row in txn_results:
416417
# We want a single event per room, since we want to batch the
@@ -426,6 +427,8 @@ def f(txn: LoggingTransaction) -> List[Dict[str, Any]]:
426427
receipt_type = event_entry.setdefault(row["receipt_type"], {})
427428

428429
receipt_type[row["user_id"]] = db_to_json(row["data"])
430+
if row["thread_id"]:
431+
receipt_type[row["user_id"]]["thread_id"] = row["thread_id"]
429432

430433
results = {
431434
room_id: [results[room_id]] if room_id in results else []

0 commit comments

Comments
 (0)