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

Commit

Permalink
Simplify condition
Browse files Browse the repository at this point in the history
  • Loading branch information
babolivier committed Jun 6, 2019
1 parent 0a2f522 commit 64fa928
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions synapse/handlers/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,14 +587,14 @@ 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.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.get("alias", ""):
if canonical_alias and canonical_alias.content.get("alias"):
defer.returnValue(summary)

joined_user_ids = [
Expand Down

0 comments on commit 64fa928

Please sign in to comment.