diff options
author | Erik Johnston <erik@matrix.org> | 2019-01-23 17:27:49 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2019-01-23 17:27:49 +0000 |
commit | 2a8edbaf74eec2e73634c40ecd9f1faa79b472c2 (patch) | |
tree | 00211aef7f4d7f5799b2104ed9d30ba05df635bf /synapse/federation/federation_base.py | |
parent | Merge branch 'erikj/msc_1813' into erikj/require_format_version (diff) | |
parent | Newsfile (diff) | |
download | synapse-2a8edbaf74eec2e73634c40ecd9f1faa79b472c2.tar.xz |
Merge branch 'erikj/get_pdu_versions' into erikj/require_format_version
Diffstat (limited to 'synapse/federation/federation_base.py')
-rw-r--r-- | synapse/federation/federation_base.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/synapse/federation/federation_base.py b/synapse/federation/federation_base.py index b7ad729c63..d749bfdd3a 100644 --- a/synapse/federation/federation_base.py +++ b/synapse/federation/federation_base.py @@ -43,8 +43,8 @@ class FederationBase(object): self._clock = hs.get_clock() @defer.inlineCallbacks - def _check_sigs_and_hash_and_fetch(self, origin, pdus, outlier=False, - include_none=False): + def _check_sigs_and_hash_and_fetch(self, origin, pdus, room_version, + outlier=False, include_none=False): """Takes a list of PDUs and checks the signatures and hashs of each one. If a PDU fails its signature check then we check if we have it in the database and if not then request if from the originating server of @@ -56,8 +56,12 @@ class FederationBase(object): a new list. Args: + origin (str) pdu (list) - outlier (bool) + room_version (str) + outlier (bool): Whether the events are outliers or not + include_none (str): Whether to include None in the returned list + for events that have failed their checks Returns: Deferred : A list of PDUs that have valid signatures and hashes. @@ -84,6 +88,7 @@ class FederationBase(object): res = yield self.get_pdu( destinations=[pdu.origin], event_id=pdu.event_id, + room_version=room_version, outlier=outlier, timeout=10000, ) |