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

Commit

Permalink
Merge pull request #3986 from matrix-org/erikj/fix_sync_with_redacted…
Browse files Browse the repository at this point in the history
…_state

Fix lazy loaded sync with rejected state events
  • Loading branch information
erikjohnston authored Oct 2, 2018
2 parents abdc141 + 5fa27ea commit bc29946
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.d/3986.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix lazy loaded sync in the presence of rejected state events
4 changes: 2 additions & 2 deletions synapse/handlers/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,13 +567,13 @@ def compute_summary(self, room_id, sync_config, batch, state, now_token):
# be a valid name or canonical_alias - i.e. we're checking that they
# haven't been "deleted" by blatting {} over the top.
if name_id:
name = yield self.store.get_event(name_id, allow_none=False)
name = yield self.store.get_event(name_id, allow_none=True)
if name and name.content:
defer.returnValue(summary)

if canonical_alias_id:
canonical_alias = yield self.store.get_event(
canonical_alias_id, allow_none=False,
canonical_alias_id, allow_none=True,
)
if canonical_alias and canonical_alias.content:
defer.returnValue(summary)
Expand Down

0 comments on commit bc29946

Please sign in to comment.