summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2018-10-02 11:38:35 +0200
committerGitHub <noreply@github.com>2018-10-02 11:38:35 +0200
commitbc29946809b29f2437212c7dd46974abdc269d3d (patch)
treef52158cfe1fa90edc4b907e1bb08525e2868c37c
parentUpdate instructions to point to pip install (#3985) (diff)
parentNewsfile (diff)
downloadsynapse-bc29946809b29f2437212c7dd46974abdc269d3d.tar.xz
Merge pull request #3986 from matrix-org/erikj/fix_sync_with_redacted_state
Fix lazy loaded sync with rejected state events
-rw-r--r--changelog.d/3986.bugfix1
-rw-r--r--synapse/handlers/sync.py4
2 files changed, 3 insertions, 2 deletions
diff --git a/changelog.d/3986.bugfix b/changelog.d/3986.bugfix
new file mode 100644
index 0000000000..ce74345365
--- /dev/null
+++ b/changelog.d/3986.bugfix
@@ -0,0 +1 @@
+Fix lazy loaded sync in the presence of rejected state events
diff --git a/synapse/handlers/sync.py b/synapse/handlers/sync.py
index c7d69d9d80..67b8ca28c7 100644
--- a/synapse/handlers/sync.py
+++ b/synapse/handlers/sync.py
@@ -567,13 +567,13 @@ class SyncHandler(object):
         # 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)