Skip to content

Commit

Permalink
Add use_float=true to ijson calls in Synapse (matrix-org#11217)
Browse files Browse the repository at this point in the history
* add use_float=true to ijson calls

* lints

* add changelog

* Update changelog.d/11217.bugfix

Co-authored-by: Sean Quah <[email protected]>

Co-authored-by: Sean Quah <[email protected]>
  • Loading branch information
H-Shay and squahtx authored Nov 1, 2021
1 parent caa706d commit e81fa92
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.d/11217.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a bug introduced in 1.35.0 which made it impossible to join rooms that return a `send_join` response containing floats.
3 changes: 3 additions & 0 deletions synapse/federation/transport/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1310,14 +1310,17 @@ def __init__(self, room_version: RoomVersion, v1_api: bool):
self._coro_state = ijson.items_coro(
_event_list_parser(room_version, self._response.state),
prefix + "state.item",
use_float=True,
)
self._coro_auth = ijson.items_coro(
_event_list_parser(room_version, self._response.auth_events),
prefix + "auth_chain.item",
use_float=True,
)
self._coro_event = ijson.kvitems_coro(
_event_parser(self._response.event_dict),
prefix + "org.matrix.msc3083.v2.event",
use_float=True,
)

def write(self, data: bytes) -> int:
Expand Down

0 comments on commit e81fa92

Please sign in to comment.