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

Commit e6e876b

Browse files
committed
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 87099b6 commit e6e876b

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
@@ -416,6 +416,8 @@ def f(txn: LoggingTransaction) -> List[Dict[str, Any]]:
416416
# {"$foo:bar": { "read": { "@user:host": <receipt> }, .. }, .. }
417417
event_entry = room_event["content"].setdefault(row["event_id"], {})
418418
receipt_type = event_entry.setdefault(row["receipt_type"], {})
419+
if row["thread_id"]:
420+
receipt_type[row["user_id"]]["thread_id"] = row["thread_id"]
419421

420422
receipt_type[row["user_id"]] = db_to_json(row["data"])
421423

0 commit comments

Comments
 (0)