diff options
author | Eric Eastwood <erice@element.io> | 2022-02-04 15:27:01 -0600 |
---|---|---|
committer | Eric Eastwood <erice@element.io> | 2022-02-04 15:27:01 -0600 |
commit | 47590bb19e87d626c94f9529eda6cda6c2359bec (patch) | |
tree | 5577c9470f41b4b85346178af584610ea95b75c6 /synapse/http/matrixfederationclient.py | |
parent | Merge branch 'develop' into madlittlemods/return-historical-events-in-order-f... (diff) | |
parent | Clarify that users' media are also preview images (#11862) (diff) | |
download | synapse-47590bb19e87d626c94f9529eda6cda6c2359bec.tar.xz |
Merge branch 'develop' into madlittlemods/return-historical-events-in-order-from-backfill
Diffstat (limited to 'synapse/http/matrixfederationclient.py')
-rw-r--r-- | synapse/http/matrixfederationclient.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/synapse/http/matrixfederationclient.py b/synapse/http/matrixfederationclient.py index deedde0b5b..2e668363b2 100644 --- a/synapse/http/matrixfederationclient.py +++ b/synapse/http/matrixfederationclient.py @@ -123,37 +123,37 @@ class ByteParser(ByteWriteable, Generic[T], abc.ABC): pass -@attr.s(slots=True, frozen=True) +@attr.s(slots=True, frozen=True, auto_attribs=True) class MatrixFederationRequest: - method = attr.ib(type=str) + method: str """HTTP method """ - path = attr.ib(type=str) + path: str """HTTP path """ - destination = attr.ib(type=str) + destination: str """The remote server to send the HTTP request to. """ - json = attr.ib(default=None, type=Optional[JsonDict]) + json: Optional[JsonDict] = None """JSON to send in the body. """ - json_callback = attr.ib(default=None, type=Optional[Callable[[], JsonDict]]) + json_callback: Optional[Callable[[], JsonDict]] = None """A callback to generate the JSON. """ - query = attr.ib(default=None, type=Optional[dict]) + query: Optional[dict] = None """Query arguments. """ - txn_id = attr.ib(default=None, type=Optional[str]) + txn_id: Optional[str] = None """Unique ID for this request (for logging) """ - uri = attr.ib(init=False, type=bytes) + uri: bytes = attr.ib(init=False) """The URI of this request """ |