From dde7110c0dd91752b5891d217408e4513d2c2a31 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Thu, 29 Nov 2018 11:49:38 +0000 Subject: [PATCH] Reduce transaction response size --- synapse/federation/federation_server.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/synapse/federation/federation_server.py b/synapse/federation/federation_server.py index 1d25b7c479..5d4dc6370c 100644 --- a/synapse/federation/federation_server.py +++ b/synapse/federation/federation_server.py @@ -672,7 +672,10 @@ class FederationServer(FederationBase): span=span, ) - defer.returnValue({"did_not_relay": list(dont_relay)}) + ret = {} + if dont_relay: + ret = {"did_not_relay": list(dont_relay)} + defer.returnValue(ret) def __str__(self): return "" % self.server_name