Clean up code

Signed-off-by: Katie Wolfe <katie@dnaf.moe>
pull/5089/head
Katie Wolfe 2019-04-24 12:04:16 -04:00
parent 5d3ed79944
commit b3e5db402d
No known key found for this signature in database
GPG Key ID: 59D0FF8038C71C05
1 changed files with 3 additions and 2 deletions

View File

@ -587,14 +587,15 @@ 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" in name.content and name.content.get("name", ""):
if name and name.content 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
and canonical_alias.content.get("alias", "")):
defer.returnValue(summary)
joined_user_ids = [