summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2019-06-05 14:02:29 +0100
committerBrendan Abolivier <babolivier@matrix.org>2019-06-05 14:02:29 +0100
commit0a2f5226441936bab45ed4bc69836a008f69249a (patch)
tree3f9d01a2cace87e96266f951bf7ce60feae9dd93 /synapse
parentMerge branch 'develop' into m-heroes-empty-room-name (diff)
downloadsynapse-0a2f5226441936bab45ed4bc69836a008f69249a.tar.xz
Simplify condition
Diffstat (limited to 'synapse')
-rw-r--r--synapse/handlers/sync.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/synapse/handlers/sync.py b/synapse/handlers/sync.py
index 72997d6d04..78318aacd8 100644
--- a/synapse/handlers/sync.py
+++ b/synapse/handlers/sync.py
@@ -587,15 +587,14 @@ class SyncHandler(object):
         # for the "name" value and default to an empty string.
         if name_id:
             name = yield self.store.get_event(name_id, allow_none=True)
-            if name and name.content and name.content.get("name", ""):
+            if name and name.content.get("name", ""):
                 defer.returnValue(summary)
 
         if canonical_alias_id:
             canonical_alias = yield self.store.get_event(
                 canonical_alias_id, allow_none=True,
             )
-            if (canonical_alias and canonical_alias.content
-                    and canonical_alias.content.get("alias", "")):
+            if canonical_alias and canonical_alias.content.get("alias", ""):
                 defer.returnValue(summary)
 
         joined_user_ids = [