diff options
author | Mark Haines <mark.haines@matrix.org> | 2015-12-01 18:41:32 +0000 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2015-12-01 18:41:32 +0000 |
commit | 95f30ecd1f90cd143c908589b600742148491c15 (patch) | |
tree | 8752ad58e1eae5963adc83093111a096cb76cf7f /synapse/rest/client/v2_alpha/sync.py | |
parent | Merge pull request #400 from matrix-org/daniel/versioning (diff) | |
download | synapse-95f30ecd1f90cd143c908589b600742148491c15.tar.xz |
Add API for setting account_data globaly or on a per room basis
Diffstat (limited to 'synapse/rest/client/v2_alpha/sync.py')
-rw-r--r-- | synapse/rest/client/v2_alpha/sync.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/rest/client/v2_alpha/sync.py b/synapse/rest/client/v2_alpha/sync.py index 09693bb435..4efe802487 100644 --- a/synapse/rest/client/v2_alpha/sync.py +++ b/synapse/rest/client/v2_alpha/sync.py @@ -144,6 +144,9 @@ class SyncRestServlet(RestServlet): ) response_content = { + "account_data": self.encode_account_data( + sync_result.account_data, filter, time_now + ), "presence": self.encode_presence( sync_result.presence, filter, time_now ), @@ -165,6 +168,9 @@ class SyncRestServlet(RestServlet): formatted.append(event) return {"events": filter.filter_presence(formatted)} + def encode_account_data(self, events, filter, time_now): + return {"events": filter.filter_account_data(events)} + def encode_joined(self, rooms, filter, time_now, token_id): """ Encode the joined rooms in a sync result |