Skip to content

Commit

Permalink
Fix compat with Synapse 1.47.0
Browse files Browse the repository at this point in the history
Valid JSON is required even if the POST body is not used by the
method.
  • Loading branch information
hifi committed Nov 22, 2021
1 parent 47cad57 commit 0f06715
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions heisenbridge/matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ def _txn(self):
return self.session + "-" + str(self.seq)

async def call(self, method, uri, data=None, content_type="application/json", retry=True):
if method == "POST" and data is None:
data = {}

async with ClientSession(
headers={"Authorization": "Bearer " + self.token}, connector=self.conn, connector_owner=False
) as session:
Expand Down

0 comments on commit 0f06715

Please sign in to comment.