diff --git a/lib/src/Connection.dart b/lib/src/Connection.dart index 7803660..e0ece74 100644 --- a/lib/src/Connection.dart +++ b/lib/src/Connection.dart @@ -44,10 +44,10 @@ class Connection { })); } - String get _syncFilters => - "{\"room\":{\"state\":{\"lazy_load_members\":${client.lazyLoadMembers ? "1" : "0"}}}"; - String get _firstSyncFilters => - "{\"room\":{\"include_leave\":1,\"state\":{\"lazy_load_members\":${client.lazyLoadMembers ? "1" : "0"}}}"; + String get _syncFilters => Uri.encodeFull( + "{\"room\":{\"state\":{\"lazy_load_members\":${client.lazyLoadMembers ? "1" : "0"}}}"); + String get _firstSyncFilters => Uri.encodeFull( + "{\"room\":{\"include_leave\":1,\"state\":{\"lazy_load_members\":${client.lazyLoadMembers ? "1" : "0"}}}"); /// Handles the connection to the Matrix Homeserver. You can change this to a /// MockClient for testing.