1 files changed, 5 insertions, 2 deletions
diff --git a/synapse/http/matrixfederationclient.py b/synapse/http/matrixfederationclient.py
index 776ed43f03..c63d068f74 100644
--- a/synapse/http/matrixfederationclient.py
+++ b/synapse/http/matrixfederationclient.py
@@ -731,8 +731,11 @@ class MatrixFederationHttpClient:
Returns:
A list of headers to be added as "Authorization:" headers
"""
- if destination is None and destination_is is None:
- raise ValueError("destination and destination_is cannot both be None!")
+ if not destination and not destination_is:
+ raise ValueError(
+ "At least one of the arguments destination and destination_is "
+ "must be a nonempty bytestring."
+ )
request: JsonDict = {
"method": method.decode("ascii"),
|