summary refs log tree commit diff
path: root/synapse/handlers/account_data.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2019-06-26 22:34:41 +0100
committerRichard van der Hoff <richard@matrix.org>2019-06-26 22:34:41 +0100
commita4daa899ec4cd195fc10936f68df5c78314b366c (patch)
tree35e88ff388b0f7652773a79930b732aa04f16bde /synapse/handlers/account_data.py
parentchangelog (diff)
parentImprove docs on choosing server_name (#5558) (diff)
downloadsynapse-a4daa899ec4cd195fc10936f68df5c78314b366c.tar.xz
Merge branch 'develop' into rav/saml2_client
Diffstat (limited to 'synapse/handlers/account_data.py')
-rw-r--r--synapse/handlers/account_data.py23
1 files changed, 8 insertions, 15 deletions
diff --git a/synapse/handlers/account_data.py b/synapse/handlers/account_data.py
index 7fa5d44d29..e62e6cab77 100644
--- a/synapse/handlers/account_data.py
+++ b/synapse/handlers/account_data.py
@@ -20,7 +20,7 @@ class AccountDataEventSource(object):
     def __init__(self, hs):
         self.store = hs.get_datastore()
 
-    def get_current_key(self, direction='f'):
+    def get_current_key(self, direction="f"):
         return self.store.get_max_account_data_stream_id()
 
     @defer.inlineCallbacks
@@ -34,29 +34,22 @@ class AccountDataEventSource(object):
         tags = yield self.store.get_updated_tags(user_id, last_stream_id)
 
         for room_id, room_tags in tags.items():
-            results.append({
-                "type": "m.tag",
-                "content": {"tags": room_tags},
-                "room_id": room_id,
-            })
+            results.append(
+                {"type": "m.tag", "content": {"tags": room_tags}, "room_id": room_id}
+            )
 
         account_data, room_account_data = (
             yield self.store.get_updated_account_data_for_user(user_id, last_stream_id)
         )
 
         for account_data_type, content in account_data.items():
-            results.append({
-                "type": account_data_type,
-                "content": content,
-            })
+            results.append({"type": account_data_type, "content": content})
 
         for room_id, account_data in room_account_data.items():
             for account_data_type, content in account_data.items():
-                results.append({
-                    "type": account_data_type,
-                    "content": content,
-                    "room_id": room_id,
-                })
+                results.append(
+                    {"type": account_data_type, "content": content, "room_id": room_id}
+                )
 
         defer.returnValue((results, current_stream_id))