mirror of
https://github.com/element-hq/synapse.git
synced 2024-12-19 17:56:19 +03:00
Reduce send invite request size
This commit is contained in:
parent
c3f36414bf
commit
549e580dc9
2 changed files with 4 additions and 1 deletions
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue