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

Commit 4a7cd9d

Browse files
authored
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.
1 parent 6b922c9 commit 4a7cd9d

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

changelog.d/14159.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Support for thread-specific notifications & receipts ([MSC3771](https://github.com/matrix-org/matrix-spec-proposals/pull/3771) and [MSC3773](https://github.com/matrix-org/matrix-spec-proposals/pull/3773)).

synapse/storage/databases/main/receipts.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,8 @@ def f(txn: LoggingTransaction) -> List[Dict[str, Any]]:
418418
receipt_type = event_entry.setdefault(row["receipt_type"], {})
419419

420420
receipt_type[row["user_id"]] = db_to_json(row["data"])
421+
if row["thread_id"]:
422+
receipt_type[row["user_id"]]["thread_id"] = row["thread_id"]
421423

422424
results = {
423425
room_id: [results[room_id]] if room_id in results else []

0 commit comments

Comments
 (0)