summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorPaul Evans <leonerd@leonerd.org.uk>2015-11-13 17:43:30 +0000
committerPaul Evans <leonerd@leonerd.org.uk>2015-11-13 17:43:30 +0000
commit1654d3b329e600a23e19a7fc108eebdc67f747c2 (patch)
tree9eb7c0f1e2d42580394e52f20ae2978c5a84457f /synapse
parentMerge pull request #374 from matrix-org/daniel/guestleave (diff)
parentDon't complain if /make_join response lacks 'prev_state' list (SYN-517) (diff)
downloadsynapse-1654d3b329e600a23e19a7fc108eebdc67f747c2.tar.xz
Merge pull request #377 from matrix-org/paul/tiny-fixes
Don't complain if /make_join response lacks 'prev_state' list (SYN-517)
Diffstat (limited to 'synapse')
-rw-r--r--synapse/federation/federation_client.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/federation/federation_client.py b/synapse/federation/federation_client.py
index d4f586fae7..c6a8c1249a 100644
--- a/synapse/federation/federation_client.py
+++ b/synapse/federation/federation_client.py
@@ -401,6 +401,12 @@ class FederationClient(FederationBase):
 
                 pdu_dict["content"].update(content)
 
+                # The protoevent received over the JSON wire may not have all
+                # the required fields. Lets just gloss over that because
+                # there's some we never care about
+                if "prev_state" not in pdu_dict:
+                    pdu_dict["prev_state"] = []
+
                 defer.returnValue(
                     (destination, self.event_from_pdu_json(pdu_dict))
                 )