diff options
author | Erik Johnston <erik@matrix.org> | 2018-11-30 11:44:35 +0000 |
---|---|---|
committer | Brendan Abolivier <babolivier@matrix.org> | 2019-02-13 15:16:05 +0000 |
commit | 549e580dc9d5bb25fd7a54a49cd50293a1855fe0 (patch) | |
tree | fbf5ccbae5d9bfa0f53d6f385e95784dc0a2ed8c | |
parent | Update proxy (diff) | |
download | synapse-549e580dc9d5bb25fd7a54a49cd50293a1855fe0.tar.xz |
Reduce send invite request size
-rw-r--r-- | synapse/federation/federation_client.py | 3 | ||||
-rw-r--r-- | synapse/handlers/federation.py | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/synapse/federation/federation_client.py b/synapse/federation/federation_client.py index db2c050b3c..14e4b2ae69 100644 --- a/synapse/federation/federation_client.py +++ b/synapse/federation/federation_client.py @@ -39,6 +39,7 @@ from synapse.util.caches.expiringcache import ExpiringCache from synapse.util.logcontext import make_deferred_yieldable, run_in_background from synapse.util.logutils import log_function from synapse.util.retryutils import NotRetryingDestination +from synapse.federation.units import _mangle_pdu logger = logging.getLogger(__name__) @@ -712,7 +713,7 @@ class FederationClient(FederationBase): destination=destination, room_id=room_id, event_id=event_id, - content=pdu.get_pdu_json(time_now), + content=_mangle_pdu(pdu.get_pdu_json(time_now)), ) except HttpResponseException as e: if e.code == 403: diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index 5d8e6c71d8..230a57a872 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -1420,6 +1420,8 @@ class FederationHandler(BaseHandler): sender, target, event.room_id, ) + FrozenEvent.from_event(event) + event.unsigned.pop("invite_room_state", None) defer.returnValue(event) @defer.inlineCallbacks |