Reduce send invite request size

This commit is contained in:
Erik Johnston 2018-11-30 11:44:35 +00:00 committed by Brendan Abolivier
parent c3f36414bf
commit 549e580dc9
2 changed files with 4 additions and 1 deletions

View file

@ -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:

View file

@ -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