From e96929de007967a479febcb636b507d08703d3c5 Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Tue, 2 Jul 2019 09:58:29 +0200 Subject: [PATCH] Add URI encoding --- lib/src/Connection.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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.