diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2022-10-04 09:47:04 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-04 09:47:04 -0400 |
commit | b4ec4f5e71a87d5bdc840a4220dfd9a34c54c847 (patch) | |
tree | 813816778b687a4635a412db3e8c3f79fe4fcf6a /synapse/rest/client/sync.py | |
parent | Bump isort from 5.7.0 to 5.10.1 (#13988) (diff) | |
download | synapse-b4ec4f5e71a87d5bdc840a4220dfd9a34c54c847.tar.xz |
Track notification counts per thread (implement MSC3773). (#13776)
When retrieving counts of notifications segment the results based on the thread ID, but choose whether to return them as individual threads or as a single summed field by letting the client opt-in via a sync flag. The summarization code is also updated to be per thread, instead of per room.
Diffstat (limited to 'synapse/rest/client/sync.py')
-rw-r--r-- | synapse/rest/client/sync.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/rest/client/sync.py b/synapse/rest/client/sync.py index c2989765ce..f1c23d68e5 100644 --- a/synapse/rest/client/sync.py +++ b/synapse/rest/client/sync.py @@ -509,6 +509,10 @@ class SyncRestServlet(RestServlet): ephemeral_events = room.ephemeral result["ephemeral"] = {"events": ephemeral_events} result["unread_notifications"] = room.unread_notifications + if room.unread_thread_notifications: + result[ + "org.matrix.msc3773.unread_thread_notifications" + ] = room.unread_thread_notifications result["summary"] = room.summary if self._msc2654_enabled: result["org.matrix.msc2654.unread_count"] = room.unread_count |