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

Commit

Permalink
Return the thread ID properly down sync. (#14159)
Browse files Browse the repository at this point in the history
A receipt's thread ID, if one exists, should be added to the
body of a receipt.
  • Loading branch information
clokep authored Oct 12, 2022
1 parent 6b922c9 commit 4a7cd9d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.d/14159.feature
Original file line number Diff line number Diff line change
@@ -0,0 +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)).
2 changes: 2 additions & 0 deletions synapse/storage/databases/main/receipts.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,8 @@ def f(txn: LoggingTransaction) -> List[Dict[str, Any]]:
receipt_type = event_entry.setdefault(row["receipt_type"], {})

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 []
Expand Down

0 comments on commit 4a7cd9d

Please sign in to comment.