Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit e81fa92

Browse files
H-Shaysquahtx
andauthored
Add use_float=true to ijson calls in Synapse (#11217)
* add use_float=true to ijson calls * lints * add changelog * Update changelog.d/11217.bugfix Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com> Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com>
1 parent caa706d commit e81fa92

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

changelog.d/11217.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix a bug introduced in 1.35.0 which made it impossible to join rooms that return a `send_join` response containing floats.

synapse/federation/transport/client.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1310,14 +1310,17 @@ def __init__(self, room_version: RoomVersion, v1_api: bool):
13101310
self._coro_state = ijson.items_coro(
13111311
_event_list_parser(room_version, self._response.state),
13121312
prefix + "state.item",
1313+
use_float=True,
13131314
)
13141315
self._coro_auth = ijson.items_coro(
13151316
_event_list_parser(room_version, self._response.auth_events),
13161317
prefix + "auth_chain.item",
1318+
use_float=True,
13171319
)
13181320
self._coro_event = ijson.kvitems_coro(
13191321
_event_parser(self._response.event_dict),
13201322
prefix + "org.matrix.msc3083.v2.event",
1323+
use_float=True,
13211324
)
13221325

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

0 commit comments

Comments
 (0)