diff options
-rw-r--r-- | synapse/federation/units.py | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/synapse/federation/units.py b/synapse/federation/units.py index bfd07e6615..6b329f26b4 100644 --- a/synapse/federation/units.py +++ b/synapse/federation/units.py @@ -77,14 +77,13 @@ class Transaction(JsonEncodedObject): internal_keys = [ "transaction_id", + "origin", "destination", + "origin_server_ts", + "previous_ids", ] required_keys = [ - "transaction_id", - "origin", - "destination", - "origin_server_ts", "pdus", ] @@ -108,15 +107,6 @@ class Transaction(JsonEncodedObject): """ Used to create a new transaction. Will auto fill out transaction_id and origin_server_ts keys. """ - if "origin_server_ts" not in kwargs: - raise KeyError( - "Require 'origin_server_ts' to construct a Transaction" - ) - if "transaction_id" not in kwargs: - raise KeyError( - "Require 'transaction_id' to construct a Transaction" - ) - kwargs["pdus"] = [ _mangle_pdu(p.get_pdu_json()) for p in pdus |