Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Clean up code
Browse files Browse the repository at this point in the history
Signed-off-by: Katie Wolfe <[email protected]>
  • Loading branch information
k80w committed Apr 24, 2019
1 parent 5d3ed79 commit b3e5db4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions synapse/handlers/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,14 +587,15 @@ def compute_summary(self, room_id, sync_config, batch, state, now_token):
# 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 = [
Expand Down

0 comments on commit b3e5db4

Please sign in to comment.